OpenFOAM ships with a limited set of built-in fluids. When a simulation requires a fluid that is not available by default (cryogenic fluids, industrial chemicals, custom mixtures), SIMD Agent automatically generates the full thermophysicalProperties dictionary with polynomial-fitted coefficients sourced from NIST reference data.
How it works
Every compressible or buoyancy-driven OpenFOAM solver reads fluid properties from a constant/thermophysicalProperties dictionary. This dictionary has two parts:
- thermoType, selects the modeling chain (equation of state, thermodynamics, transport)
- mixture, provides the actual property coefficients for the fluid
SIMD Agent picks the right model combination based on the fluid and flow regime, then fills in the coefficients automatically.
The thermoType selection
The thermoType sub-dictionary controls which mathematical models OpenFOAM uses for each property. The agent selects from these options:
| Property | Key | Options |
|---|---|---|
| Density (EOS) | equationOfState | icoPolynomial, rPolynomial, Boussinesq, PengRobinsonGas |
| Specific heat | thermo | hPolynomial, hConst, janaf |
| Viscosity & conductivity | transport | polynomial, const, sutherland |
| Energy variable | energy | sensibleEnthalpy, sensibleInternalEnergy |
Polynomial approach
The most common method for custom fluids. Each property is expressed as a polynomial in temperature up to 8th order. The agent fits coefficients from NIST tabular data at the operating pressure:
- ρ(T) = a₀ + a₁T + a₂T² + a₃T³ + … [kg/m³]
- Cᵨ(T) = a₀ + a₁T + a₂T² + a₃T³ + … [J/(kg·K)]
- μ(T) = a₀ + a₁T + a₂T² + a₃T³ + … [Pa·s]
- κ(T) = a₀ + a₁T + a₂T² + a₃T³ + … [W/(m·K)]
Unused higher-order coefficients are set to 0.
Example: custom fluid dictionary
Below is a complete thermophysicalProperties dictionary for water at atmospheric pressure (0–100 °C), showing the polynomial configuration the agent generates:
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport polynomial;
thermo hPolynomial;
equationOfState icoPolynomial;
specie specie;
energy sensibleEnthalpy;
}
mixture
{
specie
{
molWeight 18.0; // g/mol
}
thermodynamics
{
// Cp(T) polynomial coefficients
CpCoeffs<8> ( 9850.69 -48.6714 0.13736
-0.000127063 0 0 0 0 );
Hf 0; // heat of fusion [J/kg]
Sf 0; // standard entropy [J/kg/K]
}
equationOfState
{
// rho(T) polynomial coefficients
rhoCoeffs<8> ( 746.025 1.93017 -0.00365471
0 0 0 0 0 );
}
transport
{
// mu(T) polynomial coefficients [Pa.s]
muCoeffs<8> ( 0.116947 -0.00100532 2.90283e-6
-2.80572e-9 0 0 0 0 );
// kappa(T) polynomial coefficients [W/(m.K)]
kappaCoeffs<8> ( -0.710696 0.0071857 -9.29827e-6
0 0 0 0 0 );
}
}Cryogenic fluid handling
Cryogenic fluids operate in very narrow temperature bands where properties change rapidly. The agent handles this by:
- Detecting the fluid from the prompt (LN₂, LH₂, LOX, LHe, LAr, LNG) or from inlet temperatures below 130 K
- Pulling isobaric property data from NIST reference tables at the operating pressure
- Fitting 3rd–4th order polynomials across the valid liquid range (triple point to critical temperature)
- Adding a
limitTemperaturefunction object to prevent extrapolation outside the valid range
// system/fvOptions — clamps temperature to valid range
limitT
{
type limitTemperature;
active yes;
selectionMode all;
min 63; // triple point [K]
max 126; // critical temperature [K]
}| Fluid | Triple point | Boiling point | Critical T | Poly. order |
|---|---|---|---|---|
| LHe | 2.2 K | 4.2 K | 5.2 K | 4th |
| LH₂ | 13.8 K | 20.3 K | 33.2 K | 4th |
| LN₂ | 63.2 K | 77.4 K | 126.2 K | 3rd |
| LAr | 83.8 K | 87.3 K | 150.7 K | 3rd |
| LOX | 54.4 K | 90.2 K | 154.6 K | 3rd |
| LNG | 91 K | 111.7 K | 190.6 K | 3rd |
Helium and hydrogen require 4th-order polynomials due to their extremely narrow liquid ranges and steep property gradients near the critical point.
Data sources
The agent sources thermophysical property data from NIST Chemistry WebBook isobaric tables. For each fluid, it queries density, specific heat, dynamic viscosity, and thermal conductivity across the valid liquid temperature range at the operating pressure, then runs a least-squares polynomial fit.
For fluids near or above their critical point (supercritical injection, trans-critical flows), the polynomial approach breaks down. In these cases the agent switches to PengRobinsonGas as the equation of state, which requires only:
- Critical temperature Tc
- Critical pressure pc
- Acentric factor ω
Equation of state models
The agent selects the equation of state based on the flow regime:
icoPolynomialρ = ∑ aᵢ TⁱSubcritical liquids with temperature-dependent density. The default for most custom fluids.
Boussinesqρ = ρ₀ [1 − β(T − T₀)]Natural convection where density variation is small. Requires reference density and thermal expansion coefficient.
rPolynomial1/ρ = C₀ + C₁T + C₂T² − C₃p − C₄pTLiquids where density depends on both temperature and pressure. Better fits than icoPolynomial for high-pressure systems.
PengRobinsonGasCubic EOS with Tᴄ, pᴄ, ωNear-critical, supercritical, or trans-critical conditions. Used for rocket propulsion (LOX/GH₂) and supercritical CO₂ flows.
Incompressible solvers
For incompressible solvers (simpleFoam, pimpleFoam), fluid properties are defined in constant/transportProperties instead. Custom fluids only need kinematic viscosity:
transportProperties
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.516e-05; // m^2/s
}The agent computes nu from the fluid's dynamic viscosity and density at the reference temperature: ν = μ / ρ.
Note: All property data is sourced from NIST Chemistry WebBook isobaric fluid tables. For exotic fluids not in NIST, the agent prompts the user to provide density, viscosity, thermal conductivity, and specific heat values manually.