Skip to content

Commit

Permalink
Additional Science Fixes
Browse files Browse the repository at this point in the history
-Slightly more detail on the `Thermodynamics` landing page.
-A few small typo fixes
- Correcting inconsistencies in the `Species` page with when the `hat`
over molar property variables
was used.
- Replaced the number 0 with `^\circ` to indicate reference properties.
  • Loading branch information
decaluwe committed Mar 24, 2022
1 parent a86c8b0 commit a322132
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 27 deletions.
2 changes: 1 addition & 1 deletion pages/science/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<h2 class="display-4">Chemical Kinetic Theory</h2>

These sections describe some of the basic scientific theory underpinning the various ways that Cantera models phases
These sections describe some of the fundamental scientific theory underpinning the ways that Cantera models phases
of matter. This involves calculations for thermodynamic and transport properties and chemical
reaction rates. The above information gives some insight into the basic constitutive models
available in Cantera: capabilities for calculating the basic thermodynamic, chemical kinetic, and transport properties of phases of matter, which can be
Expand Down
44 changes: 22 additions & 22 deletions pages/science/species.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ expressions to compute the properties, they all require thermodynamic property
information for the individual species. For the phase types implemented at
present, the properties needed are:

1. the molar heat capacity at constant pressure :math:`\hat{c}^0_p(T)` for a
range of temperatures and a reference pressure :math:`P_0`;
2. the molar enthalpy :math:`\hat{h}(T_0, P_0)` at :math:`P_0` and a reference
temperature :math:`T_0`;
3. the absolute molar entropy :math:`\hat{s}(T_0, P_0)` at :math:`(T_0, P_0)`.
1. the molar heat capacity at constant pressure :math:`\hat{c}^\circ_p(T)` for a
range of temperatures and a reference pressure :math:`p^\circ`;
2. the molar enthalpy :math:`\hat{h}(T^\circ, p^\circ)` at :math:`p^\circ` and a reference
temperature :math:`T^\circ`;
3. the absolute molar entropy :math:`\hat{s}(T^\circ, p^\circ)` at :math:`(T^\circ, p^\circ)`.

See: :ref:`the Thermodynamic Models section <sec-thermo-models>`

Expand Down Expand Up @@ -119,20 +119,20 @@ The NASA 7-Coefficient Polynomial Parameterization
--------------------------------------------------

The NASA 7-coefficient polynomial parameterization is used to compute the
species reference-state thermodynamic properties :math:`\hat{c}^0_p(T)`,
:math:`\hat{h}^0(T)`, and :math:`\hat{s}^0(T)`.
species reference-state thermodynamic properties :math:`\hat{c}^\circ_p(T)`,
:math:`\hat{h}^\circ(T)`, and :math:`\hat{s}^\circ(T)`.

The NASA parameterization represents :math:`\hat{c}^0_p(T)` with a fourth-order
The NASA parameterization represents :math:`\hat{c}^\circ_p(T)` with a fourth-order
polynomial:

.. math::
\frac{c_p^0(T)}{R} = a_0 + a_1 T + a_2 T^2 + a_3 T^3 + a_4 T^4
\frac{\hat{c}_p^\circ(T)}{\overline{R}} = a_0 + a_1 T + a_2 T^2 + a_3 T^3 + a_4 T^4
\frac{h^0 (T)}{R T} = a_0 + \frac{a_1}{2} T + \frac{a_2}{3} T^2 +
\frac{\hat{h}^\circ (T)}{\overline{R} T} = a_0 + \frac{a_1}{2} T + \frac{a_2}{3} T^2 +
\frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}
\frac{s^0(T)}{R} = a_0 \ln T + a_1 T + \frac{a_2}{2} T^2 + \frac{a_3}{3} T^3 +
\frac{\hat{s}^\circ(T)}{\overline{R}} = a_0 \ln T + a_1 T + \frac{a_2}{2} T^2 + \frac{a_3}{3} T^3 +
\frac{a_4}{4} T^4 + a_6
Note that this is the "old" NASA polynomial form, used in the original NASA
Expand Down Expand Up @@ -160,14 +160,14 @@ the following equations:

.. math::
\frac{C_p^0(T)}{R} = a_0 T^{-2} + a_1 T^{-1} + a_2 + a_3 T
\frac{\hat{c}_p^\circ(T)}{\overline{R}} = a_0 T^{-2} + a_1 T^{-1} + a_2 + a_3 T
+ a_4 T^2 + a_5 T^3 + a_6 T^4
\frac{H^0(T)}{R T} = - a_0 T^{-2} + a_1 \frac{\ln T}{T} + a_2
\frac{\hat{h}^\circ(T)}{\overline{R} T} = - a_0 T^{-2} + a_1 \frac{\ln T}{T} + a_2
+ \frac{a_3}{2} T + \frac{a_4}{3} T^2 + \frac{a_5}{4} T^3 +
\frac{a_6}{5} T^4 + \frac{a_7}{T}
\frac{s^0(T)}{R} = - \frac{a_0}{2} T^{-2} - a_1 T^{-1} + a_2 \ln T
\frac{\hat{s}^\circ(T)}{\overline{R}} = - \frac{a_0}{2} T^{-2} - a_1 T^{-1} + a_2 \ln T
+ a_3 T + \frac{a_4}{2} T^2 + \frac{a_5}{3} T^3 + \frac{a_6}{4} T^4 + a_8
A common source for species data in the NASA9 format is the
Expand All @@ -184,12 +184,12 @@ The Shomate parameterization is:

