Post · 14 min read· pp. 280–289

8.1 Thermophysical models

Thermophysical models are concerned with: thermodynamics, e.g. relating internal energy eqn to temperature eqn; transport, e.g. the dependence of properties such as eqn on temperature; and state, e.g. dependence of density eqn on eqn and pressure eqn. Thermophysical models are specified in the physicalProperties dictionary.

A thermophysical model required an entry named 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. It can also compile on-demand a combination which is not pre-compiled during a simulation.

Thermophysical modelling packages begin 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. transport constant (constant viscosity, thermal diffusion), equationOfState perfectGas , 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.

8.1.1 Thermophysical and mixture models

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

fluidThermo : Thermophysical model for a general fluid with fixed composition used by the isoThermalFluid and fluid solver modules.

rhoThermo : Thermophysical model for liquids and solids, used by the isothermalFilm and film solver module.

psiThermo : Thermophysical model for gases only, with fixed composition, used by the shockFluid solver module.

fluidMulticomponentThermo : Thermophysical model for fluid of varying composition used by the multicomponentFluid solver module.

psiuMulticomponentThermo : Thermophysical model for combustion that modelled by a laminar flame speed and regress variable used by the XiFluid solver module.

compressibleMultiphaseVoFMixtureThermo : Thermophysical models for multiple phases used by the compressibleMultiphaseVoF solver module.

solidThermo and solidDisplacementThermo : Thermophysical models for solids used by by the solid and solidDisplacement solver modules, respectively.

The type keyword (in the thermoType sub-dictionary) specifies the underlying thermophysical model used by the solver. The user can select from the following.

  • hePsiThermo: available for solvers that construct fluidThermo, psiThermo, fluidMulticomponentThermo and .
  • heRhoThermo: available for solvers that construct fluidThermo, rhoThermo, fluidMulticomponentThermo, compressibleMultiphaseVoFMixtureThermo.
  • heheuPsiThermo: for solvers that construct psiuMulticomponentThermo.
  • heSolidThermo: for solvers that construct solidThermo or solidDisplacementThermo.

The mixture specifies the mixture composition. The options available are listed below.

  • pureMixture: mixture with fixed composition, which reads properties from a a sub-dictionary called mixture.
  • multicomponentMixture: mixture with variable composition, with species, e.g. O2, N2, listed by the species keyword, and properties specified for each specie within sub-dictionaries named after each specie.
  • coefficientWilkeMulticomponentMixture: as multicomponentMixture, but applies Wilke’s equation to calculate transport properties for the mixture.
  • valueMulticomponentMixture: as multicomponentMixture, but applies mole-fraction weighting to calculate transport properties for the mixture.
  • homogeneousMixture, inhomogeneousMixture and veryInhomogeneousMixture: for combustion based on laminar flame speed and regress variables, constituents are a set of mixtures, such as fuel, oxidant and burntProducts.

8.1.2 Transport model

The transport modelling concerns evaluating dynamic viscosity eqn, thermal conductivity eqn and thermal diffusivity eqn (for internal energy and enthalpy equations). The current transport models are as follows:

const : assumes a constant eqn and Prandtl number eqn which is simply specified by a two keywords, mu and Pr, respectively.

sutherland : calculates eqn as a function of temperature eqn from a Sutherland coefficient eqn and Sutherland temperature eqn, specified by keywords As and Ts; eqn is calculated according to:

code
|  |  |
| --- | --- |
| ![√ -- As T μ = 1+-T-∕T-. s \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/5d55f7ec7ba06aa1468a1912e2718049511d4c387da1ee21136828eeeb58a0fc.png) | (8.1) |

polynomial : calculates eqn and eqn as a function of temperature eqn from a polynomial of any order eqn, e.g.:

code
|  |  |
| --- | --- |
| ![N− 1 μ = ∑ a Ti. i=0 i \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/df8c88e3ed736c7d900db9f14ad280e988e6c08bb49f93dc18d5b2992bc7bc48.png) | (8.2) |

