wiki:PhysicsDataExplained

Version 22 (modified by Brandon Shroyer, 14 years ago) ( diff )

physics.data Explained

The physics.data file contains the physics parameters used by AstroBEAR. In addition to common physical constants like , physics.data also contains the scaling coefficients for AstroBEAR's data.

This contains only one namelist: PhysicsData.

A Note On Extraneous PhysicsData Members

Some of the parameters in the PhysicsData namelist do not currently serve any purpose. Most of these physical parameters were originally used in features that we have not yet ported over from AstroBEAR 1.0. They were left in PhysicsData against the day that we do get all those features moved over, but do not currently have any effect on the code.

This page deals with parameters that have an effect on AstroBEAR 2.0; as such, we won't bother discussing extraneous namelist members. If a parameter in physics.data is not covered here, then assume it has no impact on your simulation. If it turns out it does, however, then please update this page.


General Physical Parameters

  • gamma: The constant ideal gas value of . AstroBEAR generally assumes that the gases within the problem domain are monatomic, so should be 1.6667 for non-isothermal problems. For isothermal problems we use 1.001. Normally , but a of exactly 1 is hard for our solvers to process, so we just get as close to 1 as we can.
  • Xmu: The mean molecular weight of the gas. This is sometimes used in conjunction with the mass of a hydrogen atom to determine the number density and temperature scales. A value of 1.0 is usually used for atomic hydrogen, or 0.5 for molecular hydrogen.
  • MinTemp: Sets a minimum temperature within the domain. This should be set to 0.0 if there is no cooling. If there is cooling, then start by setting it to something low, in the 10-10 to 10-6 range. If this parameter is set too high, then it could wind up injecting extra thermal energy into the system.
  • InterpOpts: A multi-integer array that sets the interpolation options for cell-centered variables. The size of this array is equal to the number of physical variables (NrPhysicalVars). The interpolation options are actually flux limiters that prevent spurious numerical oscillations. The options are as follows:
    • 0 -- Constant: A constant limiter function.
    • 1 -- Min-Mod: Uses the minimum absolute value of the fluxes. This is the most diffusive of our flux limiters.
    • 2 -- Superbee: The Superbee flux limiter. This option is less diffusive than the other options, and is best for high-resolution problems with no strong shocks.
    • 3 -- VanLeer: Uses the Van Leer limiter from the original MUSCL scheme.
    • 4 -- MC: A monotone-centered flux limiter.

These limiters are defined in the data/slopelim.f90 file. For most variables, min-mod (option 1) is a good default choice; however, variables with aux counterparts such as Bx, By, and Bz are exceptions to this rule. These variables should always use a constant limiter (option 0).

  • lSelfGravity: A boolean flag that turns self-gravity on or off. If your problem needs self-gravity, then this should be set to .true. and the PoissonData namelist needs to be properly assembled in global.data. If your problem does not use self-gravity, then leave lSelfGravity set to .false.
  • iEOS: Selects the equation of state for the simulation to use. AstroBEAR currently has two options for the equation of state:
    • 0 -- ideal gas: Use the ideal gas EOS: .
    • 4 -- isothermal: Use the isothermal equation of state: .
  • Verbosity: A three-integer array that controls the verbosity of the numerical output. Each element of the array controls a different element of numerical integration:
    1. Controls the verbosity of protection errors.
    2. Controls the verbosity of the source term calculations.
    3. Controls the verbosity of the Riemann solver output.

All three options use the same scale: 0 (no output), 1 (minimal output), 2 (all messages).


Description of various scaling parameters

MUST be present if cooling, radiation force, or gravity are switched on! More information can be found at CalcGlobalScale and the .pdf link at the bottom of that page.

  • rScale: The density scale [g/cc]. If rScale is set, nScale is ignored. If rScale is 0, then nScale is used to find rScale.
  • nScale: The number density scale parameter [particles/cc]
  • pScale: The pressure scale [dynes/cm2]. If pScale is set, TempScale is ignored. If pScale is 0, then TempScale is used to find pScale
  • TempScale: The temperature scale parameter [Kelvin]
  • lScale: The length scale parameter [cm]. This defines 1 computational unit.


