11.4 Alternative Method for Defining Species

Sec:defining_species described how species can be defined by using the SPECIES keyword in the Config file. Sec:init_species then described how the properties of the species can be set using various subroutines defined in the Multispecies unit. There is an alternative to these approaches which uses setup variables to define the species, then uses runtime parameters to set the properties of each species. This allows users to change the number and names of species without modifying the Config file and also allows users to change properties without recompiling the code.

Species can be defined using the species setup variable. For example, to create two species called AIR and SF6 one would specify species=air,sf6 in the simulation setup command. Using this setup variable and using the SPECIES keyword in the Config file are mutually exclusive. Thus, the user must choose which method they wish to use for a given simulation. Certain units, such as the Opacity unit, requires the use of the setup variable.

When species are defined using the setup variable approach, the Multispecies unit will automatically define several runtime parameters for each species. These runtime parameters can be used set the properties shown in Table 11.1. The runtime parameter names contain the species name. Table 11.2 shows an example of the mapping between runtime parameters and Multispecies properties, where <spec> is replaced by the species name as specified in the species setup argument list. Some of these runtime parameters are arrays, and thus the <N> is a number ranging from 1 to MS_MAXELEMS. The Simulation_initSpecies subroutine can be used to override the runtime parameter settings.


Table 11.2: Automatically Generated Multispecies Runtime Parameters
Property Name Runtime Parameter Name
A ms_<spec>A
Z ms_<spec>Z
N ms_<spec>Neutral
E ms_<spec>Negative
BE ms_<spec>BindEnergy
GAMMA ms_<spec>Gamma
MS_ZMIN ms_<spec>Zmin
MS_EOSTYPE eos_<spec>EosType
MS_EOSSUBTYPE eos_<spec>SubType
MS_EOSZFREEFILE eos_<spec>TableFile
MS_EOSENERFILE eos_<spec>TableFile
MS_EOSPRESFILE eos_<spec>TableFile
MS_NUMELEMS ms_<spec>NumElems
MS_ZELEMS ms_<spec>ZElems_<N>
MS_AELEMS ms_<spec>AElems_<N>
MS_FRACTIONS ms_<spec>Fractions_<N>
MS_OPLOWTEMP op_<spec>LowTemp