## Calculating thermodynamic properties in Cantera¶

Here, we describe how Cantera uses species and phase information to calculate thermodynamic properties.

Thermodynamic properties typically depend on information at both the species and phase levels. The user must specify thermodynamic models for both levels, and these selections must be compatible with one another. For instance: one cannot pair certain non-ideal species thermodyamic models with an ideal phase model.

• The user must specify a thermodynamic model for each species and provide inputs that inform how species properties are calculated. For example, the user specifies how the reference enthalpy and entropy values for each species are calcualted, as a function of temperature.

• The user also selects a phase model. This model describes how the species interact with one another to determine phase properties and species specific properties, for a given thermodynamic state. This includes general $$p$$-$$\hat{v}$$-$$T$$ behavior (for example, calculate the phase pressure for a given molar volume, temperature, and chemical composition), as well as how species-specific properties, such as internal energy, entropy, and others depend on the state variables

## Example: The Ideal Gas Model¶

For a simple example: in the Ideal Gas model, one might use 7-parameter NASA polynomials to specify the species reference thermodynamic quantities. These would be used to calculate the reference molar enthalpy $$\hat{h}_k^\circ(T)$$ and entropy $$\hat{s}_k^\circ(T)$$ for a given species $$k$$ as a function of temperature $$T$$. See the NASA Polynomials Species Thermo entry for more information.

At the phase level, the Ideal Gas Law provides the $$P$$-$$\hat{v}$$-$$T$$ relationship. The ideal gas law is an example of an equation of state. This is used, for example, to calculate the pressure as a function of molar volume $$\hat{v}$$, and temperature, $$T$$:

\begin{equation*} p = \frac{\overline{R}T}{\hat{v}} \end{equation*}

where $$\overline{R}$$ is the Universal Gas Constant. The Maxwell relations are used to derive other thermodynamic properties from the equation of state. With the Ideal Gas phase model, these reduce to rather simple forms. For example, for a species $$k$$, the Ideal Gas molar internal energy $$\hat{u}_k$$ and entropy $$\hat{s}_k$$ are:

\begin{equation*} \hat{u}_k = \hat{h}^\circ_k(T) - p\hat{v} \end{equation*}
\begin{equation*} \hat{s}_k = \hat{s}^\circ_k(T) - \overline{R}\ln\left(\frac{pX_k}{p^\circ}\right) \end{equation*}

where $$X_k$$ is the mole fraction of species $$k$$, and where $$p^\circ$$ is the reference pressure at which the properties $$\hat{h}_k^\circ(T)$$ and $$\hat{s}_k^\circ(T)$$ are known.

Please click either of the cards below for details on the species and phase models available in Cantera:

Species

The models and equations that Cantera uses to calculate species thermodynamic properties, such as the NASA 7-parameter polynomial form.

Phases

The theory behind some of Cantera's phase models, such as the Ideal Gas Law.