Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

femforge

PyPI License Quality

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

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

Open-source solvers can do remarkable physics. Getting them to do it has meant hours in a manual and in forum threads, hunting for the keyword spelling that makes a case run. femforge moves that knowledge into the type system. 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.

You describe a simulation once, as one config, and a Driver meshes it, solves it and returns results that carry their units. Geometry, meshing and solving run behind interfaces, so the same config can target new backends as they land.

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

What you get

  • One typed config. Pydantic models check the geometry, the mesh, the materials, the conditions and the physics before anything runs.
  • Units that are checked. Lengths, material properties, conditions and results carry pint quantities, so a value with the wrong dimension fails validation instead of corrupting a solve.
  • CAD to result in one call. A tagged STEP from your CAD or a build123d script, meshed and solved.
  • Runs you can reuse and query. Each run is a bundle named after the content hash of its inputs, with its config, logs and fields. An identical config reuses the finished run, and a telemetry index lists every run.
  • A browser workbench. Browse the runs, view the fields and compose your own panels from a script.
  • Extensible backends. Geometry, meshing and solving run behind interfaces, so a new mesher or solver plugs in without changing your config. Status lists what each interface and each physics supports today.

Try it

You need uv and either Docker, which is recommended, or a native Elmer install.

uvx femforge new magnet-plate
uv run magnet-plate/main.py

The script solves a disc magnet pulling on a steel plate at four air gaps, then opens the fields in your browser. The first run downloads about 1.2 GB of packages once, plus a 1.3 GB Docker image when Elmer is not installed natively; later runs start in seconds. The Quickstart walks through it.

A solve in a few lines

import femforge as ff

config = ff.SimulationConfig(
    mesh=ff.MeshConfig(step="magnet_and_plate.step"),
    frame=ff.Axisymmetric(),
    domain=ff.DomainConfig(
        materials=[ff.materials.N52(), ff.materials.Steel_1080(), ff.materials.Air()],
        tags=[
            ff.EntityTag(selector={ff.TagKey.NAME: "MAGNET"}, conditions=[ff.Magnetization(direction=ff.Direction(0, 0, 1))]),
            ff.EntityTag(selector={ff.TagKey.NAME: "PLATE"}, conditions=[ff.ForceComponent()]),
        ],
    ),
)
result = ff.Driver().evaluate(config)
print(result.axial_force("PLATE").m_as("newton"), "N")
ff.workbench.show(ff.workbench.field_viewer(result), window=ff.workbench.Window.BROWSER)

The STEP holds a magnet, a steel plate and an air box, each solid named with its tags, such as Material=N52, Name=MAGNET. Geometry and tags builds the same model in build123d.

Install in your own project

Command Size Pick it for
Recommended uv add "femforge[workbench]" 1.2 GB solves, field plots and the browser workbench
Headless uv add femforge 0.8 GB servers, CI and pipelines that need solves and typed results only

With pip: pip install "femforge[workbench]" or pip install femforge. Elmer runs natively when it is installed, else in the femforge Docker image, pulled on the first solve; Install covers both, and femforge doctor checks the result.


Documentation · Status · Examples · Changelog · License (Apache-2.0)

Metadata

Release files for femforge 0.1.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for femforge 0.1.0rc1
File Size Uploaded Provenance Actions
femforge-0.1.0rc1.tar.gz 315.3 kB With provenance Details for femforge-0.1.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for femforge 0.1.0rc1
File Interpreter ABI Platform Actions
femforge-0.1.0rc1-py3-none-any.whl Python 3 none any Details for femforge-0.1.0rc1-py3-none-any.whl

Total release size: 714.8 kB

Release files / femforge-0.1.0rc1.tar.gz

Download URL femforge-0.1.0rc1.tar.gz
Size 315.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8af4adbfd16089d17a0dc482504c0595c0d86d93eaf0b804a644b5674b1da091
BLAKE2b-256 checksum
How to use checksums
9cce00f0167de20f140c3983d74bd30bb43d04ee9bb6d1d04a31afbd2f950de4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / femforge-0.1.0rc1-py3-none-any.whl

Download URL femforge-0.1.0rc1-py3-none-any.whl
Size 399.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
003ec50d5363bc5e9830edd81686d5f9263946914ac7de9a35bfb71b7fc3da0b
BLAKE2b-256 checksum
How to use checksums
2275a3cf6112230c81413d654e88e3ad5a9200614620a64557d4f9c290d5d076
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for femforge 0.1.0rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for femforge-0.1.0rc1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page