Physics utilities

Warning

This page is a work in progress. If you have any questions or notice any errors, please raise an issue.

Overview

This module provides small, self-contained thermodynamic and atmospheric utility functions that are shared across multiple process implementations. All functions are @inlined and scalar-valued; they are intended to be called from within kernel functions.

Saturation vapor pressure

The saturation vapor pressure $e_{\text{sat}}$ is computed using the August-Roche-Magnus empirical formula (Alduchov and Eskridge, 1997):

\[\begin{equation} e_{\text{sat}}(T) = a_1 \exp\!\left(\frac{a_2 T}{T + a_3}\right) \end{equation}\]

where $T$ is temperature in °C and the coefficients differ for liquid water ($T \geq 0$°C) and ice ($T < 0$°C):

Phase$a_1$ (Pa)$a_2$$a_3$ (°C)
Liquid water ($T \geq 0$°C)611.017.62243.12
Ice ($T < 0$°C)611.022.46272.62

Vapor pressure and humidity conversions

Specific humidity $q$ and vapor pressure $e$ are related through the molecular weight ratio $\varepsilon = M_v / M_d \approx 0.622$ and the total atmospheric pressure $p$:

\[\begin{equation} q = \frac{\varepsilon \, e}{p} \end{equation}\]

The inverse conversion (vapor pressure from specific humidity) accounts for the partial pressure of dry air:

\[\begin{equation} e = \frac{q \, p}{\varepsilon + (1 - \varepsilon) q} \end{equation}\]

Partial pressures of trace gases

The partial pressures of O₂ and CO₂ are computed from total surface pressure and, for CO₂, the volumetric concentration in ppm:

\[\begin{align} p_{\text{O}_2} &= 0.209 \, p \\ p_{\text{CO}_2} &= C_{\text{CO}_2} \times 10^{-6} \times p \end{align}\]

Methods

Terrarium.saturation_vapor_pressureFunction
saturation_vapor_pressure(T, a₁, a₂, a₃)

August-Roche-Magnus equation for saturation vapor pressure at temperature T with empirical coefficients a₁, a₂, and a₃.

source
saturation_vapor_pressure(T, Ts=T)

Saturation vapor pressure at the given temperature T, accounting for both frozen (T < 0°C) and unfrozen conditions.

Coefficients taken from Alduchov and Eskridge (1997).

source