SpectraSim Documentation
Parameter · 04 Material

Heat capacity model (custom gas)

custom_gas.cp_model Step 04 · Material

Selects whether the custom gas has a constant specific heat capacity or one that follows a polynomial in temperature.

Last updated

Theory

With "Constant cp", the value Specific heat cp (custom gas) is used at every temperature, and the compressible solver uses OpenFOAM's hConst thermodynamics (OpenFOAM user guide, 2026).

With "cp(T) polynomial", the heat capacity is the fourth-order polynomial of cp(T) coefficients (custom gas), valid over Polynomial temperature range (custom gas), equation (1). The program writes it exactly as the 7-coefficient polynomial of OpenFOAM's janaf thermodynamics, which is expressed for the molar heat capacity divided by the universal gas constant, equation (2):

  • the coefficients are scaled by M/RM/\mathcal{R};
  • the same coefficient set is used below and above the common temperature (the middle of the range);
  • the enthalpy and entropy constants are 0, because only enthalpy differences enter the solution and the heat balance, equation (3).

A temperature-dependent heat capacity matters for a hot gas: it determines the enthalpy that the flow carries (heat transfer) and the ratio γ\gamma that sets the speed of sound.

Equations

cp(T)=c0+c1T+c2T2+c3T3+c4T4c_p(T) = c_0 + c_1 T + c_2 T^2 + c_3 T^3 + c_4 T^4
(1)
ai+1=ci MR,i=0…4,a6=a7=0a_{i+1} = c_i\,\frac{M}{\mathcal{R}}, \qquad i = 0 \ldots 4, \qquad a_6 = a_7 = 0
(2)
h(T2)−h(T1)=∫T1T2cp(T) dTh(T_2) - h(T_1) = \int_{T_1}^{T_2} c_p(T)\,\mathrm{d}T
(3)
wheremeaningunit
cpc_pSpecific heat capacity at constant pressureJ/(kg K)
cic_iPolynomial coefficients entered in the libraryJ/(kg K^(i+1))
aia_iCoefficients of the solver's molar polynomial cpM/Rc_p M/\mathcal{R}-
MMMolar masskg/kmol
R\mathcal{R}Universal gas constant, 8314.47J/(kmol K)
hhSpecific sensible enthalpyJ/kg
TTTemperatureK

Default and rule

Default
constant
Rule

Constant cp.

Source

The hConst and janaf thermodynamics of OpenFOAM (OpenFOAM user guide, 2026); the mapping of the entered polynomial onto the janaf coefficients is defined by the program and written into the case's thermophysicalProperties.

Valid range constant | cp(T) polynomial

Choices

Constant cp; cp(T) polynomial.

Outside the range

Outside the polynomial's range the solver holds the properties at the range end; the Material step shows a warning when its temperature lies outside.

References 1

  1. OpenCFD Ltd. (2026). OpenFOAM user guide. openfoam.com. Web page