logPolynomial : calculates eqn and eqn as a function of eqn from a polynomial of any order eqn; from which eqn, eqn are calculated by taking the exponential, e.g.:

code
|  |  |
| --- | --- |
| ![N −1 ln(μ) = ∑ a (ln(T ))i. i i=0 \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/3ca1aa010a7b4aade824fdc3add1b693022d47fa39b535e4a33e38da5266486e.png) | (8.3) |

Andrade : calculates eqn and eqn as a polynomial function of eqn, e.g. for eqn:

code
|  |  |
| --- | --- |
| ![a ln(μ) = a0 + a1T + a2T 2 +--3---. a4 + T \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/29ba6c17743b228a964a0da2e95190874c920ad2bc183a7b469a79ea133f9116.png) | (8.4) |

tabulated : uses uniform tabulated data for viscosity and thermal conductivity as a function of pressure and temperature.

icoTabulated : uses non-uniform tabulated data for viscosity and thermal conductivity as a function of temperature.

WLF : (Williams-Landel-Ferry) calculates eqn as a function of temperature from coefficients eqn and eqn and reference temperature eqn specified by keywords C1, C2 and Tr; eqn is calculated according to:

code
|  |  |
| --- | --- |
| ![( − C1(T − Tr)) μ = μ0 exp -C-+--T-−-T- 2 r \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/7028f9fbd33bd8e9ffc91ed2bffe8a053377584f9f1a3e95a85f6d820ad99fc5.png) | (8.5) |

8.1.3 Thermodynamic models

The thermodynamic models are concerned with evaluating the specific heat eqn from which other properties are derived. The current thermo models are as follows:

eConst : assumes a constant eqn and a heat of fusion eqn which is simply specified by a two values eqn, given by keywords Cv and Hf.

eIcoTabulated : calculates eqn by interpolating non-uniform tabulated data of eqn value pairs, e.g.: ( (200 1005) (400 1020) );

ePolynomial : calculates eqn as a function of temperature by a polynomial of any order eqn:

code
|  |  |
| --- | --- |
| ![N −1 c = ∑ a Ti. v i i=0 \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/21e05d91d39243d54104297fbcd72fc69cf80af9a3cad5df8192914c04ba049f.png) | (8.6) |

ePower : calculates eqn as a power of temperature according to:

code
|  |  |
| --- | --- |
| ![( T )n0 cv = c0 T--- . ref \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/8ce05e5785a31468e60852eee6cc2d8cd203677a94d4663496bfec1785ad30cd.png) | (8.7) |

eTabulated : calculates eqn by interpolating uniform tabulated data of eqn value pairs, e.g.: ( (200 1005) (400 1020) );

hConst : assumes a constant eqn and a heat of fusion eqn which is simply specified by a two values eqn, given by keywords Cp and Hf.

hIcoTabulated : calculates eqn by interpolating non-uniform tabulated data of eqn value pairs, e.g.: ( (200 1005) (400 1020) );

hPolynomial : calculates eqn as a function of temperature by a polynomial of any order eqn:

code
|  |  |
| --- | --- |
| ![N∑ −1 i cp = aiT . i=0 \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/43e1011ab371885c96e20e16b3041ba4646db3c2d44da750cc66e340e126f5d0.png) | (8.8) |

hPower : calculates eqn as a power of temperature according to:

code
|  |  |
| --- | --- |
| ![( ) T---n0 cp = c0 Tref . \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/f68be271c3f5523137f3b0d4dbc938d3b795b3b6af534d2e81102efc99727ab6.png) | (8.9) |

hTabulated : calculates eqn by interpolating uniform tabulated data of eqn value pairs, e.g.: ( (200 1005) (400 1020) );

janaf : calculates eqn as a function of temperature eqn from a set of coefficients taken from JANAF tables of thermodynamics. The ordered list of coefficients is given in Table 8.1. The function is valid between a lower and upper limit in temperature eqn and eqn respectively. Two sets of coefficients are specified, the first set for temperatures above a common temperature eqn (and below eqn), the second for temperatures below eqn (and above eqn). The function relating eqn to temperature is:

