26 template<
class ThermoType>
29 const PtrList<ThermoType>& specieData =
30 dynamicCast<const reactingMixture<ThermoType>>(
thermo)
37 W[i] = specieData[i].W();
44 template<
class ThermoType>
47 const rhoReactionThermo& thermo,
53 const PtrList<ThermoType>& specieData =
54 dynamic_cast<const reactingMixture<ThermoType>&
>(
thermo)
60 h0 += Y[i]*specieData[i].Hs(p, T);
69 if (
isA<reactingMixture<gasHThermoPhysics>>(thermo))
71 return W<gasHThermoPhysics>(
thermo);
73 else if (
isA<reactingMixture<constFluidHThermoPhysics>>(thermo))
75 return W<constFluidHThermoPhysics>(
thermo);
80 <<
"Thermodynamics type " << thermo.type()
81 <<
" not supported by chemFoam" 84 return scalarList::null();
91 const rhoReactionThermo& thermo,
97 if (
isA<reactingMixture<gasHThermoPhysics>>(thermo))
99 return h0<gasHThermoPhysics>(
thermo,
Y,
p,
T);
101 else if (
isA<reactingMixture<constFluidHThermoPhysics>>(thermo))
103 return h0<constFluidHThermoPhysics>(
thermo,
Y,
p,
T);
108 <<
"Thermodynamics type " << thermo.type()
109 <<
" not supported by chemFoam" bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
#define forAll(list, i)
Loop across all elements in list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
rhoReactionThermo & thermo
scalarList W(const rhoReactionThermo &thermo)
List< scalar > scalarList
A List of scalars.
scalar h0(const rhoReactionThermo &thermo, const scalarList &Y, const scalar p, const scalar T)
PtrList< volScalarField > & Y