Introducing Shape V2, a foundation model for 3D geometry. Read the blog →

CFD Solvers

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:

PropertyKeyOptions
Density (EOS)equationOfStateicoPolynomial, rPolynomial, Boussinesq, PengRobinsonGas
Specific heatthermohPolynomial, hConst, janaf
Viscosity & conductivitytransportpolynomial, const, sutherland
Energy variableenergysensibleEnthalpy, 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:

constant/thermophysicalProperties
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:

  1. Detecting the fluid from the prompt (LN₂, LH₂, LOX, LHe, LAr, LNG) or from inlet temperatures below 130 K
  2. Pulling isobaric property data from NIST reference tables at the operating pressure
  3. Fitting 3rd–4th order polynomials across the valid liquid range (triple point to critical temperature)
  4. Adding a limitTemperature function object to prevent extrapolation outside the valid range
Temperature clamping for LN₂
// system/fvOptions — clamps temperature to valid range
limitT
{
    type            limitTemperature;
    active          yes;
    selectionMode   all;
    min             63;     // triple point [K]
    max             126;    // critical temperature [K]
}
FluidTriple pointBoiling pointCritical TPoly. order
LHe2.2 K4.2 K5.2 K4th
LH₂13.8 K20.3 K33.2 K4th
LN₂63.2 K77.4 K126.2 K3rd
LAr83.8 K87.3 K150.7 K3rd
LOX54.4 K90.2 K154.6 K3rd
LNG91 K111.7 K190.6 K3rd

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₄pT

Liquids 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:

constant/transportProperties
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.