Skip to content

femforge

Field lines of a magnet holding a steel ball, from the bearing-seat example

femforge is finite-element analysis as a typed Python API.

You describe a simulation once, as one SimulationConfig: the geometry, the mesh, the materials and conditions of each region, and the physics to solve. Every setting is a typed Pydantic field with a docstring, and every physical quantity carries its unit, so your editor completes the config and validation rejects a mistake before anything is meshed or solved.

The geometry is a STEP file whose bodies are named with their tags, exported from any CAD or scripted in build123d with femforge's helpers.

A Driver meshes the config, solves it and returns a Result whose quantities carry their units. Every run lands in a bundle named after the content hash of its inputs, so an identical config reuses the finished run instead of solving again.

The workbench shows the fields and the runs in a browser, and everything it shows is also scriptable. Geometry, meshing and solving run behind interfaces, and Status lists what each one supports today.

femforge is pre-alpha. The API will change between 0.x releases, and the changelog records each change.

How it fits together

  1. Geometry and tags: name each body with its material and name tags, in your CAD's STEP export or in a build123d script.
  2. Materials and conditions and physics: say what each region is made of, what drives it and which physics to solve.
  3. Mesh and frames: set the element sizes and solve the model in 3D or as an axisymmetric 2D section.
  4. Driver and runs: mesh, write the solver input, solve and record the run bundle.
  5. Results: read forces, torques, peak fields and the solved field mesh.
  6. Artifacts and retention and telemetry: reuse meshes and runs across processes, trim old bundles and query logs and sweeps.
  7. Workbench: browse runs and view fields in a browser.

Where to start

  • Install femforge and an Elmer solver.
  • Run a first simulation with the Quickstart.
  • Read Concepts for the pipeline on one page.
  • Check Status for what works today and which tasks are open.
  • Work through the User guide, one task per page.
  • Look up a class or function in the API reference.
  • Set up a development checkout with Contributing.