Units and conventions
xfea does not check or convert units. A solver’s input has no units in it: every number is written as you gave it. You are responsible for using one consistent set across geometry, materials, loads and results.
Consistent sets
Section titled “Consistent sets”| Quantity | N and mm | N and m |
|---|---|---|
| Length | mm | m |
| Force | N | N |
| Stress, modulus | MPa (N/mm²) | Pa |
| Mass | t | kg |
| Density | t/mm³ | kg/m³ |
| Time | s | s |
Mass is where sets go wrong: with newtons and millimetres the mass unit is the tonne, not the kilogram, so steel’s density is 7.85e-9. It matters as soon as mass does: self-weight, natural frequencies, dynamics.
The examples and this documentation use N and mm.
The model’s constants
Section titled “The model’s constants”A model carries the physical constants of its unit set: gravity, the Stefan-Boltzmann constant, absolute zero.
Model(units="SI_mm"), the default, has model.g = 9810 mm/s²; Model(units="SI") has 9.80665 m/s². This sets
the constants only: nothing is converted.
What is in the unit set of each recipe
Section titled “What is in the unit set of each recipe”- The material grade recipes, such as
ElasticIsotropic.steel("s355"), are in Pa and kg/m³. - The section profiles, such as
ISection.IPE200, are in mm. step.add_gravity_field()takesg=9810unless told otherwise.
So a model in N and mm writes its materials out, ElasticIsotropic(E=210_000, v=0.3, density=7.85e-9), and one in
N and m passes g=9.81.
Axes and names
Section titled “Axes and names”- Coordinates, loads and results are in the global axes x, y, z unless a frame is given.
x,y,zare translations and forces;xx,yy,zzrotations (radians) and moments about those axes.- Stress components are
s11tos23, with 1, 2, 3 for x, y, z. - A beam’s
orientationis its local y axis, the axis its section’sIxxis about.
Basics has the same list with the conventions of loads.
© 2026 Francesco Ranaudo · Text and pictures CC BY 4.0 · Code Elastic License 2.0 · how to reuse them