Theory
For an ideal gas, the specific gas constant is the universal gas constant divided by the molar mass, equation (1); the density follows from the ideal-gas law, equation (2). For a mixture of fixed composition, the molar mass is the mole-fraction-weighted sum of the species' molar masses, equation (3). The value is written as molWeight into the thermophysical properties of the compressible solver (OpenFOAM user guide, 2026).
The heat capacity must exceed the gas constant (otherwise would not be positive); the material library rejects a material that violates this.
Equations
| where | meaning | unit |
|---|---|---|
| Specific gas constant | J/(kg K) | |
| Universal gas constant, 8314.47 | J/(kmol K) | |
| Molar mass of the gas | kg/kmol | |
| Density | kg/m³ | |
| Absolute pressure | Pa | |
| Temperature | K | |
| Mole fraction of species | - | |
| Molar mass of species | kg/kmol |
Default and rule
- Default
- 28.9644 (dry air) in a new material
- Rule
A new material starts at 28.9644 kg/kmol (dry air).
- Source
Ideal-gas relations; the program uses a universal gas constant of 8314.47 J/(kmol K).
Valid range 0 < M <= 1000 kg/kmol
Values
Above 0 and up to 1000 kg/kmol. Helium 4.003, methane 16.04, air 28.96, CO₂ 44.01.