35template<
class ThermoType>
37Foam::radiation::mixtureFractionSoot<ThermoType>::checkThermo
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 "
54 <<
"singleStepReactingMixture" <<
exit(FatalError);
56 return dynamic_cast<const singleStepReactingMixture<ThermoType>&
>
67template<
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];
145template<
class ThermoType>
152template<
class ThermoType>
158 soot_ = sootMax_*(mapField/mapFieldMax_);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
Abstract base-class for fluid and solid thermodynamic properties.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Fundamental fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
virtual void correct()
Main update/correction routine.
mixtureFractionSoot(const dictionary &dict, const fvMesh &mesh, const word &modelType)
Construct from components.
virtual ~mixtureFractionSoot()
Destructor.
Base class for soot models.
const fvMesh & mesh_
Reference to the fvMesh.
sootModel(const dictionary &dict, const fvMesh &mesh, const word &modelType)
Construct from components.
const fvMesh & mesh() const
Reference to the mesh.
const dictionary & dict() const
Reference to the dictionary.
Single step reacting mixture.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word dictName("faMeshDefinition")
CombustionModel< rhoReactionThermo > & reaction
GeometricField< scalar, fvPatchField, volMesh > volScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< scalar > scalarList
List of scalar.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.