How to set parameters in ProDiMo?¶
TODO: I think this needs some revision. Some parts are also (or should be) explained somewhere else. Here we should maybe focus really on how to set parameters, maybe mention something like ParameterA.in. That we sometimes overwrite parameters. That all have some default value etc.
In Parameter.in, there are several switches which activate or deactivate certain physical modules:
The minimalistic parameters needed by ProDiMo to run are:
------------------------------------------
*** Parameter Input-File for ProDiMo ***
------------------------------------------
-----------------------------------------------
0.6 ! Mstar [Msun] : stellar mass
0.23095 ! Lstar [Lsun] : stellar luminosity
4000.0 ! Teff [K] : stellar effective temperature
3.E-3 ! Mdisk [Msun] : disk mass
4.0 ! Rin [AU] : inner disk radius
200.0 ! Rout [AU] : outer disk radius
0.03 ! amin [mic] : minimum dust particle size
100000.0 ! amax [mic] : maximum dust particle size
3.4 ! apow [-] : dust size distr power index f(a)~a^-apow
------ switches ------
.true. ! solve_temp : solve the heating/cooling balance?
.false. ! restart : restart from checkpoint file?
A more detailed parameter file follows
verbose_level : how much output? (-1...4)
solve_diskstruc : solve the vertical hydrostatic eq.?
solve_temp : solve the heating/cooling balance?
conserve_pressure : conserve pgas instead of n<H>?
restart : restart from checkpoint file?
radtrans : calculate dust continuum rad. transfer?
chi_from_RT : calculate chi from UV rad. transfer?
Td_from_RT : calculate dust temp. from rad. transfer?
Jback_from_RT : calculate background Jnu from rad. transfer?
Rphoto_from_RT : calculate photorates from rad. transfer?
Rphoto_bandint : use UV-optical colours from star?
UVpumping : use large model atoms?
UV_H2 : use electronic level?
PAH_from_RT : PAH heating from cross-sections?
dust_nonRE : non-radiative heating of dust grains?
soft_edges : add confining boundary layers?
write_pop : write output for line transfer?
NewChemScan : new initial abund. from down-right scan?
freeze_RT : freeze radiative transfer results Td/Jv?
freeze_diskstruc : freeze density/pressure structure?
freeze_Tgas : freeze gas temperature?
freeze_chemistry : freeze chemical concentrations?
perfect_ice : use long integration time for ices?
handle_UMIST : handle UMIST-data (erase/overwrite/onlyadd)
num_noerase : exceptions from erasing UMIST data
maxit : maximum number of global iterations
maxtime : maximum computational time [sec]
Parameters can be set multiple times in the same input file. Only the last value is used by the code.
The easiest way to get started is to put verbose=0 and all switches = .false.. ProDiMo just uses some formulas to set rho(x,z) and Tgas(x,z)=Tdust(x,z), and then calculates the chemistry. Switching these switches on will apply more sophisticated physics, which also takes more time.
Disk structure¶
TODO: Explain here the difference between parameterized and hydrostatic disk structure. Or link to the proper pages.
If you wish to calculate the vertical hydrostatic disk structure, use solve_diskstruc=.true.. Now the code will run much slower, because global iterations are required. You should always use conserve_pressure=.true. in this case! This conserves the gas pressure rather than the gas density if the gas temperature changes. Since the hydrostatic equilibrium provides an equation for the pressure (and not for the density!) this switch is the key to achieve global convergence. Full models with consistently calculated disk structure need time, see further tips under How_to_run_a_full_model.
Continuum radiative transfer (Radiation field and dust temperature)¶
If you use
.true. ! radtrans
ProDiMo calculates a full 2D dust continuum radiative transfer (RT) including scattering.
However, if chi_from_RT=.false., Td_from_RT=.false. and Jback_from_RT=.false. this will not yet have any effect.
If Td_from_RT=.false. only a formal solution is performed, including scattering though. If you use Td_from_RT=.true., the dust radiative equilibrium is consistently solved with the RT. If you put Td_from_RT=.true. and radtrans=.false., ProDiMo applies an approximate formula to calculate the mean intensities Jnu(x,z) based on optical depths, then calculates the dust temperature structure from these Jnu.
If chi_from_RT=.true., the strength of the local UV radiation field is determined from the results of the RT.
If Jback_from_RT=.true., ProDiMo feeds the non-LTE model atoms/molecules with the background radiation field interpolated from the RT results.
You can also use Rphoto_from_RT=.true. now, telling ProDiMo to calculate the photorates by integrating over cross sections in the calculated radiation field. The code will run much slower with radtrans=.true.
There are more parameters to control the way in which the radiative transfer results are used for the photo-rates and PAH heating/cooling, namely Rphoto_bandint, see UV_photorates and PAH_from_RT, see PAH_heating_and_chemistry.
Gas Temperature (heating cooling balance)¶
If you use
.true. ! solve_temp
ProDiMo calculates the non-LTE heating&cooling balance consistently coupled to the chemistry, resulting in the gas temperature structure Tgas(x,z).
Global Iterations¶
TODO: Maybe some more explanation
With maxit and maxtime you can specify to do only maxit global iterations at maximum, or spend no more than maxtime seconds for the global iterations. Global iterations are required for example for the hydro static diskstructure calculations (but also other cases exists). Those parameters allow then to limit the runtime, which is especially useful if you run prodimo on a supercomputer but also to be sure that all output files are consistent (which might not be the case if you kill ProDiMo yourself),
Make use of the restart file¶
The first thing to realize is that the slowest part of ProDiMo is the chemistry. After each main loop, ProDiMo writes a restart-file called restart.fits.gz. If you use restart=.true., ProDiMo first reads this files and uses all physical quantities stored therein as initial guesses for internal iterations. This speeds up the code considerably. The restart works quite sophisticated: you can change stellar parameter, the grid resolution, dust properties, or your selection of chemical species. A restart will always provide a quite reasonable guess of all physical and chemical quantities on the basis of the last solution.
A typical usecase for using a restart model is to run first a model with a low grid resolution, and if you are happy increase NXX and NZZ and run it again with restart=.true..
If you want to freeze the disk structure, gas/dust temperatures from a previous model and only do chemistry, use
.true. ! radtrans : continuum radiative transfer
.true. ! freeze_RT : freeze radiative transfer results Td/Jv?
.true. ! solve_temp : calculate gas temperature
.true. ! freeze_Tgas : freeze gas temperature?
.true. ! freeze_diskstruc : freeze density structure?
This uses the previous results for Jnu and Tdust and Tgas, and only calculate the chemical abundances again. It is also possible to just freeze the radiative transfer and redo the chemistry and heating/cooling balance consistently. Be careful with this choices here. The results will be physically not always consistent. For example freezing Tgas but recalculating the chemistry will be inconsistent, however, freezing the radiative transfer and redoing the chemistry/heating/cooling balance is in most cases still consistent.
The restart.fits.gz file is a compressed fits file and therefore can be read by any operating system (support by cfitsio). One can restart a model on a linux machine using an output generated by a Mac computer.
TODO: Check if this is in advanced models
By default, the dust is assumed to be in radiative equilibrium. However, if you put dust_nonRE=.true., the heat transfered from the gas to the dust via thermal accomodation is treated as additional non-radiative heating process of the dust in the radiative transfer. Interesting, in particular, if you want to run viscous heating models, or models with chemical heating in the midplane.
TODO: Check if this is correct, does NewChemScan really work that way. It also works without restart.
Another switch is NewChemScan=.true. which treats (only) the chemistry from scratch again. Instead of using the initial values for the chemical concentrations stored in restart.fits.gz, ProDiMo will now solve the chemistry from scratch (upper left point), than use these results as initial guess for the next point below, and - considering the next vertical column - the results from the last leftward point. Sometimes ProDiMo gets stuck with some non-converging points in the midplane. If you use this option, you may be lucky to get again converging solutions.
TODO: check with the new parameters from Peter
If soft_edges=.true., ProDiMo will produce a "soft" inner edge where the densities are gradually increased between Rin and R1. There is a theory behind this, see "confining boundary condition" in P.Woitke's Hydro-Talk.
TODO: do we ever user perfect_ice, is it still working. Also something for advanced mode.
With perfect_ice you decide whether the time-dependent chemistry solver, which is called when the NewtonRaphson-chemistry fails, is stepwise extended from years to a maximum of years, if the element depletion of the gas phase due to ice formation is still observed to be incomplete. Takes about 5x more computational time for one model! If perfect_ice=.false., the model runs faster, but it will produce noisy results concerning CO, H2CO and possibly other molecules in the highly obscured icy middle of the midplane.
TODO: Remove this? write_pop is not so useful anymore.
If write_pop=.true. the pop_<ident>.out output files are written.