Torus: Difference between revisions

From Monnier Group Research Wiki
Jump to navigationJump to search
New page: TORUS is a three-dimensional radiative transfer code which uses an adaptive mesh refinement scheme and a Monte-Carlo method to solve for the radiative equilibrium, hydrostatic equilibrium,...
 
No edit summary
Line 1: Line 1:
TORUS is a three-dimensional radiative transfer code which uses an adaptive mesh refinement scheme and a Monte-Carlo method to solve for the radiative equilibrium, hydrostatic equilibrium, and dust sublimation in circumstellar discs around both low and high-mass pre-main-sequence stars. TORUS is either an acronym for Transport of Radiation Under Sobolev, or Transport of Radiation Using Stokes.
=Preface=


TORUS is a three-dimensional radiative transfer code which uses an adaptive mesh refinement scheme and a Monte-Carlo method to solve for the radiative equilibrium, hydrostatic equilibrium, and dust sublimation in circumstellar discs around both low and high-mass pre-main-sequence stars. TORUS is either an acronym for Transport of Radiation Under Sobolev, or Transport of Radiation Using Stokes.


Much of this is covered in detail on the TORUS wiki at Exeter, [http://wiki.astro.ex.ac.uk/bin/view/TorusWeb/WebHome TorusWeb]. To gain access to that resource, you must make an account; if you have SVN access to the TORUS distribution, that username/password should also work for the wiki (I think..). Here, I will discuss TORUS from an example-driven perspective.


I will be adding to this page in the coming days to give a basic overview of how TORUS performs its calculations, how to use the code, and examples of plotting/displaying the code's output images and SEDs.
 
=Physics modules in TORUS=
 
radeq: perform a radiative equilibrium calculation
 
stateq
 
photoionphysics
 
radiationhydro
 
hydro
 
dustphysics: use dust microphysics
 
==AMR grid==
 
amrgridsize
 
amrgridcentre[x/y]
 
amr2d
 
maxdepthamr
 
The volume of the smallest grid cell (your finest resolution in the grid) is:
 
Vol = (grid size / 2^(maxdepthamr))^3
So, for a grid 2000 AU across (1000 AU, radially speaking) and a max cell depth of 20, the smallest cell is 0.0019 AU to a side.
 
Here is a sample AMR mesh setup:
 
<nowiki>! AMR grid parameters
 
readgrid F           ! we aren't reading a grid, we will set one up from scratch
 
! inputfile grid_out.dat  ! if we did read in a grid, this is how to call it
 
writegrid T            ! write the grid to file (this includes the grid cells, and the EOS in each cell)
 
outputfile grid_out.dat    ! name of the output grid
 
amrgridsize 2.0e6          ! units of 10^10cm (here, I've made grid a little bigger than disk itself- the outermost cells will be huge and empty)
 
amrgridcentrex 1.0e6      ! the linear size of the top-level AMR mesh in units of 10^10 cm. This is useful if you use multiple sources
 
amr2d T                  ! this is a 2d (cylindical) model
 
maxdepthamr 22            ! capping the AMR mesh depth helps TORUS to converge faster, saves some CPU. Set this based on how fine a resolution you need in final model.</nowiki>
 
==TORUS output==
 
Once your TORUS model has reached the criteria for convergence (more on this later), the final grid is written to a temporary output file, and then TORUS will calculate SEDs, images, and/or line profiles by sending however many photons you specify through the converged grid. If you don't calculate the SEDs/images/line profiles while running TORUS, fear not; change the lucy_grid_tmp.dat file to a different name and use it as an input to TORUS, turning off all the other physics modules. In this way, you can 'hot start' TORUS and calculate output data without re-running your model.
 
===Sample output calls===
 
====SEDs====
 
<nowiki>nphotons 100000    ! the number of photon packets in SED
 
! Output SEDs
 
spectrum T  ! produce a spectrum
 
! SED parameters
 
ninc 2              ! number of inclinations
 
firstinc 1.0        ! the first inclination (degrees)
 
lastinc 48.0        ! the last inclination (degrees)
 
filename MWC275      ! the root of the output filename
 
sised T              ! Write spectrum as lambda vs F lambda in SI units
 
sedlammin 0.12      ! minimum wavelength in SED file
 
sedlammax 2000      ! maximum wavelength in SED file
 
sedwavlin F          ! Linear spacing in SED file?
 
sednumlam 1000     ! number of wavelength points in SED
</nowiki>
The comments make this fairly self-explanatory, but a note- you must set nphotons for an SED or an image. In general, the SEDs need fewer photons than the images to get decent signal to noise (in the SED, divide the total number of photons by the number of wavelength points). I've found 50,000 photons or more for the SEDs works well. Also, if you don't specify sednumlam, the default is 200 wavelength points, and that can produce a jagged, noisy SED.
 
====Images====
 
<nowiki>nphotons 10000000    ! the number of photon packets in image
 
image T    ! produce images
 
nimage 4    ! how many images?
 
imageaxisunits AU
 
imagesize 20  ! Size of your image across each side in AU. divide this by your npixels to get desired AU/pixel resolution.
 
imagefile1 kband_20AU.fits  ! name of first image file
 
lambdaimage1 21590.     ! monochromatic wavelength in Angstroms
 
npixels1 256                ! number of pixels. I generally don't adjust this (the more pixels, the more photons you need)
 
inclination1 0              ! inclination of the system; if unknown, try a few different values in multiple images
 
imagetype1 dustonly     ! choose freefree, forbidden, recombination, or dustonly
 
imagefile2 nband_1_20AU.fits
 
lambdaimage2 77000 ! 7.7
 
npixels2 256
 
inclination2 0
 
imagetype2 dustonly
 
imagefile3 nband_2_20AU.fits
 
lambdaimage3 99000 ! 9.9um
 
npixels3 256
 
inclination3 0
 
imagetype3 dustonly
 
imagefile4 nband_3_20AU.fits
 
lambdaimage4 126000 ! 12.6um
 
npixels4 256
 
inclination4 0
 
imagetype4 dustonly
 
</nowiki>
====Line profiles====
 
To calculate line profiles, you must run the TORUS model with the comoving frame option enabled.
 
<nowiki>cmf T     ! comoving frame (vs sobolev approx)</nowiki>
 
also, specify the atomic physics option and its parameters:
 
<nowiki>atomicphysics T      ! Include atomic physics
natom 1              ! One model atom
atom1 H.atm          ! Hydrogen
xabundance 1.0      ! Pure hydrogen
yabundance 0.        ! no helium
 
vturb 20.            ! microturbulence in km/s
 
TORUS will output a velocity space data cube per your input parameters:
 
! output a datacube
 
datacube T                    ! produce a fits datacube
inclination 1.          ! viewing angle
positionangle 0.          ! position angle
datacubefile cmf_i1_ha.fits  ! title of fits output
imageside 1500.            ! size of image in 10^10cm
npixels 200              ! number of pixels
nv 200                    ! number of velocity bins
maxVel 800.d0            ! -800 to +800 km/s
distance 140.            ! distance to object in pc
lamline 6563.           ! wavelength in Angstroms</nowiki>
 
----
 
The nitty-gritty: parameters
 
==Disk geometries==
 
These are the input options for the geometry parameter:
benchmark A Pascucci benchmark disk
shakara
ttauri

Revision as of 16:24, 24 April 2012

Preface

TORUS is a three-dimensional radiative transfer code which uses an adaptive mesh refinement scheme and a Monte-Carlo method to solve for the radiative equilibrium, hydrostatic equilibrium, and dust sublimation in circumstellar discs around both low and high-mass pre-main-sequence stars. TORUS is either an acronym for Transport of Radiation Under Sobolev, or Transport of Radiation Using Stokes.

Much of this is covered in detail on the TORUS wiki at Exeter, TorusWeb. To gain access to that resource, you must make an account; if you have SVN access to the TORUS distribution, that username/password should also work for the wiki (I think..). Here, I will discuss TORUS from an example-driven perspective.


Physics modules in TORUS

radeq: perform a radiative equilibrium calculation

stateq

photoionphysics

radiationhydro

hydro

dustphysics: use dust microphysics

AMR grid

amrgridsize

amrgridcentre[x/y]

amr2d

maxdepthamr

The volume of the smallest grid cell (your finest resolution in the grid) is:

Vol = (grid size / 2^(maxdepthamr))^3 So, for a grid 2000 AU across (1000 AU, radially speaking) and a max cell depth of 20, the smallest cell is 0.0019 AU to a side.

Here is a sample AMR mesh setup:

! AMR grid parameters readgrid F  ! we aren't reading a grid, we will set one up from scratch ! inputfile grid_out.dat  ! if we did read in a grid, this is how to call it writegrid T  ! write the grid to file (this includes the grid cells, and the EOS in each cell) outputfile grid_out.dat  ! name of the output grid amrgridsize 2.0e6  ! units of 10^10cm (here, I've made grid a little bigger than disk itself- the outermost cells will be huge and empty) amrgridcentrex 1.0e6  ! the linear size of the top-level AMR mesh in units of 10^10 cm. This is useful if you use multiple sources amr2d T  ! this is a 2d (cylindical) model maxdepthamr 22  ! capping the AMR mesh depth helps TORUS to converge faster, saves some CPU. Set this based on how fine a resolution you need in final model.

TORUS output

Once your TORUS model has reached the criteria for convergence (more on this later), the final grid is written to a temporary output file, and then TORUS will calculate SEDs, images, and/or line profiles by sending however many photons you specify through the converged grid. If you don't calculate the SEDs/images/line profiles while running TORUS, fear not; change the lucy_grid_tmp.dat file to a different name and use it as an input to TORUS, turning off all the other physics modules. In this way, you can 'hot start' TORUS and calculate output data without re-running your model.

Sample output calls

SEDs

nphotons 100000  ! the number of photon packets in SED ! Output SEDs spectrum T  ! produce a spectrum ! SED parameters ninc 2  ! number of inclinations firstinc 1.0  ! the first inclination (degrees) lastinc 48.0  ! the last inclination (degrees) filename MWC275  ! the root of the output filename sised T  ! Write spectrum as lambda vs F lambda in SI units sedlammin 0.12  ! minimum wavelength in SED file sedlammax 2000  ! maximum wavelength in SED file sedwavlin F  ! Linear spacing in SED file? sednumlam 1000  ! number of wavelength points in SED The comments make this fairly self-explanatory, but a note- you must set nphotons for an SED or an image. In general, the SEDs need fewer photons than the images to get decent signal to noise (in the SED, divide the total number of photons by the number of wavelength points). I've found 50,000 photons or more for the SEDs works well. Also, if you don't specify sednumlam, the default is 200 wavelength points, and that can produce a jagged, noisy SED.

Images

nphotons 10000000  ! the number of photon packets in image image T  ! produce images nimage 4  ! how many images? imageaxisunits AU imagesize 20  ! Size of your image across each side in AU. divide this by your npixels to get desired AU/pixel resolution. imagefile1 kband_20AU.fits  ! name of first image file lambdaimage1 21590.  ! monochromatic wavelength in Angstroms npixels1 256  ! number of pixels. I generally don't adjust this (the more pixels, the more photons you need) inclination1 0  ! inclination of the system; if unknown, try a few different values in multiple images imagetype1 dustonly  ! choose freefree, forbidden, recombination, or dustonly imagefile2 nband_1_20AU.fits lambdaimage2 77000 ! 7.7 npixels2 256 inclination2 0 imagetype2 dustonly imagefile3 nband_2_20AU.fits lambdaimage3 99000 ! 9.9um npixels3 256 inclination3 0 imagetype3 dustonly imagefile4 nband_3_20AU.fits lambdaimage4 126000 ! 12.6um npixels4 256 inclination4 0 imagetype4 dustonly

Line profiles

To calculate line profiles, you must run the TORUS model with the comoving frame option enabled.

cmf T  ! comoving frame (vs sobolev approx)

also, specify the atomic physics option and its parameters:

atomicphysics T  ! Include atomic physics natom 1  ! One model atom atom1 H.atm  ! Hydrogen xabundance 1.0  ! Pure hydrogen yabundance 0.  ! no helium vturb 20.  ! microturbulence in km/s TORUS will output a velocity space data cube per your input parameters: ! output a datacube datacube T  ! produce a fits datacube inclination 1.  ! viewing angle positionangle 0.  ! position angle datacubefile cmf_i1_ha.fits  ! title of fits output imageside 1500.  ! size of image in 10^10cm npixels 200  ! number of pixels nv 200  ! number of velocity bins maxVel 800.d0  ! -800 to +800 km/s distance 140.  ! distance to object in pc lamline 6563.  ! wavelength in Angstroms


The nitty-gritty: parameters

Disk geometries

These are the input options for the geometry parameter: benchmark A Pascucci benchmark disk shakara ttauri