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].W()*speciesData_[0];
139 mixture_ += Y_[
n][celli]/speciesData_[
n].W()*speciesData_[
n];
146 template<
class ThermoType>
154 Y_[0].boundaryField()[
patchi][facei]
155 /speciesData_[0].W()*speciesData_[0];
160 Y_[
n].boundaryField()[
patchi][facei]
161 /speciesData_[
n].W()*speciesData_[
n];
168 template<
class ThermoType>
179 rhoInv += Y_[i][celli]/speciesData_[i].rho(p, T);
183 Y_[0][celli]/speciesData_[0].rho(p, T)/rhoInv*speciesData_[0];
188 Y_[
n][celli]/speciesData_[
n].rho(p, T)/rhoInv*speciesData_[
n];
195 template<
class ThermoType>
209 Y_[i].boundaryField()[
patchi][facei]/speciesData_[i].rho(p, T);
213 Y_[0].boundaryField()[
patchi][facei]/speciesData_[0].rho(p, T)/rhoInv
219 Y_[
n].boundaryField()[
patchi][facei]/speciesData_[
n].rho(p,T)
220 / rhoInv*speciesData_[
n];
227 template<
class ThermoType>
235 speciesData_[i] = ThermoType(thermoDict.
subDict(species_[i]));
const ThermoType & patchFaceMixture(const label patchi, const label facei) const
#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.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const ThermoType & cellVolMixture(const scalar p, const scalar T, const label celli) const
A class for handling words, derived from string.
const ThermoType & cellMixture(const label celli) const
Foam::multiComponentMixture.
const ThermoType & patchFaceVolMixture(const scalar p, const scalar T, const label patchi, const label facei) const
Mesh data needed to do the Finite Volume discretisation.
dimensioned< scalar > mag(const dimensioned< Type > &)
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.