47 phaseName_(phaseName),
48 species_(specieNames),
52 ? thermoDict.lookupBackwardsCompatible<
word>
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_
77 tmp<volScalarField> tYdefault;
81 typeIOobject<volScalarField> header
90 if (header.headerOk())
112 if (!tYdefault.valid())
114 const word YdefaultName
119 typeIOobject<volScalarField> timeIO
128 typeIOobject<volScalarField> constantIO
131 mesh.time().constant(),
137 typeIOobject<volScalarField> time0IO
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.
Generic GeometricField class.
void max(const dimensioned< Type > &)
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Internal &, const PtrList< PatchField< Type >> &)
Return a temporary field constructed from name,.
static word groupName(Name name, const word &group)
const word & timeName() const
Return current time name (for backwards-compatibility)
Specialisation of basicMixture for a mixture consisting of a number for molecular species.
basicSpecieMixture(const dictionary &, const wordList &specieNames, const fvMesh &, const word &)
Construct from dictionary, species names, mesh and phase name.
void correctMassFractions()
Scale the mass fractions to sum to 1.
void normalise()
Normalise the mass fractions.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const dimensionSet dimless
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
VolField< scalar > volScalarField
dimensioned< scalar > mag(const dimensioned< Type > &)
defineTypeNameAndDebug(combustionModel, 0)
SolverPerformance< Type > solve(fvMatrix< Type > &, const word &)
Solve returning the solution statistics given convergence tolerance.