Changelog¶
This file lists all notable changes to femforge and femforge-workbench. The two packages release together under one version. The format follows Keep a Changelog 1.1, and versions follow Semantic Versioning.
Unreleased¶
Added¶
- Each condition names the sif section it lands in,
Condition.section, from the newSifSectionenum, andshipped_conditions()lists the condition classesConditionUnionadmits. Condition.on_boundary(site)emits a boundary condition for one boundary group, described by aBoundarySite; a boundary group carries its owntags,measureandnamedflag, and the tags' boundary conditions land after the bordering bodies' ones.- Frame hooks
Frame.solve_share, the inverse ofFrame.total,Frame.revolvesandFrame.plane_stress, and solver hooksSolverBase.fit_frameandSolverBase.check_frame. - Named faces: a
TaggedFaceon a face of a 3D body becomes a boundary group of its own, such asTIP, carved out of the shell or interface it lies on, with its area recorded. The boundary conditions of the tags it matches land there,Boundaries.face(name)finds it in a run, andimport_tagged_stepreads named faces back.TaggedFaceis now exported fromfemforge. GmshOptions.element_ordersets the element order (Mesh.ElementOrder), such as 2 for quadratic elements.Physics.LINEAR_ELASTICITYsolves: theFixedDisplacementandSurfaceForceboundary conditions, a Poisson ratio on the shipped solid materials, andStressSolverwriting strains and principal stresses on an undeformed output mesh.Run.strain_energy()andfemforge.runstrain_energy,clapeyron_energyandstrain_energy_densityread the elastic strain energy back;FieldQuery.where_boundaryandsurface_meanselect a boundary and average a field over its area.- The
Cartesian2Dframe solves the planar section of a prismatic model per metre of depth and scales the typed forces by itsthickness: magnetostatics, heat conduction, and linear elasticity in plane stress or plane strain (PlaneState).FieldQuery.integrate_extruded(depth)integrates a planar section over a prism, andVec3.crossis the vector product. - The Cartesian 2D guide states that the strain energy readers work per metre of depth, and how to balance
clapeyron_energyagainst them. - A 2D frame sections each named face into a named edge, a
TaggedEdgethat now takesname=and is exported fromfemforge, so the conditions on a named face land on its edge of the section. - The field viewer shows elasticity runs: it opens on the displacement, offers Von Mises, Tresca, Strain Energy Density and the principal stresses and strains with the Max, Mid and Min Principal modes, and leaves the stress and strain tensors and their
stress_xxcolumns out.FieldKindandline_vectorsjoinfemforge.viz. Run.clapeyron_energy(face, force)balances the strain energy against the work of a face's authored force and takes the solve frame's share itself, whichFrame.authored_sharegives.- The field viewer's Deformation section draws the bodies displaced by the solved displacement, at a scale that starts where the largest displacement moves a tenth of the model's size.
DisplaySpec.warpandDisplaySpec.warp_scalehold the choice. default_display(run)picks the display a run opens on: its solver stack's primary field (PhysicsConfig.primary_variable), the component its surface forces share, and field lines with opacity mapping only for a flux, field or current (ElmerVariable.lines_by_default).- The driver stops a linear solve whose residual stops improving, marks the run
stalled, and records the reason and the last residuals in the manifest; a linear solve logs a progress line every 30 s. AxisymmetricandCartesian2Dcheck the authored model before sectioning it.Frame.check_geometryraisesFrameGeometryError, listing every body or named face that is not a solid of revolution about the axis, or not a prism through the thickness, with its mismatch; the solids or faces that share a name are measured as one.boundary_cylinderbounds an axisymmetric model with a cylinder of air, and the run manifest records the check asgeometry_check, on a pass and on a failure.ff.workbench.show(..., tasks=)runs a script's tasks in background child processes, one at a time, while the workbench serves, with a task strip under the dock that shows each task's stage, progress and failure and offers Open, Cancel and Retry;ff.workbench.Tasklabels a task, by its function name in Title Case when no label is given. The strip also shows a task waiting on another process's claim, a mesh or bundle the artifact cache served, a direct solve, the solver's place in a stack of several, the task's own code running after a run, a stalled solve with its log, and a confirmed Cancel at once. Each child imports from the script's directory with the server'ssys.pathbehind it. A save lists the tasks again, and Ctrl+C or closing the window stops the running one and releases its run.-
Driver and solve records bind the keys of the new
LogKeyenum: the run directory, the stage, the solver, the share of convergence covered, the linear iteration, a stall's reason, the holder of a claim the driver waits on, a solve's linear solvers and those that factorize, the kind of artifact the cache served, and whether a stage record ends its stage. The terminal leaves out the keys its message already says. -
A run records what each body and boundary group received from the sif in
conditions.json(Run.conditions()); bodies and boundaries carry their centroid, bounding box, measure, length and mean outward normal;Run.mesh_groups()reads the Elmer mesh by group andRun.authored_geometry()the authored bodies a 2D frame sectioned.femforge.physical.readoutformats quantities and directions at three significant figures, and each condition names its scene glyph,Condition.glyph. femforge.vizdraws a run's conditions in the field scene throughGlyphLayer: load arrows, held-face tints with clamp ticks, pins and rollers, magnet arrows, out-of-plane current markers and value labels, plus the selected body or boundary in the accent, a 2D section's outline with its solve axes, and the authored bodies against the prism or revolved outline they were checked against.GroupScenedraws a run without fields from its Elmer mesh. The field viewer draws them while its newfield_setup_shownstate is set.- The field viewer's Setup tab lists what each body and boundary group received from the solver, in the solve frame, with glyphs in the scene while it is shown.
Condition.summaryreads a condition as the tab does, with the solver-side values in component form and a fixed displacement on the authored axes of the frame it is given,Frame.facts,Frame.face_measureandFrame.axis_namesread a frame,components_readoutreads signed components, andSetupPaneljoinsfemforge.workbench.
Changed¶
- The field viewer dock puts Setup beside the controls; a saved layout from before is ignored once.
- Run, mesh and STEP keys move: every run re-meshes and re-solves once.
ForceComponentis nowCalculateMagneticForce, with the kindcalculate_magnetic_force, after the Elmer keyword it sets. Rename it in your scripts and saved configs.FixedPotentialis nowFixedVoltage, with the kindfixed_voltage, andscale_fixed_potentialsis nowscale_fixed_voltages. Saved configs withfixed_potentialno longer load: rename the kind. The sif keyword staysPotential, but the electrode boundary blocks, and so theRun.electrode_currentskeys, end in_fixed_voltage. The field viewer names the potential of a voltage-driven runVoltage Potentialand that of a 2D magnetostatic runMagnetic Potential, through the newElmerVariable.display_nameand the physics it reads from the run.- A customized solver stack must use the frame's coordinate system exactly, not only one that integrates the same way.
- A boundary group bordered twice by one tag gets that tag's conditions once.
- Field lines follow the first vector field when the run has no flux density, such as the displacement or the volume current, while a scalar is shown. A
FieldScenewhose field-line options name no vectors picks them the same way, and records the vectors it picked. - Cached meshes and run bundles from 0.1.0 are rebuilt on first use.
- The conditions guide is now a section with one page per physics, listing the conditions each physics reads by sif section with their fields, units and sif keywords, generated from the condition classes;
/user-guide/conditions/stays its index. SolvePlanenames its directionsx_dirandy_dir, for the oldradialandaxis, and gainsnormal.- The field viewer opens each run on its
default_displayunless the givenDisplaySpecnames a field. A quantity, mode, field-line or opacity-mapping choice you make carries over only to a run that has the quantity shown. - The project template and the coil-current and bearing-seat examples bound their models with a cylinder of air, which the axisymmetric check accepts. Every STEP artifact rebuilds once.
- Half and quarter axisymmetric models are rejected: author the whole revolution.
StressSolversolves with CG and ILU1 preconditioning to a linear tolerance of1e-7, for BiCGStab, ILU0 and1e-8, which stalled on large quadratic meshes.FixedDisplacementmaps each authored axis onto the solve coordinate it runs along, signed. A Cartesian 2D section normal to X or Y and an axisymmetric section now take clamps and rollers, an axis off the plane is dropped, and an axis oblique to a free one raises.FixedDisplacement.to_elmer()raises, since its keywords depend on the frame.Frame.solve_sharenames its argumentshare_of.- The curves of a 2D section take their names from its named edges only, so a colored body no longer names its own boundary curves and its
__EXTand__AXISgroups come back. - Cached sections and the runs built on them are rebuilt on first use.
RunStatusis aStrEnumwithSTALLED; the manifest'srunningandabandonedareLifecycleStatus.- The
femforge newtemplate and the examples solve throughshow(tasks=); bearing-seat no longer solves on a daemon thread. - The launcher's script runs are
ScriptRun,ScriptStatusandScriptFieldinfemforge_workbench.runner, forTask,TaskStatusandTaskField.
Fixed¶
- Color bar text no longer halves on a 2x display, in the Client and Server views alike.
SurfaceForcetakes the solve share of its solve components, so an axial load under an axisymmetric frame no longer raises.- The field viewer recolors the bodies when another field is picked. It used to keep drawing the values of the field it opened on, so a switch from the displacement to Von Mises left the bodies at the bottom of the colormap.
- Exporting an authored STEP again keeps its run identity, so the driver reuses the run. The digest now hashes the names, tags, colors, sizes, mass properties, faces and vertices of its bodies,
TaggedCompound.fingerprint, instead of the bytes, which changed on every export; runs on an authored STEP are solved once more on first use. Result.residualreports how far the last nonlinear solver stopped from converging, instead of 2.0 for elasticity and 0.0 for magnetostatics; one-value linear residual lines andComputeChangelines without their prefix are parsed.
0.1.0 - 2026-10-17¶
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.
0.1.0rc1 - 2026-10-17¶
The first public release candidate, superseded by 0.1.0 the same day.