next up previous contents index
Next: 7.1.9 Hydrodynamics control (HD Up: 7.1 Parameter file: rhd.par Previous: 7.1.7 Opacities   Contents   Index


7.1.8 Hydrodynamics control (HD and MHD)

Many parameters in the control file that are valid for the HD module also apply for the MHD module. A few parameters have somewhat different options for both modules (hdtimeintegrationscheme: Sect., hdsplit: Sect., character reconstruction: Sect. Several parameters have meanings only for the HD (see Sect.7.1.9) or the MHD module (see Sect.7.1.10) and are ignored in the other one.

Table 7.1: List of reasonable combinations of options for HD and MHD solver. The columns are the type of the (M)HD scheme, see Sect., the time-integration scheme, see Sect., the (directional) splitting method, see Sect., the maximum Courant number (where $D$ is the dimension of the computational box), see Sect., the maximum sound-Courant number (where $D$ is the dimension of the computational box) only specified for the case where it is actually a new constraint in addition to the normal Courant condition, see Sect., and a comment.
hdScheme hdTimeIntegrationScheme hdSplit $C_\mathrm{CourMax}$ $C_\mathrm{SndCourMax}\!\!$ comment
Roe Single 123 $1$   old default
Roe Single unsplit $1/D$   don't use
Roe Single CTU $1$ $1/2$ for $D$=$3$ recommended default
Roe RungeKutta2 unsplit $1/D$   small Mach-number flow
Roe RungeKutta3 unsplit $1/D$    
HLLMHD Hancock 123 $\approx 1$   recommended default
HLLMHD Hancock unsplit $\approx 1$    
HLLMHD RungeKutta2 unsplit $\approx 1/D$    
HLLMHD RungeKutta3 unsplit $\approx 1/D$ character hdscheme

With this parameter, the type of the hydrodynamics scheme can be specified as in
character hdscheme f=A80 b=80 n='Hydrodynamics scheme' &
  c0='Roe (approximate Riemann solver of Roe type)' &
  c1='RoeMagKin (Roe solver + kinetic magnetic field transport)' &
  c2='RoeMHD/HLLMHD (MHD solver)' &
  c3='None (skip hydrodynamics step entirely)'
Possible values are character hdtimeintegrationscheme

With this parameter, the type of the time-integration scheme can be specified as in
character hdtimeintegrationscheme f=A80 b=80 n='Time-integration scheme' &
Possible values are For possible combinations see Tab.7.1. character hdsplit

With this parameter, the type of the hydrodynamics operator (directional) splitting scheme can be specified as in
character hdsplit f=A80 b=80 n='Hydrodynamics directional splitting scheme' &
  c0='123: directional splitting (default)' &
  c1='unsplit: unsplit (direct) operator' &
  c2='CTU: Colellas Corner Transport Upwind scheme (Colella, 1990)'
Possible values are This parameter is recognized by hdscheme=Roe and hdscheme=HLLMHD, although hdscheme=HLLMHD does not know hdsplit=CTU. character reconstruction

This parameter determines the order and ``aggressiveness'' of the reconstruction scheme with e.g.
character reconstruction f=A80 b=80 n='Reconstruction method' &
  c0=Constant c1=Minmod/VanLeer/Superbee c2=PP/PPmimo &
Possible values are Usually, the VanLeer reconstruction has been a good choice. If a more stable (and diffusive) scheme was needed, Minmod could have been used. However, now the variants of the more recent 2nd-order ``Frankenstein's Method'' are better choices, if the additional computational cost is acceptable. Even if it is not strictly monotonic, the FRweno2 scheme seems to be a good general default for pure-HD models computed with the Roe solver. The PP reconstruction gives the highest accuracy. However, there is the possibility that it produces somewhat ``noisy'' models with small wiggles e.g. in the velocity for extreme cases - solar models look fine with PP. The newest options are HBweno and VAweno, which are closer to standard WENO schemes.
The options Constant, SuperBee, and FRcont are just for testing purposes: they have either too much, sometimes the wrong sign of, or too little diffusion, respectively.
The order of decreasing diffusivity and increasing accuracy is roughly (schemes on a line are similar; schemes in brackets are for testing only):
FRmimo, PPmimo, vanLeer
FRweno, HBweno, (Superbee)
PP, VAweno
However, there are differences how the increase in accuracy is achieved: vanLeer uses (potentially dangerous) anti-diffusion (in contrast to MinMod) but needs only a 3-point stencil, whereas PPmimo and FRmimo don't have anti-diffusion but need a (more expensive) 5-point stencil. FRweno achieves actually a 2nd-order-accurate reconstruction also near extrema for reasonably resolved structures (e.g., sufficiently long wavelengths of sine waves). I.e., it gives up strict monotonicity, whereas PP is strictly monotonic and achieves low dissipation from avoiding jumps at cell boundaries wherever possible. However, it chops off (flattens) extrema like all TVD schemes and it shows Gibbs wiggles near a jump that is not surrounded by constant plateaus but lies in a slope. The 2nd-order scheme FRmono is designed to suppress these wiggles, too. The highest-resolution schemes are PP (implemented in the MHD module, too) and VAweno (HD module only). real c_gravmu

The time centering of the density that is used for the computation of the gravitational acceleration can be selected e.g. with
real c_gravmu f=E15.8 b=4 n='Gravity time centering' u=1 &
  c0='-1.0: use defaults depending on time-integration scheme' &
  c1='0.0: density at old time step; 0.5: centered; 1.0: new time step'
A value of 0.0 is the default for Runge-Kutta-type time integration. The others use 0.5. However, a larger value (the maximum is 1.0) leads to damping of oscillations in a stratified atmosphere. This is due to the fact that in a ``normally stratified'' atmosphere - where the density increases with depth - the density in any given grid cell usually increases with time during an upward motion (of course, the divergence of the flow field plays a role, too). Using the density for the computation of the downward-directed gravitational acceleration at a slightly later time increases this value leading to a stronger decceleration of the upward motion. This works analogously for downward motions. The parameter is recognized by the HD and the MHD module. integer n_hyditer

After each complete hydrodynamic time step the recommendation for the next time step will be chosen so that n_hyditer iterations will (probably) needed. The parameter can be set e.g. with
integer n_hyditer f=I4 b=4 &
    n='Number of hydrodynamics iterations' c0=10
For a simulation of a solar-type star it will typically be set to 1. E.g. for brown dwarfs with shorter hydrodynamical time scales values around 10 may be considered. Note, that the hydrodynamics iteration works somewhat differently than the radiation transport iteration: in the latter case the size of the actual time step can be determined after computing the fluxes, whereas the hydrodynamics step is (possibly) of at least second order in time and the time step has to be known in advance.

In the case of the MHD module, this can reduce the computation time significantly because the MHD time step is often much smaller than the other timestep limits. However, this parameter does not determine the nuber of substeps directly. Instead, the number of substeps is determined by the requested timestep and the timestep of each MHD substep which is determined by the standart Courant condition. So, the number of MHD substeps varies during the simulation. So, the exact value of this parameter has no direct influence on the number of substeps. If this parameter is set to zero, this features is turned of. (See also parameter va_max for speeding up MHD simulations.) integer n_hydmaxiter

The absolute maximum number of hydro iterations can be specified e.g. with
integer n_hydmaxiter f=I4 b=4 &
    n='Maximum number of hydro iterations' c0=14
If more iterations are needed the computation for the current time step is stopped and resumed with a smaller one. Usually, n_hydmaxiter will either be set to a value somewhat larger than the recommended number of iterations (n_hyditer) or to 0 which disables the check for too many iterations completely. This can be safely allowed in many cases. To disable the iteration of the hydrodynamics sub-step set n_hyditer=0.

In case of the MHD module, this parameter sets the maximum number of MHD-substeps. If this parameter is set to zero, the number of MHD substeps is not limited. character hdtmpstructkeepmode

With this parameter, one can control if some temporary large 3D-array structures are kept during the run of the program or are only allocated when needed (and deleted immediately afterwards). The structures are used in the HYD, the MHD, and the VIS module. The parameter can be set e.g. with:
character hdtmpstructkeepmode f=A80 b=80 &
  n='Retaining mode for large temporary structures' &
The choices are integer n_hydcellsperchunk

In every directional sub-step neighboring 1D columns are independent from each other. They can be grouped and computed in chunks of arbitrary size. The approximate number of grid cells per chunk can be specified e.g. with
integer n_hydcellsperchunk f=I9 b=4 &
  n='Number of cells per hydro chunk' &
  c0='0 => one 2D slice at a time' &
  c1='1 => minimum chunk size (inefficient)' &
  c2='1200: reasonable value' &
  c3='1000000000: maximum chunk size (inefficient and memory intensive)'
The exact number is determined at run time to get (approximately) equal sizes of the individual chunks. The choice of this parameter does not affect the result of the computation but the memory usage and performance: smaller (and more) chunks may result in an optimum cache usage and need the smallest amount of memory, but result in additional overhead due to frequent subroutine calls. Bigger (and less) chunks are to be preferred for vector machines and processors with large caches. Very rough guide values may be Note: For simulations with activated OpenMP on a parallel machine the chunk size has to be made small enough to allow at least as many chunks as processors (or threads) available. This is particularly important for models with a small number of grid points (e.g.D models). An example is given for the Hitachi SR8000 in Sect.4.6.5.

next up previous contents index
Next: 7.1.9 Hydrodynamics control (HD Up: 7.1 Parameter file: rhd.par Previous: 7.1.7 Opacities   Contents   Index