Commit 9a5b1adc authored by Andrew Heather's avatar Andrew Heather
Browse files

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
parent 09da3f69
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment