Fluid species and related fields

A number of air and fuel fields are specific to the species that comprise the fluid. The key appSrc files are createAirSpecies.H and createFuelSpecies.H. The key case files are constant/air/sofcSpeciesProperties and constant/fuel/sofcSpeciesProperties. See these for details of input data format.

As just indicated, the air species names and associated data are read from the constant/air/sofcSpeciesProperties file at run time by appSrc file createAirSpecies.H. A speciesTable object airSpeciesNames is instantiated from the list of species following the key word speciesList in the sofcSpeciesProperties file.


A pointerList, airSpecies, of pointers to sofcSpecie objects is created. The i-th air species can then be referenced as airSpecies[i]. For each specie in the air mixture, the specie properties of name, molar weight, molar charge (for Faraday’s law), reaction sign (produced=1, non-reacting=0, consumed=-1), enthalpy of formation, and standard entropy are stored in an sofcSpecie object, and can be accessed by class functions name(), MW(), ne(), rSign(), hForm() and sForm(), respectively. The sofcSpecie class can be found in src/libSrc.


After reading the species data, one of the species is designated as airInertSpecie. It is found after the keyword inertSofcSpecie in the sofcSpeciesProperties file. Note that the inertSpecie may well be chemically inert (non-reacting), but need not be. Here “inert” means that the mass fraction of the specie will not be computed from a partial differential equation, but rather calculated by adding the mass fractions of the other components and subtracting that sum from 1. The “inert” nomenclature follows that of OpenFOAM’s thermophysicalModels.


The sofcSpeciesProperties file concludes with a toddYoung dictionary of Todd-Young (2002) polynomial coefficients for molar isobaric heat capacity. These are used to create a pointerList, molarCpAir, of pointers to polyToddYoung objects. The polyToddYoung class has functions to evaluate the polynomial and to also evaluate definite integrals which correspond to enthalpy and entropy in the case of isobaric heat capacity (see src/libSrc/polyToddYoung). Thus, eg, we can evaluate the isobaric heat capacity of the i-th air species at ambient temperature with the expression molarCpAir[i].polyVal(Tair.internalField()).

The specie names are used to create a pointerList, Yair, to mass fraction fields with names of the form Ysp, where “sp” is one of the specie names. There is one such file for each specie in the mixture. The mass fraction field IOobjects are MUST_READ, so must exist as files in the starting time directory.
Mole fraction fields are calculated from the mass fraction fields. Their names have the form Xsp. The read/write attributes are NO_READ, AUTO_WRITE. Again we have a pointerList, Xair, so that Xair[i] references the mole fraction field of the i-th air species.


Finally, createAirSpecies.H establishes a pointerlist, diffSpAir, to scalar fields for the diffusivities of the individual species in the mixture. These have READ_IF_PRESENT and AUTO_WRITE attributes, and are created with initial value 1.


A completely analogous discussion applies to the fuel side.