Go to the documentation of this file.
35 template<
class ThermoType>
42 if (
isA<singleStepReactingMixture<ThermoType>>(
thermo))
44 return dynamic_cast<const singleStepReactingMixture<ThermoType>&
>
52 <<
"Inconsistent thermo package for " <<
thermo.type()
53 <<
"Please select a thermo package based on "
56 return dynamic_cast<const singleStepReactingMixture<ThermoType>&
>
67 template<
class ThermoType>
81 mesh_.time().timeName(),
88 coeffsDict_(
dict.subOrEmptyDict(modelType +
"Coeffs")),
89 nuSoot_(coeffsDict_.get<scalar>(
"nuSoot")),
90 Wsoot_(coeffsDict_.get<scalar>(
"Wsoot")),
94 coeffsDict_.getOrDefault<
word>(
"mappingField",
"none")
98 mixture_(checkThermo(thermo_))
102 const scalarList& specieStoichCoeffs(mixture_.specieStoichCoeffs());
104 scalar totalMol = 0.0;
107 label speciei =
reaction.rhs()[i].index;
108 totalMol +=
mag(specieStoichCoeffs[speciei]);
118 const label speciei =
reaction.rhs()[i].index;
119 Xi[i] =
mag(specieStoichCoeffs[speciei])/totalMol;
120 Wm += Xi[i]*mixture_.speciesData()[speciei].W();
123 const scalar XSoot = nuSoot_/totalMol;
126 sootMax_ = XSoot*Wsoot_/Wm;
128 Info <<
"Maximum soot mass concentrations: " << sootMax_ <<
nl;
130 if (mappingFieldName_ ==
"none")
132 const label index =
reaction.rhs()[0].index;
133 mappingFieldName_ = mixture_.Y(index).name();
136 const label mapFieldIndex = mixture_.species()[mappingFieldName_];
138 mapFieldMax_ = mixture_.Yprod0()[mapFieldIndex];
145 template<
class ThermoType>
152 template<
class ThermoType>
158 soot_ = sootMax_*(mapField/mapFieldMax_);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
psiReactionThermo & thermo
const word dictName("faMeshDefinition")
Fundamental fluid thermodynamic properties.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
#define forAll(list, i)
Loop across all elements in list.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
CombustionModel< rhoReactionThermo > & reaction
const TargetType * isA(const Type &t)
Check if dynamic_cast to TargetType is possible.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual ~mixtureFractionSoot()
Destructor.
Base class for soor models.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Single step reacting mixture.
mixtureFractionSoot(const dictionary &dict, const fvMesh &mesh, const word &modelType)
Construct from components.
This soot model is purely an state model. The amount of soot produced is determined by a single step ...
virtual void correct()
Main update/correction routine.
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...