mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated calculation of heat release calculation (dQ)
- Earlier calculation of dQ was misleading - gave a measure of temperature change and not heat release - also mixed molar/mass units so value was somewhat random - Updated to calculate enthalpy/sec [m2/s3] and improved/more descriptive comments
This commit is contained in:
@ -551,7 +551,7 @@ Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
|
||||
dimensionedScalar
|
||||
(
|
||||
"zero",
|
||||
dimensionSet(1, -3, -1 , 0, 0, 0, 0),
|
||||
dimensionSet(0, 2, -3 , 0, 0, 0, 0),
|
||||
0.0
|
||||
)
|
||||
)
|
||||
@ -561,20 +561,21 @@ Foam::ODEChemistryModel<CompType, ThermoType>::dQ() const
|
||||
{
|
||||
scalarField& dQ = tdQ();
|
||||
|
||||
scalarField cp(dQ.size(), 0.0);
|
||||
scalarField rhoEff(dQ.size(), 0.0);
|
||||
|
||||
forAll(Y_, i)
|
||||
{
|
||||
forAll(dQ, cellI)
|
||||
{
|
||||
scalar Ti = this->thermo().T()[cellI];
|
||||
cp[cellI] += Y_[i][cellI]*specieThermo_[i].Cp(Ti);
|
||||
scalar hi = specieThermo_[i].h(Ti);
|
||||
scalar pi = this->thermo().p()[cellI];
|
||||
rhoEff[cellI] += Y_[i][cellI]*specieThermo_[i].rho(pi, Ti);
|
||||
scalar hi = specieThermo_[i].H(Ti);
|
||||
dQ[cellI] -= hi*RR_[i][cellI];
|
||||
}
|
||||
}
|
||||
|
||||
dQ /= cp;
|
||||
dQ /= rhoEff;
|
||||
}
|
||||
|
||||
return tdQ;
|
||||
|
||||
@ -90,7 +90,7 @@ protected:
|
||||
//- Chemistry solver
|
||||
autoPtr<chemistrySolver<CompType, ThermoType> > solver_;
|
||||
|
||||
//- Chemical source term
|
||||
//- Chemical source term [kg/m3/s]
|
||||
PtrList<scalarField> RR_;
|
||||
|
||||
|
||||
@ -180,7 +180,7 @@ public:
|
||||
//- Return the chemical time scale
|
||||
virtual tmp<volScalarField> tc() const;
|
||||
|
||||
//- Return the heat release
|
||||
//- Return the heat release, i.e. enthalpy/sec [m2/s3]
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user