.. math::
\hat{c}_p^0(T) = A + Bt + Ct^2 + Dt^3 + \frac{E}{t^2}
\hat{c}_p^\circ(T) = A + Bt + Ct^2 + Dt^3 + \frac{E}{t^2}
\hat{h}^0(T) = At + \frac{Bt^2}{2} + \frac{Ct^3}{3} + \frac{Dt^4}{4} -
\hat{h}^\circ(T) = At + \frac{Bt^2}{2} + \frac{Ct^3}{3} + \frac{Dt^4}{4} -
\frac{E}{t} + F
\hat{s}^0(T) = A \ln t + B t + \frac{Ct^2}{2} + \frac{Dt^3}{3} -
\hat{s}^\circ(T) = A \ln t + B t + \frac{Ct^2}{2} + \frac{Dt^3}{3} -
\frac{E}{2t^2} + G
where :math:`t = T / 1000 K`. It requires 7 coefficients :math:`A`, :math:`B`, :math:`C`, :math:`D`,
Expand All @@ -213,14 +213,14 @@ thermodynamic properties:

.. math::
\hat{c}_p^0(T) = \hat{c}_p^0(T_0)
\hat{c}_p^\circ(T) = \hat{c}_p^\circ(T^\circ)
\hat{h}^0(T) = \hat{h}^0(T_0) + \hat{c}_p^0\cdot(T-T_0)
\hat{h}^\circ(T) = \hat{h}^\circ(T_0) + \hat{c}_p^\circ\cdot(T-T^\circ)
\hat{s}^0(T) = \hat{s}^0(T_0) + \hat{c}_p^0 \ln (T/T_0)
\hat{s}^\circ(T) = \hat{s}^\circ(T_0) + \hat{c}_p^\circ \ln (T/T^\circ)
The parameterization uses four constants: :math:`T_0, \hat{c}_p^0(T_0),
\hat{h}^0(T_0), \hat{s}^0(T)`. The default value of :math:`T_0` is 298.15 K; the
The parameterization uses four constants: :math:`T^\circ, \hat{c}_p^\circ(T^\circ),
\hat{h}^\circ(T^\circ), \hat{s}^\circ(T)`. The default value of :math:`T^\circ` is 298.15 K; the
default value for the other parameters is 0.0.

A constant heat capacity parameterization can be defined in the CTI format using
Expand Down
37 changes: 33 additions & 4 deletions pages/science/thermodynamics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,40 @@

.. class:: lead

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.
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 a non-ideal species thermodyamic model with an ideal phase model.

- The user must specify a thermodynamic model for each species and provide inputs that inform how species-specific properties are calculated (e.g. as a function of temperature).
- The user also selects a phase model. This model describes how the species interact with one another to determine overall phase properties. This includes general :math:`P-v-T` behavior, as well as how species-specific properties are used to calculate phase-average properties such as internal energy, entropy, etc.
- The user must specify a thermodynamic model for each species and provide inputs that inform how species-specific 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 :math:`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 thermodynamics. These would be used to calculate the reference molar enthalpy :math:`\hat{h}_k^\circ(T)` and entropy :math:`\hat{s}_k^\circ(T)` for a given species :math:`k` as a function of temperature :math:`T`:

.. math::
\frac{\hat{h}^\circ_k (T)}{\overline{R} T} = a_0 + \frac{a_1}{2} T + \frac{a_2}{3} T^2 +
\frac{a_3}{4} T^3 + \frac{a_4}{5} T^4 + \frac{a_5}{T}
\frac{\hat{s}^\circ_k(T)}{\overline{R}} = a_0 \ln T + a_1 T + \frac{a_2}{2} T^2 + \frac{a_3}{3} T^3 +
\frac{a_4}{4} T^4 + a_6
At the phase level, the Ideal Gas Law determines the state, for example the pressure as a function of molar volume :math:`\hat{v}`, and temperature :math:`T`:

.. math::
p = \frac{\overline{R}T}{v}
where :math:`\overline{R}` is the Universal Gas Constant. The phase model also dictates how the state variables influence the species thermodynamic quantities at a given state. For a species :math:`k`, for example, the Ideal Gas Model specifies that the specific molar internal energy :math:`\hat{u}_k` and entropy :math:`s_k` will be:

.. math::
\hat{u}_k = \hat{h}^\circ_k(T) - p\hat{v}X_k
\hat{s}_k = \hat{s}^\circ_k(T) - \overline{R}T\ln\left(\frac{pX_k}{p^\circ}\right)
where :math:`X_k` is the mole fraction of species :math:`k`, and where :math:`p^\circ` is the reference pressure at which the properties :math:`\hat{h}_k^\circ(T)` and :math:`\hat{s}_k^\circ(T)` are known.

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

.. container:: container
:tagname: section
Expand All @@ -37,7 +66,7 @@

.. container:: card-text

The models and equations that Cantera uses to calculate species thermdynamic properties.
The models and equations that Cantera uses to calculate species thermodynamic properties.

.. container:: card

Expand Down

0 comments on commit a322132

Please sign in to comment.