RunMat
GitHub

Geometry

Geometry is the first object in the FEA workflow. Before a model can have materials, loads, constraints, or domains, RunMat needs a structured geometry.Asset.

Load Or Inspect

From .m code:

info = geometry.inspect("geometry/bracket.step");
geom = geometry.load("geometry/bracket.step");

From a .fea file:

geometry:
  path: ../geometry/bracket.step
  units: millimeter
  import:
    max_triangles: 16000000

Supported Inputs

Format familyTypical useNotes
STLSurface mesh inputGood for mesh-only workflows. Region semantics are limited.
STEPCAD exchange inputSource builds without OCCT read STEP metadata. OCCT-enabled builds import topology, tessellate faces, and map XCAF assembly, label, layer, color, and material ownership to selectable regions when the file carries that data.
IGESCAD exchange inputRequires the OCCT CAD backend. Imports topology as tessellated face regions and maps XCAF names, layers, and colors when available.
BREPNative OCCT B-rep inputRequires the OCCT CAD backend. Imports topology as tessellated face regions. BREP files do not normally carry STEP-style exchange metadata.
OBJMesh-style geometry inputUseful for polygonal assets.
PLYMesh or point-oriented inputUseful for mesh/scan style data.
glTFScene or mesh inputUseful when geometry arrives as a scene asset.

Format support means RunMat can ingest the file family. It does not guarantee that every file contains the region names, topology, or material evidence your study needs.

Source builds that do not enable the optional OCCT feature do not link OCCT. In those builds, STEP remains useful for assembly, product-label, and material-evidence metadata, but it does not produce CAD face topology. Official RunMat CLI and desktop binaries are built with OCCT enabled, so they can import STEP, IGES, and BREP topology through OCCT. Browser/WASM builds use the occt-wasm-host feature with a configured browser sidecar.

Native packagers can build the OCCT path from the bundled OCCT source or point RunMat at an existing OCCT installation with RUNMAT_OCCT_ROOT, or with RUNMAT_OCCT_INCLUDE_DIR and RUNMAT_OCCT_LIB_DIR. Building bundled OCCT requires CMake on PATH or through Cargo's CMAKE environment overrides. RUNMAT_OCCT_ROOT accepts both include/ and include/opencascade/ header layouts. Use RUNMAT_OCCT_LINK_MODE=static for static CLI-style linking. Use RUNMAT_OCCT_LINK_MODE=dylib for dynamic desktop packaging; dynamic mode requires an existing dynamic OCCT installation and does not use the bundled static OCCT builder.

Inspect Before Modeling

Use inspection when you need to answer:

QuestionOperation
What format is this file?geometry.inspect/v1
What meshes and regions were imported?geometry.list_regions/v1
What vertices and faces can I plot from a script?geometry.meshes(asset)
What are the basic counts and statistics?geometry.compute_stats/v1
Which entities match this bounded query?geometry.query_entities/v1
Can I save visual evidence for review?geometry.capture_view/v1

This matters because model setup attaches physics data to geometry regions. A study is easier to review when the selected regions are visible and stable.

Regions And Selectors

FEA materials, boundary conditions, loads, and interfaces attach to regions in the imported geometry.Asset. Region selectors are resolved against geometry.regions; they are not a separate FEA-only naming system.

Supported selectors are:

SelectorMeaning
region_1Direct region id.
id:region_1Explicit region id.
region:region_1Explicit region id.
name:Base_MountRegion whose imported name is Base_Mount.
tag:step_partFirst region with the imported tag step_part.
tag:occt_faceFirst face region produced by the OCCT CAD backend.
tag:cad_bodyFirst body-level semantic region mapped from CAD ownership metadata.
tag:cad_layerFirst layer-level semantic region mapped from CAD ownership metadata.
tag:cad_materialFirst material-level semantic region mapped from CAD ownership metadata.

Always inspect the loaded geometry before writing selectors:

geom = geometry.load("geometry/bracket.step");
regions = geometry.listRegions(geom);

Without OCCT, STEP regions are derived from STEP PRODUCT labels when they are present. If a STEP file does not contain explicit product labels, the metadata importer creates a synthetic region_1 for the model.

With the OCCT CAD backend, STEP, IGES, and BREP imports produce tessellated face regions such as face_000001 with the tag occt_face. Those regions map directly to imported mesh faces, so they can be picked, highlighted, and used by .fea selectors.

STEP and IGES imports also use the OCCT XCAF document model. When the file contains usable ownership metadata, RunMat creates additional semantic regions from CAD labels, bodies, components, assemblies, layers, colors, and materials. These regions use ids such as cad_label_0_1_1, cad_layer_boundary_faces, or cad_material_aluminum_6061, and tags such as cad_body, cad_component, cad_assembly, cad_layer, cad_color, and cad_material.

Semantic CAD regions are evidence from the imported exchange file. If a CAD file does not carry layer names, material assignments, color assignments, or meaningful product/body labels, RunMat still imports topology and face regions, but it cannot invent authored boundary names.

Mesh-only formats often have weaker region metadata and may need a workflow-specific annotation step before they are useful for boundary conditions.

Prepare Geometry

Use geometry.prep_for_analysis/v1 when you need deterministic analysis-prep data before solving. Prep returns a prep_artifact_id and a MeshingPrepResult.

Prep profileUse
surface_onlyPreserve surface-oriented data for surface workflows.
analysis_readyCreate deterministic baseline prep for analysis runs.
adaptive_refineCreate refinement-oriented quality and topology data.

Prep artifacts are useful when later steps must prove which geometry revision, mappings, and prep data were used.

Prepared analysis artifacts carry both bounded compatibility samples and full element topology vectors. The full vectors include node coordinates, edge-node incidence, element-edge incidence/orientation, and element areas. Prep-aware EM, electro-thermal, CHT, and FSI paths use those vectors for edge or interface graph construction where available, and conformance gates assert that governed prepared fixtures are not satisfied by an implicit line or diagnostic-only topology fallback.

Prep Artifact Checks

Prep-aware runs check that:

  • the artifact exists,
  • the schema is supported,
  • the artifact belongs to the same geometry id,
  • the artifact belongs to the same geometry revision,
  • the artifact is not stale when latest-revision enforcement is enabled,
  • inline prep context has enough data for the selected run.

Typed FEA prep failures use RM.FEA.RUN_PREP.* codes.

Artifact Config

Configure prep artifact storage through [runtime.fea]:

[runtime.fea]
artifact_root = "artifacts"
geometry_prep_max_artifacts = 500
geometry_prep_max_artifacts_per_geometry = 20
geometry_prep_max_age_seconds = 2592000
geometry_prep_require_latest_revision = true

Use geometry.prep_artifact_health/v1 to inspect retained artifact counts, ages, lifecycle counters, stale or mismatch rejections, and optional per-geometry entries.

Boundaries

  • STEP and IGES can expose useful product, body, layer, color, and material ownership, but the quality of that ownership depends on the exported CAD data.
  • OCCT-enabled CAD import provides face-level topology for STEP, IGES, and BREP, plus semantic regions for STEP and IGES when XCAF ownership metadata is present.
  • Builds without OCCT enabled can load STEP metadata but not face-level topology.
  • Mesh-only formats usually need additional region or boundary data from the workflow.
  • Prep artifacts improve reproducibility; they do not prove that a physics model is well posed.

See Current Status for current support by workflow stage.