33 template<
class ThermoType>
44 new ThermoType(
thermoDict.subDict(species_[i]))
48 return speciesData_[0];
52 template<
class ThermoType>
58 for (label
n=1;
n<Y_.size();
n++)
63 if (
mag(
min(
Yt).value()) < ROOTVSMALL)
66 <<
"Sum of mass fractions is zero for species " << this->species()
69 <<
"Min of mass fraction sum " <<
min(
Yt).value()
76 if (
diff > ROOTVSMALL)
79 <<
"Sum of mass fractions is different from one for species " 82 <<
"Max of mass fraction sum differs from 1 by " <<
diff 95 template<
class ThermoType>
102 const word& phaseName
106 speciesData_(species_.size()),
107 mixture_(
"mixture", *thermoData[specieNames[0]]),
108 mixtureVol_(
"volMixture", *thermoData[specieNames[0]])
115 new ThermoType(*thermoData[
species_[i]])
119 correctMassFractions();
123 template<
class ThermoType>
128 const word& phaseName
138 speciesData_(species_.size()),
139 mixture_(
"mixture", constructSpeciesData(
thermoDict)),
140 mixtureVol_(
"volMixture", speciesData_[0])
142 correctMassFractions();
148 template<
class ThermoType>
154 mixture_ = Y_[0][celli]*speciesData_[0];
156 for (label
n=1;
n<Y_.size();
n++)
158 mixture_ += Y_[
n][celli]*speciesData_[
n];
165 template<
class ThermoType>
172 mixture_ = Y_[0].boundaryField()[patchi][facei]*speciesData_[0];
174 for (label
n=1;
n<Y_.size();
n++)
176 mixture_ += Y_[
n].boundaryField()[patchi][facei]*speciesData_[
n];
183 template<
class ThermoType>
194 rhoInv += Y_[i][celli]/speciesData_[i].rho(
p,
T);
198 Y_[0][celli]/speciesData_[0].rho(
p,
T)/rhoInv*speciesData_[0];
200 for (label
n=1;
n<Y_.size();
n++)
203 Y_[
n][celli]/speciesData_[
n].rho(
p,
T)/rhoInv*speciesData_[
n];
210 template<
class ThermoType>
224 Y_[i].boundaryField()[patchi][facei]/speciesData_[i].rho(
p,
T);
228 Y_[0].boundaryField()[patchi][facei]/speciesData_[0].rho(
p,
T)/rhoInv
231 for (label
n=1;
n<Y_.size();
n++)
234 Y_[
n].boundaryField()[patchi][facei]/speciesData_[
n].rho(
p,
T)
235 / rhoInv*speciesData_[
n];
242 template<
class ThermoType>
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Lookup type of boundary radiation properties.
const ThermoType & patchFaceVolMixture(const scalar p, const scalar T, const label patchi, const label facei) const
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
speciesTable species_
Table of specie names.
A class for handling words, derived from Foam::string.
const ThermoType & patchFaceMixture(const label patchi, const label facei) const
Foam::multiComponentMixture.
const dictionary & thermoDict
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define WarningInFunction
Report a warning using Foam::Warning.
const ThermoType & cellMixture(const label celli) const
Mesh data needed to do the Finite Volume discretisation.
const ThermoType & cellVolMixture(const scalar p, const scalar T, const label celli) const
Ostream & incrIndent(Ostream &os)
Increment the indent level.
void read(const dictionary &)
Read dictionary.
volScalarField Yt(0.0 *Y[0])