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:
andy
2010-01-27 15:56:17 +00:00
parent 09da3f69a8
commit 9a5b1adc47
2 changed files with 8 additions and 7 deletions

View File

@ -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;

View File

@ -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;