Solver and Equation Compatibility¶
In one sentence: FreeCAD FEM supports four solvers, each covering a different subset of physics — knowing which solver handles which analysis type, and which boundary conditions and equations are required, prevents the most common "solver won't run" errors.
The four solvers¶
| Solver | Executable | Physics covered | Best for |
|---|---|---|---|
| CalculiX | ccx |
Structural, thermal, thermo-mechanical, buckling, frequency, electromagnetic | Most structural and thermal work |
| Elmer | ElmerSolver |
Electrostatic, electromagnetic, fluid flow, heat, structural deformation | Multiphysics, EM, flow |
| Mystran | mystran |
Linear static structural only | Quick linear checks (NASTRAN-format) |
| Z88 | z88r |
Linear static structural only | Quick linear checks (alternative) |
Each solver requires its executable to be installed separately and the path configured in Edit → Preferences → FEM → [SolverName].
CalculiX — analysis type matrix¶
CalculiX is controlled by a single Analysis Type property. All required setup (mesh, materials, BCs) is the same structure regardless of type — only the result outputs differ.
| Analysis Type | Solves | Required BCs | Optional |
|---|---|---|---|
static |
Linear/nonlinear deformation and stress | Fixed Constraint + at least one load | Spring, Contact |
frequency |
Natural frequencies and mode shapes (modal) | Fixed Constraint | No loads needed — loads are ignored |
thermomech |
Temperature distribution and thermal stress | Temperature Constraint + Heat Flux or Body Heat Source | Mechanical loads for coupled thermo-mechanical |
buckling |
Critical load multiplier (linear buckling) | Same as static | — |
check |
Mesh quality check only | None required | — |
electromagnetic |
Electrostatic field | Electrostatic Potential | Electric Charge |
Frequency analysis ignores all loads
Modal analysis computes natural vibration modes of the structure. Applied forces, pressures, and gravity loads are not used. If you want stress at a specific mode, run a separate static analysis.
Geometrical Nonlinearity must be enabled for large-deformation problems
For problems with displacements greater than ~5% of the part dimensions,
enable GeometricalNonlinearity = nonlinear on the CalculiX solver object.
The default linear setting uses a small-strain formulation.
Elmer — equation-based physics¶
Elmer has no built-in analysis type. You define the physics by adding equation objects to the Analysis container. Each equation object adds one governing PDE to the solve.
| Equation | Physics | Required BCs | Required material properties |
|---|---|---|---|
| Elasticity | Linear structural (small strain) | Displacement | Young's modulus, Poisson ratio, density |
| Deformation | Nonlinear structural (large strain) | Displacement | Young's modulus, Poisson ratio, density |
| Heat | Heat conduction/convection | Temperature and/or Heat Flux | Thermal conductivity λ, specific heat c, density ρ |
| Flow | Navier-Stokes fluid flow | Flow Velocity on inlet/wall | Viscosity, density |
| Electrostatic | Electric potential ∇·(ε∇V) = −ρ | Electrostatic Potential | Permittivity ε |
| Static Current | DC conduction ∇·(σ∇V) = 0 | Electrostatic Potential on terminals | Conductivity σ |
| Magnetodynamic | Time-harmonic (AC) EM fields | Magnetization or Current Density | Permeability, conductivity |
| Magnetodynamic 2D | 2-D planar/axisymmetric EM | Same as Magnetodynamic | Same as Magnetodynamic |
| Electricforce | Electrostatic body force | Requires Electrostatic to be solved first | — |
| Flux | Heat or electric flux (post-processing) | Requires Heat or Electrostatic to be solved first | — |
Elmer multiphysics combinations¶
Elmer's power lies in coupling multiple equations in one solve:
| Combination | Use case |
|---|---|
| Flow + Heat | Conjugate heat transfer (fluid cooling a solid) |
| Electrostatic + Electricforce + Elasticity | Electromechanical actuator (MEMS) |
| Magnetodynamic + Heat | Induction heating (Joule heating in conductor) |
| Elasticity + Heat | Thermal stress (uncoupled) |
Add all required equations to the same Analysis. Elmer solves them simultaneously (or sequentially for weakly coupled systems).
Mystran¶
Linear static structural only. Equivalent to CalculiX static with
GeometricalNonlinearity = linear. Use when CalculiX is not installed or
when a NASTRAN-format workflow is required.
Required: Fixed Constraint + at least one mechanical load.
Z88¶
Linear static structural only. Equivalent to CalculiX static with
GeometricalNonlinearity = linear. Alternative lightweight solver.
Required: Fixed Constraint + at least one mechanical load.
Choosing the right solver¶
| Scenario | Solver to use |
|---|---|
| Static stress analysis — linear | CalculiX static or Mystran or Z88 |
| Static stress analysis — nonlinear (large deflection, plasticity) | CalculiX static + Geometrical Nonlinearity |
| Modal (natural frequency) analysis | CalculiX frequency |
| Buckling analysis | CalculiX buckling |
| Steady-state or transient heat conduction | CalculiX thermomech or Elmer Heat |
| Thermal stress (heat + structural) | CalculiX thermomech (coupled) |
| Fluid flow (CFD) | Elmer Flow |
| Conjugate heat transfer (fluid + solid) | Elmer Flow + Heat |
| Electrostatic field | CalculiX electromagnetic or Elmer Electrostatic |
| DC current flow and Joule heating | Elmer Static Current + Heat |
| AC electromagnetic / eddy currents | Elmer Magnetodynamic |
| MEMS / electromechanical coupling | Elmer Electrostatic + Electricforce + Elasticity |
Common setup errors¶
| Error | Likely cause | Fix |
|---|---|---|
| Solver runs but produces zero displacement | No load applied, or loads applied to wrong face | Verify loads are on the loaded face; check magnitudes are non-zero |
| Solver fails: "No boundary conditions" | Missing required BC for the chosen equation/analysis type | Add at minimum one Dirichlet BC (fixed constraint, temperature) |
| Solver fails: "No material" | Analysis has no material assigned to the mesh | Add a Material Solid and assign it to the body |
| CalculiX frequency: zero modes | All DOF are fixed (fully clamped) | Remove excess fixity — leave enough free DOF for vibration |
| Elmer won't converge (Flow) | Turbulent flow with laminar Navier-Stokes | Reduce Reynolds number or use simpler geometry |
| CalculiX static: large displacement, wrong results | Nonlinear problem solved linearly | Enable GeometricalNonlinearity = nonlinear |
Python API¶
import ObjectsFem
import FreeCAD as App
doc = App.ActiveDocument
analysis = doc.getObject("Analysis")
# Add a CalculiX solver
calc = ObjectsFem.makeSolverCalculiX(doc, "CalculiX")
calc.AnalysisType = "static"
calc.GeometricalNonlinearity = "linear"
analysis.addObject(calc)
# Add an Elmer solver
elmer = ObjectsFem.makeSolverElmer(doc, "Elmer")
analysis.addObject(elmer)
# Add Elmer equations
heat_eq = ObjectsFem.makeEquationHeat(doc, elmer)
flow_eq = ObjectsFem.makeEquationFlow(doc, elmer)
doc.recompute()
See also¶
- Solver CalculiX — CalculiX configuration and properties
- Solver Elmer — Elmer configuration and properties
- Solver Mystran — Mystran configuration
- Solver Z88 — Z88 configuration
- Run Solver — executing the solver
- FEM Workbench — workbench overview