wiki:PhysicsDataExplained

Version 35 (modified by ehansen, 12 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. The page author is not infallible, however, so if you do discover an important parameter that isn't covered here, 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.
  • MinDensity: Sets a minimum density within the domain. This does not need to be a large value; the default is 10-30, and 10-10 is most common value in the data files. Be wary of using large MinDensity values, which can undermine conservation laws by injecting extra matter into the system. Under no circumstances should MinDensity ever be less than 0.
  • 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).


Scaling Parameters

These parameters control the scaling of the variable data. Many calculations are done in scaled physical quantities to minimize truncation error, and so variable data is typically stored in scaled or dimensionless form. These values are applied when the data needs to be restored to its proper scaling and units.

Note that some of these options are closely related. For instance, we have scaling options for mass density and number density. AstroBEAR only requires one of these quantities to be set in the data file—it will use the specified quantity to derive the unspecified one. This allows users greater flexibility in setting up their problems (for instance, if they know the temperature scale of their domain but not the pressure scale).

  • rScale: The density scale in [g/cc]. If rScale is set, nScale is ignored. If rScale is 0.0, then nScale is used to calculate rScale. rScale and nScale should not both be set to 0.0.
  • nScale: The number density scale in [particles/cc]. nScale is only used if rScale is set to 0.0; otherwise it is derived from rScale. Again, rScale and nScale should not both be 0.
  • TempScale: The temperature scale in [Kelvin]. If TempScale is set to 0.0, then it will be derived from pScale. TempScale and pScale should not both be set to 0.0.
  • pScale: The pressure scale [dynes/cm2]. pScale is only used if TempScale is set to 0.0; otherwise it is derived from pScale. Again, TempScale and pScale should not both be 0.
  • lScale: The length scale in [cm]. This defines 1 computational unit (the units used in global.data to define the size of the domain).


For more information see the following pdf

MHD Variables

  • lMHD: Logical switch used to turn MHD on or off. MHD requires the face-centered aux array, so if you turn MHD on, be sure to set MaintainAuxArrays in global.data to T.


Tracer Settings

Tracer variables are used to track the movement of specific quantities of matter within your simulation. If, for instance, you had one or more clumps suspended in an ambient medium and wanted to track the way the clump matter moves through the domain, you would use a tracer.

Note: Certain aspects of tracer behavior are controlled by the iTracerParameter in solver.data. However, the parameter below is used to activate tracers in the simulation.

  • NrTracerVars: Indicates the number of tracer variables to use in this problem. If NrTracerVars is 0, then tracers will not be active. Tracking tracer variables costs memory and CPU cycles, so it's best to leave this switched off if you don't anticipate needing them. Under no circumstances should NrTracerVars be less than 0.


Non-Solver Variables

AstroBEAR supports the creation of specialized variables that are not handled by the solver. These variables are useful for debugging, but they are derived from AstroBEAR's operations rather than being calculated by the solver. These variables do not necessarily add much to the calculation cost per cell, but they do increase the memory load of AstroBEAR. As such, it's best to turn them off if you are not actively using them to debug your code.

  • NrUserDiagnosticVars: The number of non-solver variables created solely so that the user can track some problem-specific quantity. These will not be considered physical variables, even if they are derived from a physical quantity.

AstroBEAR's Non-Solver Variables

The boolean flags below activate some common non-solver variables. Note that these variables do not count against the total for NrUserDiagnosticVars

  • lCheckDivergence: Stores the divergence of the magnetic field. Ideally, this quantity should be 0, but when dealing with numerical approximations this is not always guaranteed. Nevertheless, high divergence values indicate serious problems with either the solver or the problem setup.
  • lOutputErrFlag: Stores the error flags for a grid. This is useful when debugging unusual refinement patterns in your problem.
  • lMPI_ID: Stores the MPI ID of a grid. It may seem redundant (since a grid can have only one MPI ID), but outputting it as a variable allows us to use visualization tools to see how AstroBEAR is distributing the grids.

Cylindrical Symmetry (2.5D)

This section gives some brief details on how you can take advantage of cylindrical coordinates if your problem has such symmetry.

  • iCylindrical Controls whether astrobear is to use cylindrical coordinates. The default is 0 which leaves everything in Cartesian, 1 is for no angular momentum, and 2 is for with angular momentum.

Basically when iCylindrical is not 0, astrobear changes the differential operators and how each axis is treated. In other words, astrobear switches to cylindrical coordinates. The x-axis becomes the radial axis, the y-axis becomes the cylindrical z-axis, and the z-axis is nothing since this is only implemented for ndim = 2.

Furthermore, if your problem has rotation then iCylindrical should be set to 2. This will change the ivz component to the angular momentum component. Otherwise, if iCylindrical=1 then there is only ivx (radial) and ivy (cylindrical z).

One other important thing to note…if iCylindrical is not 0, then mydim (a global parameter in physics declarations) will be set to 3, otherwise it is set to ndim.

Note: See TracWiki for help on using the wiki.