Skip to content

femforge

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

femforge drives finite-element analysis from Python. You describe a simulation as one typed SimulationConfig: the geometry, the mesh settings, the materials and conditions of each region, and the physics to solve. 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 through the mesh backend, gmsh today, solves it through the solver backend, Elmer today, and returns a typed 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.

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