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")))
73 "singleStepCombustion<CombThermoType, ThermoType>::" 74 "singleStepCombustion" 81 <<
"Inconsistent thermo package for " << this->
type() <<
" model:\n" 83 <<
"Please select a thermo package based on " 89 Info<<
"Combustion mode: semi-implicit" <<
endl;
93 Info<<
"Combustion mode: explicit" <<
endl;
100 template<
class CombThermoType,
class ThermoType>
107 template<
class CombThermoType,
class ThermoType>
113 const label specieI =
114 this->thermoPtr_->composition().species()[Y.
member()];
118 wFuel_*singleMixturePtr_->specieStoichCoeffs()[specieI]
123 const label fNorm = singleMixturePtr_->specieProd()[specieI];
125 wSpecie /=
max(fNorm*(Y - fres), scalar(1
e-2));
127 return -fNorm*wSpecie*fres + fNorm*
fvm::Sp(wSpecie, Y);
131 return wSpecie +
fvm::Sp(0.0*wSpecie, Y);
136 template<
class CombThermoType,
class ThermoType>
140 const label fuelI = singleMixturePtr_->fuelIndex();
142 const_cast<volScalarField&
>(this->thermoPtr_->composition().Y(fuelI));
144 return -singleMixturePtr_->qFuel()*(
R(YFuel) & YFuel);
148 template<
class CombThermoType,
class ThermoType>
159 this->mesh_.time().timeName(),
167 zeroGradientFvPatchScalarField::typeName
180 template<
class CombThermoType,
class ThermoType>
word member() const
Return member (name without the extension)
virtual tmp< volScalarField > Sh() const
Sensible enthalpy source term.
Mesh data needed to do the Finite Volume discretisation.
Calculate the matrix for implicit and explicit sources.
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
#define R(A, B, C, D, E, F, K, M)
A class for handling words, derived from string.
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)
DimensionedInternalField & dimensionedInternalField()
Return dimensioned internal field.
const dimensionSet dimEnergy
virtual bool read()
Update properties from given dictionary.
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual tmp< volScalarField > dQ() const
Heat release rate calculated from fuel consumption rate matrix.
static word groupName(Name name, const word &group)
const double e
Elementary charge.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
PtrList< volScalarField > & Y
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
virtual ~singleStepCombustion()
Destructor.
const dimensionSet dimVolume(pow3(dimLength))
bool read(const char *, int32_t &)
Single step reacting mixture.
psiReactionThermo & thermo
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.