Changes between Version 2 and Version 3 of DataScaling


Ignore:
Timestamp:
07/10/11 17:59:35 (14 years ago)
Author:
Brandon Shroyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • DataScaling

    v2 v3  
    77AstroBEAR 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.
    88
     9Quantities divided by a scaling term are sometimes referred to as ''scaled'' quantities.  These scaled quantities are dimensionless, being described in terms of [ComputationalUnits computational units].
     10
     11[[BR]]
    912== Scaling in AstroBEAR ==
    1013
     
    1316The most basic physical scaling options are set by the user in the [PhysicsDataExplained physics.data] file:
    1417
    15 ||nScale||number density scale (cm^-3^)||
    16 ||rScale||density scale (g cm^-3^)||
    17 ||pScale||pressure scale (dynes cm^-2^)||
    18 ||!TempScale||temperature scale (K)||
    19 ||lScale||length scale (cm)||
     18||  '''variable name'''  ||  '''scale name (units)'''  ||
     19||{{{nScale}}}||number density scale (cm^-3^)||
     20||{{{rScale}}}||density scale (g cm^-3^)||
     21||{{{pScale}}}||pressure scale (dynes cm^-2^)||
     22||{{{TempScale}}}||temperature scale (K)||
     23||{{{lScale}}}||length scale (cm)||
    2024
    2125AstroBEAR derives other scaling constants such as magnetic pressure and velocity from these basic parameters:
    22 
    23 ||!VelScale||velocity scale (cm s^-1^)||
    24 ||BScale||magnetic field scale (esu)||
    25 ||!TimeScale||time scale (s)||
    26 ||!ScaleGrav*||gravity scale (cm^3^)||
    27 ||!ScaleCool!**||cooling scale (erg^-1^ cm^3^)||
     26||  '''variable name'''  ||  '''scale name (units)'''  ||  '''formula'''  ||
     27||{{{VelScale}}}  ||velocity scale (cm s^-1^)||  [[latex($\sqrt{\gamma ~p_{scale} \over r_{scale}}$)]]  ||
     28||{{{BScale}}}  ||magnetic field scale (esu)||  [[latex($\sqrt{p_{scale} \over {4 \pi}}$)]]  ||
     29||{{{TimeScale}}}  ||time scale (s)||  [[latex($l_{scale} \over v_{scale}$)]]  ||
     30||{{{ScaleGrav}}}*  ||gravity scale (cm^3^)||  [[latex($G ~r_{scale} ~{t_{scale}}^2$)]]  ||
     31||{{{ScaleCool}}}!**  ||cooling scale (erg^-1^ cm^3^)||  [[latex($t_{scale} \over p_{scale}$)]]  ||
    2832
    2933*requires elliptic source terms.[[BR]]
    3034!**requires cooling source terms.
    3135
    32 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,
     36[[BR]]
     37== Example of Scaling Calculations ==
     38
     39As an example, we will construct the scaling terms for the [wiki:AstroBearProjects/MHDClumps MHD clump] simulations.  We start with the following physical parameters for the simulation:
     40
     41|| ambient density || 100 cm^-3^ ||
     42||ambient temperature || 10^4^ K ||
     43||wind speed || Mach 25 ||
     44||clump radius || 200 AU ||
     45||plasma beta || 1 ||
     46
     47The first thing we notice is that the ambient wind speed is expressed as a [http://en.wikipedia.org/wiki/Mach_number Mach number] instead of in cm/s.  In essence, this quantity is pre-scaled to the sound speed of the problem, and does not need to be scaled any further.  Similarly, the [http://en.wikipedia.org/wiki/Beta_(plasma_physics) plasma beta] term is a dimensionless quantity that specifies the strength of the magnetic field in terms of the pressure, so there is no need to concern ourselves with the scaling of the magnetic field.
     48
     49The quantities that do need scaling are density, temperature, and distance.Since the clump radius is on the order of 100 AU, that seems like a reasonable value for {{{lScale}}}.  AstroBEAR assumes that distance scales are given in centimeters, and 1 AU = 1.495 x 10^13^ cm; therefore, the scaling term in {{{physics.data}}} is:
     50{{{
     51lScale = 1.49598d15,
     52}}}
     53
     54This gives us a scaled clump radius of 2 computational units.
     55
     56Ideally, we would like to scale the ambient density to 1.  Since we are given the number density but not the mass density, the density scales in {{{physics.data}}} should be set as follows:
     57{{{
     58nScale = 1.d2,
     59rScale = 0.d0,
     60}}}
     61This causes {{{rScale}}} to be derived from {{{nScale}}}, the known quantity.
     62
     63Similarly, we would like to scale the ambient temperature to 1.  To do this, we set the temperature and pressure scaling options in {{{physics.data}}} as follows:
     64{{{
     65pScale = 0.d0,
     66TempScale = 1.d4,
     67}}}
     68With this configuration, AstroBEAR both scales the ambient temperature to 1 and derives the pressure scale from the temperature scale.  With {{{rScale}}} and {{{pScale}}}, we can now derive values for {{{VelScale}}} and {{{BScale}}} (see '[DataScaling#Data_File_Parameters 'Data File Parameters"] above).  {{{VelScale}}} can now be used in conjunction with {{{lScale}}} to derive the {{{TimeScale}}}, which in turn allows us to obtain a value for {{{ScaleCool}}}.
     69
     70{{{
     71#!comment
     72[[BR]]
     73== More Complex Scaling ==
     74
     75The MHD clump problem is a relatively simple [DataScaling#Example_of_Scaling_Calculations example] of scaling, since the
     76}}}
     77
    3378{{{
    3479#!comment