Low-frequency electromagnetic simulation

Electromagnetic design for motors, actuators and magnets.

  • Validated
  • Scriptable
  • Open files

A multi-platform application for 2D and 3D magnetostatic, AC and transient simulation, with circuits, motion and losses, providing CAD import to a finished report. TerreLenz has been actively developed and trusted in industry and academic research for over a decade.

  • Windows and macOS
  • Full support from magnetic applications engineers
  • Built-in Python
  • Engineering services, vetted sourcing and lab measurements, with no parts sold and no commission

Move the pointer. A steel disc follows it and bends the field.

Magnet on a steel plate (3D) — TerreLenz
TerreLenz showing the flux density of a block magnet on a steel plate on a cut plane, with forces and torques per body in the Quantities panel.
0.00% gap field difference from FEMM 4.2 on a saturating C-core
+0.04% AC resistance of a round wire against the Bessel-function solution
+0.22% center field of a saturating steel sphere against the exact solution
0.02% torque on the TEAM 30a induction motor against the published table
10+ years of development and use in industry and academic research

Who we are

Built by working magnetic engineers.

We design magnetic circuits for consumer electronics, aerospace and the industries in between. The commercial suites got in our way with rigid licenses, locked feature tiers and proprietary file formats, so we wrote our own tools. They have been used in industry, academic research, and on our own designs for over ten years. TerreLenz is those tools, packaged for other teams.

  • Consumer electronicsTight packaging, fast programs, high volumes
  • AerospaceDemanding reliability and documented results
  • Design work firstFeatures come from problems we had to solve

Why TerreLenz

Software shouldn’t make design harder.

We are practicing magnetic engineers, and we listen when a workflow doesn’t work for you. A tool should be accessible: no arbitrary rules, no basic features held back for an expensive tier, no interfaces hidden behind obscure scripting, and no steep learning curve before your first solve.

Sound familiar? Open a card for what TerreLenz does about it.

  • Licensing

    Overpriced for the value provided, and it still won’t run remotely.

    Feature tiers, region locks, rules against virtual machines, automation and AI agents, and a steep price increase every year.

    TerreLenzOne base license covers 2D and 3D magnetics, sweeps, optimization and scripting, with add-ons priced on their own. It works in any country while you’re travelling, doesn’t tie you to the computer it runs on, and tries not to get in your way. Engineers need tools that don’t restrict remote work or travel for their simulation hardware that may be left in the office or in a co-work environment.

  • Learning curve

    A training course and a thick manual before the first solve.

    Dense, dated interfaces that need a course, a consultant and weeks of practice before the software earns its keep.

    TerreLenzA modern, intuitive interface laid out the way the work goes: draw or import, assign materials and coils, pick a study, solve. No training is needed for a first solve, and the portal's lessons and user guide are there when you go deeper. If your team would rather be shown, group training and project assistance are available.

  • Files

    A project format that nothing else can open, and every import a fight.

    Closed formats keep you on one package, and every import is a fight with proprietary file types.

    TerreLenzA .tlz project is a zip with a JSON model inside. STEP, IGES, STL and DXF come in; STEP, DXF, CSV and reports go out.

  • Solving

    The window is frozen, Stop does nothing, and the last three hours are gone.

    A solve that can’t be cancelled, no autosave, and a crash or a forced operating system update that throws away the finished result.

    TerreLenzSolves run in a separate process, so the window stays responsive and Stop always works. A recovery copy is written every few minutes and before each solve, and each finished solve is saved as a project of its own.

  • CAD

    The imported geometry won’t mesh, and there is nothing to fix it with.

    Little or no modeling of their own, awkward tools where there are any, and no word on which face is the problem.

    TerreLenzA constrained sketcher, booleans, fillets, sweeps and lofts, with a build history that follows design parameters. Overlaps, thin gaps and tiny faces are reported before meshing, small details are removed below a size, and a re-imported part keeps its materials, coils and mesh settings.

  • Coils

    Winding paths drawn by hand, current direction found by guessing.

    Coil setup that is hard to follow, and a sign error that shows up only after the solve.

    TerreLenzAny body can be a coil, with turns, current, fill factor and strand size. Racetrack, solenoid, saddle, diamond and swept coils are made from their dimensions, with the winding axis found for you.

  • Motion and physics

    Another module, another set of rules, another week of learning.

    Motion, AC and transient physics each live in their own module, and moving a model between them means rebuilding it.

    TerreLenzRotors, strokes, plungers and free movers are set on the bodies of the same model, and a study changes from static to AC to transient without rebuilding it. Machine templates start a motor from its dimensions.

  • Circuits

    A few sources and resistors, and the real circuit work done somewhere else.

    Drive circuits too thin to trust, so the drive is analyzed in another program and copied over by hand.

    TerreLenzA schematic editor and a full SPICE-class simulator: transient, AC, DC sweeps, noise, poles and zeros, vendor MOSFET and IGBT models, Monte Carlo and worst case. The same schematic drives the field solve. (The simulator runs on Windows today; the editor on macOS too.)

  • Magnet know-how

    Load lines and demagnetization margins, hidden behind a script.

    Important outputs tucked away in scripts or extension tools, and no sense of how magnets are designed in practice.

    TerreLenzLoad lines, permeance coefficients and demagnetization margins are standard results, set by engineers who design small magnets and magnetic circuits for production.

  • Results

    Reports you would rather not show a customer.

    Bare reporting and dated images, so every review deck is rebuilt by hand.

    TerreLenzReports in PowerPoint, Word, PDF or HTML written for the reader, with field views and animations ready to show.

  • Automation

    Scripting that takes longer than clicking through it.

    Outdated or obscure scripting languages, thin documentation, and features that can’t be reached from a script at all.

    TerreLenzThe whole interface is in the built-in Python, documented beside each feature and written so that an AI agent can use it.

  • Support and updates

    Slow support, catch-up fees, and years between updates.

    Expensive maintenance that buys a ticket queue, one operating system, and releases with little in them for modern workflows.

    TerreLenzSupport comes from the engineers who build TerreLenz: with maintenance on a perpetual license, and as part of the fee on a site license. Maintenance can be added at any time, with no catch-up fee. Regular releases on Windows and macOS, with features that come from problems we and our customers had to solve.

