7.1 Thermophysical models

Thermophysical models are concerned with energy, heat and physical properties. The thermophysicalProperties dictionary is read by any solver that uses the thermophysical model library. A thermophysical model is constructed in OpenFOAM as a pressure-temperature p - T  \relax \special {t4ht= system from which other properties are computed. There is one compulsory dictionary entry called thermoType which specifies the package of thermophysical modelling that is used in the simulation. OpenFOAM includes a large set of pre-compiled combinations of modelling, built within the code using C++ templates. This coding approach assembles thermophysical modelling packages beginning with the equation of state and then adding more layers of thermophysical modelling that derive properties from the previous layer(s). The keyword entries in thermoType reflects the multiple layers of modelling and the underlying framework in which they combined. Below is an example entry for thermoType:


thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

The keyword entries specify the choice of thermophysical models, e.g. constant transport (constant viscosity, thermal diffusion), Perfect Gas equationOfState, etc. In addition there is a keyword entry named energy that allows the user to specify the form of energy to be used in the solution and thermodynamics. The following sections explains the entries and options in the thermoType package.

7.1.1 Thermophysical and mixture models

The most general solvers that use thermophysical modelling construct a fluidThermo model that allows the user to specify the thermophysical model through the type entry (described below) at run-time. These solvers include rhoSimpleFoam, rhoPorousSimpleFoam and rhoPimpleFoam.

Each solver that uses thermophysical modelling constructs an object of a specific thermophysical model class. The model classes are listed below.

psiThermo
Thermophysical model for fixed composition, based on compressibility           -1
ψ = (RT  )   \relax \special {t4ht=, where R  \relax \special {t4ht= is Gas Constant and T  \relax \special {t4ht= is temperature. The solvers that construct psiThermo include rhoCentralFoam, uncoupledKinematicParcelFoam and coldEngineFoam.
rhoThermo
Thermophysical model for fixed composition, based on density ρ  \relax \special {t4ht=. The solvers that construct rhoThermo include the buoyantSimpleFoam, buoyantPimpleFoam, rhoPorousSimpleFoam, twoPhaseEulerFoam and thermoFoam.
psiReactionThermo
Thermophysical model for reacting mixture, based on ψ  \relax \special {t4ht=. The solvers that construct psiReactionThermo include many of the combustion solvers, e.g.sprayFoam, engineFoam, fireFoam and reactingFoam, and some lagrangian solvers, e.g. coalChemistryFoam.
psiuReactionThermo
Thermophysical model for combustion, based on compressibility of unburnt gas ψ
 u  \relax \special {t4ht=. The solvers that construct psiuReactionThermo include combustion solvers that model combustion based on laminar flame speed and regress variable, e.g.XiFoam, XiEngineFoam, PDRFoam.
rhoReactionThermo
Thermophysical model for reacting mixture, based on ρ  \relax \special {t4ht=. The solvers that construct rhoReactionThermo include chtMultiRegionFoam, some combustion solvers, e.g.chemFoam, rhoReactingFoam, rhoReactingBuoyantFoam, and some lagrangian solvers, e.g. reactingParcelFoam and simpleReactingParcelFoam.
multiphaseMixtureThermo
Thermophysical models for multiple phases. The solvers that construct multiphaseMixtureThermo include compressible multiphase interface-capturing solvers, e.g.compressibleInterFoam, and compressibleMultiphaseInterFoam.

The type keyword specifies the underlying thermophysical model. Options are listed below.

  • hePsiThermo: for solvers that construct psiThermo and psiReactionThermo.
  • heRhoThermo: for solvers that construct rhoThermo, rhoReactionThermo and multiphaseMixtureThermo.
  • heheuPsiThermo: for solvers that construct psiuReactionThermo.

The mixture specifies the mixture composition. The option typically used for thermophysical models without reactions is pureMixture, which represents a mixture with fixed composition. When pureMixture is specified, the thermophysical models coefficients are specified within a sub-dictionary called mixture.

For mixtures with variable composition, required by thermophysical models with reactions, the reactingMixture option is used. Species and reactions are listed in a chemistry file, specified by the foamChemistryFile keyword. The reactingMixture model then requires the thermophysical models coefficients to be specified for each specie within sub-dictionaries named after each specie, e.g. O2, N2.

For combustion based on laminar flame speed and regress variables, constituents are a set of mixtures, such as fuel, oxidant and burntProducts. The available mixture models for this combustion modelling are homogeneousMixture, inhomogeneousMixture and veryInhomogeneousMixture.

Other models for variable composition are egrMixture, multiComponentMixture and singleStepReactingMixture.

7.1.2 Transport model

The transport modelling concerns evaluating dynamic viscosity μ  \relax \special {t4ht=, thermal conductivity κ  \relax \special {t4ht= and thermal diffusivity α  \relax \special {t4ht= (for internal energy and enthalpy equations). The current transport models are as follows:

const
assumes a constant μ  \relax \special {t4ht= and Prandtl number P r = cpμ∕κ  \relax \special {t4ht= which is simply specified by a two keywords, mu and Pr, respectively.
sutherland
calculates μ  \relax \special {t4ht= as a function of temperature T  \relax \special {t4ht= from a Sutherland coefficient As  \relax \special {t4ht= and Sutherland temperature Ts  \relax \special {t4ht=, specified by keywords As and Ts; μ  \relax \special {t4ht= is calculated according to:
     A  √T--
μ = ---s-----.
    1 + Ts∕T
      \relax \special {t4ht=
(7.1)
polynomial
calculates μ  \relax \special {t4ht= and κ  \relax \special {t4ht= as a function of temperature T  \relax \special {t4ht= from a polynomial of any order N  \relax \special {t4ht=, e.g.:
    N -1
μ =  ∑  a T i.
          i
     i=0
      \relax \special {t4ht=
(7.2)
logPolynomial
calculates ln(μ)  \relax \special {t4ht= and ln (κ)  \relax \special {t4ht= as a function of ln(T )  \relax \special {t4ht= from a polynomial of any order N  \relax \special {t4ht=; from which μ  \relax \special {t4ht=, κ  \relax \special {t4ht= are calculated by taking the exponential, e.g.:
        N∑- 1
ln(μ) =     ai[ln(T )]i.
        i=0
      \relax \special {t4ht=
(7.3)

7.1.3 Thermodynamic models

The thermodynamic models are concerned with evaluating the specific heat cp  \relax \special {t4ht= from which other properties are derived. The current thermo models are as follows:

hConst
assumes a constant cp  \relax \special {t4ht= and a heat of fusion Hf  \relax \special {t4ht= which is simply specified by a two values cp Hf  \relax \special {t4ht=, given by keywords Cp and Hf.
eConst
assumes a constant cv  \relax \special {t4ht= and a heat of fusion Hf  \relax \special {t4ht= which is simply specified by a two values cv Hf  \relax \special {t4ht=, given by keywords Cv and Hf.
janaf
calculates cp  \relax \special {t4ht= as a function of temperature T  \relax \special {t4ht= from a set of coefficients taken from JANAF tables of thermodynamics. The ordered list of coefficients is given in Table 7.1. The function is valid between a lower and upper limit in temperature Tl  \relax \special {t4ht= and Th  \relax \special {t4ht= respectively. Two sets of coefficients are specified, the first set for temperatures above a common temperature Tc  \relax \special {t4ht= (and below Th  \relax \special {t4ht=), the second for temperatures below Tc  \relax \special {t4ht= (and above Tl  \relax \special {t4ht=). The function relating cp  \relax \special {t4ht= to temperature is:
cp = R ((((a4T + a3)T + a2 )T + a1)T + a0).
      \relax \special {t4ht=
(7.4)
In addition, there are constants of integration, a5   \relax \special {t4ht= and a6   \relax \special {t4ht=, both at high and low temperature, used to evaluating h  \relax \special {t4ht= and s  \relax \special {t4ht= respectively.
hPolynomial
calculates cp  \relax \special {t4ht= as a function of temperature by a polynomial of any order N  \relax \special {t4ht=:
     N∑-1    i
cp =     aiT  .
     i=0
      \relax \special {t4ht=
(7.5)
ePolynomial
calculates cv  \relax \special {t4ht= as a function of temperature by a polynomial of any order N  \relax \special {t4ht=:
     N∑-1
cv =     aiT i.
     i=0
      \relax \special {t4ht=
(7.6)
hPower
calculates cp  \relax \special {t4ht= as a power of temperature according to:
       (     )
          T   n0
cp = c0  ----    .
         Tref
      \relax \special {t4ht=
(7.7)
ePower
calculates c
 v  \relax \special {t4ht= as a power of temperature according to:
       (     )n0
cv = c0  -T--    .
         Tref
      \relax \special {t4ht=
(7.8)
hTabulated
calculates cp  \relax \special {t4ht= by interpolating tabulated data of (T,cp)  \relax \special {t4ht= value pairs, e.g.:
Cp ( (200 1005) (400 1020) );


Description Entry Keyword



Lower temperature limit T  (K )
 l  \relax \special {t4ht= Tlow
Upper temperature limit T  (K )
 h  \relax \special {t4ht= Thigh
Common temperature T  (K)
 c  \relax \special {t4ht= Tcommon
High temperature coefficients a ...a
 0    4   \relax \special {t4ht= highCpCoeffs (a0 a1 a2 a3 a4...
High temperature enthalpy offset a5   \relax \special {t4ht= a5...
High temperature entropy offset a6   \relax \special {t4ht= a6)
Low temperature coefficients a0...a4   \relax \special {t4ht= lowCpCoeffs (a0 a1 a2 a3 a4...
Low temperature enthalpy offset a5   \relax \special {t4ht= a5...
Low temperature entropy offset a6   \relax \special {t4ht= a6)




Table 7.1: JANAF thermodynamics coefficients.

7.1.4 Composition of each constituent

There is currently only one option for the specie model which specifies the composition of each constituent. That model is itself named specie, which is specified by the following entries.

  • nMoles: number of moles of component. This entry is only used for combustion modelling based on regress variable with a homogeneous mixture of reactants; otherwise it is set to 1.
  • molWeight in grams per mole of specie.

7.1.5 Equation of state

The following equations of state are available in the thermophysical modelling library.

rhoConst
Constant density:
ρ = constant.
      \relax \special {t4ht=
(7.9)
perfectGas
Perfect gas:
    -1--
ρ = RT  p.
      \relax \special {t4ht=
(7.10)
icoTabulated
Tabulated data for an incompressible fluid using (T, ρ)  \relax \special {t4ht= value pairs, e.g. 
rho ( (200 1010) (400 980) );
incompressiblePerfectGas
Perfect gas for an incompressible fluid:
ρ = -1--p  ,
    RT   ref
      \relax \special {t4ht=
(7.11)
where pref   \relax \special {t4ht= is a reference pressure.
perfectFluid
Perfect fluid:
      1
ρ =  ---p + ρ0,
     RT
      \relax \special {t4ht=
(7.12)
where ρ0   \relax \special {t4ht= is the density at T =  0  \relax \special {t4ht=.
linear
Linear equation of state:
ρ =  ψp + ρ0,
      \relax \special {t4ht=
(7.13)
where ψ  \relax \special {t4ht= is compressibility (not necessarily (RT )-1   \relax \special {t4ht=).
adiabaticPerfectFluid
Adiabatic perfect fluid:
       ( p + B  )1∕γ
ρ = ρ0   -------    ,
         p0 + B
      \relax \special {t4ht=
(7.14)
where ρ0,p0   \relax \special {t4ht= are reference density and pressure respectively, and B  \relax \special {t4ht= is a model constant.
Boussinesq
Boussinesq approximation
ρ = ρ0[1 - β (T  - T0)]
      \relax \special {t4ht=
(7.15)
where β  \relax \special {t4ht= is the coeffient of volumetric expansion and ρ
 0   \relax \special {t4ht= is the reference density at reference temperature T0   \relax \special {t4ht=.
PengRobinsonGas
Peng Robinson equation of state:
     -1---
ρ =  zRT p,
      \relax \special {t4ht=
(7.16)
where the complex function z =  z(p,T)  \relax \special {t4ht= can be referenced in the source code in PengRobinsonGasI.H, in the $FOAM_SRC/thermophysicalModels/specie/equationOfState/ directory.
icoPolynomial
Incompressible, polynomial equation of state:
    N∑ -1    i
ρ =     aiT ,
     i=0
      \relax \special {t4ht=
(7.17)
where ai  \relax \special {t4ht= are polynomial coefficients of any order N  \relax \special {t4ht=.
rPolynomial
Reciprocal polynomial equation of state for liquids and solids:
1-= C  + C  T + C  T2 - C  p - C pT
ρ     0    1      2       3     4
      \relax \special {t4ht=
(7.18)
where Ci  \relax \special {t4ht= are coefficients.

7.1.6 Selection of energy variable

The user must specify the form of energy to be used in the solution, either internal energy e  \relax \special {t4ht= and enthalpy h  \relax \special {t4ht=, and in forms that include the heat of formation Δhf  \relax \special {t4ht= or not. This choice is specified through the energy keyword.

We refer to absolute energy where heat of formation is included, and sensible energy where it is not. For example absolute enthalpy h  \relax \special {t4ht= is related to sensible enthalpy hs  \relax \special {t4ht= by

         ∑       i
h = hs +     ciΔh f
          i
\relax \special {t4ht=
(7.19)
where ci  \relax \special {t4ht= and hif  \relax \special {t4ht= are the molar fraction and heat of formation, respectively, of specie i  \relax \special {t4ht=. In most cases, we use the sensible form of energy, for which it is easier to account for energy change due to reactions. Keyword entries for energy therefore include e.g. sensibleEnthalpy, sensibleInternalEnergy and absoluteEnthalpy.

7.1.7 Thermophysical property data

The basic thermophysical properties are specified for each species from input data. Data entries must contain the name of the specie as the keyword, e.g. O2, H2O, mixture, followed by sub-dictionaries of coefficients, including:

specie
containing i.e. number of moles, nMoles, of the specie, and molecular weight, molWeight in units of g/mol;
thermodynamics
containing coefficients for the chosen thermodynamic model (see below);
transport
containing coefficients for the chosen tranpsort model (see below).

The following is an example entry for a specie named fuel modelled using sutherland transport and janaf thermodynamics:


fuel
{
    specie
    {
        nMoles       1;
        molWeight    16.0428;
    }
    thermodynamics
    {
        Tlow         200;
        Thigh        6000;
        Tcommon      1000;
        highCpCoeffs (1.63543 0.0100844 -3.36924e-06 5.34973e-10
                      -3.15528e-14 -10005.6 9.9937);
        lowCpCoeffs  (5.14988 -0.013671 4.91801e-05 -4.84744e-08
                      1.66694e-11 -10246.6 -4.64132);
    }
    transport
    {
        As           1.67212e-06;
        Ts           170.672;
    }
}
The following is an example entry for a specie named air modelled using const transport and hConst thermodynamics:


air
{
    specie
    {
        nMoles          1;
        molWeight       28.96;
    }
    thermodynamics
    {
        Cp              1004.5;
        Hf              2.544e+06;
    }
    transport
    {
        mu              1.8e-05;
        Pr              0.7;
    }
}
OpenFOAM v8 User Guide - 7.1 Thermophysical models