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_
112 if (!tYdefault.
valid())
114 const word YdefaultName
179 correctMassFractions();
193 calculatedFvPatchScalarField::typeName
198 for (
label i=1; i<Y_.size(); i++)
203 if (
mag(
max(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.
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.
T & ref() const
Return non-const reference or generate a fatal error.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
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,.
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
const word & constant() const
Return constant name.
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.