Capabilities

Static, AC and transient studies.

The same model can be solved as a magnetostatic, time-harmonic or transient study. The study type is chosen in the Study menu; geometry, materials and coils are unchanged. Transient studies and motion come with the Transient and Motion add-on, and the Machines add-on provides them too.

3D fields

Magnetostatics with permanent magnets, coils, linear and saturating iron and uniform applied fields. AC eddy currents from current-fed coils. Adaptive meshing, symmetry planes and open boundaries.

2D planar & axisymmetric

Magnetostatic, AC and transient studies. Draw with a constrained sketcher, import DXF, or cut a 2D model from a section of the 3D one.

Circuits

DC, sine, pulse and table sources driving stranded or solid coils, three-phase sets and netlists. A schematic editor draws any circuit, simulates it on its own and couples it to the field solve.

Motion

Rotors turning in the air gap, at a set speed or driven by load, inertia and friction. Stroke sweeps and plunger dynamics, magnetic gears with a second rotor, and periodic linear arrays.

Losses & heat

Copper, eddy-current and iron losses, with loss coefficients fitted to the supplier’s W/kg data and laminations by stacking factor. 2D heating feeds the temperatures back into resistance and magnets.

Magnets & hysteresis

Parallel, radial and Halbach magnetization; temperature-dependent grades; load-line tools that map each magnet’s permeance coefficient and operating point, and demagnetization margin maps. Magnetizing fixtures, yokes and heads: the capacitor-discharge pulse through a saturating yoke, the magnetized fraction in every element, and the coil’s heat per shot and repetition rate against its cooling. Jiles–Atherton hysteresis in steels.

Workflow

From geometry to results.

  1. 1

    Bring the geometry

    Import STEP with part names kept, or sketch and extrude. After a design change, Re-import STEP, keeping settings updates the shapes and keeps every material, magnet and coil.

  2. 2

    Set up the physics

    Pick materials and magnetization directions, turn bodies into coils, and choose the study, circuits and motion. The Study tab of the side panel sums up the study and has the Solve button.

  3. 3

    Solve and check

    F5 solves. Shift+F5 Check accuracy solves again with a finer mesh, higher-order elements, smaller time steps and more air, and shows how far each result moved.

  4. 4

    See it in Lenz

    Lenz, the results view, shows fields on any cut plane, flux lines, probes that update without re-solving and animated waveforms. Ctrl+P turns what you see into a report.

    Named for Lenz’s law, and a lens on your fields.

Electric machines

Machine templates.

