47 phaseName_(phaseName),
48 species_(specieNames),
54 {
"defaultSpecie",
"inertSpecie"}
58 defaultSpecieIndex_(-1),
59 active_(species_.size(),
true),
64 if (species_.found(defaultSpecie_))
66 defaultSpecieIndex_ = species_[defaultSpecie_];
71 <<
"default specie " << defaultSpecie_
72 <<
" not found in available species " << species_
90 if (header.headerOk())
112 if (!tYdefault.
valid())
114 const word YdefaultName
146 if (timeIO.headerOk())
150 else if (constantIO.headerOk())
179 correctMassFractions();
193 calculatedFvPatchScalarField::typeName
198 for (
label i=1; i<Y_.size(); i++)
203 if (
mag(
min(Yt).value()) < rootVSmall)
206 <<
"Sum of mass fractions is zero for species " << species()
237 Y_[i].max(scalar(0));
242 Y_[defaultSpecieIndex_] = scalar(1) - Yt;
243 Y_[defaultSpecieIndex_].
max(scalar(0));
#define forAll(list, i)
Loop across all elements in list.
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...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T & ref() const
Return non-const reference or generate a fatal error.
Templated form of IOobject providing type information for file reading and header type checking...
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
const dimensionSet dimless
const Time & time() const
Return the top-level database.
virtual word timeName() const
Return current time name.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void normalise()
Normalise the mass fractions.
bool valid() const
Is this temporary object valid,.
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
const word & constant() const
Return constant name.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
defineTypeNameAndDebug(combustionModel, 0)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
void max(const dimensioned< Type > &)
Mesh data needed to do the Finite Volume discretisation.
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.
dimensioned< scalar > mag(const dimensioned< Type > &)
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void correctMassFractions()
Scale the mass fractions to sum to 1.
basicSpecieMixture(const dictionary &, const wordList &specieNames, const fvMesh &, const word &)
Construct from dictionary, species names, mesh and phase name.
ITstream & lookupBackwardsCompatible(const wordList &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream, trying a list of keywords.