31 namespace combustionModels
36 template<
class ReactionThermo,
class ThermoType>
37 singleStepCombustion<ReactionThermo, ThermoType>::singleStepCombustion
39 const word& modelType,
40 ReactionThermo& thermo,
42 const word& combustionProperties
46 singleMixturePtr_(
nullptr),
51 this->
thermo().phasePropertyName(
"wFuel"),
60 semiImplicit_(
readBool(this->coeffs_.lookup(
"semiImplicit")))
73 <<
"Inconsistent thermo package for " << this->
type() <<
" model:\n" 75 <<
"Please select a thermo package based on " 81 Info<<
"Combustion mode: semi-implicit" <<
endl;
85 Info<<
"Combustion mode: explicit" <<
endl;
92 template<
class ReactionThermo,
class ThermoType>
99 template<
class ReactionThermo,
class ThermoType>
105 const label specieI =
110 wFuel_*singleMixturePtr_->specieStoichCoeffs()[specieI]
115 const label fNorm = singleMixturePtr_->specieProd()[specieI];
117 wSpecie /=
max(fNorm*(Y - fres), scalar(1
e-2));
119 return -fNorm*wSpecie*fres + fNorm*
fvm::Sp(wSpecie, Y);
123 return wSpecie +
fvm::Sp(0.0*wSpecie, Y);
128 template<
class ReactionThermo,
class ThermoType>
132 const label fuelI = singleMixturePtr_->fuelIndex();
136 return -singleMixturePtr_->qFuel()*(
R(YFuel) & YFuel);
140 template<
class ReactionThermo,
class ThermoType>
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Single step reacting mixture.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< fvMatrix< Type > > Sp(const volScalarField::Internal &, const GeometricField< Type, fvPatchField, volMesh > &)
rhoReactionThermo & thermo
static word member(const word &name)
Return member (name without the extension)
const dimensionSet dimVolume(pow3(dimLength))
A class for handling words, derived from string.
Abstract base class for turbulence models (RAS, LES and laminar).
Thermo model wrapper for combustion models.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
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)
virtual ~singleStepCombustion()
Destructor.
const doubleScalar e
Elementary charge.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Calculate the matrix for implicit and explicit sources.
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.