Version 2 (modified by 14 years ago) ( diff ) | ,
---|
Data Scaling
The wide variety of scales in astrophysical variables is a chronic problem for numerical simulation codes. When variables of widely disparate scales are combined in a machine calculation, the results are vulnerable to truncation error, especially if the order-of-magnitude difference between two values is below machine precision. Handled improperly, these scaling differences can cause massive problems in a simulation.
AstroBEAR handles the problem by dividing a scaling constant out of certain variables. The equations of ideal MHD are scale-free, so the scaling of variables does not change the results of the simulation. This does not hold true if physical source terms such as cooling or gravity are present; during source term steps, physical scaling must be reintroduced.
Scaling in AstroBEAR
Data File Parameters
The most basic physical scaling options are set by the user in the physics.data file:
nScale | number density scale (cm-3) |
rScale | density scale (g cm-3) |
pScale | pressure scale (dynes cm-2) |
TempScale | temperature scale (K) |
lScale | length scale (cm) |
AstroBEAR derives other scaling constants such as magnetic pressure and velocity from these basic parameters:
VelScale | velocity scale (cm s-1) |
BScale | magnetic field scale (esu) |
TimeScale | time scale (s) |
ScaleGrav* | gravity scale (cm3) |
ScaleCool** | cooling scale (erg-1 cm3) |
*requires elliptic source terms.
**requires cooling source terms.
Calculating the appropriate scales to use is not always a trivial task, especially if the important scale for your problem is a derived one. For instance,