The Machines menu builds a complete machine model from its slot and pole counts, diameters, magnets and turns, including the winding, the smallest periodic sector and the rotation setup. The Machines add-on provides Transient and Motion, so a rotating study needs nothing more.

  • Permanent-magnet machines with surface, inset or buried magnets (flat, V or spoke), and rotor skew.
  • Squirrel-cage induction machines, with torque, currents and losses from standstill to near synchronous speed.
  • Standard analyses: cogging torque, back-EMF, torque against load angle, Ke, Kt and the d-q model with saturation.
  • Torque–speed curve and efficiency map for a DC bus voltage and current limit, and generator operation into a load. Operating points, or a whole drive cycle, are marked on the map.
  • Quick design: an analytic estimate that takes about 0.1 ms and needs no mesh. On the default 12-slot, 10-pole machine it is within 0.7 % of the finite-element magnet flux linkage and within 1.5 % on torque.
Efficiency map, default PM machine — TerreLenz
Efficiency map of the default permanent-magnet machine over torque (0 to 5.1 N·m) and speed (0 to about 6000 rpm), peaking at 96.4 % near 5000 rpm and full torque.

Validation

Tested on industry benchmarks.

TerreLenz is checked against the TEAM benchmark problems, closed-form solutions and FEMM 4.2 on identical models. The cases below are drawn from over 60 automated tests that run on each build; a result outside its tolerance fails the build. Each test runs at a fixed mesh with second-order elements so the suite finishes in seconds, and the figures are what that mesh gives. Adaptive refinement takes the same models well below them.

Read the full validation report All cases, how the error is measured, the numerics, and the current limits.
CaseChecked againstQuantityError
Block magnet 20×20×10 mm, Br 1.3 TClosed formBz, 2 mm from the pole face+0.09 %
Block magnet 20×20×10 mmClosed formBz, 10 mm from the pole face, fixed test mesh+1.00 %
Steel sphere in a uniform field, at the knee (400 kA/m)Exact solutionB at the center+0.22 %
Steel sphere, deep saturation (1.5 MA/m)Exact solutionB at the center+0.65 %
Two-wire line, planarAnalyticInductance per length−0.08 %
Two coaxial rings, axisymmetricAnalyticMutual inductance−0.08 %
Two coaxial rings, axisymmetricAnalyticAxial force+0.06 %
Thick solenoid, axisymmetricAnalyticCenter field+0.43 %
C-core and armature, 500 A-turnsFEMM 4.2Gap B, force, flux linkage0.00 %
C-core and armature, 3000 A-turns (saturated)FEMM 4.2Armature force−0.04 %
Round copper wire, ACBessel-function solutionResistance (skin effect)+0.04 %
Plate over a coil: transient steady stateAC solutionCurrent, loss, force≤0.06 %
Ring around a wireAnalyticIron losses (Bertotti)0.007 %
Stranded coil, voltage stepe−t/τRL current risepasses
TEAM 7 asymmetric conductor, 50 and 200 HzPublished measurementsBz and Jy along the benchmark linespasses
TEAM 30a induction motor, 0–1200 rad/sPublished reference tableTorquewithin 0.02 %
TEAM 30a induction motorIndependent FE modelRotor losses, between two FE models≤4 %
4-pole rotor, slotted statorFEMM 4.2Cogging torque, of the ripple amplitudewithin 6 %
Rotating magnetω·dλ/dθ from a rotor sweepBack-EMFpasses

Cogging torque is a small ripple on a large torque, so its error is given as a share of the ripple amplitude. Block magnet: the error grows to +1.93 % at 20 mm, where the finite air region starts to count; the tests allow 1 % up to 5 mm; an adaptive mesh of 211 000 elements, 49 s, holds the error at 3 mm to 0.14 %. The two-wire line goes from −6.2 % to −0.03 % in four adaptive passes and 3 s. TEAM 30a torque is checked at 0, 200, 400 and 1200 rad/s.

Engineering notes

The numerics.

The methods behind the results, each with a test case.

Second-order elements by default

First-order elements reach 30 % error next to a magnet, so all studies default to second order, with nodal elements in 2D and hierarchical edge elements in 3D.

Block magnet, 2 mm off the pole: +0.09 %

Open boundaries

A shell transformation maps the exterior of the air region to infinity, so the model can stop close to the part. The tests check that each open-boundary result lies between the field-normal and flux-tangential wall results.

Magnet in a 30 mm ball of air: within 0.3 %; plain wall: 6–13 % off

Forces and torques

Maxwell stress over a shell of air around each body, with a thin-film term for parts that touch. Rotor torque by Arkkio’s method over the meshed gap. Virtual work is kept as an independent check.

Plunger: stress −20.09 N, virtual work −20.14 N, 0.2 % apart

