Repository navigation
The first public release.
Added
femforge new NAMEwrites a project folder with one runnable script, its README and a.gitignore. The script solves a disc magnet pulling on a steel plate and opens the field in a browser, anduv run NAME/main.pyinstalls everything it needs.SimulationConfigdescribes a simulation in one typed, validated model: the geometry, the mesh, the materials, the conditions of each region, the physics and the solve frame, 3D (Solid) or an axisymmetric section (Axisymmetric). Quantities carry their units through pint.- Parametric geometry: a
Build123dGeometrysubclass builds a build123d model whoseTaggedPartandTaggedCompoundparts carry their material and name into the STEP file. - Meshing with gmsh: conformal multi-body meshes, element sizes per region, typed
GmshOptions, andWorkerMesherto mesh in a separate process. - Elmer solves of magnetostatics in 3D and on the axisymmetric section, steady heat conduction, electrostatics, current conduction, Joule heating and coil magnetostatics. Elmer runs natively or in the femforge Docker image,
ghcr.io/femforge-io/femforge-elmer, which also runs partitioned MPI solves. - Conditions for those physics:
Magnetization,CurrentDensity,ForceComponent,FixedTemperature,HeatFlux,Convection,HeatSource,FixedPotential,JouleHeat,CoilDriveandCoilTerminal. - Materials: N42 and N52 magnets, 1080 steel with a nonlinear B-H curve, 316 steel, copper, FR4 and air, and a registry for your own.
Driver.evaluateruns a config into a run bundle named after the content hash of its inputs, reuses a finished bundle with the same inputs, shares STEP files, meshes and bundles through an artifact store, and trims bundles by a retention policy.Resultholds the forces, torques, peak flux density and peak temperature as pint quantities, andRunreads a bundle's result, manifest, bodies and solved fields.- Telemetry: parquet indexes of runs, artifacts and log records, with queries, live log journals and sweep progress.
- Optimization:
Parameterization,Objective,GridSearchand a search for the largest current under a temperature limit. - Validation of a magnetostatic solve against magpylib's analytical field.
- The
femforgecommand:new,doctorto check gmsh, Docker, the solver image and disk space and name the fix for each failure,artifacts,purge,index,runs,logs,sweeps,telemetryandimage. - femforge-workbench, installed with
femforge[workbench]: a browser workbench with a launcher, run and artifact browsers, run, sweep and log monitors, and a field viewer with field lines.femforge.workbench.showserves a workbench from a script, and thefemforge.workbenchesentry point adds your own to the launcher. - The field viewer's Symmetry section expands a run solved on an axisymmetric section: as solved, mirrored into the full r–z plane, or revolved around its axis into a solid in the authored frame, with a sweep angle for a cutaway. Revolve is the default, so the first view of the magnet-plate project is 3D. Field lines of a revolved run are seeded as in a solid run, integrated in the section and swept to their seeds.
- A Legend setting, Hidden, Vertical or Horizontal, for the color bar; the field lines share the field's bar while the field shows their magnitude, and get one beside it otherwise.
- A guided tour of the field viewer on the first start, replayed from the help button in the app bar.
- The femforge logo: the docs site shows it in place of the book icon, and the workbench shows it with the femforge name at the left of the app bar and as the browser tab's icon.
- The color bars are titled with the field's unit, which
ElmerVariable.unitandvariable_unitname for every solver output; the potential's unit follows the physics solved. - Examples: a magnet holding a bearing in its seat in 2D and 3D, a heated copper puck on an FR4 board, and a solenoid pulling a steel plunger. The docs show each one with a screenshot of its workbench.
- Type information for the whole package, including the lazy
import femforge as ffnamespace. - Support for Python 3.12, 3.13 and 3.14.
Changed
- The field viewer starts with the Turbo colormap, no outline, opacity mapping from 0.15 to 1.0, and field lines on from 18 × 18 seeds on the center plane.
- The range slider wears the colormap between its thumbs, and moving a thumb pins the range.
- The run picker lists each run by its description and id.
- The controls' sections are spaced apart, the run picker is wider, and the bundle path beside it is a read-only readout of the open run.
- The field viewer draws every run in its one view; the plotly 2D tab and the
FieldScene.figurepath are gone. - Solve frames moved to the
femforge.framespackage.Frameis now an abstract base class that every frame subclasses, and each pipeline stage calls a hook on it instead of namingSolidorAxisymmetric;FrameUniontypes the serialized frame fields, andff.Framejoinsff.Solid,ff.Axisymmetricandff.Axis.femforge.common.frameis gone. Axisymmetric.planegives the section's plane in the authored model as aSolvePlane, andaxisymmetric_cross_sectiontakes that plane instead of an axis and a radial direction.geometry.frame.apply_frameis replaced byFrame.prepare_geometry, andimport_tagged_stepmoved tofemforge.geometry.step.Physics.in_frameis replaced byFrame.solves, andrun.magnetic.revolvebyFrame.total.- A
MeshJobcarries the solve frame, so the mesher no longer rebuilds one from the mesh dimension. - The Frames guide is a section: a page on the concept and one page per frame.
Fixed
- An axisymmetric run was shown as 3D, with Volume seeds offered, because Elmer writes its flat mesh with a Z extent of a few 1e-18 rather than zero.
- The run picker listed an opened bundle beside its indexed run; it now picks the indexed run.