OpenFOAM does not assume units, it checks them. Every dimensioned quantity carries a vector of seven exponents in square brackets, and the solver refuses to add or compare quantities whose dimensions do not match.

The order is fixed: mass, length, time, temperature, quantity, current, luminous intensity. So [0 2 -2 0 0 0 0] is length squared over time squared, which is the kinematic pressure that incompressible solvers work with.

That last point catches most newcomers. In the incompressible solvers pressure is divided by density, so the value you enter and the value you read out is not in pascals. Multiplying by the density is what returns the pressure to the units you expected.

@ET-DC@eyJkeW5hbWljIjp0cnVlLCJjb250ZW50IjoicG9zdF90aXRsZSIsInNldHRpbmdzIjp7ImJlZm9yZSI6IiIsImFmdGVyIjoiIn19@

Written by cfd.ninja

March 19, 2020

), volume in cubic metres (), pressure in Pascals (). Algebraic operations must be performed on these properties using consistent units of measurement; in particular, addition, subtraction and equality are only physically meaningful for properties of the same dimensional units. As a safeguard against implementing a meaningless operation, OpenFOAM attaches dimensions to field data and physical properties and performs dimension checking on any tensor operation.

The I/O format for a dimensionSet is 7 scalars delimited by square brackets, e.g.

    [0 2 -1 0 0 0 0]


No. Property SI unit USCS unit




1 Mass kilogram (kg) pound-mass (lbm)
2 Length metre (m) foot (ft)
3 Time
— — — — second (s) — — — —
4 Temperature Kelvin (K) degree Rankine (R)
5 Quantity kilogram-mole (kgmol) pound-mole (lbmol)
6 Current
— — — — ampere (A) — — — —
7 Luminous intensity
— — — — candela (cd) — — — —




In this tutorial, you will learn how to works the units in OpenFOAM.

"

Tutorial: Heat Exchanger using ANSYS Fluent.

Related Articles

Stay Up to Date With The Latest News & Updates

Help us keep growing

CFD.NINJA is financed with its own resources, if you want to support us we will be grateful.

Join Our Newsletter

Subscribe to receive emails with detailed information related to the CFD.

Follow Us

Subscribe to our social networks to receive notifications about our new tutorials