File formats
What the application reads and what it writes.
There are three separate import paths — geometry, mesh and case — and they do not overlap. Geometry is a surface the mesher snaps to; a mesh is a volume mesh somebody else generated; a case is a whole SHD Sim CFD case exported from another installation.
Geometry import
Section titled “Geometry import”Three families, told apart by file extension.
Polygon and mesh geometry
Section titled “Polygon and mesh geometry”Read through Assimp and triangulated on import. The advertised list is taken from the library at run time, so the file dialog can never offer a format the build cannot read; it is not a fixed list in the application. The formats named explicitly in the dialog’s “Common” filter, and the ones the application has a display name for, are:
| Extension | Shown as |
|---|---|
.stl |
STL |
.obj |
OBJ |
.glb |
GLB |
.gltf |
glTF |
.fbx |
FBX |
.dae |
COLLADA |
.ply |
PLY |
.3mf |
3MF |
Anything else Assimp reads is accepted too and shown by its upper-cased
extension. .stl gets its own filter as “OpenFOAM triSurface”, because that is
the format the case is written back out in.
Import produces a flat triangle soup in source units, and everything downstream — the viewport, the bounds, the frontal area, the cell sizing and the triSurface at case export — consumes only that. No format gets a preview-only path.
Non-triangular faces that the library cannot triangulate are discarded and counted. FBX and glTF carry their own scale to metres; where a format declares one it is used, and where it says nothing the unit choice on the Geometry pane wins.
CAD, through the OCCT translator
Section titled “CAD, through the OCCT translator”| Extension | Format |
|---|---|
.step, .stp |
STEP |
.iges, .igs |
IGES |
.brep |
BREP |
These do not go through Assimp. They are handed to shd-simcfd-translator, a
separate executable that reads the B-rep with OCCT, optionally heals it, and
tessellates it to an ASCII STL which then enters the normal pipeline.
The translator normally sits beside the application. The environment variable
SHD_SIMCFD_GEOMETRY_TRANSLATOR overrides where it is looked for. Without it,
CAD import reports that no translator was found and nothing else happens; the
Geometry pane shows which path it resolved.
Healing is a toggle on the Geometry pane, passed through as --heal or
--no-heal. It sews faces, removes tiny edges and reports diagnostics. IGES in
particular arrives as a pile of disconnected faces and needs it.
Only BREP is affected by the unit choice: STEP and IGES carry their own units and
the translator reads them from the file. The translator accepts m, mm, cm,
in and ft (and the long spellings metre/meter, millimetre,
centimetre, inch, foot/feet).
Translation of a real assembly can take up to two minutes and reports no fraction, so the progress strip is indeterminate.
Aerofoil profiles
Section titled “Aerofoil profiles”.dat — a two-dimensional section contour. Both conventions in circulation are
read:
| Convention | Layout |
|---|---|
| Selig | One loop: trailing edge over the top to the leading edge and back along the bottom. x runs 1 → 0 → 1 |
| Lednicer | A counts line, then the upper surface leading edge to trailing edge, then the lower surface the same way |
They are told apart by the first coordinate line. A leading name line is conventional but not required — a first line that does not parse as a coordinate pair is treated as the name. A file with fewer than three usable coordinate pairs is rejected.
A .dat is not geometry until it is extruded. It has no thickness, no span
and no units. The Geometry pane grows an “Aerofoil extrusion” section with three
controls, and “Extrude to triSurface” turns the profile into a closed
triangulated solid:
| Control | Meaning |
|---|---|
| Chord | The profile is normalised to unit chord on read, so this is the size it becomes whatever scaling the file used |
| Span | Extruded along z, centred on zero |
| Angle of attack | Rotated about the quarter chord |
A 2-D case wants the span about one cell thick, with empty front and back patches — see Boundary condition types.
One control on the Geometry pane: m, mm, cm, in, ft. Geometry is
rescaled to metres on import, so bounds, areas and cell sizes are always SI.
Mesh import
Section titled “Mesh import”A volume mesh from another tool, converted by the matching OpenFOAM converter. Chosen under Mesh by setting the mesher to “Import an existing mesh”.
Only converters present in the bundled runtime are offered. The list below is the full set the application knows about; any entry whose executable is missing is not advertised and cannot be selected.
| Format | Extensions | Converter |
|---|---|---|
| Fluent / ANSYS mesh | .msh, .cas |
fluentMeshToFoam |
| Fluent 3D mesh | .msh |
fluent3DMeshToFoam |
| Gmsh | .msh |
gmshToFoam |
| STAR-CCM+ / STAR-CD | .cel, .vrt, .bnd |
star4ToFoam |
| CFX-4 | .geo |
cfx4ToFoam |
| I-deas universal | .unv |
ideasUnvToFoam |
| ANSYS Prep7 | .ans |
ansysToFoam |
| Plot3D | .grd, .p3d |
plot3dToFoam |
| Netgen neutral | .mesh |
netgenNeutralToFoam |
| TetGen | .ele, .node |
tetgenToFoam |
| GAMBIT neutral | .neu |
gambitToFoam |
| VTK unstructured | .vtk |
vtkUnstructuredToFoam |
| EnSight | .case |
ensightToFoam |
Generic .msh |
.msh |
mshToFoam |
star4ToFoam and tetgenToFoam are given the stem of a set of files rather
than one file — star4ToFoam reads <name>.cel, .vrt and .bnd together, and
tetgenToFoam reads <name>.ele and .node. Point the file dialog at any one
of them.
How the converter is chosen
Section titled “How the converter is chosen”The file’s first 4 KB is read and matched first, because an extension does not
identify a mesh: .msh is used by Fluent, Gmsh and others for entirely different
formats, and picking by extension alone once handed a Gmsh mesh to the Fluent
reader, which produced a mesh of the right size made of garbage cells.
| Found in the header | Converter |
|---|---|
$MeshFormat |
gmshToFoam |
# vtk DataFile |
vtkUnstructuredToFoam |
$NOD |
gmshToFoam |
Starts (0 or (1 , or contains (10 ( |
fluentMeshToFoam |
PROSTAR |
star4ToFoam |
-1 followed by 2411 |
ideasUnvToFoam |
Nothing recognisable inside falls back to the extension, and no match at all is a Problems-tab error: “No converter in this build reads …. Choose the source format explicitly.” The converter can always be set by hand.
After conversion
Section titled “After conversion”Converters produce whatever units the source was in. A scale to metres is applied
with transformPoints -scale when it is anything other than 1 — a mesh imported
in millimetres and left there is a model a thousand times too big, and it will
mesh, run and produce plausible nonsense.
The application then runs any configured mesh operations and
checkMesh -allGeometry -allTopology.
Field files in 0/ are not written on the pass that imports a mesh. Until
the converter has run, nobody knows what the patches are called. They are written
on the next pass, once the patch names have been adopted from the mesh.
Case import and export
Section titled “Case import and export”| Direction | Format | How |
|---|---|---|
| Export | .zip |
Home screen, or --export-case=<file.zip> |
| Import | .zip, or a case directory |
Home screen “From a .zip…”, or --import-case=<dir|zip> |
A case is a directory with a case.json in it. An archive that nests the case
one level down is handled; an archive with no case.json anywhere is rejected
with “That is not a SHD Sim CFD case — there is no case.json in it.”
Export is asynchronous and can be cancelled. What lands in the archive is the
whole case directory, including empty directories, so a reserved but unused
run/ still arrives.
Export
Section titled “Export”Everything the application writes out, other than the OpenFOAM case itself — that is Case directory layout.
| What | Format | Where it lands |
|---|---|---|
| Report | PDF, A4 | The path you choose, or --report=<file.pdf> |
| Viewport frame | PNG | The path you choose, or --save-image=<file.png> |
| Animation | PNG frame sequence, frame-0000.png upward |
A dated folder under exports/ |
| Probe values | CSV | exports/probe-<timestamp>.csv |
| Plot over line | CSV | exports/line-<timestamp>.csv |
| Boundary values (Calculator) | CSV | exports/boundary-values-<timestamp>.csv |
| Case thumbnail | PNG, 320 px wide | thumbnail.png in the case directory |
| ParaView marker | Empty .foam file |
Beside the case, named after it |
exports/ sits beside the results it came from — inside the run directory — and
falls back to the Pictures folder when there is no run directory. Names carry a
yyyyMMdd-HHmmss stamp, so nothing is overwritten.
CSV is written as UTF-8 in the C locale with ten significant figures. That is deliberate: a spreadsheet opening a comma-decimal file in a comma-decimal locale reads every value as text.
The .foam file is a marker, not a container — ParaView reads the directory it
sits in. It is named after the case rather than case.foam, because ParaView
shows the file name in its pipeline.
Fields written by the solver
Section titled “Fields written by the solver”A Cutting plane result control samples a plane while the run goes and writes
it under postProcessing/. Its format is a choice of vtk, raw, ensight or
foam, defaulting to vtk.
The time directories themselves are written in binary by default;
writeFormat is settable and some seeded examples set it to ascii.