TerreLenz / Validation
Validation report
Every number, and how we got it.
TerreLenz is checked against closed-form solutions, FEMM 4.2 on identical models and the TEAM benchmark problems. Each case on this page is an automated test: it runs on every build, and a result that drifts out of tolerance fails the build. Below are the numbers, the method behind them, and the limits we know about.
- Over 60 automated validation cases
- Second-order elements throughout
- Signs and tolerances kept, not rounded away
How to read the tables
What “error” means here.
Error is TerreLenz’s result minus the reference, as a percentage of the reference, at the mesh and element order the test uses. Signs are kept: “+” means TerreLenz reads high. Where a test checks several points or speeds, the table gives the worst of them.
Tolerance is what the automated test enforces, and it is usually looser than the error we measure. That way a mesher or library update that moves a result by a hair doesn’t break the build, but a real regression does. Where the tolerance is the only number we publish, the table says “within”.
References are of four kinds: closed-form solutions (textbook fields, inductances, forces and losses); FEMM 4.2 with mesh-converged models built from the same geometry; the TEAM problems (published measurements for TEAM 7, the published reference table for TEAM 30a); and internal cross-checks, where two independent routes to the same quantity must agree, such as a transient run to steady state against the AC solution, a 3D model against its axisymmetric twin, or Maxwell stress against virtual work.
Second-order elements as standard
First-order elements are not good enough for engineering results: near a magnet the error reaches 30 %. Every study therefore defaults to second order, with nodal elements in 2D and hierarchical edge elements in 3D.
Block magnet, 2 mm from the pole face: +0.09 %Open boundaries, not a wall
A finite air box with a zero-potential wall is wrong in a known direction. TerreLenz maps the exterior to infinity with a shell transformation, in 2D and 3D, so the model can stop close to the part.
Block magnet in a 30 mm ball of air: within 0.3 % of exact. Same ball, plain wall: 6–13 % offBracketing the answer
Flux-tangential walls overestimate stored energy; field-normal walls underestimate it. The tests solve both and require the open-boundary result to land between them. If it ever doesn’t, something is wrong with the boundary treatment, not the mesh.
Block magnet: 1.296 J (FN) < 1.330 J (open) < 1.399 J (FT)Forces from the Maxwell stress tensor
Integrated over a shell of air around each body, with a thin-film term for bodies that touch. Machine torque uses Arkkio’s method over the meshed air-gap ring. Virtual work, dW′/dx, is kept as an independent cross-check.
Plunger stroke force: Maxwell stress −20.09 N, virtual work −20.14 NSaturation by Newton–Raphson
With the exact Jacobian, in 2D and 3D, and optional adaptive relaxation. Given a straight-line B-H curve, the Newton solver reproduces the linear solver to six digits. Curves are extended at μ0 beyond the last point, so a solve never runs off the end of the table.
Steel sphere, 1.5 MA/m applied: +0.65 % at 3.2 TConvergence you can watch
A Zienkiewicz–Zhu error estimator drives adaptive refinement in 2D and 3D. Check accuracy re-solves with a finer mesh, higher order, a tighter Newton tolerance, half the time step and more air, then reports how far each result moved. That spread is the error bar you put in the report.
Two-wire line, 4 adaptive passes: −6.2 % → +0.39 % → +0.024 % → −0.034 %Results
The cases, by study type.
Geometry and settings are stated where they matter. Unless noted, every case uses second-order elements and the mesh the test specifies.
3D magnetostatics
Block magnet: 20 × 20 × 10 mm, Br 1.3 T, μr 1, in a 180 × 180 × 170 mm air box. Sphere: radius 10 mm, Fröhlich-type steel with μi 1500 and Js 1.95 T, checked against the exact relation ⅔·H + B(H)/3μ0 = H0.
| Case | Checked against | Quantity | Error |
|---|---|---|---|
| Block magnet | Closed form | Bz, 2 mm from the pole face (0.3605 vs 0.3601 T) | +0.09 % |
| Block magnet | Closed form | Bz, 5 mm | +0.63 % |
| Block magnet | Closed form | Bz, 10 mm | +1.00 % |
| Block magnet | Closed form | Bz, 20 mm (air-box truncation starts to count) | +1.93 % |
| Block magnet, adaptive mesh from a 20 mm seed: 3 742 → 211 000 elements in 4 passes, 49 s | Closed form | Bz, 3 mm above the pole | 0.14 % |
| Block magnet in a 30 mm ball of air, open boundary | Closed form | On-axis field | within 0.3 % |
| One eighth of the block magnet, three symmetry planes | Whole model | Stored energy × 8 | 0.015 % |
| Block magnet with field-normal / flux-tangential walls at ±25 and ±50 mm | Open-boundary model, 1.330 J | Stored energy brackets the open value | 1.296 / 1.327 J below · 1.399 / 1.340 J above |
| Steel sphere, 10 kA/m (linear, μr 1000) | Exact solution | B at the center | +0.22 % |
| Steel sphere, 100 kA/m (nearly linear) | Exact solution | B at the center | +0.22 % |
| Steel sphere, 400 kA/m (at the knee) | Exact solution | B at the center (1.5069 vs 1.5036 T) | +0.22 % |
| Steel sphere, 1.5 MA/m (deep saturation) | Exact solution | B at the center (3.2051 vs 3.1844 T) | +0.65 % |
| Ring coil, second-order edge elements | Thick-coil formula | B on axis: center / 10 mm / 25 mm | +0.7 % / −0.4 % / −1.0 % |
| Ring coil, 3D model | Its own 2D axisymmetric model | Flux linkage (5.712 vs 5.701 mWb) | 0.2 % |
| Two cuboid magnets | Magnetic charge model | Fz (−42.2 N) / Fx (−10.2 N) / torque | −0.08 % / +0.03 % / +1.2 % |
Tolerances: block magnet 1 % to 5 mm, 1.5 % at 10 mm, 4 % at 20 mm; sphere 2 %; ring coil 1 % below 20 mm, 3 % at 25 mm. The ring coil’s +0.7 % at the center is discretization: the exact discrete solution on the same mesh sits at +0.14 %.
2D magnetostatics and saturation
C-core: a saturating core with a 100-turn coil and an armature across two 1 mm gaps, planar, 100 mm deep. The FEMM 4.2 models are mesh-converged and built from the same geometry description.
| Case | Checked against | Quantity | Error |
|---|---|---|---|
| Two-wire line, planar | L′ = μ0/π (ln(d/a) + ¼) | Inductance per length | −0.08 % |
| Two-wire line, planar | F′ = μ0I²/2πd | Force per length | −0.4 % |
| Two-wire line, adaptive from 833 elements: 4 passes to 23 400 elements, 3 s | Analytic | Inductance per length, pass by pass | −6.2 → +0.39 → +0.024 → −0.034 % |
| Two coaxial rings, axisymmetric | Maxwell’s filament formula | Mutual inductance | −0.08 % |
| Two coaxial rings, axisymmetric | Analytic | Axial force | +0.06 % |
| Thick solenoid, axisymmetric | Analytic | Center field | +0.43 % |
| Permeable cylinder, μr 10, in an applied field | Analytic | Field inside | −0.20 % |
| Sphere in an axial applied field, axisymmetric | Analytic | Field inside | +0.08 % |
| Two-wire line / thin ring in a small air region, open boundary | Free-space values | Inductance | −0.03 % / +0.09 % |
| Same region with a plain zero-potential wall (for comparison) | Free-space values | Inductance | −8.7 % / −3.4 % |
| Planar magnet with field-normal / flux-tangential walls | Open-boundary model, 8.437 J | Stored energy brackets the open value | 8.049 / 8.333 J below · 8.818 / 8.525 J above |
| C-core, 500 A-turns | FEMM 4.2 | Gap B (0.29115 vs 0.29115 T) | 0.00 % |
| C-core, 500 A-turns | FEMM 4.2 | Armature force (−73.306 vs −73.307 N) | 0.00 % |
| C-core, 500 A-turns | FEMM 4.2 | Flux linkage (46.167 vs 46.166 mWb) | 0.00 % |
| C-core, 3000 A-turns (saturated) | FEMM 4.2 | Gap B (1.2128 vs 1.2137 T) | −0.07 % |
| C-core, 3000 A-turns (saturated) | FEMM 4.2 | Armature force (−1266.96 vs −1267.46 N) | −0.04 % |
| C-core, 3000 A-turns (saturated) | FEMM 4.2 | Flux linkage (194.18 vs 194.20 mWb) | −0.01 % |
| C-core, 5 A and 30 A | FEMM 4.2 block integrals | Energy and co-energy | within 0.5 % |
| Laminated ring, stacking factor 0.9 | Analytic | Loss / flux density | 0.03 % / 0.01 % |
| Magnet at 120 °C, library temperature coefficients | Scaled 20 °C solve | Field | exactly 0.88× |
AC, eddy currents, transients and circuits
Where the reference is another TerreLenz study, the two routes are independent: a transient stepped to steady state against the time-harmonic solution, or a 3D model against its axisymmetric twin.
| Case | Checked against | Quantity | Error |
|---|---|---|---|
| Round copper wire, 5 kHz (δ 0.93 mm, radius 5 mm), adaptive from 240 to 6 300 elements | Bessel-function solution | AC resistance | +0.04 % |
| Round copper wire, 50 / 300 / 1000 Hz | Bessel-function solution | AC resistance | within 1 % |
| Conducting cylinder as a shield, a/δ = 2 | B0 / |J0(ka)| | Field inside | within 0.16 % |
| Same cylinder under a transient sine | Its AC solution | Loss | within 1.8 % |
| Conducting sphere in a uniform AC field, 3D | Closed form | Eddy-current loss | within 3 % |
| Aluminum disk above a ring coil, 200 Hz, 3D | Its axisymmetric AC model | Eddy loss / coil inductance | 1.2 % / 0.2 % |
| TEAM 7 asymmetric conductor with a hole, 50 and 200 Hz, 675 000 unknowns | Published measurements | Bz 15 mm above the plate | within 4 % of the 78 G peak at all but two points per line; worst 5.4 G |
| TEAM 7 | Published measurements | Jy on the face toward the coil | within 15 % of the extreme, except at the hole’s edge |
| Plate over a coil, Crank–Nicolson transient to steady state | Its AC solution | Current / loss / force | 0.02 % / 0.04 % / 0.06 % |
| Saturating C-core, nonlinear transient at DC | Its magnetostatic solution | All quantities | identical |
| Stranded coil, voltage step | V/R (1 − e−tR/L) | Current rise | passes |
| Same step with adaptive BDF2 time steps | Exact | Current, in 29 steps | 0.26 % |
| Ring around a wire | Analytic | Iron loss (Bertotti) | 0.007 % |
| Jiles–Atherton ring, 50 Hz | Loop area × f | Hysteresis loss (0.5446 W, equal to electrical input to six digits) | within 0.4 % |
| Jiles–Atherton ring | Independent integration of the model | Remanence (0.627 vs 0.624 T) | +0.5 % |
| Saturated C-core, AC study with the effective B-H curve | Fundamental of the transient | Flux linkage | +5.9 % (see Limits) |
| Induction heating of a round coil, 2D | Closed form | Temperature | within 0.5 % |
| Capacitor discharge into a coil (netlist) | RLC solution | Current / overshoot | 0.03 % / 0.003 % |
| Freewheeling diode | Analytic | Decay | within 0.5 % |
| Crowbar decay | Analytic | Current | within 0.001 % |
| Star and delta netlists | Nodal analysis | Currents | 6 digits |
TEAM 7: at 200 Hz and ωt = 90° the field is 3.5–4 G high along the line; a phase offset in the measurement is suspected but not confirmed, so the test keeps the tighter tolerance and the discrepancy is reported as is.
Motion, machines and magnets
TEAM 30a: the three-phase induction motor, 60 Hz, 1 m deep, torque checked at 0, 200, 400 and 1200 rad/s against the published table. Machine torque is Arkkio’s method over the meshed air-gap ring.
| Case | Checked against | Quantity | Error |
|---|---|---|---|
| TEAM 30a, 0 / 200 / 400 / 1200 rad/s | Published reference table | Torque | within 0.02 % |
| TEAM 30a | Independent FE reference | Rotor losses | ≤ 4 % |
| TEAM 30a, slip model in AC | Motion solution | Torque at s = 0.47 / s = −2.18 | +0.7 % / −4.9 % |
| TEAM 30a, locked rotor, 1 ms time step | AC solution | Torque: Crank–Nicolson (implicit Euler for comparison) | −0.9 % (−9 %) |
| 4-pole rotor, 12-slot stator | FEMM 4.2 | Cogging torque | within 6 % of amplitude |
| 12-slot, 4-pole sector sweep | Whole machine | Cogging torque | within 1.6 % of amplitude |
| One pole of a 4-pole rotor (periodic sector) | Whole machine | Fields / energy × 4 | 0.3 % / 0.001 % |
| Anti-periodic sector, AC and transient | Whole machine | Bar loss / flux linkage × 4 | 0.005 % / 1 % |
| Translational periodic array | Whole model | Field at every probe | within 1 % |
| Rotating magnet | ω · dλ/dθ from a static sweep | Back-EMF | passes |
| Magnetic pendulum, load-driven | 2π √(J/k) | Period | −0.05 % |
| Rotor on a torsion spring, load-driven | Analytic | Period | 0.01 % |
| Load-driven sector model | Whole machine | Rotor angle | within 0.15° |
| Magnetic gear, two rotors | Exact ratio 2.5 | Torque ratio; sum of the three torques | 2.44–2.55; 0.4 % |
| Magnetic gear, free outer rotor | Gear ratio −120 | Lock-in speed | −119.997 rpm |
| Plunger, blocked | V/R (1 − e−tR/L) | Current | within 0.2 % |
| Plunger, free | Energy balance | Electrical in vs mechanical + stored | within 0.3 % |
| Plunger stroke force | Virtual work dW′/dy (−20.14 N) | Maxwell stress force (−20.09 N) | 0.2 % |
| Eddy-current brake | Low-speed formula (−0.26054 N) | Drag (−0.26033 N) | 0.08 % |
| 45° of rotation at 1000 rpm, adaptive time steps | Fixed fine steps | Flux linkage | within 0.4 % of peak |
| Irreversible demagnetization with recoil | Demagnetization law, per element | B at every step | within 0.2 mT |
| Cylindrical magnet | Analytic | Mean demagnetization margin | within 0.3 mT |
| Magnetizing fixture, half-field curve | Exact | Magnetized fraction | 50.001 % |
Quick design against finite elements
Quick design is an analytic (magnetic-equivalent-circuit) estimate of the template machine, about 0.1 ms per design. It is a sizing tool: this is how far it sits from the full FE model of the default 12-slot, 10-pole machine at 10 A, using the tabulated M270-35A steel.
| Quantity | Quick design | Finite elements | Difference |
|---|---|---|---|
| Magnet flux linkage ψm | 67.7 mWb | 67.2 mWb | +0.7 % |
| Phase EMF at 1500 rpm, peak | 53.2 V | 52.8 V | +0.8 % |
| Torque at 10 A, q axis | 5.08 N·m | 5.01 N·m | +1.4 % |
| Ld (2D part) | 1.19 mH | 1.20 mH | −0.8 % |
| Lq (2D part) | 1.28 mH | 1.18 mH | +8 % |
| Open-circuit iron loss | 7.4 W | 8.2 W | −10 % |
Buried-magnet rotors (flat, V and spoke) are rougher: flux linkage within 15 %, best torque within 20 %, Ld and Lq within 35 % of FE, because the estimate has no leakage-bridge saturation model. The induction-machine estimate reads 5–8 % above FE on torque at every slip and within 3 % on current. That is why the button next to the estimate builds the FE model.
Where the error comes from
Four things move a finite-element result. TerreLenz shows you each.
The air region
A finite box moves far-field results by about 1.6 % depending on whether the wall is field-normal or flux-tangential, and the effect grows with distance: +1.93 % on the block magnet at 20 mm. Open boundaries remove it; Check accuracy adds more air and shows what changed.
The mesh
On a typical wire-force model, a mesh refinement moves the answer by 0.4 % and the air-region choice by 7.4 %, so the tests always vary both. Adaptive refinement shows the convergence pass by pass rather than asking you to trust one mesh.
The element order
First-order elements reach 30 % error near a magnet, which is why second order is the default and not an option to remember. Orders above two are on the roadmap.
The time step
On TEAM 30a with the rotor locked and a 1 ms step, implicit Euler reads the torque 9 % low; Crank–Nicolson reads it 0.9 % low. Crank–Nicolson is the default, adaptive BDF2 is available, and every transient starts from a converged static solve.
Limits
What TerreLenz doesn’t do yet.
You should know these before you buy, not after. The tester build reports the same list under Help.
- Motion is 2D. Rotation, periodic sectors, netlists and the controller in the loop are 2D today. 3D covers magnetostatics, AC and transients with coils on current or voltage sources (series R, L and C, no switches), eddy currents and saturation, at fixed time steps. 3D motion is next on the roadmap.
- 3D AC is linear. A saturating body in a 3D eddy-current study is refused with a message, not silently approximated.
- 2D AC treats saturation with an effective B-H curve, fundamental only. On the saturated C-core that reads +5.9 % on flux linkage, so for waveforms distorted by saturation use a transient study.
- Element order is 1 or 2. Higher orders are planned.
- The built-in soft materials are generic approximations, not datasheet data. Enter your own B-H curves and loss coefficients for design work. The magnet catalog (129 grades) is fitted to the standard grade tables and measured production lots.
- Iron loss is Bertotti per harmonic. Minor loops and DC bias are not modeled, and stranded (Litz) coils have no proximity-loss model. Magnet eddy loss comes from transient FE, not from quick design.
- 2D heating is steady state, air gaps don’t conduct, planar models have no end windings, and the machine thermal network is not yet calibrated against heat runs.
- Per-body torque on a rotor at the default mesh reads 3–6 % below Arkkio’s method, so machine models use Arkkio. Cogging against FEMM is within 6 % of amplitude; the sector sweep is within 1.6 %.
Engineers’ FAQ
The questions we’d ask.
Which formulations does it solve?
2D planar and axisymmetric magnetostatics use the vector potential Az (r·Aφ in axisymmetry) with reluctivity ν(|B|²). 2D AC and transient studies use the a-v formulation with stranded and massive conductors, coupled to circuits. 3D magnetostatics without coils uses the total scalar potential; 3D with coils, and 3D AC, use an ungauged vector potential on second-order edge elements, with each coil’s current density taken from a conduction solve and made exactly divergence-free.
How are force and torque computed?
Force per body is the Maxwell stress tensor integrated over a shell of air around the body, with a thin-film term for bodies in contact. Torque on a rotor uses Arkkio’s method over the meshed air-gap ring, which is far less mesh-sensitive than a surface integral. Virtual work is available as a cross-check; the two agree to 0.2 % on the plunger benchmark.
How are flux linkage and inductance defined?
Flux linkage is the integral of A over the coil section, times turns and depth (or 2π). The inductance matrix is reported two ways: apparent, from each circuit alone at its test current, and incremental, from ±1 % steps about the operating point. For permanent-magnet devices the incremental value is (λ − λ0)/i. AC studies give the coil impedance R + jωL directly.
What linear solvers are used, and on how many cores?
2D and small 3D systems (below about 20 000 unknowns) use a sparse direct solver. Larger 3D systems use conjugate gradients with domain-decomposition (BDDC) or algebraic multigrid preconditioning, threaded across up to 12 physical cores. Sweeps run several solves in parallel, each in its own process, so a failed variant is reported rather than stopping the sweep.
For scale: TEAM 7 at 675 000 second-order edge unknowns solves in about 22 s per frequency on a desktop PC.
How is motion handled?
Rotation uses a moving band in the air gap, at a set speed, from an angle table, or load-driven: a semi-implicit Euler step on the rotor’s inertia, friction and load with Arkkio torque evaluated each step. Up to two rotors can turn, which is how magnetic gears are modeled. Translation is a static position sweep (re-meshed at each position), a quasi-static plunger model on λ(x, i) and F(x, i) tables, or a full 2D transient with eddy currents, re-meshed every step. Skew is modeled by slices.
How does time stepping work?
A theta scheme with implicit Euler or Crank–Nicolson (the default for new projects), or adaptive BDF2 with error control. Every transient starts from a converged static solve, so there is no artificial start-up transient. Nonlinear steps use Newton–Raphson with the exact Jacobian.
How is temperature handled?
Each material carries temperature coefficients or tables: Br and HcJ for magnets (library values −0.12 / −0.6 %/°C for NdFeB, −0.2 / +0.3 for ferrite, −0.035 / −0.25 for SmCo), resistivity for conductors, and saturation polarization for steels, with per-temperature demagnetization curves. A 2D heating study feeds its temperatures back into all of them.
Are results reproducible?
Yes. Meshing is deterministic, and a test checks that two runs of the same model produce byte-identical meshes. Every solve is written as plain files you can archive and re-run, and a project file is a zip of JSON you can read without TerreLenz.
Why a rainbow colormap, and can I change it?
By default, magnitudes use turbo, a rainbow map whose lightness is smoothed so it doesn’t show the false bands of the classic “jet”, and signed values use cool-warm. Rainbow maps separate more levels by eye, but their lightness doesn’t rise evenly, so they can overstate some features and they don’t survive a grayscale print.
When that matters, switch to a perceptual map in the Lenz · Results panel under Colors: Viridis or Inferno, whose lightness rises evenly, or Cividis, which is also safe for the most common color blindness. Grayscale is there too. Your choice is remembered and used for the report’s field plots, and the report’s method notes name the map.
Can I run these cases myself?
Ask us for any benchmark on this page as a project file and we’ll send it with the tester build. Or bring your own reference case: the fastest way to judge a solver is on a problem whose answer you already know.
Check it on a problem you already know the answer to.
Request the tester build and any benchmark on this page as a ready-to-run project, or send us your own reference case, a measurement or a known design, and our applications engineers will model it with you.
Every license includes full support, in every region.