Source Term Switches & Parameters

  • iCylindrical: Specifies whether there is cylindrical symmetry in the problem. 0 - no, 1 - yes, 2 - 2D cylindrical with v_phi (hydro only).
  • iSymAxis: Specifies the location of the symmetry axis if iCylindrical is set to 1 or 2; 0 - along the x-axis, 1 - along the y-axis.
  • lPrimitive: Logical. Currently can be omitted (and is not actually in physics.data as of r445 ), but default value is set = .TRUE. in revision r445, so if you want to work with conservative variables, add lPrimitive here and set to F. See here for more information.
  • iCooling: Specifies whether radiative cooling is occurring.
    • 0 - No cooling
    • 1 - Simple Dalgarno-McCray cooling. The file TABLES/cooling.tab must be present.
    • 2 - Cooling with microphysics. The file neqcool.dat, plus the tables TABLES/DMcooling.tab, TABLES/Hexcooling.tab must be present.
    • 3 - Analytic cooling. Used for for some testing purposes (?)
    • 4 - Inoue & Inutsuka cooling function. The file TABLES/IIcooling.tab must be present.
  • MinTemp: The minimum allowed temperature for the cooling regime, if iCooling is 1.
  • iRadForce: Specifies a central radiative driving force in the system. 0 - no, 1 - yes. SOURCE ASSUMED TO BE IN THE LOWER LEFT CORNER. ONLY 2D!
  • Lumin: The effective luminosity of the central source for radiation driving, normalized to Eddington luminosity. Only used if iRadForce = 1.
  • iGravity: Specifies a central gravitational force in the system.
    • 0 - No gravity
    • 1 - Gravitational source assumed to be in the left lower corner. Only 2D. Click here for subroutine
    • 2 - Uniform gravity applied along lower boundary. Click here for subroutine
    • 3 - Self-gravity, with or without sink particles (depending on iSink flag).
  • mCentral: The mass of the central gravitating body [Solar Masses]. Only used if iGravity = 1. Actually used in iGravity = 2 as well, but not as solar masses (input mCentral as acceleration in cgs instead… this may be changed in upcoming revisions).
  • SrcPrecision: Precision of the source term integration on every level including level -1. Note: There must be as many values specified for this array as there are AMR levels + 1.


Type of Riemann solver to be used on each refinement level

  • RSType: The type of Riemann solver to be used on each AMR level. 0 - approximate Roe Solver, 1 - exact Riemann Solver. There must be as many values specified for this array as there are AMR levels + 1.
  • ViscCD: This term allows for artificial viscosity in the contact discontinuity between grids to prevent carbuncles. 0 - off, 1 - on, 2 - ?. Can only be run with the exact Riemann Solver.
  • ViscLOF: Deprecated variable. If used, this term must be set to a real value. Can be commented out in most cases.
  • iEOS: The equation of state type used for the exact solver.
    • 0 - ideal gas
    • 1 - different isentropic gamma and ratio of specific heats
    • 2 - analytic Thomas Fermi EOS.
    • 3 - vanderWaals
    • 4 - isothermal
  • PMinRealGas: The minimum pressure allowed in the Thomas Fermi EOS, dyne/cm2. Only used if iEOS = 2.


Verbosity of the output of various runtime diagnostic messages to "xbear.log"

  • Verbosity: This array contains three values to control the error messages that appear.

The first value sets the cell protection error messages (0 - none, 1 - all messages).
The second value sets the source term messages (0 - none, 1 - minimal, 2 - all messages).
The third value sets the exact Riemann solver messages (0 - none, 1 - minimal, 2 - all messages).


