Changes between Version 7 and Version 8 of 1DPulsedJets


Ignore:
Timestamp:
01/23/12 20:13:09 (13 years ago)
Author:
ehansen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • 1DPulsedJets

    v7 v8  
    12121.) It must be ordered as log(ne), T, log(X), (9 species cooling fractions), cooling rate. Where ne is the electron density, T is temperature, X is ionization fraction, and the 9 species cooling fractions are the fractions of how much each species contributes to the cooling rate. Note that here log refers to the base 10 logarithm.  The 9 species are ordered as follows: OI, OII, NI, NII, SII, FeII, SIII, MgII, CII.
    1313
    14 2.) The first three parameters in the table must be "cycled" through in the following order: log(X), log(ne), T.  In other words, if you follow the table going down, the log(X) column changes first while log(ne) and T remain constant.  Then once all values of log(X) are cycled through, log(ne) changes to its next value and log(X) gets cycled through again.  The process repeats until all possible values are cycled through.  This is important so that all the cooling rates are read in and used in a consistent order.
    15 
    16 3.) The very first line of the table needs to have nDensities, nTemps, nXs.  As an example, the first line might read: 40 30 21.  This means there are 40 different values for log(ne), 30 for T, and 21 for log(X).  Thus, there are a total of 25,200 different values for the cooling rate (40*30*21 = 25,200).
    17 
    18 4.) The step sizes of log(ne), T, and log(X) must remain constant.  In other words, each column is evenly spaced.
     142.) The step sizes of log(ne), T, and log(X) must remain constant.  In other words, each column is evenly spaced.
    1915
    2016Also, it is important to note that the cooling rate has units of erg * cm^-3^ * nH^-2^.  So before the rate can be added to the change in energy, dqdt(iE), it must be multiplied by nH^2^ where nH is the number density of hydrogen.
     
    2218
    2319== Zcooling.tab ==
    24 PHcooling.tab contains a lot of data that is not needed.  Reading in this data one line at a time is inefficient, especially when astrobear is being run on multiple processors.  This is why a separate script is used to reformat PHcooling.tab to Zcooling.tab before running astrobear.  Remember that PHcooling.tab still requires the aforementioned properties in order to be reformatted correctly.  Zcooling.tab has the following format:
     20PHcooling.tab contains a lot of data that is not needed.  Reading in this data one line at a time is inefficient, especially when astrobear is being run on multiple processors.  This is why a separate script called ph2zformat.s is used to reformat PHcooling.tab into Zcooling.tab before running astrobear.  Remember that PHcooling.tab still requires the aforementioned properties in order to be reformatted correctly.  Zcooling.tab has the following format:
    2521
    26 nDensities nTemps nXs [[BR]]
    27 lognemin lognemax [[BR]]
    28 tempmin tempmax [[BR]]
    29 logxmin logxmax [[BR]]
    30 coolingrate(1,1,1) coolingrate(2,1,1) ... coolingrate(nDensities,nTemps,nxs)
     22nDensities [[BR]]
     23nTemps [[BR]]
     24nXs [[BR]]
     25lognemin [[BR]]
     26lognemax [[BR]]
     27tempmin [[BR]]
     28tempmax [[BR]]
     29logxmin [[BR]]
     30logxmax [[BR]]
     31coolingrate(1,1,1) [[BR]]
     32coolingrate(2,1,1) [[BR]]
     33... [[BR]]
     34coolingrate(nDensities,nTemps,nxs)
    3135
    32 Where lognemin is the minimum value of the log(ne) column in PHcooling.tab, and the other minimum and maximum values are defined in the same way.  This reformatted table essentially gives the number of data points, the ranges for log(ne), T, and log(X), and the cooling rates on one line.  Now the data does not need to be read in one line at a time for 25,200 or so values.  The entire array of cooling rates can be read in instantly. 
     36Where nDensities, nTemps, and nXs are the number of unique values for log(ne), T, and log(X) respectively.  So if these parameters are equal to 40, 30, and 21, then there are a total of 25,200 cooling rates (40*30*21 = 25200).  lognemin is the minimum value of the log(ne) column in PHcooling.tab, and the other minimum and maximum values are defined in the same way. Now the data does not need to be read in one line at a time for 25,200 or so values.  The entire array of cooling rates can be read in with a single READ statement.  No iteration or nested DO loops required.
    3337
    3438[[BR]]