31 namespace combustionModels
36 template<
class CombThermoType,
class ThermoType>
37 singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
39 const word& modelType,
44 CombThermoType(modelType, mesh, phaseName),
45 singleMixturePtr_(NULL),
59 semiImplicit_(
readBool(this->coeffs_.lookup(
"semiImplicit")))
72 <<
"Inconsistent thermo package for " << this->
type() <<
" model:\n" 74 <<
"Please select a thermo package based on " 80 Info<<
"Combustion mode: semi-implicit" <<
endl;
84 Info<<
"Combustion mode: explicit" <<
endl;
91 template<
class CombThermoType,
class ThermoType>
98 template<
class CombThermoType,
class ThermoType>
104 const label specieI =
105 this->thermoPtr_->composition().species()[Y.
member()];
109 wFuel_*singleMixturePtr_->specieStoichCoeffs()[specieI]
114 const label fNorm = singleMixturePtr_->specieProd()[specieI];
116 wSpecie /=
max(fNorm*(Y - fres), scalar(1
e-2));
118 return -fNorm*wSpecie*fres + fNorm*
fvm::Sp(wSpecie, Y);
122 return wSpecie +
fvm::Sp(0.0*wSpecie, Y);
127 template<
class CombThermoType,
class ThermoType>
131 const label fuelI = singleMixturePtr_->fuelIndex();
133 const_cast<volScalarField&
>(this->thermoPtr_->composition().Y(fuelI));
135 return -singleMixturePtr_->qFuel()*(
R(YFuel) & YFuel);
139 template<
class CombThermoType,
class ThermoType>
150 this->mesh_.time().timeName(),
170 template<
class CombThermoType,
class ThermoType>
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
virtual tmp< volScalarField > dQ() const
Heat release rate calculated from fuel consumption rate matrix.
virtual tmp< volScalarField > Sh() const
Sensible enthalpy source term.
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)
const double e
Elementary charge.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Single step reacting mixture.
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
word member() const
Return member (name without the extension)
psiReactionThermo & thermo
const dimensionSet dimVolume(pow3(dimLength))
bool read(const char *, int32_t &)
A class for handling words, derived from string.
static word groupName(Name name, const word &group)
const dimensionSet dimEnergy
Internal & ref()
Return a reference to the dimensioned internal field.
virtual bool read()
Update properties from given dictionary.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
#define R(A, B, C, D, E, F, K, M)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
PtrList< volScalarField > & Y
Mesh data needed to do the Finite Volume discretisation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual ~singleStepCombustion()
Destructor.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
A class for managing temporary objects.
T & ref() const
Return non-const reference or generate a fatal error.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Calculate the matrix for implicit and explicit sources.