Saturation by Newton–Raphson

The exact Jacobian in 2D and 3D. Given a straight-line B-H curve, the Newton solver reproduces the linear solver to six digits, and curves extend at μ0 past their last point, so a solve cannot run past the end of the table.

Steel sphere at 3.2 T: +0.65 % against the exact solution

Load-driven motion

A moving band in the air gap, driven by speed, an angle table, or the rotor’s own inertia, friction and load. Two rotors for magnetic gears. Translation with eddy currents re-meshes every step.

Magnetic pendulum period: −0.05 % from 2π√(J/k)

Temperature-dependent materials

129 magnet and soft-material grades with Br and HcJ against temperature, per-temperature demagnetization curves, and irreversible demagnetization with recoil tracked in every element.

Demagnetization law followed to 0.2 mT at every step

Automation

Python scripting and AI agents.

The whole interface is also available from the built-in Python, with nothing to install. The documentation is written so that an AI agent can build a model, set up parameters, run a sweep and extract the results from a description of the problem.

  • Documentation for automation: each feature's Python call is documented beside it, and the customer portal has the full Python reference and an automation guide written for agents.
  • A built-in reference (Script › Python reference) lists all classes, functions and arguments inside the app.
  • Headless batch mode with exit codes, for pipelines, servers and CI.
  • Named parameters drive geometry, materials, circuits and boundaries.
  • Sweeps run several solves at once; a failed variant is reported and the sweep continues.
PromptModel a 10 × 10 × 5 mm N42 magnet in air, sweep its width from 6 to 12 mm, and give me the stored energy for each.
sweep_magnet.py
# the open project
p = terrelenz.project()
p.set_parameter("w", 10, "magnet width")   # mm

m = p.add_box("Magnet", (0, 0, 0), (10, 10, 5))
m.set_step(0, "dx", "w")        # x size follows w
m.material = "NdFeB N42"
m.magnetization = (0, 0, 1)
p.air_region()

r = p.solve()                       # shown in the window too
print(r.energy, r.force("Magnet"))

for row in p.sweep({"w": "6:2:12"}):   # one solve per value
    print(row["values"]["w"], row["results"].energy)

Reports

Customer-ready reports.

A solved model becomes a report with the headline numbers, field plots, waveforms, the model and its materials, ready for a customer or a design review.

  • PowerPoint, Word, PDF or HTML output.
  • Written for the reader: results are laid out in a form a client can follow.
  • Saved views choose the figures, and a script can regenerate the report.
The first page of a TerreLenz report for a solenoid actuator: coil flux linkage 14.65 mWb, stored energy 14.65 mJ, force on the coil 687.1 mN and inductance 7.325 mH.
A generated report, unedited: the solenoid actuator example.

Files and recovery

Recovery and open files.

TerreLenz recovers your work after a crash, a forced restart for updates or a mesh setting that asks too much, and saves it in files other tools can read.

Recovery after a crash or restart

A recovery copy of your project, solution included, is written every few minutes and before each solve. After a crash or a forced restart, the next start offers it back.

A copy after each solve

Each finished solve is saved as a project of its own in an autosave folder, separate from your file. A long solve is not lost if the session is not saved.

Solves run in a separate process

Meshing and solving run outside the window, so it stays responsive and Stop always works. A run that would exhaust memory is stopped with a reason, and the model is unchanged.

Open project files

A .tlz project is a zip archive with a JSON-based model and its results inside. Save a copy without solutions to share just the model.

Standard exports

CSV for data, PNG for field views, MP4 and GIF for animations, and reports in PowerPoint, Word, PDF and HTML.

Python export

Scripts can read any result and pass it to another tool.

Licensing

Licenses that travel with you.

The licensing of the big suites got in our way, so we set up TerreLenz licensing around how we work. We built these tools to make our own jobs easier, and we are not grabbing for every penny.

Valid in any region

A license works in any country. There is no charge for region unlocking.

Support from the engineers

Support comes from the applications engineers who build TerreLenz and design with it. On a perpetual license it is part of maintenance; on a site license it is part of the fee. Either way, a fraction of the cost of comparable suites. Write to [email protected] or call 1-877-798-5936.

No locked tiers

The base license covers 2D and 3D magnetics, sweeps, optimization and scripting. Transient and motion, machine design, and electric and thermal analysis are separate, reasonably priced add-ons, not bundled into higher tiers. The Machines add-on provides Transient and Motion.

Flexible licensing

