34 namespace combustionModels
39 template<
class ReactionThermo,
class ThermoType>
42 const word& modelType,
45 const word& combustionProperties
49 singleMixturePtr_(
nullptr),
54 this->
thermo().phasePropertyName(
"wFuel"),
63 semiImplicit_(this->coeffs_.getBool(
"semiImplicit"))
76 <<
"Inconsistent thermo package for " << this->
type() <<
" model:\n" 78 <<
"Please select a thermo package based on " 84 Info<<
"Combustion mode: semi-implicit" <<
endl;
88 Info<<
"Combustion mode: explicit" <<
endl;
95 template<
class ReactionThermo,
class ThermoType>
102 template<
class ReactionThermo,
class ThermoType>
108 const label specieI =
109 this->
thermo().composition().species().find(Y.
member());
113 wFuel_*singleMixturePtr_->specieStoichCoeffs()[specieI]
118 const label fNorm = singleMixturePtr_->specieProd()[specieI];
120 wSpecie /=
max(fNorm*(
Y - fres), scalar(1
e-2));
122 return -fNorm*wSpecie*fres + scalar(fNorm)*
fvm::Sp(wSpecie,
Y);
125 return wSpecie +
fvm::Sp(0.0*wSpecie,
Y);
129 template<
class ReactionThermo,
class ThermoType>
133 const label fuelI = singleMixturePtr_->fuelIndex();
137 return -singleMixturePtr_->qFuel()*(
R(YFuel) & YFuel);
141 template<
class ReactionThermo,
class ThermoType>
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Single step reacting mixture.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
constexpr char nl
The newline '\n' character (0x0a)
compressible::turbulenceModel & turb
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ignore writing from objectRegistry::writeObject()
static word member(const word &name)
Return member (name without the extension)
psiReactionThermo & thermo
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const dimensionSet dimVolume(pow3(dimLength))
const dimensionedScalar e
Elementary charge.
A class for handling words, derived from Foam::string.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Abstract base class for turbulence models (RAS, LES and laminar).
Thermo model wrapper for combustion models.
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s3].
virtual bool read()
Update properties from given dictionary.
#define R(A, B, C, D, E, F, K, M)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< volScalarField > & Y
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual ~singleStepCombustion()
Destructor.
Base class for combustion models using singleStepReactingMixture.
const Type * isA(const U &obj)
Check if dynamic_cast to Type is possible.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Calculate the finiteVolume matrix for implicit and explicit sources.
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
static constexpr const zero Zero
Global zero (0)