FLASHX
Doxygen Generated Documentation From Interface Source Code

Go to the source code of this file.
Functions/Subroutines  
subroutine  Eos (mode, vecLen, eosData, massFrac, mask, vecBegin, vecEnd, diagFlag) 
subroutine Eos  (  integer  mode, 
integer  vecLen,  
real  eosData,  
real  massFrac,  
logical, dimension(EOS_VARS+1:EOS_NUM), optional, target  mask,  
integer  vecBegin,  
integer  vecEnd,  
integer  diagFlag  
) 
This routine applies the equation of state to thermodynamic quantities at one or more grid cells. The number of cells is determined by the argument veclen. The routine expects data packaged for it in the 1d array, eosData. The data in eosData is organized as: 1:vecLen points contain the first variable, vecLen+1:2*vecLen points contain the second variable, and so on. The number and order of variables in the array is determined by the constants defined in Eos.h.
The routine takes different quantities as givens depending on the value of the mode variable: if mode=MODE_DENS_TEMP, density and temperature are taken as given, and pressure and internal energy are generated as output; if mode=MODE_DENS_EI, density and internal energy are taken as givens, and pressure and temperature are generated as output. If mode=MODE_DENS_PRES, density and pressure are taken as givens, and internal energy and temperature are generated as output. Note that internal energy is EINT_VAR, not ENER_VAR.
In addition to pressure, temperature, and internal energy, which are always thermodynamically consistent after this call, other quantities such as the various thermodynamic partial derivatives can be calculated based on the values in the argument, mask. mask is a logical array with one entry per quantity, with the order determined by constants defined in Eos.h (the same as those for the eosData argument); .true. means return the quantity, .false. means don't.
mode : Selects the mode of operation of the Eos unit. The valid values are MODE_DENS_EI, MODE_DENS_PRES and MODE_DENS_TEMP as decribed above.
vecLen : number of points (cells) for which the eosData array is sized. If vecBegin and vecEnd are not present, this is also the number of points (cells) for which EOS computation is to be done.
eosData : This array is the data structure through which variable values are passed in and out of the Eos routine. The arrays is sized as EOS_NUM*vecLen. EOS_NUM, and individual input and output Eos variables are defined in Eos.h. The array is organizes such that the first 1:vecLen entries represent the first Eos variable, vecLen+1: 2*vecLen represent the second Eos variable and so on.
massFrac : Contains the mass fractions of the species included in the simulation. The array is sized as NSPECIES*vecLen.
mask : Mask is a logical array the size of EOS_DERIVS (number of partial derivatives that can be computed, defined in Eos.h), where each index represents a specific partial derivative that can be calculated by the Eos unit. A .true. value in mask results in the corresponding derivative being calculated and returned. It should preferably be dimensioned as mask(EOS_VARS+1:EOS_NUM) in the calling routine to exactly match the arguments declaration in Eos Unit. Note that the indexing of mask does not begin at 1, but rather at one past the number of variables.
An implementation that does not need derivative quantities should set the mask equal to .false.
vecBegin : Index of first cell in eosData to handle. Can be used to limit operation to a subrange of cells, untested. If not present, the default is 1. vecEnd : Index of last cell in eosData to handle. Can be used to limit operation to a subrange of cells, untested. If not present, the default is vecLen.
SEE ALSO
Eos.h defines the variables used. Eos_wrapped sets up the data structure.