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>
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().find(mappingFieldName_);
138 mapFieldMax_ = mixture_.Yprod0()[mapFieldIndex];
145 template<
class ThermoType>
152 template<
class ThermoType>
158 soot_ = sootMax_*(mapField/mapFieldMax_);
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual ~mixtureFractionSoot()
Destructor.
Abstract base-class for fluid and solid thermodynamic properties.
mixtureFractionSoot(const dictionary &dict, const fvMesh &mesh, const word &modelType)
Construct from components.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Single step reacting mixture.
constexpr char nl
The newline '\n' character (0x0a)
virtual void correct()
Main update/correction routine.
const word dictName("faMeshDefinition")
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
#define forAll(list, i)
Loop across all elements in list.
psiReactionThermo & thermo
Base class for soot models.
A class for handling words, derived from Foam::string.
Fundamental fluid thermodynamic properties.
This soot model is purely an state model. The amount of soot produced is determined by a single step ...
CombustionModel< rhoReactionThermo > & reaction
Mesh data needed to do the Finite Volume discretisation.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
Defines the attributes of an object for which implicit objectRegistry management is supported...