code
|  |  |
| --- | --- |
| ![cp = R ((((a4T + a3)T + a2)T + a1)T + a0). \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/7b8f4fb3ec1c779e9d26129549a290db29dd08a2c68394ef3c75380be19c8e61.png) | (8.10) |

In addition, there are constants of integration, ![eqn](https://cdn.archive.preserve.ng/img/578373f1d020129dc5962018a248e225f054144cce83be865b6aa324286962c3.png) and ![eqn](https://cdn.archive.preserve.ng/img/04340b4529817759d0baf26e692324deb5840a186ae9a7668040d6dd67f731de.png), both at high and
low temperature, used to evaluating ![eqn](https://cdn.archive.preserve.ng/img/eb69482d4166e89ddeaa9d23b543af6b4b4b233b18c6d7bc81d23d2563c10a5f.png) and ![eqn](https://cdn.archive.preserve.ng/img/e345271c8406f2ec1908641705c0d8b50465866621cbd8a0e36f543f93974062.png) respectively.

DescriptionEntryKeyword
---------
Lower temperature limiteqnTlow
Upper temperature limiteqnThigh
Common temperatureeqnTcommon
High temperature coefficientseqnhighCpCoeffs (a0 a1 a2 a3 a4...
High temperature enthalpy offseteqna5...
High temperature entropy offseteqna6)
Low temperature coefficientseqnlowCpCoeffs (a0 a1 a2 a3 a4...
Low temperature enthalpy offseteqna5...
Low temperature entropy offseteqna6)
---------

Table 8.1: JANAF thermodynamics coefficients.


8.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.

8.1.5 Equation of state

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

adiabaticPerfectFluid : Adiabatic perfect fluid:

code
|  |  |
| --- | --- |
| ![( )1∕γ ρ = ρ0 -p+-B-- , p0 + B \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/44917440ca3bc248fa388e67a45f9bba40ec31d8d43b5c89fda887221c3bb46d.png) | (8.11) |

where ![eqn](https://cdn.archive.preserve.ng/img/a52f129fcf08b1f3f314c8df2449b01730aa036342082edeebd0825823857427.png) are reference density and pressure respectively, and
![eqn](https://cdn.archive.preserve.ng/img/682c07f0836edd2eaaf6a945713aeaeafd60164e33db7b9e4d099b68463af191.png) is
a model constant.

Boussinesq : Boussinesq approximation

code
|  |  |
| --- | --- |
| ![ρ = ρ0(1− β (T − T0)) \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/73f2cda573e183c159b39b0aee324f854d09b9c988ac2b4732822b2e144f071e.png) | (8.12) |

where ![eqn](https://cdn.archive.preserve.ng/img/e1ca314fc1ac6f201ca5c0ebd625a0848c0980a58e25ca8d28b8fe4f93ba03a3.png) is the coeffient of volumetric expansion and ![eqn](https://cdn.archive.preserve.ng/img/4673f31bbb491a5b69d8c684ea19d513f8ebb38d1a5122d7b2be88b149e1c7dd.png) is the reference
density at reference temperature ![eqn](https://cdn.archive.preserve.ng/img/c6baf79a924fc3e45a80b12fac209505b5bcf1b3024d00384d7e73c486150bc4.png).

icoPolynomial : Incompressible, polynomial equation of state:

code
|  |  |
| --- | --- |
| ![N∑− 1 ρ = aiT i, i=0 \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/1c4d1590908397dcf2954416513c4aab35c2d0f43b90170bc1e54853ed2cd935.png) | (8.13) |

where ![eqn](https://cdn.archive.preserve.ng/img/12ccbc45e67623ad48fc034eddb498a7b53c66a6c90cfe5f0de8f1b813a54c56.png) are polynomial coefficients of any order ![eqn](https://cdn.archive.preserve.ng/img/d426a202e3ef15146dec644dc8a575912326e8ccccd662d8f1483d62ff38729f.png).

icoTabulated : Tabulated data for an incompressible fluid using eqn value pairs, e.g.  rho ( (200 1010) (400 980) );

incompressiblePerfectGas : Perfect gas for an incompressible fluid:

code
|  |  |
| --- | --- |
| ![ρ = -1-pref, RT \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/6d4e6200edd4bdfc1232f1d59e394507ac287c4e0de12e06b8eafc31b5fbdc13.png) | (8.14) |

where ![eqn](https://cdn.archive.preserve.ng/img/d6a30aaeba458704d42970252b77394ac19554142837364f89e3cecd50d1882c.png) is a reference pressure.

linear : Linear equation of state:

code
|  |  |
| --- | --- |
| ![ρ = ψp + ρ0, \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/a82b03c2e3a6d872db6d8cf499c0209f3d361c682d15c4a1026a97a8d0e5c6dd.png) | (8.15) |

where ![eqn](https://cdn.archive.preserve.ng/img/6a838c8d9e641cc329b45fecb33eccaaa4e729ded2d031ad7f9b2c6e52524e04.png) is compressibility (not necessarily ![eqn](https://cdn.archive.preserve.ng/img/d25d4b49026e4a8b2101338a925058a6e049d7bca8ce106ae3abe2730ea2c028.png)).

PengRobinsonGas : Peng Robinson equation of state:

code
|  |  |
| --- | --- |
| ![1 ρ = -----p, zRT \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/0d9040152914280241e43472bd742c78e0c8fd398f6aef76ec40c8e0c73c514b.png) | (8.16) |

where the complex function ![eqn](https://cdn.archive.preserve.ng/img/6b0cbba6fa959da1a32824954810ce66e8b114f70fd6f7674de6a7bb9958affa.png) can be referenced in the source code in
PengRobinsonGasI.H, in the
$FOAM\_SRC/thermophysicalModels/specie/equationOfState/
directory.

perfectFluid : Perfect fluid:

code
|  |  |
| --- | --- |
| ![ρ = -1--p+ ρ , RT 0 \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/13e0a78e75b738330052390f4bd4937dc6fb48db9e26f084e90e48dfdf553128.png) | (8.17) |

where ![eqn](https://cdn.archive.preserve.ng/img/ea3d8a7da74ecc5d282a564fa0be6abd95e0c6689e5b4db2b261aeeeb9b1601e.png) is the density at ![eqn](https://cdn.archive.preserve.ng/img/920f0e4f4f574d196f53b17ebfca22f99907b7edc122f02e6fcd25daafa024f2.png).

perfectGas : Perfect gas:

code
|  |  |
| --- | --- |
| ![1 ρ = RT-p. \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/904cbcb165025d6d135a21e6aa2b2753c331c331fd708333ec15616a374cd730.png) | (8.18) |

rhoConst : Constant density:

code
|  |  |
| --- | --- |
| ![ρ = constant. \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/c62cd338a6926caa66dd35b9b3c2c2ff9b91df840136c88f902af91fe38fdf23.png) | (8.19) |

rhoTabulated : Uniform tabulated data for a compressible fluid, calculating eqn as a function of eqn and eqn.

rPolynomial : Reciprocal polynomial equation of state for liquids and solids:

code
|  |  |
| --- | --- |
| ![1- 2 ρ = C0 + C1T + C2T − C3p − C4pT \relax \special {t4ht=](https://cdn.archive.preserve.ng/img/0244d986b4aaaa4c606b3bf2d4a9d9c1386c774bf8e40bd3b1ef7734ee1b5a32.png) | (8.20) |

where ![eqn](https://cdn.archive.preserve.ng/img/39a3983c3574cf04479716bb8ff37fa608abdd937d2c5cf5375295677c186882.png) are coefficients.

8.1.6 Selection of energy variable

The user must specify the form of energy to be used in the solution, either internal energy eqn and enthalpy eqn, and in forms that include the heat of formation eqn 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 eqn is related to sensible enthalpy eqn by

∑ h = hs + ciΔhif i \relax \special {t4ht=(8.21)

where eqn and eqn are the molar fraction and heat of formation, respectively, of specie eqn. 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.

8.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; } }