A personal license covers two computers, and a virtual machine counts as one, switched in the portal. Remote desktop and remote viewing are allowed. Team licenses float between people, and a license left on another computer can be reclaimed remotely. Maintenance on a perpetual license can be added at any time, with no catch-up fee. Requests and license files: [email protected].

Compare licenses and add-ons Customer sign-in Maintenance includes the customer portal, with each release, the lessons, the user guide, the scripting guide and Python reference, and sample projects.

Simulation and engineering services

Work with our engineers.

Our applications engineers build TerreLenz and use it on their own designs. Bring a design problem and we model it with you. You keep the answer, the method and a model your team can rerun.

Industrial design experience. Our engineers have spent their careers designing magnetics for production, from consumer electronics to aerospace. They know where a model and a measured part disagree, which tolerances and material lots change the answer, and what a supplier can build. That experience is behind each support answer and each project.

Design support or contract design. We can work alongside your engineers on sizing, magnet and steel selection, winding and drive, and loss and thermal budgets. We can also take a magnetic circuit, actuator or motor from specification to a documented design that your team owns.

By the project or by the hour. A scoped study has a fixed price and ends with a report. Hourly work covers model reviews, working sessions with your team and scripts for your sweeps.

  • Motors and actuators sized from your specification, from quick design to efficiency map.
  • Magnetic circuits designed or reviewed: magnets, poles, gaps, yokes and return paths, with their operating points over temperature.
  • Contract design: specification in, documented design and model out.
  • Magnet choices checked for operating point and demagnetization margin over temperature.
  • Magnetizing fixtures and heads designed for your magnets: the yoke, the pulse, the magnetized fraction, and the cooling the shot rate needs.
  • Losses and heating in steel, magnets, windings and eddy-current parts.
  • Parts and measurements: sourcing through suppliers we trust, and lab measurements of your parts against the model. Details below.
  • Model review: mesh, boundaries, materials and the key results of a model your team built.
  • Automation: scripts for your sweeps, optimizations and reports.
  1. 1

    Scope it

    Tell us the device, the targets and the deadline. We agree the questions to answer and what you get back.

  2. 2

    Model it together

    We build or review the model with your engineers in working sessions: geometry, materials, magnets, coils and drives.

  3. 3

    Check the answer

    Each result we hand over has been through Check accuracy, and the report states how far it moved.

  4. 4

    Keep the work

    You get the .tlz project, its scripts and the report, so your team can rerun it, change it and build on it.

Parts and measurements

The engineers between the design and the part.

We do not make or sell magnets, motors or steel, and we take no commission from anyone. We add the engineering between a finished design and a part that performs like the model, for one fee quoted up front, and the drawings, tests and model are yours to take to any supplier, including one you already have.

  1. 1

    Specify

    Drawings for the magnets, steel, fixture or prototype motor, with tolerances set from the model rather than copied from a catalog. Quality tests written for the part, and the fixturing to run them, so you and the supplier measure the same thing the same way.

    Sourcing fee

  2. 2

    Source

    An introduction to a supplier we have vetted on capability, test equipment, track record and our own experience of their parts, plus a second supplier and an alternate material qualified against the same model. The supplier's price reaches you as is.

    Sourcing fee

  3. 3

    Build

    We answer the supplier's questions about the circuit and work with them until their inspection matches the drawing. Their measured material data goes into your project, and we design the incoming inspection for your own dock, with equipment suppliers recommended at no charge.

    Sourcing fee · tolerance and lot study on request

  4. 4

    Measure

    Ship us any magnet, assembly or system. In a trusted magnet lab we measure flux, field, force and torque, compare them with the model and with the supplier's inspection, explain any difference, and hand back the model that matches. Prototype magnets are magnetized to the drawing and verified for the same fee.

    Measurement fee, per job

Ask about sourcing or a measurement Quoted by email. Tell us the part, the quantity and what you need to know about it.

Your engineers review and sign off each drawing, test and recommendation before it goes to a supplier. The design, and the decision to build it, stay yours.

Magnet and motor suppliers: a clear drawing and a test both sides agree on means fewer questions and fewer rejected lots. The specifications we send you are made in TerreLenz, and the same tools can run your own quotes, magnetizing fixtures and customer questions. See licensing.

TerreLenz — Electromagnetic and motor simulation

See it on your problem.

Schedule a demo with an applications engineer, or talk to sales about licenses and add-ons. Bring a design of your own and we’ll show you how TerreLenz handles it, or model it with you.

Support comes with maintenance or a site license, and every license works in any region.