30 template<
class ThermoType>
33 const dictionary& thermoDict
41 new ThermoType(thermoDict.subDict(species_[i]))
45 return speciesData_[0];
49 template<
class ThermoType>
60 if (
mag(
max(
Yt).value()) < rootVSmall)
63 <<
"Sum of mass fractions is zero for species " << this->species()
76 template<
class ThermoType>
87 speciesData_(species_.size()),
88 mixture_(
"mixture", *thermoData[specieNames[0]]),
89 mixtureVol_(
"volMixture", *thermoData[specieNames[0]])
96 new ThermoType(*thermoData[species_[i]])
100 correctMassFractions();
104 template<
class ThermoType>
109 const word& phaseName
115 thermoDict.
lookup(
"species"),
119 speciesData_(species_.size()),
120 mixture_(
"mixture", constructSpeciesData(thermoDict)),
121 mixtureVol_(
"volMixture", speciesData_[0])
123 correctMassFractions();
129 template<
class ThermoType>
135 mixture_ = Y_[0][celli]*speciesData_[0];
139 mixture_ += Y_[
n][celli]*speciesData_[
n];
146 template<
class ThermoType>
153 mixture_ = Y_[0].boundaryField()[
patchi][facei]*speciesData_[0];
157 mixture_ += Y_[
n].boundaryField()[
patchi][facei]*speciesData_[
n];
164 template<
class ThermoType>
175 rhoInv += Y_[i][celli]/speciesData_[i].rho(p, T);
179 Y_[0][celli]/speciesData_[0].rho(p, T)/rhoInv*speciesData_[0];
184 Y_[
n][celli]/speciesData_[
n].rho(p, T)/rhoInv*speciesData_[
n];
191 template<
class ThermoType>
205 Y_[i].boundaryField()[
patchi][facei]/speciesData_[i].rho(p, T);
209 Y_[0].boundaryField()[
patchi][facei]/speciesData_[0].rho(p, T)/rhoInv
215 Y_[
n].boundaryField()[
patchi][facei]/speciesData_[
n].rho(p,T)
216 / rhoInv*speciesData_[
n];
223 template<
class ThermoType>
231 speciesData_[i] = ThermoType(thermoDict.
subDict(species_[i]));
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
const ThermoType & patchFaceVolMixture(const scalar p, const scalar T, const label patchi, const label facei) const
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
A class for handling words, derived from string.
const ThermoType & patchFaceMixture(const label patchi, const label facei) const
Foam::multiComponentMixture.
const ThermoType & cellMixture(const label celli) const
Mesh data needed to do the Finite Volume discretisation.
dimensioned< scalar > mag(const dimensioned< Type > &)
const ThermoType & cellVolMixture(const scalar p, const scalar T, const label celli) const
void read(const dictionary &)
Read dictionary.
volScalarField Yt(0.0 *Y[0])
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.