33 template<
class ThermoType>
47 mesh_.time().timeName(),
55 nuSoot_(coeffsDict_.lookup<scalar>(
"nuSoot")),
56 Wsoot_(coeffsDict_.lookup<scalar>(
"Wsoot")),
60 coeffsDict_.lookupOrDefault<
word>(
"mappingField",
"none")
64 const word& combustionName = combustionModel::combustionPropertiesName;
76 ? mesh.
lookupObject<psiCombustionType>(combustionName).mixture()
81 ? mesh.
lookupObject<psiCombustionType>(combustionName).reaction()
87 const scalar stoichCoeff = reaction.
rhs()[i].stoichCoeff;
88 totalMol +=
mag(stoichCoeff);
98 const label speciei = reaction.
rhs()[i].index;
99 const scalar stoichCoeff = reaction.
rhs()[i].stoichCoeff;
100 Xi[i] =
mag(stoichCoeff)/totalMol;
108 const label speciei = reaction.
rhs()[i].index;
109 Yprod0[speciei] = mixture.
specieThermos()[speciei].W()/Wm*Xi[i];
112 const scalar XSoot = nuSoot_/totalMol;
115 sootMax_ = XSoot*Wsoot_/Wm;
117 Info <<
"Maximum soot mass concentrations: " << sootMax_ <<
nl;
119 if (mappingFieldName_ ==
"none")
121 const label index = reaction.
rhs()[0].index;
122 mappingFieldName_ = mixture.
Y(index).name();
125 const label mapFieldIndex = mixture.
species()[mappingFieldName_];
127 mapFieldMax_ = Yprod0[mapFieldIndex];
133 template<
class ThermoType>
141 template<
class ThermoType>
147 soot_ = sootMax_*(mapField/mapFieldMax_);
#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.
virtual ~mixtureFraction()
Destructor.
A list of keyword definitions, which are a keyword followed by any number of values (e...
bool foundObject(const word &name) const
Is the named Type found?
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const PtrList< ThermoType > & specieThermos() const
Return the raw specie thermodynamic data.
A class for handling words, derived from string.
Foam::multiComponentMixture.
CombustionModel< rhoReactionThermo > & reaction
mixtureFraction(const dictionary &dict, const fvMesh &mesh, const word &modelType)
Construct from components.
virtual void correct()
Main update/correction routine.
Mesh data needed to do the Finite Volume discretisation.
Base class for soot models.
dimensioned< scalar > mag(const dimensioned< Type > &)
Base class for combustion models using multiComponentMixture.
const List< specieCoeffs > & rhs() const
Return the components of the right hand side.
phaseChangeTwoPhaseMixture & mixture
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
const speciesTable & species() const
Return the table of species.