Protection routine switches

  • iProtect: This switch sets the type of protection method used to protect against negative and small values of pressure and density.
    • 0 - no protection
    • 1 - resets protected cells to the values of the neighbor cell with the minimum value of Presure/density
    • 2 - resets protected cells to the values of the neighbor cell with the minimum value of Pressure
    • 3, 4 are nominally the same options as 1 and 2, but also include entropy conservation. These options are deprecated in the current version of the code, and should not be used. See Protect for more information.
    • 5 - average neighbor Pressure and density


MHD related section

  • iDivB: Numerical method of preventing magnetic field divergence. See ConstrainedTransport for more information.
    • 1 - Ryu Jones CT
    • 2 - Dia Woodward CT
    • 3 - Balsara Spicer CT
    • 6 - Gardiner and Stone but only works for method(1)=1
  • lMHD: Logical switch to say whether there is MHD in the problem. T/F value only.
  • Bbeta: The plasma parameter beta, or the ratio of thermal energy density to magnetic energy density. Also the ratio of plasma pressure to the magnetic pressure
  • MACH: A Mach number setting, if needed in a particular problem setup.
  • TEST_MHD: This is set = 1 in the current physics.data. I'm not sure what it does.


Tracer Settings

  • iLTracer: A switch to set the type of tracer fields. If iLTracer is set greater than or equal to 1, tracers will be turned on. If iLTracer is on it works on all variables between nTracerLO and nTracerHI. See VanLeer for more information.
    • 0 = Conservative Tracer constrained between 0 and the density. Must choose this for Species tracking (which uses the tracer fields), or for no tracers.
    • 1 = Lagrangian Tracer constrained between 0 and 1
    • 2 = Lagrangian Tracer constrained to be 0 or greater
  • Warning: This applies for all tracers.


(Cosmic Ray) CR related section

In order to run CR portion of code, MHD must be on and iLTracer must be 2. See CosmicRay for more information.

  • lCR: Turns Cosmic Rays on and off.
  • lCRfeed: Turns Cosmic Ray feedback on and off. Cosmic Rays provide an extra pressure to the fluid flow. By turning this on you turn on the CR pressure term which will add into the dynamics of the flow.
  • iAtrans: Turns on and off Alfven Transport where 1 is on and 0 is off. Alfven Transport deals with the heating from Alfven wave production at shocks by Cosmic Ray streaming. This changes both the scattering center velocities for the CRs and the gas pressure by adding an addition pressure due to Alfven wave dissipation.
  • lCREl: Turns on and off the CR electron energy losses due to synchrotron and inverse Compton radiation.
  • nj: Number of Species. If 1 and Energy Losses are active then it is electrons, otherwise 1 is proton and 2 is electron. Currently only 2 species are allowed.
  • nplow: Info%q variable index for start of CR variables; should be 1 higher than any tracers. More details on the storage of CRs is located in CosmicRay.
  • np: Number of Momentum Bins.
  • ylow: ln(plow), the log of the minimum momentum (i.e. the momentum value for the lowest momentum bin) in code units (in units of m_p*c, where m_p is the mass of the proton and c is the speed of light).
  • yhigh: ln(phigh), the log of the maximum momentum in code units
  • dlp0: ln(dp), the log of the momentum bin size. Note this is currently set to be constant.
  • ceps1: Injection fraction for species 1. Basically at a shock this determines the fraction of material passing through the shock that becomes CRs.
  • ceps2: Injection fraction for species 2.
  • ckapp: Diffusion scaling for the parallel (parallel to the shock normal) diffusion coefficient.
  • rkap: kper/kpar, The ratio of the perpendicular diffusion to the parallel diffusion
  • alph: The momentum powerlaw dependance of the diffusion, 1=Bohm diffusion. More details on the diffusion coefficient is located in CosmicRay.
  • beta0: 1/c, where c is the speed of light, in code units. This is needed to set the CR pressure and other things in the CR routine.
  • ucmb: The CMB/Radiation energy density in code units. The energy density has the same units as the magnetic energy density.
  • tsc: The synchrotron lifetime in code units for an electron at p=1 (units of m_p*c) and ub=1. Same units at t and dt.
Note: See TracWiki for help on using the wiki.