thermo: Standardise property names and remove molar functions
All property functions in the low-level templated thermo property implementations and the high-level virtual interfaces have been made consistent. All energies and enthalpies are lower case to denote that they are specific quantities. Molar functions have been removed as these are no longer used anywhere.
This commit is contained in:
@ -99,7 +99,7 @@ void Foam::CloudFilmTransfer<CloudType>::absorbInteraction
|
||||
facei,
|
||||
mass, // mass
|
||||
mass*Urel, // momentum
|
||||
mass*liq.Hs(pc, p.T()) // energy
|
||||
mass*liq.hs(pc, p.T()) // energy
|
||||
);
|
||||
|
||||
this->nParcelsTransferred()++;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -57,7 +57,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
OFstream plotFile(liquidName + ".dat");
|
||||
|
||||
plotFile << "# p T rho Cp Hs Ha pv hl Cpg mu mug kappa kappag sigma" << nl;
|
||||
plotFile << "# p T rho Cp hs ha pv hl Cpg mu mug kappa kappag sigma" << nl;
|
||||
|
||||
for (label pi = 0; pi < nP; ++ pi)
|
||||
{
|
||||
@ -72,8 +72,8 @@ int main(int argc, char *argv[])
|
||||
<< T << ' '
|
||||
<< liquidPtr->rho(p, T) << ' '
|
||||
<< liquidPtr->Cp(p, T) << ' '
|
||||
<< liquidPtr->Hs(p, T) << ' '
|
||||
<< liquidPtr->Ha(p, T) << ' '
|
||||
<< liquidPtr->hs(p, T) << ' '
|
||||
<< liquidPtr->ha(p, T) << ' '
|
||||
<< liquidPtr->pv(p, T) << ' '
|
||||
<< liquidPtr->hl(p, T) << ' '
|
||||
<< liquidPtr->Cpg(p, T) << ' '
|
||||
|
||||
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
ThermoMixture
|
||||
Test-thermoMixture
|
||||
|
||||
Description
|
||||
|
||||
@ -33,9 +33,6 @@ Description
|
||||
#include "specie.H"
|
||||
#include "perfectGas.H"
|
||||
#include "hConstThermo.H"
|
||||
#include "sensibleEnthalpy.H"
|
||||
#include "thermo.H"
|
||||
#include "constTransport.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -44,33 +41,41 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
typedef constTransport
|
||||
<
|
||||
species::thermo
|
||||
<
|
||||
hConstThermo<perfectGas<specie>>,
|
||||
sensibleEnthalpy
|
||||
>
|
||||
> ThermoType;
|
||||
typedef hConstThermo<perfectGas<specie>> ThermoType;
|
||||
|
||||
dictionary dict(IFstream("thermoDict")());
|
||||
|
||||
ThermoType t1("specie1", dict.subDict("specie1"));
|
||||
ThermoType t2("specie2", dict.subDict("specie2"));
|
||||
|
||||
Info<< "Checking Cp of mixture of hConstThermo" << endl;
|
||||
Info<< "Checking Cp of mixture of hConstThermo:" << nl << endl;
|
||||
|
||||
Info<< "W 1, 2, (1 + 2) = " << t1.W() << " " << t2.W() << " "
|
||||
<< (t1 + t2).W() << endl;
|
||||
ThermoType t1Plus2(0.5*t1 + 0.5*t2);
|
||||
|
||||
Info<< "Cp 1, 2, 1 + 2 = " << t1.cp(1, 1) << " " << t2.cp(1, 1) << " "
|
||||
<< (t1 + t2).cp(1, 1) << endl;
|
||||
ThermoType t1PlusEq2(0.5*t1);
|
||||
t1PlusEq2 += 0.5*t2;
|
||||
|
||||
ThermoType t3(t1);
|
||||
t3 += t2;
|
||||
Info<< "Cp (1 += 2) = " << t3.cp(1, 1) << endl;
|
||||
Info<< " W_1/W_2/W_{1+2}/W_{1+=2} = "
|
||||
<< t1.W() << "/"
|
||||
<< t2.W() << "/"
|
||||
<< t1Plus2.W() << "/"
|
||||
<< t1PlusEq2.W()
|
||||
<< " [kg/kmol] " << nl << endl;
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
Info<< "Cp_1/Cp_2/Cp_{1+2}/Cp_{1+=2} = "
|
||||
<< t1.Cp(1, 1) << "/"
|
||||
<< t2.Cp(1, 1) << "/"
|
||||
<< t1Plus2.Cp(1, 1) << "/"
|
||||
<< t1PlusEq2.Cp(1, 1)
|
||||
<< " [J/kg/K]" << endl
|
||||
<< " = "
|
||||
<< t1.Cp(1, 1)*t1.W() << "/"
|
||||
<< t2.Cp(1, 1)*t2.W() << "/"
|
||||
<< t1Plus2.Cp(1, 1)*t1Plus2.W() << "/"
|
||||
<< t1PlusEq2.Cp(1, 1)*t1PlusEq2.W()
|
||||
<< " [J/kmol/K]" << nl << endl;
|
||||
|
||||
Info<< "End" << nl << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -11,12 +11,6 @@ specie1
|
||||
Cv 1;
|
||||
Hf 0;
|
||||
}
|
||||
|
||||
transport
|
||||
{
|
||||
mu 1;
|
||||
Pr 1;
|
||||
}
|
||||
}
|
||||
|
||||
specie2
|
||||
@ -32,10 +26,4 @@ specie2
|
||||
Cv 2;
|
||||
Hf 0;
|
||||
}
|
||||
|
||||
transport
|
||||
{
|
||||
mu 1;
|
||||
Pr 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "products " << (1/products.Y())*products << ';' << endl;
|
||||
|
||||
scalar Tad = products.THa(reactants.Ha(P, T0), P, 1000.0);
|
||||
scalar Tad = products.Tha(reactants.ha(P, T0), P, 1000.0);
|
||||
Info<< "Tad = " << Tad << nl << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -248,7 +248,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
scalar equilibriumFlameTemperatureNew =
|
||||
products.THa(reactants.Ha(P, T0), P, adiabaticFlameTemperature);
|
||||
products.Tha(reactants.ha(P, T0), P, adiabaticFlameTemperature);
|
||||
|
||||
if (j==0)
|
||||
{
|
||||
|
||||
@ -133,7 +133,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
Info<< "Adiabatic flame temperature of mixture " << rMix.name() << " = "
|
||||
<< products.THa(reactants.Ha(p, T0), p, 1000.0) << " K" << endl;
|
||||
<< products.Tha(reactants.ha(p, T0), p, 1000.0) << " K" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ Usage
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
hf 0;
|
||||
Cv 10;
|
||||
}
|
||||
equationOfState
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,7 @@ Class
|
||||
Foam::functionObjects::totalEnthalpy
|
||||
|
||||
Description
|
||||
Calculates and writes the total enthalpy (ha + K) as the volScalarField
|
||||
'Ha'.
|
||||
Calculates and writes the total enthalpy (ha + K) as the volScalarField Ha
|
||||
|
||||
See also
|
||||
Foam::functionObjects::fvMeshFunctionObject
|
||||
|
||||
@ -67,7 +67,7 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::CpEff
|
||||
|
||||
template<class ParcelType>
|
||||
template<class TrackCloudType>
|
||||
Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HsEff
|
||||
Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::hsEff
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
@ -79,9 +79,9 @@ Foam::scalar Foam::ReactingMultiphaseParcel<ParcelType>::HsEff
|
||||
) const
|
||||
{
|
||||
return
|
||||
this->Y_[GAS]*cloud.composition().Hs(idG, YGas_, p, T)
|
||||
+ this->Y_[LIQ]*cloud.composition().Hs(idL, YLiquid_, p, T)
|
||||
+ this->Y_[SLD]*cloud.composition().Hs(idS, YSolid_, p, T);
|
||||
this->Y_[GAS]*cloud.composition().hs(idG, YGas_, p, T)
|
||||
+ this->Y_[LIQ]*cloud.composition().hs(idL, YLiquid_, p, T)
|
||||
+ this->Y_[SLD]*cloud.composition().hs(idS, YSolid_, p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -378,7 +378,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc
|
||||
cloud.UTransRef()[this->cell()] += dm*U0;
|
||||
|
||||
cloud.hsTransRef()[this->cell()] +=
|
||||
dm*HsEff(cloud, td, pc, T0, idG, idL, idS);
|
||||
dm*hsEff(cloud, td, pc, T0, idG, idL, idS);
|
||||
|
||||
cloud.phaseChange().addToPhaseChangeMass(np0*mass1);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ private:
|
||||
|
||||
//- Return the mixture effective sensible enthalpy
|
||||
template<class TrackCloudType>
|
||||
scalar HsEff
|
||||
scalar hsEff
|
||||
(
|
||||
TrackCloudType& cloud,
|
||||
trackingData& td,
|
||||
|
||||
@ -350,8 +350,8 @@ Foam::scalar Foam::SprayParcel<ParcelType>::chi
|
||||
scalar TBoil = liq.pvInvert(p0);
|
||||
|
||||
scalar hl = liq.hl(pAmb, TBoil);
|
||||
scalar iTp = liq.Ha(pAmb, T0) - pAmb/liq.rho(pAmb, T0);
|
||||
scalar iTb = liq.Ha(pAmb, TBoil) - pAmb/liq.rho(pAmb, TBoil);
|
||||
scalar iTp = liq.ha(pAmb, T0) - pAmb/liq.rho(pAmb, T0);
|
||||
scalar iTb = liq.ha(pAmb, TBoil) - pAmb/liq.rho(pAmb, TBoil);
|
||||
|
||||
chi += X[i]*(iTp - iTb)/hl;
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ Foam::scalarField Foam::CompositionModel<CloudType>::X
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
Foam::scalar Foam::CompositionModel<CloudType>::ha
|
||||
(
|
||||
const label phasei,
|
||||
const scalarField& Y,
|
||||
@ -333,7 +333,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HMixture += Y[i]*thermo_.liquids().properties()[i].Ha(p, T);
|
||||
HMixture += Y[i]*thermo_.liquids().properties()[i].ha(p, T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -341,7 +341,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HMixture += Y[i]*thermo_.solids().properties()[i].Ha(T);
|
||||
HMixture += Y[i]*thermo_.solids().properties()[i].ha(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -357,7 +357,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::H
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
Foam::scalar Foam::CompositionModel<CloudType>::hs
|
||||
(
|
||||
const label phasei,
|
||||
const scalarField& Y,
|
||||
@ -366,7 +366,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
) const
|
||||
{
|
||||
const phaseProperties& props = phaseProps_[phasei];
|
||||
scalar HsMixture = 0.0;
|
||||
scalar hsMixture = 0.0;
|
||||
switch (props.phase())
|
||||
{
|
||||
case phaseProperties::GAS:
|
||||
@ -374,7 +374,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
forAll(Y, i)
|
||||
{
|
||||
label cid = props.carrierId(i);
|
||||
HsMixture += Y[i]*carrierMcThermoPtr_->hsi(cid, p, T);
|
||||
hsMixture += Y[i]*carrierMcThermoPtr_->hsi(cid, p, T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -382,8 +382,8 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HsMixture +=
|
||||
Y[i]*(thermo_.liquids().properties()[i].Hs(p, T));
|
||||
hsMixture +=
|
||||
Y[i]*(thermo_.liquids().properties()[i].hs(p, T));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -391,7 +391,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HsMixture += Y[i]*thermo_.solids().properties()[i].Hs(T);
|
||||
hsMixture += Y[i]*thermo_.solids().properties()[i].hs(T);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -403,57 +403,7 @@ Foam::scalar Foam::CompositionModel<CloudType>::Hs
|
||||
}
|
||||
}
|
||||
|
||||
return HsMixture;
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::scalar Foam::CompositionModel<CloudType>::Hc
|
||||
(
|
||||
const label phasei,
|
||||
const scalarField& Y,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
const phaseProperties& props = phaseProps_[phasei];
|
||||
scalar HcMixture = 0.0;
|
||||
switch (props.phase())
|
||||
{
|
||||
case phaseProperties::GAS:
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
label cid = props.carrierId(i);
|
||||
HcMixture += Y[i]*carrierMcThermoPtr_->hfi(cid);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case phaseProperties::LIQUID:
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HcMixture += Y[i]*thermo_.liquids().properties()[i].Hf();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case phaseProperties::SOLID:
|
||||
{
|
||||
forAll(Y, i)
|
||||
{
|
||||
HcMixture += Y[i]*thermo_.solids().properties()[i].Hf();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Unknown phase enumeration"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
return HcMixture;
|
||||
return hsMixture;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ public:
|
||||
// Evaluation
|
||||
|
||||
//- Return total enthalpy for the phase phaseI
|
||||
virtual scalar H
|
||||
virtual scalar ha
|
||||
(
|
||||
const label phaseI,
|
||||
const scalarField& Y,
|
||||
@ -224,16 +224,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Return sensible enthalpy for the phase phaseI
|
||||
virtual scalar Hs
|
||||
(
|
||||
const label phaseI,
|
||||
const scalarField& Y,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const;
|
||||
|
||||
//- Return chemical enthalpy for the phase phaseI
|
||||
virtual scalar Hc
|
||||
virtual scalar hs
|
||||
(
|
||||
const label phaseI,
|
||||
const scalarField& Y,
|
||||
|
||||
@ -244,7 +244,7 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
|
||||
case (parent::etEnthalpyDifference):
|
||||
{
|
||||
scalar hc = this->owner().composition().carrier().hai(idc, p, T);
|
||||
scalar hp = liquids_.properties()[idl].Ha(p, T);
|
||||
scalar hp = liquids_.properties()[idl].ha(p, T);
|
||||
|
||||
dh = hc - hp;
|
||||
break;
|
||||
|
||||
@ -175,15 +175,15 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate
|
||||
const scalarField XcMix(calcXc(p.cell()));
|
||||
|
||||
// carrier thermo properties
|
||||
scalar Hsc = 0.0;
|
||||
scalar Hc = 0.0;
|
||||
scalar hsc = 0.0;
|
||||
scalar hc = 0.0;
|
||||
scalar Cpc = 0.0;
|
||||
scalar kappac = 0.0;
|
||||
forAll(this->owner().composition().carrier().Y(), i)
|
||||
{
|
||||
scalar Yc = this->owner().composition().carrier().Y()[i][p.cell()];
|
||||
Hc += Yc*this->owner().composition().carrier().hai(i, pc, Tc);
|
||||
Hsc += Yc*this->owner().composition().carrier().hai(i, ps, Ts);
|
||||
hc += Yc*this->owner().composition().carrier().hai(i, pc, Tc);
|
||||
hsc += Yc*this->owner().composition().carrier().hai(i, ps, Ts);
|
||||
Cpc += Yc*this->owner().composition().carrier().Cpi(i, ps, Ts);
|
||||
kappac += Yc*this->owner().composition().carrier().kappai(i, ps, Ts);
|
||||
}
|
||||
@ -252,7 +252,7 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate
|
||||
|
||||
// model constants
|
||||
// NOTE: using Sherwood number instead of Nusselt number
|
||||
const scalar A = (Hc - Hsc)/hv;
|
||||
const scalar A = (hc - hsc)/hv;
|
||||
const scalar B = pi*kappac/Cpc*d*Sh;
|
||||
|
||||
scalar G = 0.0;
|
||||
@ -328,7 +328,7 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh
|
||||
{
|
||||
scalar hc =
|
||||
this->owner().composition().carrier().hai(idc, p, TDash);
|
||||
scalar hp = liquids_.properties()[idl].Ha(p, TDash);
|
||||
scalar hp = liquids_.properties()[idl].ha(p, TDash);
|
||||
|
||||
dh = hc - hp;
|
||||
break;
|
||||
|
||||
@ -157,12 +157,12 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate
|
||||
dMassSRCarrier[O2GlobalId_] -= dmO2;
|
||||
dMassSRCarrier[CO2GlobalId_] += dmCO2;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar hsC = thermo.solids().properties()[CsLocalId_].hs(T);
|
||||
|
||||
// carrier sensible enthalpy exchange handled via change in mass
|
||||
|
||||
// Heat of reaction [J]
|
||||
return dmC*HsC - dmCO2*HcCO2_;
|
||||
return dmC*hsC - dmCO2*HcCO2_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -195,8 +195,8 @@ Foam::scalar Foam::COxidationHurtMitchell<CloudType>::calculate
|
||||
// note: carrier sensible enthalpy exchange handled via change in mass
|
||||
if (heatOfReaction_ < 0)
|
||||
{
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
return dOmega*(WC_*HsC - (WC_ + Sb_*WO2_)*HcCO2_);
|
||||
const scalar hsC = thermo.solids().properties()[CsLocalId_].hs(T);
|
||||
return dOmega*(WC_*hsC - (WC_ + Sb_*WO2_)*HcCO2_);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -212,12 +212,12 @@ Foam::scalar Foam::COxidationIntrinsicRate<CloudType>::calculate
|
||||
dMassSRCarrier[O2GlobalId_] -= dmO2;
|
||||
dMassSRCarrier[CO2GlobalId_] += dmCO2;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar hsC = thermo.solids().properties()[CsLocalId_].hs(T);
|
||||
|
||||
// carrier sensible enthalpy exchange handled via change in mass
|
||||
|
||||
// Heat of reaction [J]
|
||||
return dmC*HsC - dmCO2*HcCO2_;
|
||||
return dmC*hsC - dmCO2*HcCO2_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -166,12 +166,12 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate
|
||||
dMassSRCarrier[O2GlobalId_] -= dmO2;
|
||||
dMassSRCarrier[CO2GlobalId_] += dmCO2;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar hsC = thermo.solids().properties()[CsLocalId_].hs(T);
|
||||
|
||||
// carrier sensible enthalpy exchange handled via change in mass
|
||||
|
||||
// Heat of reaction [J]
|
||||
return dmC*HsC - dmCO2*HcCO2_;
|
||||
return dmC*hsC - dmCO2*HcCO2_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -224,12 +224,12 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate
|
||||
// Add to particle mass transfer
|
||||
dMassSolid[CsLocalId_] += dOmega*WC_;
|
||||
|
||||
const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T);
|
||||
const scalar hsC = thermo.solids().properties()[CsLocalId_].hs(T);
|
||||
|
||||
// carrier sensible enthalpy exchange handled via change in mass
|
||||
|
||||
// Heat of reaction [J]
|
||||
return dOmega*(WC_*HsC - (WC_ + WO2_)*HcCO2_);
|
||||
return dOmega*(WC_*hsC - (WC_ + WO2_)*HcCO2_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::BasicThermo
|
||||
"he",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::HE,
|
||||
&MixtureType::thermoMixtureType::he,
|
||||
this->p_,
|
||||
this->T_
|
||||
),
|
||||
@ -359,7 +359,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::he
|
||||
"he",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::HE,
|
||||
&MixtureType::thermoMixtureType::he,
|
||||
p,
|
||||
T
|
||||
);
|
||||
@ -377,7 +377,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::he
|
||||
return cellSetProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::HE,
|
||||
&MixtureType::thermoMixtureType::he,
|
||||
cells,
|
||||
cellSetScalarList(this->p_, cells),
|
||||
T
|
||||
@ -396,7 +396,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::he
|
||||
return patchFieldProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::HE,
|
||||
&MixtureType::thermoMixtureType::he,
|
||||
patchi,
|
||||
this->p_.boundaryField()[patchi],
|
||||
T
|
||||
@ -415,7 +415,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::he
|
||||
return fieldSourceProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::HE,
|
||||
&MixtureType::thermoMixtureType::he,
|
||||
source,
|
||||
cellSetScalarList(this->p_, source.cells()),
|
||||
T
|
||||
@ -432,7 +432,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::hs() const
|
||||
"hs",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Hs,
|
||||
&MixtureType::thermoMixtureType::hs,
|
||||
this->p_,
|
||||
this->T_
|
||||
);
|
||||
@ -452,7 +452,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::hs
|
||||
"hs",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Hs,
|
||||
&MixtureType::thermoMixtureType::hs,
|
||||
p,
|
||||
T
|
||||
);
|
||||
@ -470,7 +470,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::hs
|
||||
return cellSetProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Hs,
|
||||
&MixtureType::thermoMixtureType::hs,
|
||||
cells,
|
||||
cellSetScalarList(this->p_, cells),
|
||||
T
|
||||
@ -489,7 +489,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::hs
|
||||
return patchFieldProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Hs,
|
||||
&MixtureType::thermoMixtureType::hs,
|
||||
patchi,
|
||||
this->p_.boundaryField()[patchi],
|
||||
T
|
||||
@ -506,7 +506,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::ha() const
|
||||
"ha",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Ha,
|
||||
&MixtureType::thermoMixtureType::ha,
|
||||
this->p_,
|
||||
this->T_
|
||||
);
|
||||
@ -526,7 +526,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::ha
|
||||
"ha",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Ha,
|
||||
&MixtureType::thermoMixtureType::ha,
|
||||
p,
|
||||
T
|
||||
);
|
||||
@ -544,7 +544,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::ha
|
||||
return cellSetProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Ha,
|
||||
&MixtureType::thermoMixtureType::ha,
|
||||
cells,
|
||||
cellSetScalarList(this->p_, cells),
|
||||
T
|
||||
@ -563,7 +563,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::ha
|
||||
return patchFieldProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Ha,
|
||||
&MixtureType::thermoMixtureType::ha,
|
||||
patchi,
|
||||
this->p_.boundaryField()[patchi],
|
||||
T
|
||||
@ -571,20 +571,6 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::ha
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::hc() const
|
||||
{
|
||||
return volScalarFieldProperty
|
||||
(
|
||||
"hc",
|
||||
dimEnergy/dimMass,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::Hf
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template<class MixtureType, class BasicThermoType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::Cp
|
||||
@ -644,7 +630,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::Cpv
|
||||
|
||||
template<class MixtureType, class BasicThermoType>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::The
|
||||
(
|
||||
const volScalarField& h,
|
||||
const volScalarField& p,
|
||||
@ -656,7 +642,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
"T",
|
||||
dimTemperature,
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::THE,
|
||||
&MixtureType::thermoMixtureType::The,
|
||||
h,
|
||||
p,
|
||||
T0
|
||||
@ -666,7 +652,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
|
||||
template<class MixtureType, class BasicThermoType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::The
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0,
|
||||
@ -676,7 +662,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
return cellSetProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::THE,
|
||||
&MixtureType::thermoMixtureType::The,
|
||||
cells,
|
||||
h,
|
||||
cellSetScalarList(this->p_, cells),
|
||||
@ -687,7 +673,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
|
||||
template<class MixtureType, class BasicThermoType>
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
Foam::BasicThermo<MixtureType, BasicThermoType>::The
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0,
|
||||
@ -697,7 +683,7 @@ Foam::BasicThermo<MixtureType, BasicThermoType>::THE
|
||||
return patchFieldProperty
|
||||
(
|
||||
&MixtureType::thermoMixture,
|
||||
&MixtureType::thermoMixtureType::THE,
|
||||
&MixtureType::thermoMixtureType::The,
|
||||
patchi,
|
||||
h,
|
||||
this->p_.boundaryField()[patchi],
|
||||
|
||||
@ -330,9 +330,6 @@ public:
|
||||
const labelList& cells
|
||||
) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
virtual tmp<volScalarField> hc() const;
|
||||
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
@ -358,7 +355,7 @@ public:
|
||||
// Temperature-energy inversion functions
|
||||
|
||||
//- Temperature from enthalpy/internal energy
|
||||
virtual tmp<volScalarField> THE
|
||||
virtual tmp<volScalarField> The
|
||||
(
|
||||
const volScalarField& h,
|
||||
const volScalarField& p,
|
||||
@ -366,7 +363,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for cell-set
|
||||
virtual tmp<scalarField> THE
|
||||
virtual tmp<scalarField> The
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& T0, // starting temperature
|
||||
@ -374,7 +371,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for patch
|
||||
virtual tmp<scalarField> THE
|
||||
virtual tmp<scalarField> The
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& T0, // starting temperature
|
||||
|
||||
@ -374,9 +374,6 @@ public:
|
||||
const label patchi
|
||||
) const = 0;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
virtual tmp<volScalarField> hc() const = 0;
|
||||
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
@ -412,7 +409,7 @@ public:
|
||||
// Temperature-energy inversion functions
|
||||
|
||||
//- Temperature from enthalpy/internal energy
|
||||
virtual tmp<volScalarField> THE
|
||||
virtual tmp<volScalarField> The
|
||||
(
|
||||
const volScalarField& h,
|
||||
const volScalarField& p,
|
||||
@ -420,7 +417,7 @@ public:
|
||||
) const = 0;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for cell-set
|
||||
virtual tmp<scalarField> THE
|
||||
virtual tmp<scalarField> The
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0, // starting temperature
|
||||
@ -428,7 +425,7 @@ public:
|
||||
) const = 0;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for patch
|
||||
virtual tmp<scalarField> THE
|
||||
virtual tmp<scalarField> The
|
||||
(
|
||||
const scalarField& h,
|
||||
const scalarField& T0, // starting temperature
|
||||
|
||||
@ -53,7 +53,7 @@ void Foam::PsiThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
TCells[celli] = thermoMixture.THE
|
||||
TCells[celli] = thermoMixture.The
|
||||
(
|
||||
hCells[celli],
|
||||
pCells[celli],
|
||||
@ -118,7 +118,7 @@ void Foam::PsiThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
phe[facei] = thermoMixture.HE(pp[facei], pT[facei]);
|
||||
phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
|
||||
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
|
||||
@ -142,7 +142,7 @@ void Foam::PsiThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
pT[facei] = thermoMixture.THE(phe[facei], pp[facei], pT[facei]);
|
||||
pT[facei] = thermoMixture.The(phe[facei], pp[facei], pT[facei]);
|
||||
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
|
||||
|
||||
@ -54,7 +54,7 @@ void Foam::RhoFluidThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
TCells[celli] = thermoMixture.THE
|
||||
TCells[celli] = thermoMixture.The
|
||||
(
|
||||
hCells[celli],
|
||||
pCells[celli],
|
||||
@ -124,7 +124,7 @@ void Foam::RhoFluidThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
phe[facei] = thermoMixture.HE(pp[facei], pT[facei]);
|
||||
phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
|
||||
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
|
||||
@ -149,7 +149,7 @@ void Foam::RhoFluidThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
pT[facei] = thermoMixture.THE(phe[facei], pp[facei], pT[facei]);
|
||||
pT[facei] = thermoMixture.The(phe[facei], pp[facei], pT[facei]);
|
||||
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
|
||||
|
||||
@ -214,7 +214,7 @@ void Foam::chemistryModel<ThermoType>::derivatives
|
||||
scalar& dTdt = dYTpdt[nSpecie_];
|
||||
for (label i=0; i<nSpecie_; i++)
|
||||
{
|
||||
dTdt -= dYTpdt[i]*specieThermos_[sToc(i)].Ha(p, T);
|
||||
dTdt -= dYTpdt[i]*specieThermos_[sToc(i)].ha(p, T);
|
||||
}
|
||||
dTdt /= CpM;
|
||||
|
||||
@ -390,12 +390,12 @@ void Foam::chemistryModel<ThermoType>::jacobian
|
||||
}
|
||||
|
||||
// dT/dt
|
||||
scalarField& Ha = YTpWork_[4];
|
||||
scalarField& ha = YTpWork_[4];
|
||||
scalar& dTdt = dYTpdt[nSpecie_];
|
||||
for (label i=0; i<nSpecie_; i++)
|
||||
{
|
||||
Ha[sToc(i)] = specieThermos_[sToc(i)].Ha(p, T);
|
||||
dTdt -= dYTpdt[i]*Ha[sToc(i)];
|
||||
ha[sToc(i)] = specieThermos_[sToc(i)].ha(p, T);
|
||||
dTdt -= dYTpdt[i]*ha[sToc(i)];
|
||||
}
|
||||
dTdt /= CpM;
|
||||
|
||||
@ -411,7 +411,7 @@ void Foam::chemistryModel<ThermoType>::jacobian
|
||||
for (label j=0; j<nSpecie_; j++)
|
||||
{
|
||||
const scalar ddYjdtdYi = J(j, i);
|
||||
ddTdtdYi -= ddYjdtdYi*Ha[sToc(j)];
|
||||
ddTdtdYi -= ddYjdtdYi*ha[sToc(j)];
|
||||
}
|
||||
ddTdtdYi -= Cp[sToc(i)]*dTdt;
|
||||
ddTdtdYi /= CpM;
|
||||
@ -424,7 +424,7 @@ void Foam::chemistryModel<ThermoType>::jacobian
|
||||
{
|
||||
const scalar dYidt = dYTpdt[i];
|
||||
const scalar ddYidtdT = J(i, nSpecie_);
|
||||
ddTdtdT -= dYidt*Cp[sToc(i)] + ddYidtdT*Ha[sToc(i)];
|
||||
ddTdtdT -= dYidt*Cp[sToc(i)] + ddYidtdT*ha[sToc(i)];
|
||||
}
|
||||
ddTdtdT -= dTdt*dCpMdT;
|
||||
ddTdtdT /= CpM;
|
||||
@ -931,7 +931,7 @@ Foam::chemistryModel<ThermoType>::Qdot() const
|
||||
{
|
||||
forAll(Qdot, celli)
|
||||
{
|
||||
const scalar hi = specieThermos_[i].Hf();
|
||||
const scalar hi = specieThermos_[i].hf();
|
||||
Qdot[celli] -= hi*RR_[i][celli];
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,9 +167,9 @@ Foam::valueMulticomponentMixture<ThermoType>::thermoMixtureType::psi
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::scalar
|
||||
Foam::valueMulticomponentMixture<ThermoType>::thermoMixtureType::Hf() const
|
||||
Foam::valueMulticomponentMixture<ThermoType>::thermoMixtureType::hf() const
|
||||
{
|
||||
return massWeighted(&ThermoType::Hf);
|
||||
return massWeighted(&ThermoType::hf);
|
||||
}
|
||||
|
||||
|
||||
@ -188,16 +188,16 @@ Foam::valueMulticomponentMixture<ThermoType>::thermoMixtureType::Hf() const
|
||||
|
||||
thermoMixtureFunction(Cp)
|
||||
thermoMixtureFunction(Cv)
|
||||
thermoMixtureFunction(Hs)
|
||||
thermoMixtureFunction(Ha)
|
||||
thermoMixtureFunction(hs)
|
||||
thermoMixtureFunction(ha)
|
||||
thermoMixtureFunction(Cpv)
|
||||
thermoMixtureFunction(gamma)
|
||||
thermoMixtureFunction(HE)
|
||||
thermoMixtureFunction(he)
|
||||
|
||||
|
||||
template<class ThermoType>
|
||||
Foam::scalar
|
||||
Foam::valueMulticomponentMixture<ThermoType>::thermoMixtureType::THE
|
||||
Foam::valueMulticomponentMixture<ThermoType>::thermoMixtureType::The
|
||||
(
|
||||
const scalar he,
|
||||
scalar p,
|
||||
@ -210,7 +210,7 @@ Foam::valueMulticomponentMixture<ThermoType>::thermoMixtureType::THE
|
||||
he,
|
||||
p,
|
||||
T0,
|
||||
&thermoMixtureType::HE,
|
||||
&thermoMixtureType::he,
|
||||
&thermoMixtureType::Cpv,
|
||||
&thermoMixtureType::limit
|
||||
);
|
||||
|
||||
@ -122,13 +122,13 @@ public:
|
||||
scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
// Sensible enthalpy [J/kg]
|
||||
scalar Hs(const scalar p, const scalar T) const;
|
||||
scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
// Absolute enthalpy [J/kg]
|
||||
scalar Ha(const scalar p, const scalar T) const;
|
||||
scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
// Enthalpy of formation [J/kg]
|
||||
scalar Hf() const;
|
||||
scalar hf() const;
|
||||
|
||||
|
||||
// Mass specific derived properties
|
||||
@ -140,14 +140,14 @@ public:
|
||||
scalar gamma(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
scalar HE(const scalar p, const scalar T) const;
|
||||
scalar he(const scalar p, const scalar T) const;
|
||||
|
||||
|
||||
// Energy->temperature inversion functions
|
||||
|
||||
//- Temperature from enthalpy or internal energy
|
||||
// given an initial temperature T0
|
||||
scalar THE
|
||||
scalar The
|
||||
(
|
||||
const scalar he,
|
||||
const scalar p,
|
||||
|
||||
@ -211,7 +211,7 @@ Foam::scalar Foam::MulticomponentThermo<BaseThermo>::hei
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return this->specieThermo(speciei).HE(p, T);
|
||||
return this->specieThermo(speciei).he(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -225,7 +225,7 @@ Foam::tmp<Foam::scalarField> Foam::MulticomponentThermo<BaseThermo>::hei
|
||||
{
|
||||
return scalarFieldPropertyi
|
||||
(
|
||||
&BaseThermo::mixtureType::thermoType::HE,
|
||||
&BaseThermo::mixtureType::thermoType::he,
|
||||
speciei,
|
||||
p,
|
||||
T
|
||||
@ -246,7 +246,7 @@ Foam::MulticomponentThermo<BaseThermo>::hei
|
||||
(
|
||||
"he",
|
||||
dimEnergy/dimMass,
|
||||
&BaseThermo::mixtureType::thermoType::HE,
|
||||
&BaseThermo::mixtureType::thermoType::he,
|
||||
speciei,
|
||||
p,
|
||||
T
|
||||
@ -262,7 +262,7 @@ Foam::scalar Foam::MulticomponentThermo<BaseThermo>::hsi
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return this->specieThermo(speciei).Hs(p, T);
|
||||
return this->specieThermo(speciei).hs(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@ Foam::tmp<Foam::scalarField> Foam::MulticomponentThermo<BaseThermo>::hsi
|
||||
{
|
||||
return scalarFieldPropertyi
|
||||
(
|
||||
&BaseThermo::mixtureType::thermoType::Hs,
|
||||
&BaseThermo::mixtureType::thermoType::hs,
|
||||
speciei,
|
||||
p,
|
||||
T
|
||||
@ -297,7 +297,7 @@ Foam::MulticomponentThermo<BaseThermo>::hsi
|
||||
(
|
||||
"hs",
|
||||
dimEnergy/dimMass,
|
||||
&BaseThermo::mixtureType::thermoType::Hs,
|
||||
&BaseThermo::mixtureType::thermoType::hs,
|
||||
speciei,
|
||||
p,
|
||||
T
|
||||
@ -313,7 +313,7 @@ Foam::scalar Foam::MulticomponentThermo<BaseThermo>::hai
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return this->specieThermo(speciei).Ha(p, T);
|
||||
return this->specieThermo(speciei).ha(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -327,7 +327,7 @@ Foam::tmp<Foam::scalarField> Foam::MulticomponentThermo<BaseThermo>::hai
|
||||
{
|
||||
return scalarFieldPropertyi
|
||||
(
|
||||
&BaseThermo::mixtureType::thermoType::Ha,
|
||||
&BaseThermo::mixtureType::thermoType::ha,
|
||||
speciei,
|
||||
p,
|
||||
T
|
||||
@ -348,7 +348,7 @@ Foam::MulticomponentThermo<BaseThermo>::hai
|
||||
(
|
||||
"ha",
|
||||
dimEnergy/dimMass,
|
||||
&BaseThermo::mixtureType::thermoType::Ha,
|
||||
&BaseThermo::mixtureType::thermoType::ha,
|
||||
speciei,
|
||||
p,
|
||||
T
|
||||
@ -362,7 +362,7 @@ Foam::scalar Foam::MulticomponentThermo<BaseThermo>::hfi
|
||||
const label speciei
|
||||
) const
|
||||
{
|
||||
return this->specieThermo(speciei).Hf();
|
||||
return this->specieThermo(speciei).hf();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -57,7 +57,7 @@ void Foam::PsiuMulticomponentThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
TCells[celli] = thermoMixture.THE
|
||||
TCells[celli] = thermoMixture.The
|
||||
(
|
||||
hCells[celli],
|
||||
pCells[celli],
|
||||
@ -72,7 +72,7 @@ void Foam::PsiuMulticomponentThermo<BaseThermo>::calculate()
|
||||
kappaCells[celli] =
|
||||
transportMixture.kappa(pCells[celli], TCells[celli]);
|
||||
|
||||
TuCells[celli] = this->reactants(composition).THE
|
||||
TuCells[celli] = this->reactants(composition).The
|
||||
(
|
||||
heuCells[celli],
|
||||
pCells[celli],
|
||||
@ -137,7 +137,7 @@ void Foam::PsiuMulticomponentThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
phe[facei] = thermoMixture.HE(pp[facei], pT[facei]);
|
||||
phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
|
||||
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
|
||||
@ -160,7 +160,7 @@ void Foam::PsiuMulticomponentThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
pT[facei] = thermoMixture.THE(phe[facei], pp[facei], pT[facei]);
|
||||
pT[facei] = thermoMixture.The(phe[facei], pp[facei], pT[facei]);
|
||||
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
pCv[facei] = thermoMixture.Cv(pp[facei], pT[facei]);
|
||||
@ -170,7 +170,7 @@ void Foam::PsiuMulticomponentThermo<BaseThermo>::calculate()
|
||||
|
||||
pTu[facei] =
|
||||
this->reactants(composition)
|
||||
.THE(pheu[facei], pp[facei], pTu[facei]);
|
||||
.The(pheu[facei], pp[facei], pTu[facei]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -214,7 +214,7 @@ Foam::PsiuMulticomponentThermo<BaseThermo>::PsiuMulticomponentThermo
|
||||
BaseThermo::mixtureType::thermoType::heName() + 'u',
|
||||
dimEnergy/dimMass,
|
||||
&BaseThermo::mixtureType::reactants,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::HE,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::he,
|
||||
this->p_,
|
||||
this->Tu_
|
||||
),
|
||||
@ -269,7 +269,7 @@ Foam::PsiuMulticomponentThermo<BaseThermo>::heu
|
||||
return this->cellSetProperty
|
||||
(
|
||||
&BaseThermo::mixtureType::reactants,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::HE,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::he,
|
||||
cells,
|
||||
UIndirectList<scalar>(this->p_, cells),
|
||||
Tu
|
||||
@ -288,7 +288,7 @@ Foam::PsiuMulticomponentThermo<BaseThermo>::heu
|
||||
return this->patchFieldProperty
|
||||
(
|
||||
&BaseThermo::mixtureType::reactants,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::HE,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::he,
|
||||
patchi,
|
||||
this->p_.boundaryField()[patchi],
|
||||
Tu
|
||||
@ -305,7 +305,7 @@ Foam::PsiuMulticomponentThermo<BaseThermo>::Tb() const
|
||||
"Tb",
|
||||
dimTemperature,
|
||||
&BaseThermo::mixtureType::products,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::THE,
|
||||
&BaseThermo::mixtureType::thermoMixtureType::The,
|
||||
this->he_,
|
||||
this->p_,
|
||||
this->T_
|
||||
|
||||
@ -257,13 +257,6 @@ Foam::tmp<Foam::scalarField> Foam::constSolidThermo::ha
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::constSolidThermo::hc() const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<volScalarField>(nullptr);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::constSolidThermo::Cp
|
||||
(
|
||||
const scalarField& T,
|
||||
@ -294,7 +287,7 @@ Foam::tmp<Foam::scalarField> Foam::constSolidThermo::Cpv
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volScalarField> Foam::constSolidThermo::THE
|
||||
Foam::tmp<Foam::volScalarField> Foam::constSolidThermo::The
|
||||
(
|
||||
const volScalarField& h,
|
||||
const volScalarField& p,
|
||||
@ -306,7 +299,7 @@ Foam::tmp<Foam::volScalarField> Foam::constSolidThermo::THE
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::constSolidThermo::THE
|
||||
Foam::tmp<Foam::scalarField> Foam::constSolidThermo::The
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& T0,
|
||||
@ -318,7 +311,7 @@ Foam::tmp<Foam::scalarField> Foam::constSolidThermo::THE
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField> Foam::constSolidThermo::THE
|
||||
Foam::tmp<Foam::scalarField> Foam::constSolidThermo::The
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& T0,
|
||||
|
||||
@ -315,9 +315,6 @@ public:
|
||||
const labelList& cells
|
||||
) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
virtual tmp<volScalarField> hc() const;
|
||||
|
||||
//- Heat capacity at constant pressure for patch [J/kg/K]
|
||||
virtual tmp<scalarField> Cp
|
||||
(
|
||||
@ -343,7 +340,7 @@ public:
|
||||
// Temperature-energy inversion functions
|
||||
|
||||
//- Temperature from enthalpy/internal energy
|
||||
virtual tmp<volScalarField> THE
|
||||
virtual tmp<volScalarField> The
|
||||
(
|
||||
const volScalarField& h,
|
||||
const volScalarField& p,
|
||||
@ -351,7 +348,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for cell-set
|
||||
virtual tmp<scalarField> THE
|
||||
virtual tmp<scalarField> The
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& T0, // starting temperature
|
||||
@ -359,7 +356,7 @@ public:
|
||||
) const;
|
||||
|
||||
//- Temperature from enthalpy/internal energy for patch
|
||||
virtual tmp<scalarField> THE
|
||||
virtual tmp<scalarField> The
|
||||
(
|
||||
const scalarField& he,
|
||||
const scalarField& T0, // starting temperature
|
||||
|
||||
@ -55,7 +55,7 @@ void Foam::SolidThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
TCells[celli] = thermoMixture.THE
|
||||
TCells[celli] = thermoMixture.The
|
||||
(
|
||||
hCells[celli],
|
||||
pCells[celli],
|
||||
@ -127,7 +127,7 @@ void Foam::SolidThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
phe[facei] = thermoMixture.HE(pp[facei], pT[facei]);
|
||||
phe[facei] = thermoMixture.he(pp[facei], pT[facei]);
|
||||
|
||||
prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
@ -159,7 +159,7 @@ void Foam::SolidThermo<BaseThermo>::calculate()
|
||||
transportMixture =
|
||||
this->transportMixture(composition, thermoMixture);
|
||||
|
||||
pT[facei] = thermoMixture.THE(phe[facei], pp[facei] ,pT[facei]);
|
||||
pT[facei] = thermoMixture.The(phe[facei], pp[facei] ,pT[facei]);
|
||||
|
||||
prho[facei] = thermoMixture.rho(pp[facei], pT[facei]);
|
||||
pCp[facei] = thermoMixture.Cp(pp[facei], pT[facei]);
|
||||
|
||||
@ -173,22 +173,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -83,7 +83,7 @@ inline Foam::scalar Foam::Boussinesq<Specie>::rho
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::H(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::h(scalar p, scalar T) const
|
||||
{
|
||||
return p/this->rho(p, T);
|
||||
}
|
||||
@ -97,7 +97,7 @@ inline Foam::scalar Foam::Boussinesq<Specie>::Cp(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::E(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::e(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -111,7 +111,7 @@ inline Foam::scalar Foam::Boussinesq<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::Sp
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -122,7 +122,7 @@ inline Foam::scalar Foam::Boussinesq<Specie>::Sp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::Sv
|
||||
inline Foam::scalar Foam::Boussinesq<Specie>::sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -175,22 +175,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -90,7 +90,7 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::rho
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::H(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::h(scalar p, scalar T) const
|
||||
{
|
||||
const scalar Pr = p/Pc_;
|
||||
const scalar Tr = T/Tc_;
|
||||
@ -143,7 +143,7 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::Cp(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::E(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::e(scalar p, scalar T) const
|
||||
{
|
||||
const scalar Pr = p/Pc_;
|
||||
const scalar Tr = T/Tc_;
|
||||
@ -187,7 +187,7 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::Sp
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -214,7 +214,7 @@ inline Foam::scalar Foam::PengRobinsonGas<Specie>::Sp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::Sv
|
||||
inline Foam::scalar Foam::PengRobinsonGas<Specie>::sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -178,22 +178,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -85,7 +85,7 @@ inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::rho
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::H
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::h
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -108,7 +108,7 @@ inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Cp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::E
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::e
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -131,7 +131,7 @@ inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Cv
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Sp
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -145,7 +145,7 @@ inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Sp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::Sv
|
||||
inline Foam::scalar Foam::adiabaticPerfectFluid<Specie>::sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -162,22 +162,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -76,7 +76,7 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::rho
|
||||
|
||||
|
||||
template<class Specie, int PolySize>
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::H
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::h
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -98,7 +98,7 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Cp
|
||||
|
||||
|
||||
template<class Specie, int PolySize>
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::E
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::e
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -120,7 +120,7 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Cv
|
||||
|
||||
|
||||
template<class Specie, int PolySize>
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Sp
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -131,7 +131,7 @@ inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Sp
|
||||
|
||||
|
||||
template<class Specie, int PolySize>
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::Sv
|
||||
inline Foam::scalar Foam::icoPolynomial<Specie, PolySize>::sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -145,22 +145,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -76,7 +76,7 @@ inline Foam::scalar Foam::icoTabulated<Specie>::rho
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::H
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::h
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -98,7 +98,7 @@ inline Foam::scalar Foam::icoTabulated<Specie>::Cp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::E
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::e
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -120,7 +120,7 @@ inline Foam::scalar Foam::icoTabulated<Specie>::Cv
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::Sp
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -131,7 +131,7 @@ inline Foam::scalar Foam::icoTabulated<Specie>::Sp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::Sv
|
||||
inline Foam::scalar Foam::icoTabulated<Specie>::sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -155,22 +155,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -77,7 +77,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::rho
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::H
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::h
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -99,7 +99,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Cp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::E
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::e
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -121,7 +121,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Cv
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Sp
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -132,7 +132,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Sp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::Sv
|
||||
inline Foam::scalar Foam::incompressiblePerfectGas<Specie>::sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -160,22 +160,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -72,7 +72,7 @@ inline Foam::scalar Foam::linear<Specie>::rho(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::linear<Specie>::H(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::linear<Specie>::h(scalar p, scalar T) const
|
||||
{
|
||||
return log(rho(p, T))/psi_;
|
||||
}
|
||||
@ -86,7 +86,7 @@ inline Foam::scalar Foam::linear<Specie>::Cp(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::linear<Specie>::E(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::linear<Specie>::e(scalar p, scalar T) const
|
||||
{
|
||||
const scalar rho = this->rho(p, T);
|
||||
|
||||
@ -102,14 +102,14 @@ inline Foam::scalar Foam::linear<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::linear<Specie>::Sp(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::linear<Specie>::sp(scalar p, scalar T) const
|
||||
{
|
||||
return -log((rho0_ + psi_*p)/(rho0_ + psi_*Pstd))/(T*psi_);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::linear<Specie>::Sv(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::linear<Specie>::sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
|
||||
@ -167,22 +167,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -79,7 +79,7 @@ inline Foam::scalar Foam::perfectFluid<Specie>::rho(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::H(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::h(scalar p, scalar T) const
|
||||
{
|
||||
return p/rho(p, T) - Pstd/rho(Pstd, T);
|
||||
}
|
||||
@ -95,7 +95,7 @@ inline Foam::scalar Foam::perfectFluid<Specie>::Cp(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::E(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::e(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -109,14 +109,14 @@ inline Foam::scalar Foam::perfectFluid<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::Sp(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::sp(scalar p, scalar T) const
|
||||
{
|
||||
return -this->R()*log(p/Pstd);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::Sv(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectFluid<Specie>::sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
|
||||
@ -134,22 +134,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -63,7 +63,7 @@ inline Foam::scalar Foam::perfectGas<Specie>::rho(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::H(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::h(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -77,7 +77,7 @@ inline Foam::scalar Foam::perfectGas<Specie>::Cp(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::E(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::e(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -91,14 +91,14 @@ inline Foam::scalar Foam::perfectGas<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::Sp(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::sp(scalar p, scalar T) const
|
||||
{
|
||||
return -this->R()*log(p/Pstd);
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::Sv(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::perfectGas<Specie>::sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented;
|
||||
return 0;
|
||||
|
||||
@ -178,22 +178,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -69,7 +69,7 @@ inline Foam::scalar Foam::rPolynomial<Specie>::rho(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::H(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::h(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -83,7 +83,7 @@ inline Foam::scalar Foam::rPolynomial<Specie>::Cp(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::E(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::e(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -97,14 +97,14 @@ inline Foam::scalar Foam::rPolynomial<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::Sp(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::sp(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::Sv(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rPolynomial<Specie>::sv(scalar p, scalar T) const
|
||||
{
|
||||
NotImplemented
|
||||
return 0;
|
||||
|
||||
@ -144,22 +144,22 @@ public:
|
||||
inline scalar rho(scalar p, scalar T) const;
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
inline scalar Cv(scalar p, scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -69,7 +69,7 @@ inline Foam::scalar Foam::rhoConst<Specie>::rho(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::H(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::h(scalar p, scalar T) const
|
||||
{
|
||||
return p/rho_;
|
||||
}
|
||||
@ -83,7 +83,7 @@ inline Foam::scalar Foam::rhoConst<Specie>::Cp(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::E(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::e(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -97,14 +97,14 @@ inline Foam::scalar Foam::rhoConst<Specie>::Cv(scalar p, scalar T) const
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::Sp(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::sp(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::Sv(scalar p, scalar T) const
|
||||
inline Foam::scalar Foam::rhoConst<Specie>::sv(scalar p, scalar T) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ Description
|
||||
density vs pressure and temperature.
|
||||
|
||||
Thermodynamic contributions derived from tabulated density data are not
|
||||
sufficiently accurate and hence the H, Cp, E, Cv, Sp, Sv and CpMCv are not
|
||||
sufficiently accurate and hence the h, Cp, e, Cv, sp, sv and CpMCv are not
|
||||
implemented. Thus this equation of state should be used in conjunction with
|
||||
hTabulated or eTabulated thermodynamics in which both the energy and heat
|
||||
capacity are tabulated w.r.t. pressure and temperature avoiding the need
|
||||
@ -183,7 +183,7 @@ public:
|
||||
|
||||
//- Return enthalpy contribution [J/kg]
|
||||
// Not implemented
|
||||
inline scalar H(const scalar p, const scalar T) const;
|
||||
inline scalar h(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cp contribution [J/(kg K]
|
||||
// Not implemented
|
||||
@ -191,7 +191,7 @@ public:
|
||||
|
||||
//- Return internal energy contribution [J/kg]
|
||||
// Not implemented
|
||||
inline scalar E(const scalar p, const scalar T) const;
|
||||
inline scalar e(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return Cv contribution [J/(kg K]
|
||||
// Not implemented
|
||||
@ -199,11 +199,11 @@ public:
|
||||
|
||||
//- Return entropy contribution to the integral of Cp/T [J/kg/K]
|
||||
// Not implemented
|
||||
inline scalar Sp(const scalar p, const scalar T) const;
|
||||
inline scalar sp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return entropy contribution to the integral of Cv/T [J/kg/K]
|
||||
// Not implemented
|
||||
inline scalar Sv(const scalar p, const scalar T) const;
|
||||
inline scalar sv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Return compressibility [s^2/m^2]
|
||||
inline scalar psi(scalar p, scalar T) const;
|
||||
|
||||
@ -76,7 +76,7 @@ inline Foam::scalar Foam::rhoTabulated<Specie>::rho
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::H
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::h
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -100,7 +100,7 @@ inline Foam::scalar Foam::rhoTabulated<Specie>::Cp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::E
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::e
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -124,7 +124,7 @@ inline Foam::scalar Foam::rhoTabulated<Specie>::Cv
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::Sp
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::sp
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
@ -136,7 +136,7 @@ inline Foam::scalar Foam::rhoTabulated<Specie>::Sp
|
||||
|
||||
|
||||
template<class Specie>
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::Sv
|
||||
inline Foam::scalar Foam::rhoTabulated<Specie>::sv
|
||||
(
|
||||
scalar p,
|
||||
scalar T
|
||||
|
||||
@ -87,19 +87,19 @@ public:
|
||||
}
|
||||
|
||||
// Absolute enthalpy [J/kg]
|
||||
scalar HE
|
||||
scalar he
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.Ha(p, T);
|
||||
return thermo.ha(p, T);
|
||||
}
|
||||
|
||||
//- Temperature from absolute enthalpy
|
||||
// given an initial temperature T0
|
||||
scalar THE
|
||||
scalar The
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar h,
|
||||
@ -107,7 +107,7 @@ public:
|
||||
const scalar T0
|
||||
) const
|
||||
{
|
||||
return thermo.THa(h, p, T0);
|
||||
return thermo.Tha(h, p, T0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -88,19 +88,19 @@ public:
|
||||
}
|
||||
|
||||
// Absolute internal energy [J/kg]
|
||||
scalar HE
|
||||
scalar he
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.Ea(p, T);
|
||||
return thermo.ea(p, T);
|
||||
}
|
||||
|
||||
//- Temperature from absolute internal energy
|
||||
// given an initial temperature T0
|
||||
scalar THE
|
||||
scalar The
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar e,
|
||||
@ -108,7 +108,7 @@ public:
|
||||
const scalar T0
|
||||
) const
|
||||
{
|
||||
return thermo.TEa(e, p, T0);
|
||||
return thermo.Tea(e, p, T0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -37,9 +37,19 @@ Foam::eConstThermo<EquationOfState>::eConstThermo
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Cv_(dict.subDict("thermodynamics").lookup<scalar>("Cv")),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
Tref_(dict.subDict("thermodynamics").lookupOrDefault<scalar>("Tref", Tstd)),
|
||||
Esref_(dict.subDict("thermodynamics").lookupOrDefault<scalar>("Esref", 0))
|
||||
esRef_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupOrDefaultBackwardsCompatible<scalar>({"esRef", "Esref"}, 0)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -52,14 +62,14 @@ void Foam::eConstThermo<EquationOfState>::write(Ostream& os) const
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Cv", Cv_);
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("hf", hf_);
|
||||
if (Tref_ != Tstd)
|
||||
{
|
||||
dict.add("Tref", Tref_);
|
||||
}
|
||||
if (Esref_ != 0)
|
||||
if (esRef_ != 0)
|
||||
{
|
||||
dict.add("Esref", Esref_);
|
||||
dict.add("esRef", esRef_);
|
||||
}
|
||||
os << indent << dict.dictName() << dict;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ Description
|
||||
at constant volume:
|
||||
|
||||
\verbatim
|
||||
e = Cv*(T - Tref) + Esref
|
||||
e = Cv*(T - Tref) + esRef
|
||||
\endverbatim
|
||||
|
||||
Usage
|
||||
@ -37,8 +37,8 @@ Usage
|
||||
Property | Description
|
||||
Cv | Constant Heat capacity at constant volume [J/kg/K]
|
||||
Tref | Reference temperature [K] (defaults to Tstd)
|
||||
Esref | Reference sensible internal energy [J/kg] (defaults to 0)
|
||||
Hf | Heat of formation [J/kg]
|
||||
esRef | Reference sensible internal energy [J/kg] (defaults to 0)
|
||||
hf | Heat of formation [J/kg]
|
||||
\endtable
|
||||
|
||||
Example specification of eConstThermo for air:
|
||||
@ -46,7 +46,7 @@ Usage
|
||||
thermodynamics
|
||||
{
|
||||
Cv 724;
|
||||
Hf 0;
|
||||
hf 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
@ -112,13 +112,13 @@ class eConstThermo
|
||||
scalar Cv_;
|
||||
|
||||
//- Heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Reference temperature around which to linearise [K]
|
||||
scalar Tref_;
|
||||
|
||||
//- Reference sensible enthalpy around which to linearise [J/kg]
|
||||
scalar Esref_;
|
||||
scalar esRef_;
|
||||
|
||||
|
||||
public:
|
||||
@ -130,9 +130,9 @@ public:
|
||||
(
|
||||
const EquationOfState& st,
|
||||
const scalar Cv,
|
||||
const scalar Hf,
|
||||
const scalar hf,
|
||||
const scalar Tref,
|
||||
const scalar Esref
|
||||
const scalar esRef
|
||||
);
|
||||
|
||||
//- Construct from name and dictionary
|
||||
@ -163,19 +163,19 @@ public:
|
||||
inline scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible internal energy [J/kg]
|
||||
inline scalar Es(const scalar p, const scalar T) const;
|
||||
inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute internal energy [J/kg]
|
||||
inline scalar Ea(const scalar p, const scalar T) const;
|
||||
inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "EtoHthermo.H"
|
||||
|
||||
|
||||
@ -30,16 +30,16 @@ inline Foam::eConstThermo<EquationOfState>::eConstThermo
|
||||
(
|
||||
const EquationOfState& st,
|
||||
const scalar Cv,
|
||||
const scalar Hf,
|
||||
const scalar hf,
|
||||
const scalar Tref,
|
||||
const scalar Esref
|
||||
const scalar esRef
|
||||
)
|
||||
:
|
||||
EquationOfState(st),
|
||||
Cv_(Cv),
|
||||
Hf_(Hf),
|
||||
hf_(hf),
|
||||
Tref_(Tref),
|
||||
Esref_(Esref)
|
||||
esRef_(esRef)
|
||||
{}
|
||||
|
||||
|
||||
@ -52,9 +52,9 @@ inline Foam::eConstThermo<EquationOfState>::eConstThermo
|
||||
:
|
||||
EquationOfState(name, ct),
|
||||
Cv_(ct.Cv_),
|
||||
Hf_(ct.Hf_),
|
||||
hf_(ct.hf_),
|
||||
Tref_(ct.Tref_),
|
||||
Esref_(ct.Esref_)
|
||||
esRef_(ct.esRef_)
|
||||
{}
|
||||
|
||||
|
||||
@ -93,54 +93,54 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::Cv
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::Es
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::es
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cv_*(T - Tref_) + Esref_ + EquationOfState::E(p, T);
|
||||
return Cv_*(T - Tref_) + esRef_ + EquationOfState::e(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::Ea
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::ea
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es(p, T) + Hf();
|
||||
return es(p, T) + hf();
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::Hf() const
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::hf() const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp(p, T)*log(T/Tstd) + EquationOfState::Sv(p, T);
|
||||
return Cp(p, T)*log(T/Tstd) + EquationOfState::sv(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::eConstThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return
|
||||
Cv_*(T - Tref_) + Esref_ + Hf() + Pstd/EquationOfState::rho(Pstd, T)
|
||||
- S(Pstd, T)*T;
|
||||
Cv_*(T - Tref_) + esRef_ + hf() + Pstd/EquationOfState::rho(Pstd, T)
|
||||
- s(Pstd, T)*T;
|
||||
}
|
||||
|
||||
|
||||
@ -188,8 +188,8 @@ inline void Foam::eConstThermo<EquationOfState>::operator+=
|
||||
const scalar Y2 = ct.Y()/this->Y();
|
||||
|
||||
Cv_ = Y1*Cv_ + Y2*ct.Cv_;
|
||||
Hf_ = Y1*Hf_ + Y2*ct.Hf_;
|
||||
Esref_ = Y1*Esref_ + Y2*ct.Esref_;
|
||||
hf_ = Y1*hf_ + Y2*ct.hf_;
|
||||
esRef_ = Y1*esRef_ + Y2*ct.esRef_;
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,9 +215,9 @@ inline Foam::eConstThermo<EquationOfState> Foam::operator+
|
||||
(
|
||||
eofs,
|
||||
ct1.Cv_,
|
||||
ct1.Hf_,
|
||||
ct1.hf_,
|
||||
ct1.Tref_,
|
||||
ct1.Esref_
|
||||
ct1.esRef_
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -241,11 +241,11 @@ inline Foam::eConstThermo<EquationOfState> Foam::operator+
|
||||
eofs,
|
||||
ct1.Y()/eofs.Y()*ct1.Cv_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Cv_,
|
||||
ct1.Y()/eofs.Y()*ct1.Hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Hf_,
|
||||
ct1.Y()/eofs.Y()*ct1.hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.hf_,
|
||||
ct1.Tref_,
|
||||
ct1.Y()/eofs.Y()*ct1.Esref_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Esref_
|
||||
ct1.Y()/eofs.Y()*ct1.esRef_
|
||||
+ ct2.Y()/eofs.Y()*ct2.esRef_
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -262,9 +262,9 @@ inline Foam::eConstThermo<EquationOfState> Foam::operator*
|
||||
(
|
||||
s*static_cast<const EquationOfState&>(ct),
|
||||
ct.Cv_,
|
||||
ct.Hf_,
|
||||
ct.hf_,
|
||||
ct.Tref_,
|
||||
ct.Esref_
|
||||
ct.esRef_
|
||||
);
|
||||
}
|
||||
|
||||
@ -301,11 +301,11 @@ inline Foam::eConstThermo<EquationOfState> Foam::operator==
|
||||
eofs,
|
||||
ct2.Y()/eofs.Y()*ct2.Cv_
|
||||
- ct1.Y()/eofs.Y()*ct1.Cv_,
|
||||
ct2.Y()/eofs.Y()*ct2.Hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.Hf_,
|
||||
ct2.Y()/eofs.Y()*ct2.hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.hf_,
|
||||
ct1.Tref_,
|
||||
ct2.Y()/eofs.Y()*ct2.Esref_
|
||||
- ct1.Y()/eofs.Y()*ct1.Esref_
|
||||
ct2.Y()/eofs.Y()*ct2.esRef_
|
||||
- ct1.Y()/eofs.Y()*ct1.esRef_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -36,8 +36,18 @@ Foam::eIcoTabulatedThermo<EquationOfState>::eIcoTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
Sf_(dict.subDict("thermodynamics").lookup<scalar>("Sf")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
sf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"sf", "Sf"})
|
||||
),
|
||||
Cv_("Cv", dict.subDict("thermodynamics").subDict("Cv"))
|
||||
{}
|
||||
|
||||
@ -53,8 +63,8 @@ void Foam::eIcoTabulatedThermo<EquationOfState>::write
|
||||
EquationOfState::write(os);
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("Sf", Sf_);
|
||||
dict.add("hf", hf_);
|
||||
dict.add("sf", sf_);
|
||||
dict.add("Cv", Cv_.values());
|
||||
os << indent << dict.dictName() << dict;
|
||||
}
|
||||
|
||||
@ -31,8 +31,8 @@ Description
|
||||
Usage
|
||||
\table
|
||||
Property | Description
|
||||
Hf | Heat of formation
|
||||
Sf | Standard entropy
|
||||
hf | Heat of formation
|
||||
sf | Standard entropy
|
||||
Cv | Specific heat at constant volume vs temperature table
|
||||
\endtable
|
||||
|
||||
@ -40,8 +40,8 @@ Usage
|
||||
\verbatim
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Sf 0;
|
||||
hf 0;
|
||||
sf 0;
|
||||
Cv
|
||||
{
|
||||
values
|
||||
@ -104,10 +104,10 @@ class eIcoTabulatedThermo
|
||||
// Private Data
|
||||
|
||||
//- Heat of formation
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Standard entropy
|
||||
scalar Sf_;
|
||||
scalar sf_;
|
||||
|
||||
//- Specific heat at constant volume table [J/kg/K]
|
||||
integratedNonUniformTable Cv_;
|
||||
@ -142,19 +142,19 @@ public:
|
||||
inline scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible internal energy [J/kg]
|
||||
inline scalar Es(const scalar p, const scalar T) const;
|
||||
inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute internal energy [J/kg]
|
||||
inline scalar Ea(const scalar p, const scalar T) const;
|
||||
inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "EtoHthermo.H"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,8 +35,8 @@ inline Foam::eIcoTabulatedThermo<EquationOfState>::eIcoTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, pt),
|
||||
Hf_(pt.Hf_),
|
||||
Sf_(pt.Sf_),
|
||||
hf_(pt.hf_),
|
||||
sf_(pt.sf_),
|
||||
Cv_(pt.Cv_)
|
||||
{}
|
||||
|
||||
@ -65,37 +65,37 @@ inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::Cv
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::Es
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::es
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cv_.intfdT(T) + EquationOfState::E(p, T);
|
||||
return Cv_.intfdT(T) + EquationOfState::e(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::Ea
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::ea
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es(p, T) + Hf_;
|
||||
return es(p, T) + hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::Hf()
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::hf()
|
||||
const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -107,7 +107,7 @@ inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::S
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::eIcoTabulatedThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
|
||||
@ -36,8 +36,18 @@ Foam::ePolynomialThermo<EquationOfState, PolySize>::ePolynomialThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
Sf_(dict.subDict("thermodynamics").lookup<scalar>("Sf")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
sf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"sf", "Sf"})
|
||||
),
|
||||
CvCoeffs_
|
||||
(
|
||||
dict.subDict("thermodynamics").lookup
|
||||
@ -70,8 +80,8 @@ void Foam::ePolynomialThermo<EquationOfState, PolySize>::write
|
||||
EquationOfState::write(os);
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("Sf", Sf_);
|
||||
dict.add("hf", hf_);
|
||||
dict.add("sf", sf_);
|
||||
dict.add
|
||||
(
|
||||
word("CvCoeffs<" + Foam::name(PolySize) + '>'),
|
||||
|
||||
@ -41,8 +41,8 @@ Description
|
||||
Usage
|
||||
\table
|
||||
Property | Description
|
||||
Hf | Heat of formation
|
||||
Sf | Standard entropy
|
||||
hf | Heat of formation
|
||||
sf | Standard entropy
|
||||
CvCoeffs<8> | Specific heat at constant volume polynomial coeffs
|
||||
\endtable
|
||||
|
||||
@ -50,8 +50,8 @@ Usage
|
||||
\verbatim
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Sf 0;
|
||||
hf 0;
|
||||
sf 0;
|
||||
CvCoeffs<8> (1000 -0.05 0.003 0 0 0 0 0);
|
||||
}
|
||||
\endverbatim
|
||||
@ -126,10 +126,10 @@ class ePolynomialThermo
|
||||
// Private Data
|
||||
|
||||
//- Heat of formation
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Standard entropy
|
||||
scalar Sf_;
|
||||
scalar sf_;
|
||||
|
||||
//- Specific heat at constant volume polynomial coeffs [J/kg/K/K^i]
|
||||
Polynomial<PolySize> CvCoeffs_;
|
||||
@ -149,8 +149,8 @@ class ePolynomialThermo
|
||||
inline ePolynomialThermo
|
||||
(
|
||||
const EquationOfState& pt,
|
||||
const scalar Hf,
|
||||
const scalar Sf,
|
||||
const scalar hf,
|
||||
const scalar sf,
|
||||
const Polynomial<PolySize>& CvCoeffs,
|
||||
const typename Polynomial<PolySize>::intPolyType& eCoeffs,
|
||||
const Polynomial<PolySize>& sCoeffs
|
||||
@ -186,19 +186,19 @@ public:
|
||||
inline scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible internal energy [J/kg]
|
||||
inline scalar Es(const scalar p, const scalar T) const;
|
||||
inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute internal energy [J/kg]
|
||||
inline scalar Ea(const scalar p, const scalar T) const;
|
||||
inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "EtoHthermo.H"
|
||||
|
||||
|
||||
@ -31,16 +31,16 @@ template<class EquationOfState, int PolySize>
|
||||
inline Foam::ePolynomialThermo<EquationOfState, PolySize>::ePolynomialThermo
|
||||
(
|
||||
const EquationOfState& pt,
|
||||
const scalar Hf,
|
||||
const scalar Sf,
|
||||
const scalar hf,
|
||||
const scalar sf,
|
||||
const Polynomial<PolySize>& CvCoeffs,
|
||||
const typename Polynomial<PolySize>::intPolyType& eCoeffs,
|
||||
const Polynomial<PolySize>& sCoeffs
|
||||
)
|
||||
:
|
||||
EquationOfState(pt),
|
||||
Hf_(Hf),
|
||||
Sf_(Sf),
|
||||
hf_(hf),
|
||||
sf_(sf),
|
||||
CvCoeffs_(CvCoeffs),
|
||||
eCoeffs_(eCoeffs),
|
||||
sCoeffs_(sCoeffs)
|
||||
@ -55,8 +55,8 @@ inline Foam::ePolynomialThermo<EquationOfState, PolySize>::ePolynomialThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, pt),
|
||||
Hf_(pt.Hf_),
|
||||
Sf_(pt.Sf_),
|
||||
hf_(pt.hf_),
|
||||
sf_(pt.sf_),
|
||||
CvCoeffs_(pt.CvCoeffs_),
|
||||
eCoeffs_(pt.eCoeffs_),
|
||||
sCoeffs_(pt.sCoeffs_)
|
||||
@ -87,55 +87,55 @@ inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::Cv
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::Es
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::es
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return eCoeffs_.value(T) + EquationOfState::E(p, T);
|
||||
return eCoeffs_.value(T) + EquationOfState::e(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::Ea
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::ea
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es(p, T) + Hf();
|
||||
return es(p, T) + hf();
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::Hf()
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::hf()
|
||||
const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::S
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return sCoeffs_.value(T) + EquationOfState::Sv(p, T);
|
||||
return sCoeffs_.value(T) + EquationOfState::sv(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::Gstd
|
||||
inline Foam::scalar Foam::ePolynomialThermo<EquationOfState, PolySize>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return
|
||||
eCoeffs_.value(T) + Hf() + Pstd/EquationOfState::rho(Pstd, T)
|
||||
- S(Pstd, T)*T;
|
||||
eCoeffs_.value(T) + hf() + Pstd/EquationOfState::rho(Pstd, T)
|
||||
- s(Pstd, T)*T;
|
||||
}
|
||||
|
||||
|
||||
@ -168,8 +168,8 @@ inline void Foam::ePolynomialThermo<EquationOfState, PolySize>::operator+=
|
||||
Y1 /= this->Y();
|
||||
const scalar Y2 = pt.Y()/this->Y();
|
||||
|
||||
Hf_ = Y1*Hf_ + Y2*pt.Hf_;
|
||||
Sf_ = Y1*Sf_ + Y2*pt.Sf_;
|
||||
hf_ = Y1*hf_ + Y2*pt.hf_;
|
||||
sf_ = Y1*sf_ + Y2*pt.sf_;
|
||||
CvCoeffs_ = Y1*CvCoeffs_ + Y2*pt.CvCoeffs_;
|
||||
eCoeffs_ = Y1*eCoeffs_ + Y2*pt.eCoeffs_;
|
||||
sCoeffs_ = Y1*sCoeffs_ + Y2*pt.sCoeffs_;
|
||||
@ -204,8 +204,8 @@ inline Foam::ePolynomialThermo<EquationOfState, PolySize> Foam::operator+
|
||||
return ePolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
eofs,
|
||||
pt1.Hf_,
|
||||
pt1.Sf_,
|
||||
pt1.hf_,
|
||||
pt1.sf_,
|
||||
pt1.CvCoeffs_,
|
||||
pt1.eCoeffs_,
|
||||
pt1.sCoeffs_
|
||||
@ -218,8 +218,8 @@ inline Foam::ePolynomialThermo<EquationOfState, PolySize> Foam::operator+
|
||||
return ePolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
eofs,
|
||||
Y1*pt1.Hf_ + Y2*pt2.Hf_,
|
||||
Y1*pt1.Sf_ + Y2*pt2.Sf_,
|
||||
Y1*pt1.hf_ + Y2*pt2.hf_,
|
||||
Y1*pt1.sf_ + Y2*pt2.sf_,
|
||||
Y1*pt1.CvCoeffs_ + Y2*pt2.CvCoeffs_,
|
||||
Y1*pt1.eCoeffs_ + Y2*pt2.eCoeffs_,
|
||||
Y1*pt1.sCoeffs_ + Y2*pt2.sCoeffs_
|
||||
@ -238,8 +238,8 @@ inline Foam::ePolynomialThermo<EquationOfState, PolySize> Foam::operator*
|
||||
return ePolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
s*static_cast<const EquationOfState&>(pt),
|
||||
pt.Hf_,
|
||||
pt.Sf_,
|
||||
pt.hf_,
|
||||
pt.sf_,
|
||||
pt.CvCoeffs_,
|
||||
pt.eCoeffs_,
|
||||
pt.sCoeffs_
|
||||
@ -266,8 +266,8 @@ inline Foam::ePolynomialThermo<EquationOfState, PolySize> Foam::operator==
|
||||
return ePolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
eofs,
|
||||
Y2*pt2.Hf_ - Y1*pt1.Hf_,
|
||||
Y2*pt2.Sf_ - Y1*pt1.Sf_,
|
||||
Y2*pt2.hf_ - Y1*pt1.hf_,
|
||||
Y2*pt2.sf_ - Y1*pt1.sf_,
|
||||
Y2*pt2.CvCoeffs_ - Y1*pt1.CvCoeffs_,
|
||||
Y2*pt2.eCoeffs_ - Y1*pt1.eCoeffs_,
|
||||
Y2*pt2.sCoeffs_ - Y1*pt1.sCoeffs_
|
||||
|
||||
@ -39,7 +39,12 @@ Foam::ePowerThermo<EquationOfState>::ePowerThermo
|
||||
c0_(dict.subDict("thermodynamics").lookup<scalar>("C0")),
|
||||
n0_(dict.subDict("thermodynamics").lookup<scalar>("n0")),
|
||||
Tref_(dict.subDict("thermodynamics").lookup<scalar>("Tref")),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf"))
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ Usage
|
||||
c0 | Reference heat capacity at constant volume [J/kg/K]
|
||||
n0 | Exponent of the power function
|
||||
Tref | Reference temperature [K]
|
||||
Hf | Heat of formation [J/kg]
|
||||
hf | Heat of formation [J/kg]
|
||||
\endtable
|
||||
|
||||
Example specification of ePowerThermo:
|
||||
@ -49,7 +49,7 @@ Usage
|
||||
c0 230;
|
||||
Tref 470;
|
||||
n0 3;
|
||||
Hf 0;
|
||||
hf 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
@ -118,7 +118,7 @@ class ePowerThermo
|
||||
scalar c0_;
|
||||
scalar n0_;
|
||||
scalar Tref_;
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -138,7 +138,7 @@ public:
|
||||
const scalar c0,
|
||||
const scalar n0,
|
||||
const scalar Tref,
|
||||
const scalar Hf
|
||||
const scalar hf
|
||||
);
|
||||
|
||||
//- Construct from name and dictionary
|
||||
@ -173,19 +173,19 @@ public:
|
||||
inline scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible internal energy [J/kg]
|
||||
inline scalar Es(const scalar p, const scalar T) const;
|
||||
inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute internal energy [J/kg]
|
||||
inline scalar Ea(const scalar p, const scalar T) const;
|
||||
inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "EtoHthermo.H"
|
||||
|
||||
|
||||
@ -53,14 +53,14 @@ inline Foam::ePowerThermo<EquationOfState>::ePowerThermo
|
||||
const scalar c0,
|
||||
const scalar n0,
|
||||
const scalar Tref,
|
||||
const scalar Hf
|
||||
const scalar hf
|
||||
)
|
||||
:
|
||||
EquationOfState(st),
|
||||
c0_(c0),
|
||||
n0_(n0),
|
||||
Tref_(Tref),
|
||||
Hf_(Hf)
|
||||
hf_(hf)
|
||||
{}
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ inline Foam::ePowerThermo<EquationOfState>::ePowerThermo
|
||||
c0_(jt.c0_),
|
||||
n0_(jt.n0_),
|
||||
Tref_(jt.Tref_),
|
||||
Hf_(jt.Hf_)
|
||||
hf_(jt.hf_)
|
||||
{}
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ inline Foam::scalar Foam::ePowerThermo<EquationOfState>::Cv
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::Es
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::es
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -122,30 +122,30 @@ inline Foam::scalar Foam::ePowerThermo<EquationOfState>::Es
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_ + 1) - pow(Tstd, n0_ + 1))/(pow(Tref_, n0_)*(n0_ + 1))
|
||||
+ EquationOfState::E(p, T);
|
||||
+ EquationOfState::e(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::Ea
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::ea
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es(p, T) + Hf();
|
||||
return es(p, T) + hf();
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::Hf() const
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::hf() const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -153,20 +153,20 @@ inline Foam::scalar Foam::ePowerThermo<EquationOfState>::S
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_) - pow(Tstd, n0_))/(pow(Tref_, n0_)*n0_)
|
||||
+ EquationOfState::Sv(p, T);
|
||||
+ EquationOfState::sv(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::ePowerThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_ + 1) - pow(Tstd, n0_ + 1))/(pow(Tref_, n0_)*(n0_ + 1))
|
||||
+ Hf() + Pstd/EquationOfState::rho(Pstd, T)
|
||||
- S(Pstd, T)*T;
|
||||
+ hf() + Pstd/EquationOfState::rho(Pstd, T)
|
||||
- s(Pstd, T)*T;
|
||||
}
|
||||
|
||||
|
||||
@ -199,7 +199,7 @@ inline void Foam::ePowerThermo<EquationOfState>::operator+=
|
||||
Y1 /= this->Y();
|
||||
const scalar Y2 = ct.Y()/this->Y();
|
||||
|
||||
Hf_ = Y1*Hf_ + Y2*ct.Hf_;
|
||||
hf_ = Y1*hf_ + Y2*ct.hf_;
|
||||
c0_ = Y1*c0_ + Y2*ct.c0_;
|
||||
n0_ = Y1*n0_ + Y2*ct.n0_;
|
||||
Tref_ = Y1*Tref_ + Y2*ct.Tref_;
|
||||
@ -230,7 +230,7 @@ inline Foam::ePowerThermo<EquationOfState> Foam::operator+
|
||||
ct1.c0_,
|
||||
ct1.n0_,
|
||||
ct1.Tref_,
|
||||
ct1.Hf_
|
||||
ct1.hf_
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -244,8 +244,8 @@ inline Foam::ePowerThermo<EquationOfState> Foam::operator+
|
||||
+ ct2.Y()/eofs.Y()*ct2.n0_,
|
||||
ct1.Y()/eofs.Y()*ct1.Tref_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Tref_,
|
||||
ct1.Y()/eofs.Y()*ct1.Hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Hf_
|
||||
ct1.Y()/eofs.Y()*ct1.hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.hf_
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -264,7 +264,7 @@ inline Foam::ePowerThermo<EquationOfState> Foam::operator*
|
||||
ct.c0_,
|
||||
ct.n0_,
|
||||
ct.Tref_,
|
||||
ct.Hf_
|
||||
ct.hf_
|
||||
);
|
||||
}
|
||||
|
||||
@ -291,8 +291,8 @@ inline Foam::ePowerThermo<EquationOfState> Foam::operator==
|
||||
- ct1.Y()/eofs.Y()*ct1.n0_,
|
||||
ct2.Y()/eofs.Y()*ct2.Tref_
|
||||
- ct1.Y()/eofs.Y()*ct1.Tref_,
|
||||
ct2.Y()/eofs.Y()*ct2.Hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.Hf_
|
||||
ct2.Y()/eofs.Y()*ct2.hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.hf_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -36,9 +36,25 @@ Foam::eTabulatedThermo<EquationOfState>::eTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
Sf_(dict.subDict("thermodynamics").lookup<scalar>("Sf")),
|
||||
Es_("Es", dict.subDict("thermodynamics").subDict("Es")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
sf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"sf", "Sf"})
|
||||
),
|
||||
es_
|
||||
(
|
||||
"es",
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.subDictBackwardsCompatible({"es", "Es"})
|
||||
),
|
||||
Cp_("Cp", dict.subDict("thermodynamics").subDict("Cp")),
|
||||
Cv_("Cv", dict.subDict("thermodynamics").subDict("Cv"))
|
||||
{}
|
||||
@ -55,12 +71,12 @@ void Foam::eTabulatedThermo<EquationOfState>::write
|
||||
EquationOfState::write(os);
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("Sf", Sf_);
|
||||
dict.add("hf", hf_);
|
||||
dict.add("sf", sf_);
|
||||
|
||||
dictionary EsDict("Es");
|
||||
EsDict.add("values", Es_.values());
|
||||
dict.add("Es", EsDict);
|
||||
dictionary esDict("es");
|
||||
esDict.add("values", es_.values());
|
||||
dict.add("es", esDict);
|
||||
|
||||
dictionary CpDict("Cp");
|
||||
CpDict.add("values", Cp_.values());
|
||||
|
||||
@ -32,9 +32,9 @@ Usage
|
||||
|
||||
\table
|
||||
Property | Description
|
||||
Hf | Heat of formation
|
||||
Sf | Standard entropy
|
||||
Es | Sensible internal energy vs pressure and temperature table
|
||||
hf | Heat of formation
|
||||
sf | Standard entropy
|
||||
es | Sensible internal energy vs pressure and temperature table
|
||||
Cv | Specific heat capacity vs pressure and temperature table
|
||||
\endtable
|
||||
|
||||
@ -42,10 +42,10 @@ Usage
|
||||
\verbatim
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Sf 0;
|
||||
hf 0;
|
||||
sf 0;
|
||||
|
||||
Es
|
||||
es
|
||||
{
|
||||
pLow 1e4;
|
||||
pHigh 5e5;
|
||||
@ -135,13 +135,13 @@ class eTabulatedThermo
|
||||
// Private Data
|
||||
|
||||
//- Heat of formation
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Standard entropy
|
||||
scalar Sf_;
|
||||
scalar sf_;
|
||||
|
||||
//- Sensible internal energy table [J/kg]
|
||||
table2D Es_;
|
||||
table2D es_;
|
||||
|
||||
//- Specific heat at constant pressure table [J/kg/K]
|
||||
table2D Cp_;
|
||||
@ -182,25 +182,25 @@ public:
|
||||
inline scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible internal energy [J/kg]
|
||||
inline scalar Es(const scalar p, const scalar T) const;
|
||||
inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute internal energy [J/kg]
|
||||
inline scalar Ea(const scalar p, const scalar T) const;
|
||||
inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
inline scalar Hs(const scalar p, const scalar T) const;
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kg]
|
||||
inline scalar Ha(const scalar p, const scalar T) const;
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
|
||||
// Derivative term used for Jacobian
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,9 +35,9 @@ inline Foam::eTabulatedThermo<EquationOfState>::eTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, pt),
|
||||
Hf_(pt.Hf_),
|
||||
Sf_(pt.Sf_),
|
||||
Es_(pt.Es_),
|
||||
hf_(pt.hf_),
|
||||
sf_(pt.sf_),
|
||||
es_(pt.es_),
|
||||
Cp_(pt.Cp_),
|
||||
Cv_(pt.Cv_)
|
||||
{}
|
||||
@ -78,59 +78,59 @@ inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::Cv
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::Es
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::es
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es_.value(p, T);
|
||||
return es_.value(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::Ea
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::ea
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es(p, T) + Hf_;
|
||||
return es(p, T) + hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::Hs
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es(p, T) + p/EquationOfState::rho(p, T);
|
||||
return es(p, T) + p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::Ha
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Ea(p, T) + p/EquationOfState::rho(p, T);
|
||||
return ea(p, T) + p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::Hf()
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::hf()
|
||||
const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -142,7 +142,7 @@ inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::S
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::eTabulatedThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
|
||||
@ -37,9 +37,19 @@ Foam::hConstThermo<EquationOfState>::hConstThermo
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Cp_(dict.subDict("thermodynamics").lookup<scalar>("Cp")),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
Tref_(dict.subDict("thermodynamics").lookupOrDefault<scalar>("Tref", Tstd)),
|
||||
Hsref_(dict.subDict("thermodynamics").lookupOrDefault<scalar>("Hsref", 0))
|
||||
hsRef_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupOrDefaultBackwardsCompatible<scalar>({"hsRef", "Hsref"}, 0)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
@ -52,14 +62,14 @@ void Foam::hConstThermo<EquationOfState>::write(Ostream& os) const
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Cp", Cp_);
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("hf", hf_);
|
||||
if (Tref_ != Tstd)
|
||||
{
|
||||
dict.add("Tref", Tref_);
|
||||
}
|
||||
if (Hsref_ != 0)
|
||||
if (hsRef_ != 0)
|
||||
{
|
||||
dict.add("Hsref", Hsref_);
|
||||
dict.add("hsRef", hsRef_);
|
||||
}
|
||||
os << indent << dict.dictName() << dict;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ Description
|
||||
at constant pressure:
|
||||
|
||||
\verbatim
|
||||
h = Cp*(T - Tref) + Hsref
|
||||
h = Cp*(T - Tref) + hsRef
|
||||
\endverbatim
|
||||
|
||||
Usage
|
||||
@ -37,8 +37,8 @@ Usage
|
||||
Property | Description
|
||||
Cp | Constant Heat capacity at constant pressure [J/kg/K]
|
||||
Tref | Reference temperature [K] (defaults to Tstd)
|
||||
Hsref | Reference sensible enthalpy [J/kg] (defaults to 0)
|
||||
Hf | Heat of formation [J/kg]
|
||||
hsRef | Reference sensible enthalpy [J/kg] (defaults to 0)
|
||||
hf | Heat of formation [J/kg]
|
||||
\endtable
|
||||
|
||||
Example specification of hConstThermo for air:
|
||||
@ -46,7 +46,7 @@ Usage
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
hf 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
@ -112,13 +112,13 @@ class hConstThermo
|
||||
scalar Cp_;
|
||||
|
||||
//- Heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Reference temperature around which to linearise [K]
|
||||
scalar Tref_;
|
||||
|
||||
//- Reference sensible enthalpy around which to linearise [J/kg]
|
||||
scalar Hsref_;
|
||||
scalar hsRef_;
|
||||
|
||||
|
||||
public:
|
||||
@ -130,9 +130,9 @@ public:
|
||||
(
|
||||
const EquationOfState& st,
|
||||
const scalar Cp,
|
||||
const scalar Hf,
|
||||
const scalar hf,
|
||||
const scalar Tref,
|
||||
const scalar Hsref
|
||||
const scalar hsRef
|
||||
);
|
||||
|
||||
//- Construct from name and dictionary
|
||||
@ -163,19 +163,19 @@ public:
|
||||
inline scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kg]
|
||||
inline scalar Ha(const scalar p, const scalar T) const;
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
inline scalar Hs(const scalar p, const scalar T) const;
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "HtoEthermo.H"
|
||||
|
||||
|
||||
@ -30,16 +30,16 @@ inline Foam::hConstThermo<EquationOfState>::hConstThermo
|
||||
(
|
||||
const EquationOfState& st,
|
||||
const scalar Cp,
|
||||
const scalar Hf,
|
||||
const scalar hf,
|
||||
const scalar Tref,
|
||||
const scalar Href
|
||||
)
|
||||
:
|
||||
EquationOfState(st),
|
||||
Cp_(Cp),
|
||||
Hf_(Hf),
|
||||
hf_(hf),
|
||||
Tref_(Tref),
|
||||
Hsref_(Href)
|
||||
hsRef_(Href)
|
||||
{}
|
||||
|
||||
|
||||
@ -52,9 +52,9 @@ inline Foam::hConstThermo<EquationOfState>::hConstThermo
|
||||
:
|
||||
EquationOfState(name, ct),
|
||||
Cp_(ct.Cp_),
|
||||
Hf_(ct.Hf_),
|
||||
hf_(ct.hf_),
|
||||
Tref_(ct.Tref_),
|
||||
Hsref_(ct.Hsref_)
|
||||
hsRef_(ct.hsRef_)
|
||||
{}
|
||||
|
||||
|
||||
@ -93,52 +93,52 @@ inline Foam::scalar Foam::hConstThermo<EquationOfState>::Cp
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::Hs
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_*(T - Tref_) + Hsref_ + EquationOfState::H(p, T);
|
||||
return Cp_*(T - Tref_) + hsRef_ + EquationOfState::h(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::Ha
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Hs(p, T) + Hf();
|
||||
return hs(p, T) + hf();
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::Hf() const
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::hf() const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_*log(T/Tstd) + EquationOfState::Sp(p, T);
|
||||
return Cp_*log(T/Tstd) + EquationOfState::sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::hConstThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_*(T - Tref_) + Hsref_ + Hf() - Cp_*T*log(T/Tstd);
|
||||
return Cp_*(T - Tref_) + hsRef_ + hf() - Cp_*T*log(T/Tstd);
|
||||
}
|
||||
|
||||
|
||||
@ -185,8 +185,8 @@ inline void Foam::hConstThermo<EquationOfState>::operator+=
|
||||
const scalar Y2 = ct.Y()/this->Y();
|
||||
|
||||
Cp_ = Y1*Cp_ + Y2*ct.Cp_;
|
||||
Hf_ = Y1*Hf_ + Y2*ct.Hf_;
|
||||
Hsref_ = Y1*Hsref_ + Y2*ct.Hsref_;
|
||||
hf_ = Y1*hf_ + Y2*ct.hf_;
|
||||
hsRef_ = Y1*hsRef_ + Y2*ct.hsRef_;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,9 +212,9 @@ inline Foam::hConstThermo<EquationOfState> Foam::operator+
|
||||
(
|
||||
eofs,
|
||||
ct1.Cp_,
|
||||
ct1.Hf_,
|
||||
ct1.hf_,
|
||||
ct1.Tref_,
|
||||
ct1.Hsref_
|
||||
ct1.hsRef_
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -238,11 +238,11 @@ inline Foam::hConstThermo<EquationOfState> Foam::operator+
|
||||
eofs,
|
||||
ct1.Y()/eofs.Y()*ct1.Cp_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Cp_,
|
||||
ct1.Y()/eofs.Y()*ct1.Hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Hf_,
|
||||
ct1.Y()/eofs.Y()*ct1.hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.hf_,
|
||||
ct1.Tref_,
|
||||
ct1.Y()/eofs.Y()*ct1.Hsref_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Hsref_
|
||||
ct1.Y()/eofs.Y()*ct1.hsRef_
|
||||
+ ct2.Y()/eofs.Y()*ct2.hsRef_
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -259,9 +259,9 @@ inline Foam::hConstThermo<EquationOfState> Foam::operator*
|
||||
(
|
||||
s*static_cast<const EquationOfState&>(ct),
|
||||
ct.Cp_,
|
||||
ct.Hf_,
|
||||
ct.hf_,
|
||||
ct.Tref_,
|
||||
ct.Hsref_
|
||||
ct.hsRef_
|
||||
);
|
||||
}
|
||||
|
||||
@ -298,11 +298,11 @@ inline Foam::hConstThermo<EquationOfState> Foam::operator==
|
||||
eofs,
|
||||
ct2.Y()/eofs.Y()*ct2.Cp_
|
||||
- ct1.Y()/eofs.Y()*ct1.Cp_,
|
||||
ct2.Y()/eofs.Y()*ct2.Hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.Hf_,
|
||||
ct2.Y()/eofs.Y()*ct2.hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.hf_,
|
||||
ct1.Tref_,
|
||||
ct2.Y()/eofs.Y()*ct2.Hsref_
|
||||
- ct1.Y()/eofs.Y()*ct1.Hsref_
|
||||
ct2.Y()/eofs.Y()*ct2.hsRef_
|
||||
- ct1.Y()/eofs.Y()*ct1.hsRef_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -36,8 +36,18 @@ Foam::hIcoTabulatedThermo<EquationOfState>::hIcoTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
Sf_(dict.subDict("thermodynamics").lookup<scalar>("Sf")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
sf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"sf", "Sf"})
|
||||
),
|
||||
Cp_("Cp", dict.subDict("thermodynamics").subDict("Cp"))
|
||||
{}
|
||||
|
||||
@ -53,8 +63,8 @@ void Foam::hIcoTabulatedThermo<EquationOfState>::write
|
||||
EquationOfState::write(os);
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("Sf", Sf_);
|
||||
dict.add("hf", hf_);
|
||||
dict.add("sf", sf_);
|
||||
dict.add("Cp", Cp_.values());
|
||||
os << indent << dict.dictName() << dict;
|
||||
}
|
||||
|
||||
@ -32,8 +32,8 @@ Usage
|
||||
|
||||
\table
|
||||
Property | Description
|
||||
Hf | Heat of formation
|
||||
Sf | Standard entropy
|
||||
hf | Heat of formation
|
||||
sf | Standard entropy
|
||||
Cp | Specific heat at constant pressure vs temperature table
|
||||
\endtable
|
||||
|
||||
@ -41,8 +41,8 @@ Usage
|
||||
\verbatim
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Sf 0;
|
||||
hf 0;
|
||||
sf 0;
|
||||
Cp
|
||||
{
|
||||
values
|
||||
@ -105,10 +105,10 @@ class hIcoTabulatedThermo
|
||||
// Private Data
|
||||
|
||||
//- Heat of formation
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Standard entropy
|
||||
scalar Sf_;
|
||||
scalar sf_;
|
||||
|
||||
//- Specific heat at constant pressure table [J/kg/K]
|
||||
integratedNonUniformTable Cp_;
|
||||
@ -143,19 +143,19 @@ public:
|
||||
inline scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kg]
|
||||
inline scalar Ha(const scalar p, const scalar T) const;
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
inline scalar Hs(const scalar p, const scalar T) const;
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "HtoEthermo.H"
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,8 +35,8 @@ inline Foam::hIcoTabulatedThermo<EquationOfState>::hIcoTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, pt),
|
||||
Hf_(pt.Hf_),
|
||||
Sf_(pt.Sf_),
|
||||
hf_(pt.hf_),
|
||||
sf_(pt.sf_),
|
||||
Cp_(pt.Cp_)
|
||||
{}
|
||||
|
||||
@ -65,53 +65,53 @@ inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::Cp
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::Hs
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_.intfdT(T) + EquationOfState::H(p, T);
|
||||
return Cp_.intfdT(T) + EquationOfState::h(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::Ha
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Hs(p, T) + Hf_;
|
||||
return hs(p, T) + hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::Hf()
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::hf()
|
||||
const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_.intfByTdT(T) + EquationOfState::Sp(p, T) + Sf_;
|
||||
return Cp_.intfByTdT(T) + EquationOfState::sp(p, T) + sf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::hIcoTabulatedThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Cp_.intfdT(T) + Hf_ - (Cp_.intfByTdT(T) + Sf_)*T;
|
||||
return Cp_.intfdT(T) + hf_ - (Cp_.intfByTdT(T) + sf_)*T;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -36,8 +36,18 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
Sf_(dict.subDict("thermodynamics").lookup<scalar>("Sf")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
sf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"sf", "Sf"})
|
||||
),
|
||||
CpCoeffs_
|
||||
(
|
||||
dict.subDict("thermodynamics").lookup
|
||||
@ -52,10 +62,10 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
||||
sCoeffs_ = CpCoeffs_.integralMinus1();
|
||||
|
||||
// Offset h poly so that it is relative to the enthalpy at Tstd
|
||||
hCoeffs_[0] += Hf_ - hCoeffs_.value(Tstd);
|
||||
hCoeffs_[0] += hf_ - hCoeffs_.value(Tstd);
|
||||
|
||||
// Offset s poly so that it is relative to the entropy at Tstd
|
||||
sCoeffs_[0] += Sf_ - sCoeffs_.value(Tstd);
|
||||
sCoeffs_[0] += sf_ - sCoeffs_.value(Tstd);
|
||||
}
|
||||
|
||||
|
||||
@ -70,8 +80,8 @@ void Foam::hPolynomialThermo<EquationOfState, PolySize>::write
|
||||
EquationOfState::write(os);
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("Sf", Sf_);
|
||||
dict.add("hf", hf_);
|
||||
dict.add("sf", sf_);
|
||||
dict.add
|
||||
(
|
||||
word("CpCoeffs<" + Foam::name(PolySize) + '>'),
|
||||
|
||||
@ -39,8 +39,8 @@ Description
|
||||
Usage
|
||||
\table
|
||||
Property | Description
|
||||
Hf | Heat of formation
|
||||
Sf | Standard entropy
|
||||
hf | Heat of formation
|
||||
sf | Standard entropy
|
||||
CpCoeffs<8> | Specific heat at constant pressure polynomial coeffs
|
||||
\endtable
|
||||
|
||||
@ -48,8 +48,8 @@ Usage
|
||||
\verbatim
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Sf 0;
|
||||
hf 0;
|
||||
sf 0;
|
||||
CpCoeffs<8> (1000 -0.05 0.003 0 0 0 0 0);
|
||||
}
|
||||
\endverbatim
|
||||
@ -124,10 +124,10 @@ class hPolynomialThermo
|
||||
// Private Data
|
||||
|
||||
//- Heat of formation
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Standard entropy
|
||||
scalar Sf_;
|
||||
scalar sf_;
|
||||
|
||||
//- Specific heat at constant pressure polynomial coeffs [J/kg/K/K^i]
|
||||
Polynomial<PolySize> CpCoeffs_;
|
||||
@ -149,8 +149,8 @@ public:
|
||||
inline hPolynomialThermo
|
||||
(
|
||||
const EquationOfState& pt,
|
||||
const scalar Hf,
|
||||
const scalar Sf,
|
||||
const scalar hf,
|
||||
const scalar sf,
|
||||
const Polynomial<PolySize>& CpCoeffs,
|
||||
const typename Polynomial<PolySize>::intPolyType& hCoeffs,
|
||||
const Polynomial<PolySize>& sCoeffs
|
||||
@ -181,19 +181,19 @@ public:
|
||||
inline scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kg]
|
||||
inline scalar Ha(const scalar p, const scalar T) const;
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
inline scalar Hs(const scalar p, const scalar T) const;
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "HtoEthermo.H"
|
||||
|
||||
|
||||
@ -31,16 +31,16 @@ template<class EquationOfState, int PolySize>
|
||||
inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
||||
(
|
||||
const EquationOfState& pt,
|
||||
const scalar Hf,
|
||||
const scalar Sf,
|
||||
const scalar hf,
|
||||
const scalar sf,
|
||||
const Polynomial<PolySize>& CpCoeffs,
|
||||
const typename Polynomial<PolySize>::intPolyType& hCoeffs,
|
||||
const Polynomial<PolySize>& sCoeffs
|
||||
)
|
||||
:
|
||||
EquationOfState(pt),
|
||||
Hf_(Hf),
|
||||
Sf_(Sf),
|
||||
hf_(hf),
|
||||
sf_(sf),
|
||||
CpCoeffs_(CpCoeffs),
|
||||
hCoeffs_(hCoeffs),
|
||||
sCoeffs_(sCoeffs)
|
||||
@ -55,8 +55,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, pt),
|
||||
Hf_(pt.Hf_),
|
||||
Sf_(pt.Sf_),
|
||||
hf_(pt.hf_),
|
||||
sf_(pt.sf_),
|
||||
CpCoeffs_(pt.CpCoeffs_),
|
||||
hCoeffs_(pt.hCoeffs_),
|
||||
sCoeffs_(pt.sCoeffs_)
|
||||
@ -87,48 +87,48 @@ inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::Cp
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::Hs
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
return ha(p, T) - hf();
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::Ha
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return hCoeffs_.value(T) + EquationOfState::H(p, T);
|
||||
return hCoeffs_.value(T) + EquationOfState::h(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::Hf()
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::hf()
|
||||
const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::S
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return sCoeffs_.value(T) + EquationOfState::Sp(p, T);
|
||||
return sCoeffs_.value(T) + EquationOfState::sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState, int PolySize>
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::Gstd
|
||||
inline Foam::scalar Foam::hPolynomialThermo<EquationOfState, PolySize>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
@ -168,8 +168,8 @@ inline void Foam::hPolynomialThermo<EquationOfState, PolySize>::operator+=
|
||||
Y1 /= this->Y();
|
||||
const scalar Y2 = pt.Y()/this->Y();
|
||||
|
||||
Hf_ = Y1*Hf_ + Y2*pt.Hf_;
|
||||
Sf_ = Y1*Sf_ + Y2*pt.Sf_;
|
||||
hf_ = Y1*hf_ + Y2*pt.hf_;
|
||||
sf_ = Y1*sf_ + Y2*pt.sf_;
|
||||
CpCoeffs_ = Y1*CpCoeffs_ + Y2*pt.CpCoeffs_;
|
||||
hCoeffs_ = Y1*hCoeffs_ + Y2*pt.hCoeffs_;
|
||||
sCoeffs_ = Y1*sCoeffs_ + Y2*pt.sCoeffs_;
|
||||
@ -204,8 +204,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator+
|
||||
return hPolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
eofs,
|
||||
pt1.Hf_,
|
||||
pt1.Sf_,
|
||||
pt1.hf_,
|
||||
pt1.sf_,
|
||||
pt1.CpCoeffs_,
|
||||
pt1.hCoeffs_,
|
||||
pt1.sCoeffs_
|
||||
@ -218,8 +218,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator+
|
||||
return hPolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
eofs,
|
||||
Y1*pt1.Hf_ + Y2*pt2.Hf_,
|
||||
Y1*pt1.Sf_ + Y2*pt2.Sf_,
|
||||
Y1*pt1.hf_ + Y2*pt2.hf_,
|
||||
Y1*pt1.sf_ + Y2*pt2.sf_,
|
||||
Y1*pt1.CpCoeffs_ + Y2*pt2.CpCoeffs_,
|
||||
Y1*pt1.hCoeffs_ + Y2*pt2.hCoeffs_,
|
||||
Y1*pt1.sCoeffs_ + Y2*pt2.sCoeffs_
|
||||
@ -238,8 +238,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator*
|
||||
return hPolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
s*static_cast<const EquationOfState&>(pt),
|
||||
pt.Hf_,
|
||||
pt.Sf_,
|
||||
pt.hf_,
|
||||
pt.sf_,
|
||||
pt.CpCoeffs_,
|
||||
pt.hCoeffs_,
|
||||
pt.sCoeffs_
|
||||
@ -266,8 +266,8 @@ inline Foam::hPolynomialThermo<EquationOfState, PolySize> Foam::operator==
|
||||
return hPolynomialThermo<EquationOfState, PolySize>
|
||||
(
|
||||
eofs,
|
||||
Y2*pt2.Hf_ - Y1*pt1.Hf_,
|
||||
Y2*pt2.Sf_ - Y1*pt1.Sf_,
|
||||
Y2*pt2.hf_ - Y1*pt1.hf_,
|
||||
Y2*pt2.sf_ - Y1*pt1.sf_,
|
||||
Y2*pt2.CpCoeffs_ - Y1*pt1.CpCoeffs_,
|
||||
Y2*pt2.hCoeffs_ - Y1*pt1.hCoeffs_,
|
||||
Y2*pt2.sCoeffs_ - Y1*pt1.sCoeffs_
|
||||
|
||||
@ -39,7 +39,12 @@ Foam::hPowerThermo<EquationOfState>::hPowerThermo
|
||||
c0_(dict.subDict("thermodynamics").lookup<scalar>("C0")),
|
||||
n0_(dict.subDict("thermodynamics").lookup<scalar>("n0")),
|
||||
Tref_(dict.subDict("thermodynamics").lookup<scalar>("Tref")),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf"))
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ Usage
|
||||
c0 | Reference heat capacity at constant pressure [J/kg/K]
|
||||
n0 | Exponent of the power function
|
||||
Tref | Reference temperature [K]
|
||||
Hf | Heat of formation [J/kg]
|
||||
hf | Heat of formation [J/kg]
|
||||
\endtable
|
||||
|
||||
Example specification of hPowerThermo:
|
||||
@ -46,7 +46,7 @@ Usage
|
||||
c0 230;
|
||||
Tref 470;
|
||||
n0 3;
|
||||
Hf 0;
|
||||
hf 0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
@ -115,7 +115,7 @@ class hPowerThermo
|
||||
scalar c0_;
|
||||
scalar n0_;
|
||||
scalar Tref_;
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
@ -135,7 +135,7 @@ public:
|
||||
const scalar c0,
|
||||
const scalar n0,
|
||||
const scalar Tref,
|
||||
const scalar Hf
|
||||
const scalar hf
|
||||
);
|
||||
|
||||
//- Construct from name and dictionary
|
||||
@ -170,19 +170,19 @@ public:
|
||||
inline scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kg]
|
||||
inline scalar Ha(const scalar p, const scalar T) const;
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
inline scalar Hs(const scalar p, const scalar T) const;
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "HtoEthermo.H"
|
||||
|
||||
|
||||
@ -53,14 +53,14 @@ inline Foam::hPowerThermo<EquationOfState>::hPowerThermo
|
||||
const scalar c0,
|
||||
const scalar n0,
|
||||
const scalar Tref,
|
||||
const scalar Hf
|
||||
const scalar hf
|
||||
)
|
||||
:
|
||||
EquationOfState(st),
|
||||
c0_(c0),
|
||||
n0_(n0),
|
||||
Tref_(Tref),
|
||||
Hf_(Hf)
|
||||
hf_(hf)
|
||||
{}
|
||||
|
||||
|
||||
@ -75,7 +75,7 @@ inline Foam::hPowerThermo<EquationOfState>::hPowerThermo
|
||||
c0_(jt.c0_),
|
||||
n0_(jt.n0_),
|
||||
Tref_(jt.Tref_),
|
||||
Hf_(jt.Hf_)
|
||||
hf_(jt.hf_)
|
||||
{}
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ inline Foam::scalar Foam::hPowerThermo<EquationOfState>::Cp
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::Hs
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -122,30 +122,30 @@ inline Foam::scalar Foam::hPowerThermo<EquationOfState>::Hs
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_ + 1) - pow(Tstd, n0_ + 1))/(pow(Tref_, n0_)*(n0_ + 1))
|
||||
+ EquationOfState::H(p, T);
|
||||
+ EquationOfState::h(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::Ha
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Hs(p, T) + Hf();
|
||||
return hs(p, T) + hf();
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::Hf() const
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::hf() const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -153,19 +153,19 @@ inline Foam::scalar Foam::hPowerThermo<EquationOfState>::S
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_) - pow(Tstd, n0_))/(pow(Tref_, n0_)*n0_)
|
||||
+ EquationOfState::Sp(p, T);
|
||||
+ EquationOfState::sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::hPowerThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return
|
||||
c0_*(pow(T, n0_ + 1) - pow(Tstd, n0_ + 1))/(pow(Tref_, n0_)*(n0_ + 1))
|
||||
+ Hf()
|
||||
+ hf()
|
||||
- c0_*(pow(T, n0_) - pow(Tstd, n0_))*T/(pow(Tref_, n0_)*n0_);
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ inline void Foam::hPowerThermo<EquationOfState>::operator+=
|
||||
Y1 /= this->Y();
|
||||
const scalar Y2 = ct.Y()/this->Y();
|
||||
|
||||
Hf_ = Y1*Hf_ + Y2*ct.Hf_;
|
||||
hf_ = Y1*hf_ + Y2*ct.hf_;
|
||||
c0_ = Y1*c0_ + Y2*ct.c0_;
|
||||
n0_ = Y1*n0_ + Y2*ct.n0_;
|
||||
Tref_ = Y1*Tref_ + Y2*ct.Tref_;
|
||||
@ -231,7 +231,7 @@ inline Foam::hPowerThermo<EquationOfState> Foam::operator+
|
||||
ct1.c0_,
|
||||
ct1.n0_,
|
||||
ct1.Tref_,
|
||||
ct1.Hf_
|
||||
ct1.hf_
|
||||
);
|
||||
}
|
||||
else
|
||||
@ -245,8 +245,8 @@ inline Foam::hPowerThermo<EquationOfState> Foam::operator+
|
||||
+ ct2.Y()/eofs.Y()*ct2.n0_,
|
||||
ct1.Y()/eofs.Y()*ct1.Tref_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Tref_,
|
||||
ct1.Y()/eofs.Y()*ct1.Hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.Hf_
|
||||
ct1.Y()/eofs.Y()*ct1.hf_
|
||||
+ ct2.Y()/eofs.Y()*ct2.hf_
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -265,7 +265,7 @@ inline Foam::hPowerThermo<EquationOfState> Foam::operator*
|
||||
ct.c0_,
|
||||
ct.n0_,
|
||||
ct.Tref_,
|
||||
ct.Hf_
|
||||
ct.hf_
|
||||
);
|
||||
}
|
||||
|
||||
@ -292,8 +292,8 @@ inline Foam::hPowerThermo<EquationOfState> Foam::operator==
|
||||
- ct1.Y()/eofs.Y()*ct1.n0_,
|
||||
ct2.Y()/eofs.Y()*ct2.Tref_
|
||||
- ct1.Y()/eofs.Y()*ct1.Tref_,
|
||||
ct2.Y()/eofs.Y()*ct2.Hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.Hf_
|
||||
ct2.Y()/eofs.Y()*ct2.hf_
|
||||
- ct1.Y()/eofs.Y()*ct1.hf_
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -36,9 +36,25 @@ Foam::hTabulatedThermo<EquationOfState>::hTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, dict),
|
||||
Hf_(dict.subDict("thermodynamics").lookup<scalar>("Hf")),
|
||||
Sf_(dict.subDict("thermodynamics").lookup<scalar>("Sf")),
|
||||
Hs_("Hs", dict.subDict("thermodynamics").subDict("Hs")),
|
||||
hf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"hf", "Hf"})
|
||||
),
|
||||
sf_
|
||||
(
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.lookupBackwardsCompatible<scalar>({"sf", "Sf"})
|
||||
),
|
||||
hs_
|
||||
(
|
||||
"hs",
|
||||
dict
|
||||
.subDict("thermodynamics")
|
||||
.subDictBackwardsCompatible({"hs", "Hs"})
|
||||
),
|
||||
Cp_("Cp", dict.subDict("thermodynamics").subDict("Cp")),
|
||||
Cv_("Cv", dict.subDict("thermodynamics").subDict("Cv"))
|
||||
{}
|
||||
@ -55,12 +71,12 @@ void Foam::hTabulatedThermo<EquationOfState>::write
|
||||
EquationOfState::write(os);
|
||||
|
||||
dictionary dict("thermodynamics");
|
||||
dict.add("Hf", Hf_);
|
||||
dict.add("Sf", Sf_);
|
||||
dict.add("hf", hf_);
|
||||
dict.add("sf", sf_);
|
||||
|
||||
dictionary HsDict("Hs");
|
||||
HsDict.add("values", Hs_.values());
|
||||
dict.add("Hs", HsDict);
|
||||
dictionary hsDict("hs");
|
||||
hsDict.add("values", hs_.values());
|
||||
dict.add("hs", hsDict);
|
||||
|
||||
dictionary CpDict("Cp");
|
||||
CpDict.add("values", Cp_.values());
|
||||
|
||||
@ -32,9 +32,9 @@ Usage
|
||||
|
||||
\table
|
||||
Property | Description
|
||||
Hf | Heat of formation
|
||||
Sf | Standard entropy
|
||||
Hs | Sensible enthalpy vs pressure and temperature table
|
||||
hf | Heat of formation
|
||||
sf | Standard entropy
|
||||
hs | Sensible enthalpy vs pressure and temperature table
|
||||
Cp | Specific heat capacity vs pressure and temperature table
|
||||
\endtable
|
||||
|
||||
@ -42,10 +42,10 @@ Usage
|
||||
\verbatim
|
||||
thermodynamics
|
||||
{
|
||||
Hf 0;
|
||||
Sf 0;
|
||||
hf 0;
|
||||
sf 0;
|
||||
|
||||
Hs
|
||||
hs
|
||||
{
|
||||
pLow 1e4;
|
||||
pHigh 5e5;
|
||||
@ -135,13 +135,13 @@ class hTabulatedThermo
|
||||
// Private Data
|
||||
|
||||
//- Heat of formation
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
//- Standard entropy
|
||||
scalar Sf_;
|
||||
scalar sf_;
|
||||
|
||||
//- Sensible enthalpy table [J/kg]
|
||||
table2D Hs_;
|
||||
table2D hs_;
|
||||
|
||||
//- Specific heat at constant pressure table [J/kg/K]
|
||||
table2D Cp_;
|
||||
@ -182,25 +182,25 @@ public:
|
||||
inline scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
inline scalar Hs(const scalar p, const scalar T) const;
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kg]
|
||||
inline scalar Ha(const scalar p, const scalar T) const;
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible internal energy [J/kg]
|
||||
inline scalar Es(const scalar p, const scalar T) const;
|
||||
inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute internal energy [J/kg]
|
||||
inline scalar Ea(const scalar p, const scalar T) const;
|
||||
inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
|
||||
// Derivative term used for Jacobian
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,9 +35,9 @@ inline Foam::hTabulatedThermo<EquationOfState>::hTabulatedThermo
|
||||
)
|
||||
:
|
||||
EquationOfState(name, pt),
|
||||
Hf_(pt.Hf_),
|
||||
Sf_(pt.Sf_),
|
||||
Hs_(pt.Hs_),
|
||||
hf_(pt.hf_),
|
||||
sf_(pt.sf_),
|
||||
hs_(pt.hs_),
|
||||
Cp_(pt.Cp_),
|
||||
Cv_(pt.Cv_)
|
||||
{}
|
||||
@ -78,59 +78,59 @@ inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::Cv
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::Hs
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Hs_.value(p, T);
|
||||
return hs_.value(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::Ha
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Hs(p, T) + Hf_;
|
||||
return hs(p, T) + hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::Hf()
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::hf()
|
||||
const
|
||||
{
|
||||
return Hf_;
|
||||
return hf_;
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::Es
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::es
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Hs(p, T) - p/EquationOfState::rho(p, T);
|
||||
return hs(p, T) - p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::Ea
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::ea
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Ha(p, T) - p/EquationOfState::rho(p, T);
|
||||
return ha(p, T) - p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -142,7 +142,7 @@ inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::S
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::hTabulatedThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
|
||||
@ -230,19 +230,19 @@ public:
|
||||
inline scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kg]
|
||||
inline scalar Ha(const scalar p, const scalar T) const;
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kg]
|
||||
inline scalar Hs(const scalar p, const scalar T) const;
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Entropy [J/kg/K]
|
||||
inline scalar S(const scalar p, const scalar T) const;
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy of the mixture in the standard state [J/kg]
|
||||
inline scalar Gstd(const scalar T) const;
|
||||
inline scalar gStd(const scalar T) const;
|
||||
|
||||
#include "HtoEthermo.H"
|
||||
|
||||
|
||||
@ -181,18 +181,18 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::Cp
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::Hs
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Ha(p, T) - Hf();
|
||||
return ha(p, T) - hf();
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::Ha
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -203,12 +203,12 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::Ha
|
||||
(
|
||||
((((a[4]/5.0*T + a[3]/4.0)*T + a[2]/3.0)*T + a[1]/2.0)*T + a[0])*T
|
||||
+ a[5]
|
||||
) + EquationOfState::H(p, T);
|
||||
) + EquationOfState::h(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::Hf() const
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::hf() const
|
||||
{
|
||||
const coeffArray& a = lowCpCoeffs_;
|
||||
return
|
||||
@ -222,7 +222,7 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::Hf() const
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::S
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::s
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
@ -233,12 +233,12 @@ inline Foam::scalar Foam::janafThermo<EquationOfState>::S
|
||||
(
|
||||
(((a[4]/4.0*T + a[3]/3.0)*T + a[2]/2.0)*T + a[1])*T + a[0]*log(T)
|
||||
+ a[6]
|
||||
) + EquationOfState::Sp(p, T);
|
||||
) + EquationOfState::sp(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class EquationOfState>
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::Gstd
|
||||
inline Foam::scalar Foam::janafThermo<EquationOfState>::gStd
|
||||
(
|
||||
const scalar T
|
||||
) const
|
||||
|
||||
@ -87,19 +87,19 @@ public:
|
||||
}
|
||||
|
||||
// Sensible enthalpy [J/kg]
|
||||
scalar HE
|
||||
scalar he
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.Hs(p, T);
|
||||
return thermo.hs(p, T);
|
||||
}
|
||||
|
||||
//- Temperature from sensible enthalpy
|
||||
// given an initial temperature T0
|
||||
scalar THE
|
||||
scalar The
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar h,
|
||||
|
||||
@ -88,19 +88,19 @@ public:
|
||||
}
|
||||
|
||||
//- Sensible internal energy [J/kg]
|
||||
scalar HE
|
||||
scalar he
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return thermo.Es(p, T);
|
||||
return thermo.es(p, T);
|
||||
}
|
||||
|
||||
//- Temperature from sensible internal energy
|
||||
// given an initial temperature T0
|
||||
scalar THE
|
||||
scalar The
|
||||
(
|
||||
const Thermo& thermo,
|
||||
const scalar e,
|
||||
@ -108,7 +108,7 @@ public:
|
||||
const scalar T0
|
||||
) const
|
||||
{
|
||||
return thermo.TEs(e, p, T0);
|
||||
return thermo.Tes(e, p, T0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -7,20 +7,20 @@ inline scalar Cp
|
||||
return Cv(p, T) + EquationOfState::CpMCv(p, T);
|
||||
}
|
||||
|
||||
inline scalar Hs
|
||||
inline scalar hs
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Es(p, T) + p/EquationOfState::rho(p, T);
|
||||
return es(p, T) + p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
inline scalar Ha
|
||||
inline scalar ha
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Ea(p, T) + p/EquationOfState::rho(p, T);
|
||||
return ea(p, T) + p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
@ -7,20 +7,20 @@ inline scalar Cv
|
||||
return Cp(p, T) - EquationOfState::CpMCv(p, T);
|
||||
}
|
||||
|
||||
inline scalar Es
|
||||
inline scalar es
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Hs(p, T) - p/EquationOfState::rho(p, T);
|
||||
return hs(p, T) - p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
inline scalar Ea
|
||||
inline scalar ea
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const
|
||||
{
|
||||
return Ha(p, T) - p/EquationOfState::rho(p, T);
|
||||
return ha(p, T) - p/EquationOfState::rho(p, T);
|
||||
}
|
||||
|
||||
@ -144,28 +144,28 @@ public:
|
||||
// inline scalar Cp(const scalar p, const scalar T) const;
|
||||
|
||||
// Sensible enthalpy [J/kg]
|
||||
// inline scalar Hs(const scalar p, const scalar T) const;
|
||||
// inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
// Enthalpy of formation [J/kg]
|
||||
// inline scalar Hf() const;
|
||||
// inline scalar hf() const;
|
||||
|
||||
// Absolute enthalpy [J/kg]
|
||||
// inline scalar Ha(const scalar p, const scalar T) const;
|
||||
// inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
// Heat capacity at constant volume [J/kg/K]
|
||||
// inline scalar Cv(const scalar p, const scalar T) const;
|
||||
|
||||
// Sensible internal energy [J/kg]
|
||||
// inline scalar Es(const scalar p, const scalar T) const;
|
||||
// inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
// Absolute internal energy [J/kg]
|
||||
// inline scalar Ea(const scalar p, const scalar T) const;
|
||||
// inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
// Entropy [J/kg/K]
|
||||
// inline scalar S(const scalar p, const scalar T) const;
|
||||
// inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
|
||||
// Mass specific derived properties
|
||||
// Derived properties
|
||||
|
||||
//- Heat capacity at constant pressure/volume [J/kg/K]
|
||||
inline scalar Cpv(const scalar p, const scalar T) const;
|
||||
@ -174,48 +174,12 @@ public:
|
||||
inline scalar gamma(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
inline scalar HE(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy [J/kg]
|
||||
inline scalar G(const scalar p, const scalar T) const;
|
||||
|
||||
//- Helmholtz free energy [J/kg]
|
||||
inline scalar A(const scalar p, const scalar T) const;
|
||||
|
||||
|
||||
// Mole specific derived properties
|
||||
|
||||
//- Heat capacity at constant pressure [J/kmol/K]
|
||||
inline scalar cp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute enthalpy [J/kmol]
|
||||
inline scalar ha(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible enthalpy [J/kmol]
|
||||
inline scalar hs(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy of formation [J/kmol]
|
||||
inline scalar hc() const;
|
||||
|
||||
//- Entropy [J/kmol/K]
|
||||
inline scalar s(const scalar p, const scalar T) const;
|
||||
|
||||
//- Enthalpy/Internal energy [J/kmol]
|
||||
inline scalar he(const scalar p, const scalar T) const;
|
||||
|
||||
//- Heat capacity at constant volume [J/kmol/K]
|
||||
inline scalar cv(const scalar p, const scalar T) const;
|
||||
|
||||
//- Sensible internal energy [J/kmol]
|
||||
inline scalar es(const scalar p, const scalar T) const;
|
||||
|
||||
//- Absolute internal energy [J/kmol]
|
||||
inline scalar ea(const scalar p, const scalar T) const;
|
||||
|
||||
//- Gibbs free energy [J/kmol]
|
||||
//- Gibbs free energy [J/kg]
|
||||
inline scalar g(const scalar p, const scalar T) const;
|
||||
|
||||
//- Helmholtz free energy [J/kmol]
|
||||
//- Helmholtz free energy [J/kg]
|
||||
inline scalar a(const scalar p, const scalar T) const;
|
||||
|
||||
|
||||
@ -231,23 +195,19 @@ public:
|
||||
inline scalar Kp(const scalar p, const scalar T) const;
|
||||
|
||||
//- Equilibrium constant i.t.o. molar concentration
|
||||
// = PIi(ci/cstd)^nui
|
||||
// = PIi(ci/cStd)^nui
|
||||
// For low pressures (where the gas mixture is near perfect)
|
||||
// Kc = Kp(pstd/(RR*T))^nu
|
||||
// Kc = Kp(Pstd/(RR*T))^nu
|
||||
inline scalar Kc(const scalar p, const scalar T) const;
|
||||
|
||||
//- Equilibrium constant [] i.t.o. mole-fractions
|
||||
// For low pressures (where the gas mixture is near perfect)
|
||||
// Kx = Kp(pstd/p)^nui
|
||||
inline scalar Kx
|
||||
(
|
||||
const scalar p,
|
||||
const scalar T
|
||||
) const;
|
||||
// Kx = Kp(Pstd/p)^nui
|
||||
inline scalar Kx(const scalar p, const scalar T) const;
|
||||
|
||||
//- Equilibrium constant [] i.t.o. number of moles
|
||||
// For low pressures (where the gas mixture is near perfect)
|
||||
// Kn = Kp(n*pstd/p)^nui where n = number of moles in mixture
|
||||
// Kn = Kp(n*Pstd/p)^nui where n = number of moles in mixture
|
||||
inline scalar Kn
|
||||
(
|
||||
const scalar p,
|
||||
@ -256,7 +216,7 @@ public:
|
||||
) const;
|
||||
|
||||
|
||||
// Energy->temperature inversion functions
|
||||
// Energy->temperature inversion functions
|
||||
|
||||
//- Return the temperature corresponding to the value of the
|
||||
// thermodynamic property f, given the function f = F(p, T)
|
||||
@ -282,7 +242,7 @@ public:
|
||||
|
||||
//- Temperature from enthalpy or internal energy
|
||||
// given an initial temperature T0
|
||||
inline scalar THE
|
||||
inline scalar The
|
||||
(
|
||||
const scalar H,
|
||||
const scalar p,
|
||||
@ -292,14 +252,14 @@ public:
|
||||
//- Temperature from sensible enthalpy given an initial T0
|
||||
inline scalar THs
|
||||
(
|
||||
const scalar Hs,
|
||||
const scalar hs,
|
||||
const scalar p,
|
||||
const scalar T0
|
||||
) const;
|
||||
|
||||
//- Temperature from absolute enthalpy
|
||||
// given an initial temperature T0
|
||||
inline scalar THa
|
||||
inline scalar Tha
|
||||
(
|
||||
const scalar H,
|
||||
const scalar p,
|
||||
@ -308,7 +268,7 @@ public:
|
||||
|
||||
//- Temperature from sensible internal energy
|
||||
// given an initial temperature T0
|
||||
inline scalar TEs
|
||||
inline scalar Tes
|
||||
(
|
||||
const scalar E,
|
||||
const scalar p,
|
||||
@ -317,7 +277,7 @@ public:
|
||||
|
||||
//- Temperature from absolute internal energy
|
||||
// given an initial temperature T0
|
||||
inline scalar TEa
|
||||
inline scalar Tea
|
||||
(
|
||||
const scalar E,
|
||||
const scalar p,
|
||||
@ -331,9 +291,6 @@ public:
|
||||
// w.r.t. temperature
|
||||
inline scalar dKcdTbyKc(const scalar p, const scalar T) const;
|
||||
|
||||
//- Derivative of cp w.r.t. temperature
|
||||
inline scalar dcpdT(const scalar p, const scalar T) const;
|
||||
|
||||
|
||||
// I-O
|
||||
|
||||
|
||||
@ -85,99 +85,11 @@ Foam::species::thermo<Thermo, Type>::gamma(const scalar p, const scalar T) const
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::HE(const scalar p, const scalar T) const
|
||||
{
|
||||
return Type<thermo<Thermo, Type>>::HE(*this, p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::G(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Ha(p, T) - T*this->S(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::A(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Ea(p, T) - T*this->S(p, T);
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::cp(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Cp(p, T)*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::ha(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Ha(p, T)*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::hs(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Hs(p, T)*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::hc() const
|
||||
{
|
||||
return this->Hf()*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::s(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->S(p, T)*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::he(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->HE(p, T)*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::cv(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Cv(p, T)*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::es(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Es(p, T)*this->W();
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::ea(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->Ea(p, T)*this->W();
|
||||
return Type<thermo<Thermo, Type>>::he(*this, p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -185,7 +97,7 @@ template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::g(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->G(p, T)*this->W();
|
||||
return this->ha(p, T) - T*this->s(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -193,7 +105,7 @@ template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::a(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->A(p, T)*this->W();
|
||||
return this->ea(p, T) - T*this->s(p, T);
|
||||
}
|
||||
|
||||
|
||||
@ -201,7 +113,7 @@ template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::K(const scalar p, const scalar T) const
|
||||
{
|
||||
scalar arg = -this->Y()*this->Gstd(T)/(RR*T);
|
||||
scalar arg = -this->Y()*this->gStd(T)/(RR*T);
|
||||
|
||||
if (arg < 600)
|
||||
{
|
||||
@ -358,14 +270,14 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::T
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::THE
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::The
|
||||
(
|
||||
const scalar he,
|
||||
const scalar p,
|
||||
const scalar T0
|
||||
) const
|
||||
{
|
||||
return Type<thermo<Thermo, Type>>::THE(*this, he, p, T0);
|
||||
return Type<thermo<Thermo, Type>>::The(*this, he, p, T0);
|
||||
}
|
||||
|
||||
|
||||
@ -383,7 +295,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::THs
|
||||
hs,
|
||||
p,
|
||||
T0,
|
||||
&thermo<Thermo, Type>::Hs,
|
||||
&thermo<Thermo, Type>::hs,
|
||||
&thermo<Thermo, Type>::Cp,
|
||||
&thermo<Thermo, Type>::limit
|
||||
);
|
||||
@ -391,7 +303,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::THs
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::THa
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::Tha
|
||||
(
|
||||
const scalar ha,
|
||||
const scalar p,
|
||||
@ -404,7 +316,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::THa
|
||||
ha,
|
||||
p,
|
||||
T0,
|
||||
&thermo<Thermo, Type>::Ha,
|
||||
&thermo<Thermo, Type>::ha,
|
||||
&thermo<Thermo, Type>::Cp,
|
||||
&thermo<Thermo, Type>::limit
|
||||
);
|
||||
@ -412,7 +324,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::THa
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEs
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::Tes
|
||||
(
|
||||
const scalar es,
|
||||
const scalar p,
|
||||
@ -425,7 +337,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEs
|
||||
es,
|
||||
p,
|
||||
T0,
|
||||
&thermo<Thermo, Type>::Es,
|
||||
&thermo<Thermo, Type>::es,
|
||||
&thermo<Thermo, Type>::Cv,
|
||||
&thermo<Thermo, Type>::limit
|
||||
);
|
||||
@ -433,7 +345,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEs
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEa
|
||||
inline Foam::scalar Foam::species::thermo<Thermo, Type>::Tea
|
||||
(
|
||||
const scalar ea,
|
||||
const scalar p,
|
||||
@ -446,7 +358,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::TEa
|
||||
ea,
|
||||
p,
|
||||
T0,
|
||||
&thermo<Thermo, Type>::Ea,
|
||||
&thermo<Thermo, Type>::ea,
|
||||
&thermo<Thermo, Type>::Cv,
|
||||
&thermo<Thermo, Type>::limit
|
||||
);
|
||||
@ -462,7 +374,7 @@ Foam::species::thermo<Thermo, Type>::dKcdTbyKc
|
||||
) const
|
||||
{
|
||||
const scalar dKcdTbyKc =
|
||||
(this->S(Pstd, T) + this->Gstd(T)/T)*this->Y()/(RR*T);
|
||||
(this->s(Pstd, T) + this->gStd(T)/T)*this->Y()/(RR*T);
|
||||
|
||||
const scalar nm = this->Y()/this->W();
|
||||
if (equal(nm, small))
|
||||
@ -476,14 +388,6 @@ Foam::species::thermo<Thermo, Type>::dKcdTbyKc
|
||||
}
|
||||
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
inline Foam::scalar
|
||||
Foam::species::thermo<Thermo, Type>::dcpdT(const scalar p, const scalar T) const
|
||||
{
|
||||
return this->dCpdT(p, T)*this->W();;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
template<class Thermo, template<class> class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -96,7 +96,7 @@ Foam::Ar::Ar()
|
||||
kappag_("kappag", 0.0001236, 0.8262, -132.8, 16000),
|
||||
sigma_("sigma", 150.86, 0.03823, 1.2927, 0.0, 0.0, 0.0),
|
||||
D_("D", 147.18, 20.1, 39.948, 28), // note: Same as nHeptane
|
||||
Hf_(h_.value(Tstd))
|
||||
hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ Foam::Ar::Ar
|
||||
kappag_(vapourThermalConductivity),
|
||||
sigma_(surfaceTension),
|
||||
D_(vapourDiffusivity),
|
||||
Hf_(h_.value(Tstd))
|
||||
hf_(h_.value(Tstd))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,7 +77,7 @@ class Ar
|
||||
Function2s::APIdiffCoef D_;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
scalar Hf_;
|
||||
scalar hf_;
|
||||
|
||||
|
||||
public:
|
||||
@ -137,13 +137,13 @@ public:
|
||||
inline scalar Cp(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid sensible enthalpy [J/kg]
|
||||
inline scalar Hs(scalar p, scalar T) const;
|
||||
inline scalar hs(scalar p, scalar T) const;
|
||||
|
||||
//- Liquid heat of formation [J/kg]
|
||||
inline scalar Hf() const;
|
||||
inline scalar hf() const;
|
||||
|
||||
//- Liquid absolute enthalpy [J/kg]
|
||||
inline scalar Ha(scalar p, scalar T) const;
|
||||
inline scalar ha(scalar p, scalar T) const;
|
||||
|
||||
//- Ideal gas heat capacity [J/kg/K]
|
||||
inline scalar Cpg(scalar p, scalar T) const;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user