Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new
Documentation

21. The field solver (Preview): inductance, loss, heat and force from the field

A circuit model of an inductor or transformer needs numbers: L, the coupling, where the core saturates, how much it loses and how hot it runs. The field solver finds them from the magnetic field of the part itself. It meshes a section of the core and windings into triangles (or the whole part into tetrahedra in 3D), solves Maxwell's equations on that mesh and reads the inductance, loss density, temperature and force from the solution. You can write the results into the part on the schematic, so the circuit simulation then runs on the solved values.

This chapter covers turning the solver on, the ready-made examples, solving a part you designed, reading the field window, core loss, 3D, drawing a section of your own, the other analyses, exports, the limits and the accuracy report. Every command it names has a page in the command reference, under Field solver commands.

Turn on Preview features

The field solver is a Preview feature: it has not passed its release gate (the accuracy, hardware and performance rows described at the end of this chapter), so check its results before you rely on them. While Preview features are off, its items stay in Design > Field Solver but are greyed out, and hovering one says how to turn them on.

Design > Field Solver with Preview features off: the solver's items are greyed out

Turn them on in Edit > Preferences > Simulation (Preview features (field solver)). From the CLI, Python or an agent, run preview.set {"enabled":true}; preview.get reads the setting. Development builds start with it on and release builds with it off. While it is on, every field-solver reply carries preview: true and a note in English and Traditional Chinese, so a report or export built from it says that it came from a Preview feature.

The Field Solver submenu with Preview features on

The submenu holds:

  • Design > Field Solver > Field Solve (magnetics.fieldSolve): solve the selected part's field and read L.
  • Design > Field Solver > Core Loss from Last Run (magnetics.fieldCoreLoss): drive that model with the part's current from the last simulation and find the core loss.
  • Two exchange items (magnetics.femmExport, magnetics.femmImport) that write the same model for an independent open-source 2D solver and read its results back, so you can cross-check this one.
  • Design > Field Solver > Open Field Example (field.openExample): open one of the four checked examples.
  • Design > Field Solver > New Field Drawing (geometry.new): start a drawing of your own section.

The other commands (line profile, region table, force, flux map, transient, winding capacitance, thermal and the exports) have no menu item yet. Run them from Quick Open (Cmd+K), the CLI, Python or an agent.

Start with an example

Choose Design > Field Solver > Open Field Example and pick one. Each opens solved in the field window, with a card on top that checks the result against its row of the accuracy report.

The gapped E 25/13/7 example in the field window, its check card on top

Example (name) What it is Check (accuracy-report row) Result
e25BuckInductor Gapped E 25/13/7 N87 inductor, 34 turns, 1 mm gap L against the Richardson-extrapolated 91.83 µH (mesher_independence, ≤ 0.5 %) 91.45 µH, 0.42 %
e25FlybackTransformer The same core wound as a 1:1 coupled inductor, 25 turns each M12 against M21 (reciprocity, ≤ 0.5 %) L1 48.97 µH, L2 50.37 µH, M 49.21 µH, k 0.991
ringCoreChoke 30/20/5 mm ring core, 20 turns, μr 2208, as an axisymmetric (r, z) section L against the closed form 358.1 µH (analytic_toroid_axisym, ≤ 1 %) 358.1 µH
potCore P26/16 pot core, 1 mm centre-post gap, 34 turns, μr 2208, axisymmetric L from flux linkage against L from stored energy (energy_vs_flux_linkage, ≤ 1e-6) 173.7 µH, the two agree to 1e-13
twoWireLine Two round wires, 1 mm radius, 20 mm apart, go and return, no core, inside an open boundary (60 mm, 4 shells) L per metre against the closed form (μ0/π) arccosh(D/2a) + 2 μ0/(8π) (open_boundary_two_wire, ≤ 0.5 %) 1.2924 µH/m against 1.2973 µH/m, 0.37 %

The ring core has no field view: its toroidal winding's B runs along φ, round the axis, which a 2D (r, z) section cannot draw. The card and the values still show.

From the CLI:

powercraft-cli run --cmd preview.set --params '{"enabled":true}' \
  --cmd field.openExample --params '{"name":"e25BuckInductor","field":false}'

Solve a part you designed

Select an inductor, coupled inductor or transformer on the schematic and choose Design > Field Solver > Field Solve. The solver works on the part's design from Design > Automate > Design Magnetics (magnetics.design, chapter 16). A part with no design yet is designed first, and the solve follows when the design arrives. With nothing selected it uses the part of the last Design Magnetics run.

What it builds: the front section of an E pair or planar E set with the gap ground into the centre leg, or the top view of a ring core, with each winding in the window. The mesh is automatic, with three elements across every gap and graded out from there; elementMm sets the largest element in the core and windings instead. The 2D solve is magnetostatic with linear materials (the core at its catalogue initial permeability at the design temperature, or muR), with 1 A in each winding in turn. It returns:

  • L of each winding from the field energy, M and k, and, when the turns ratio allows, the magnetising inductance and the leakages (a split that falls below zero is left out with a note);
  • model: the mesh size, the smallest element angle, the solver's iterations and residual, the reciprocity |M12 − M21|/|M|, and provenance, a hash of each solve's input, so a stored result can be checked against a fresh solve (the same call gives the same hash).

apply: true writes the result into the part in one undoable history step: l for an inductor; l1, l2 and k for a coupled inductor; lm, llk1 and llk2 for a transformer.

The solve runs as a job: its progress counts the windings solved, and cancelling stops it within one iteration. Before it starts, the solver estimates the memory it needs. Past 60 % of the memory available it refuses, says what to change (a larger elementMm, for example), and offers Run Anyway, as simulation.run does (ignoreMemoryCheck from the CLI).

Read the field window

The window (the example above is one) shows the values the solve reports, then the field view:

  • The quantity tabs: Flux density |B| (T) and Field strength |H| (A/m); a core-loss result adds Core loss density (W/m³), and a thermal result shows Temperature (°C) instead.
  • With two windings, Winding A at 1 A or Winding B at 1 A picks whose field is drawn. The materials are linear, so the field at any currents is the sum of the windings' 1 A fields times their currents. A core-loss result adds At the peak |B|: every winding at its current at the instant of the core's peak |B|.
  • Layers: Flux lines (contours of the vector potential A_z, or of ψ = r·A_φ in an axisymmetric section), Mesh and Outlines (region edges).
  • Whole model fits the air box as well as the core.
  • Click the map to place the probe, which reads the value under it. Scroll to zoom and drag to pan.
  • The colour scale runs from 0 to the core's 99th percentile of |B| by area, so a few crowded elements in a corner do not wash out the map; the legend's top reads ≥ when values lie above it.
  • Export Image saves the map as PNG or SVG at print resolution (field.exportImage, below).

Look for flux that leaves the core through the gap and the window: that fringing field is what heats the winding next to the gap, and what a gap spacer moves.

Core loss

Design > Field Solver > Core Loss from Last Run takes the part's winding currents from the last simulation (i(L1), or i(T1.1) and i(T1.2)), over the last switching period, and finds B(t) in every core element. When the core material has a data-sheet B-H curve (a data-sheet ferrite or alloy such as N87, or a powder grade from its DC-bias roll-off) each time point is a nonlinear Newton solve on that curve at the core temperature; otherwise the 1 A solves are scaled by the currents. The loss density of each element follows from the iGSE with the material's Steinmetz data, and the total is summed over the core's volume.

Core loss from the last run: the loss-density map and the core's B(t)

The window adds the loss map and the core's mean B(t) over the period. The reply also gives:

  • totalLossW; for N87 and 3C90, a DC-bias correction from measured premagnetization data, with totalLossIgseW the plain iGSE total beside it and a dcBiasNotCovered warning outside the measured range;
  • bP99, the |B| below which 99 % of the core's area lies, checked against the material's saturation flux density at the temperature (the peak element is reported beside it; a peak on a corner of the drawing, where the linear field is singular, gets a cornerPeak warning);
  • a warning when the winding current peaks above the limit Design Magnetics held the design to: the core was designed for a smaller current, and saturates at this one.

In an axisymmetric sketch each element stands for its whole ring (2π r̄ times its area), so the loss, the |B| 99th percentile and the mean B are weighted by volume, and model.form in the reply says planar or axisymmetric. Magnets are accepted (direction: [r, z]); only the field view is refused, because it is planar.

From the CLI, give the waveform yourself (waveform: {t, i}) or name signals of the last run (signals, with t0, t1 or fsw for the window).

With dimension: 3 the loss comes from the 3D model (see 3D below). Add endTurns: true for an E or planar E design with one or two round or litz windings on the centre leg: the core is then the wound one of Field Solve with endTurns, one eighth meshed. totalLossW and coreVolume are the whole core's, while the map rows are the eighth's and sum to an eighth of the loss; model.construction says wound. The end turns carry flux the straight extrusion leaves out, so the wound loss reads a few per cent above it (+4 % on the E 25/13/7 buck). endTurns is refused in 2D and with sketch, layers or magnets.

Steel loss: hysteresis, classical and excess

For a laminated steel, magnetics.lossSeparation splits the iron loss into Bertotti's three terms for sinusoidal flux: P = kh·f·B^Y + kc·F·(f·B)² + ke·(f·B)^1.5 (hysteresis, classical eddy current, excess). Read the loss points off the steel's data-sheet curves (points: [{frequencyHz, bPeakT, loss}], in W/kg with densityKgM3, or in W/m³). With the sheet's conductivitySm and thicknessMm the classical coefficient is the thin sheet's π²σd²/6, so one 50 or 60 Hz curve is enough; without them it is fitted too, and the points need two or more frequencies. muR adds the sheet's skin factor F(d/δ) to the classical term, and exponent fixes Y (otherwise it is fitted). The reply gives kh, Y, kc and ke (per m³, and per kg with the density), the error at every point, and each term's loss and share at your working points (at: [{frequencyHz, bPeakT}]). A coefficient the fit wants below zero is held at zero and named in heldAtZero. The program holds no steel data: every coefficient comes from your points and sheet.

powercraft-cli run --cmd magnetics.lossSeparation --params '{"densityKgM3":7650,"conductivitySm":2e6,
  "thicknessMm":0.35,"points":[{"frequencyHz":50,"bPeakT":0.5,"loss":0.4},{"frequencyHz":50,"bPeakT":1.0,"loss":1.2},
  {"frequencyHz":50,"bPeakT":1.5,"loss":2.6}],"at":[{"frequencyHz":400,"bPeakT":1.0}]}'

The numbers above only show the format. Read yours from your steel's data sheet.

Studies: 2D and 3D side by side

Each circuit keeps its field analyses as studies, saved in its file: one 2D or 3D model each, with its drawing or design, the settings it was last solved with, its view and its results. The fast 2D section stays your design loop while a 3D study of the same part checks the final design, and neither overwrites the other.

The row at the top of the field, 3D and drawing windows picks the study and holds four icons (each names itself on hover):

  • New 2D study starts an empty 2D study; the one you were in keeps its drawing and results.
  • Open in 3D (Open in 2D in a 3D study) starts a study of the same part in the other dimension with the same design (core, gap and winding) and settings, so nothing is drawn twice. Solve it as before and compare L.
  • Rename study and Delete study (not undoable; a circuit keeps at least one).

Each study remembers its own zoom, camera, section and the 3D views saved for the report. A file saved before studies opens with one study, Field 2D, holding what you had. With View › Studio Layout (Preview), the Field 2D and Field 3D documents list the studies of each kind with their part and saved L; click one to open it.

From the command line, field.studies lists them and field.newStudy {"dimension":3,"from":0} opens the 3D study from the first one:

powercraft-cli run --in choke.pcraft --cmd field.newStudy --params '{"dimension":3,"from":0}' --cmd field.studies

A save keeps each study's drawing, settings, view and the values of its last solve, not the field itself: open the file and solve again to draw it.

3D

dimension: 3 builds the model in 3D and solves it with the 3D solver. An E-core design or a sketch is its section extruded straight through the depth (layers element layers, 8 by default), so its L checks the 2D solve; a ring core is its section revolved about the axis. endTurns: true winds round or litz windings on the centre leg as a bobbin with its end turns and solves one eighth of the part. A design whose core material has a catalogue B-H curve is solved on that curve at each of currents (L(I), secant and incremental); linear: true keeps it linear. adaptive: true refines the mesh where the error estimate is largest and solves again until L settles, on the curve too: there every point of L(I) must settle, and each pass lists its secant at the largest current. import reads closed bodies from an STL file or the solids of a STEP file, with your μr for each and your windings. A helix winding is a stack of rings by default; pitched: true makes it a true helix with its axial current and a straight return lead back down through its turns at startAngleDeg (its corner radius at least its thickness). field.exportModelStl (Preview) takes the same model keys and returns the meshed 3D model as ASCII STL, one solid per region named after it, with the symmetric part the solve meshes reflected into the whole (whole: false writes the part). Save its stl text as a .stl file to check the mesh in a CAD or mesh viewer. field.exportModelStep (Preview) takes the same keys and writes the meshed solid regions as a STEP file (ISO 10303-21, AP214, in metres), one faceted solid per closed piece of each region (a region in several pieces gives primary 2 and so on). A piece that encloses other regions, such as the air box around a wound core, is written as a solid with voids (BREP_WITH_VOIDS), so every region comes out and its volume is the material between its outer shell and its voids. The 3D import reads such a solid back. Save its step text as a .step file to open the core, windings and magnets in a mechanical CAD tool.

The E 25/13/7 solved in 3D, |B| on a section plane across the core

With field: true the 3D window shows each body, a section plane, smooth shading and flux tubes (each tube carries the same share of the flux through the section). The reply gives L two ways (from the field energy and from the flux linkage) and the largest difference between them, and the peak and 99th-percentile |B| of the core.

The window opens with the whole model filling about 70 % of the view, seen from the front-right and above (yaw −45°, pitch 30°). Drag to orbit, right-drag to pan and scroll to zoom; the triad in the bottom-right corner shows where the model's x, y and z point. The bodies are lit by a key and a fill light with a soft highlight, and their outlines and the section's edge are drawn as thin dark lines, so the core keeps its shape against the colours. The controls above the view:

  • Section plane: none, or across x, y or z, with a slider for its position. The cut face is filled with the field's colours, unlit, so they match the legend.
  • Smooth shading: each body's values averaged at its corners and blended across each face; off, every element shows its own value.
  • Colour map: Viridis (the default), Inferno or Turbo. Viridis and Inferno grow lighter from bottom to top, so they still read in grey; Turbo tells more levels apart. The report's pictures stay on Viridis.
  • Flux tubes (not in a thermal result). While they are on, the magnetic parts turn see-through so the tubes inside the core show at full strength.
  • Colour range, when the result has more than one body: Automatic, or one body, whose own values then set the scale (a core a few kelvin apart shows its gradient beside a much hotter winding). The other bodies take the end colours and turn see-through, so they do not hide it.
  • Bodies: an opacity slider for each body. An opacity you set yourself is kept when the tubes or the colour range change, and so is a hidden body.

|B| and the temperature use a linear scale. A core loss's loss density spans decades, so it uses a logarithmic scale from the 1st to the 99th percentile by volume; the legend's bottom reads ≤, since lower values take the bottom colour.

On the desktop the view is drawn by the graphics card, with a depth buffer and 4× anti-aliasing, so faces that cross meet in the right place and the edges are smooth. In the browser, without a usable graphics card, and in pictures made without a window (the report, snapshots) the same view is drawn by the processor instead; the colours, picks, legend and saved cameras are the same either way.

A 3D solve takes a while, so field.tables3d solves the 3D model once and returns tables to reuse: the L/M matrix, the flux-linkage table on the B-H curve over currents (the same psiCurve or coupledCurve the flux map writes, which both circuit solvers follow), and with loss a grid of core loss against peak current and frequency. field.tableLookup then reads L, M and the loss from that reply at any current and frequency inside the grid, without solving again.

Thermal in 3D

field.thermalSolve with dimension: 3 solves the steady temperature on the same tetrahedra as the 3D field solve. The regions, the convection and the copper coupling are given as in 2D, and lossW is the whole heat of a region. Every outer face of the solids convects; ends: "insulated" stops the two end faces of an extruded model from convecting, so no heat flows along the depth and the result is the planar solve's, which makes it a check against 2D. layers sets the element layers through the depth, and ignoreMemoryCheck runs past the memory guard.

This example is a rod 10 mm across and 1 m deep with 100 kW/m³ in it, k = 4 W/(m·K) and h = 10 W/(m²·K):

{
  "sketch": {
    "depthMm": 1000,
    "points": [[5, 0], [-5, 0], [-20, -20], [20, -20], [20, 20], [-20, 20]],
    "edges": [[0, 1, 3.141592653589793], [1, 0, 3.141592653589793], [2, 3], [3, 4], [4, 5], [5, 2]],
    "labels": [{"name": "rod", "at": [0, 0], "muR": 1}, {"name": "air", "at": [15, 15]}]
  },
  "elementMm": 0.5,
  "regions": [{"name": "rod", "k": 4, "heatWm3": 100000}],
  "convection": {"hWm2K": 10, "ambientC": 25},
  "dimension": 3,
  "layers": 2,
  "ends": "insulated"
}

The surface settles at 49.97 °C and the hot spot on the axis at 50.13 °C; the closed form for a long cylinder gives 50.0 °C and 50.16 °C. With ends: "convecting" the end faces cool the rod as well, and it runs a little cooler.

The heat can come from the same sources as in 2D:

  • core heats the core with the 3D core loss on the same tetrahedra, recomputed at the core's mean temperature until it settles. permeability: "followsTemperature" solves every winding again at the core's permeability at that temperature, and drive: "curve" puts the core on its catalogue B-H curve.
  • ac heats the conductors with the planar section's AC loss, the same along the depth. It has no end turns. With core as well, both losses are iterated in one loop.
  • line reads the temperature along a line given as [x, y, z] in mm (or [x, y] on the middle plane), and lumped reduces the result to a thermal network with one 3D solve per region.
  • plane: {axis, atMm, points?} reads the temperature on an axis-aligned cut (axis "x", "y" or "z", z = 0 at mid-depth) on a grid over the solids, up to 1001 points a side: the reply gives the grid, the range, the mean of the points inside the solids and the cut's hot spot with its region. Points in the air are null.

A ring-core design is its section revolved a full turn. The core is the only solid, since the windings are current sheets on it, unless you name a region A or B: that winding is then drawn as a solid copper frame around the core, as thick as its turns fill the hole and carried over the faces and the outside. The frame holds more copper than the turns do, so give its effective k yourself. layers, ends and ac do not apply to a ring.

On a ring, eddy: {"frequencyHz": …, "currentsA": [...]} heats the regions given sigmaSm with their 3D eddy-current loss, ½∫σ|E|², from a time-harmonic solve of the revolved ring in which each winding is a toroidal current sheet at its peak current, all in phase. A whole turn has no end faces, so the induced current closes inside the ring, end effects and all. A copper region's conductivity follows its mean temperature (IEC 60028), sigmaSm being its value at lossAtC, and is iterated with the thermal solve; any other conductor keeps the value given. eddy is refused on an extruded model, whose conductors run to its end faces (the planar ac is the loss there), together with ac, core or lumped, and on a winding's copper frame, which would be one shorted turn. The winding's own loss is not in this solve.

Force in 3D

field.force with dimension: 3 gives the force and torque on a body of the 3D model: a sketch or an E-type design extruded through its depth, layers element layers as in Field Solve. The force is the weighted Maxwell stress tensor over the air around the body, as in 2D, and forceN and torqueNm are [x, y, z] for the whole model, with z along the extrusion and z = 0 its middle plane. centreMm may then be [x, y, z]. The solver meshes only the half through the depth (even layers) or the quarter (a body that is its own mirror across x = 0, and no magnets), and unfolds the part's force into the whole body's; mirrorPlanes names the planes it unfolded across. lorentzN checks it on a coil in air, and nonlinear: true puts the core on its B-H curve.

virtualWork: true checks it a third way, by the derivative of the co-energy with the body moved by ±1e-3 of its size along x and y and turned by ±1e-4 rad: six more solves, two on the quarter. It gives F_x, F_y and τ_z; F_z, τ_x and τ_y are null, because the extrusion's ends hold the body along z. A winding's current moves with the body, and a magnet in the body turns its magnetization with it.

A magnet given its grade's demagCurve (as in magnetics.fieldSolve {dimension: 3}) is solved on that curve by Newton's method at the currents given, and the force and the knee check read that field (model.magnets: "demagCurve"), so a magnet driven past its knee pulls less. virtualWork is refused with a demagCurve, because the co-energy on the curve is not computed yet.

magnets works as in 2D: each magnet is its region through the depth, magnetized in the drawing's plane, and a drawing of magnets alone, with no coil, is extruded with no winding. The reply then has a row for each magnet with its volume and where it is worst, and the demagnetization warnings.

This example is the two conductors of "Draw a section of your own" below, 2 A in 10 turns each, out and back, extruded 100 mm with two layers and 0.5 mm elements:

{
  "sketch": {
    "depthMm": 100,
    "points": [[-50, -50], [50, -50], [50, 50], [-50, 50], [-12, -2], [-8, -2], [-8, 2], [-12, 2], [8, -2], [12, -2], [12, 2], [8, 2]],
    "edges": [[0, 1], [1, 2], [2, 3], [3, 0], [4, 5], [5, 6], [6, 7], [7, 4], [8, 9], [9, 10], [10, 11], [11, 8]],
    "labels": [
      {"name": "air", "at": [0, 30]},
      {"name": "go", "at": [-10, 0], "circuit": "A", "turns": 10},
      {"name": "return", "at": [10, 0], "circuit": "A", "turns": -10}
    ]
  },
  "elementMm": 0.5,
  "regions": ["go"],
  "currents": {"A": 2},
  "dimension": 3,
  "layers": 2,
  "virtualWork": true
}

The stress tensor gives −0.342 mN along x: the conductor on the left is pushed away from the other. Virtual work and the Lorentz force agree with it within 1 %, and so does the planar field.force of the same section through the depth, since the extrusion's ends carry the planar field. F_z is close to zero. The box's edge pulls the value below the thin-wire 0.40 mN, as in 2D.

Give elementMm when you want the Lorentz check. The 3D mesh is coarse by default, and the Lorentz force needs the field resolved inside the conductor: on the default mesh of this example it is 38 % low, while the stress tensor is within 1 % of the planar force on that mesh too. When lorentzN and forceN are more than 1 % apart, the reply says so in a note, with the number of tetrahedra in the body.

Draw a section of your own

Design > Field Solver > New Field Drawing asks for planar or axisymmetric and, for planar, the depth in mm, then opens the drawing canvas. Pick a tool along its top:

Tool What it does
Pan Drag a point or region label to move it onto the grid, or drag the canvas to pan; scroll to zoom
Point Click to place a point
Segment Click where the segment starts, then where it ends
Rectangle Click one corner, then the opposite one
Circle Click the centre, then a point on the circle
Arc Click the start, the end, then a point the arc passes through
Region Click inside a closed region to say what it is: air, a magnetic material with its μr, or a coil with its circuit and turns (negative for the return side)
Dimension Click two points to show their distance (geometry.setDimension then sets it, moving the second point)
Delete Click a point, edge or region label to delete it

Grid (mm) sets the snap grid. Esc cancels an unfinished edit; Undo and Redo step through the drawing's own history. The line under the canvas says Ready to mesh. once every region is closed and labelled, or names the first problem (the point, edge, region or label). Each tool is a geometry.* command, so the CLI, the assistant and Python draw the same way, in metres: geometry.addRectangle {"min":[0,0],"max":[0.01,0.02]}. geometry.get returns the whole drawing.

The canvas has no Solve button in this version. To solve a section of your own, give it to a command as sketch, in millimetres: points, edges between them ([a, b], or [a, b, sweepRad] for an arc) and labels. A label with muR is a linear core, one with circuit and turns a coil, one with neither air. The outer boundary holds A = 0, unless you give the sketch an open boundary (next section). For example, two conductors 20 mm apart carrying 10 turns each, out and back, in a 100 mm box 100 mm deep:

{"depthMm":100,
 "points":[[-50,-50],[50,-50],[50,50],[-50,50],[-12,-2],[-8,-2],[-8,2],[-12,2],[8,-2],[12,-2],[12,2],[8,2]],
 "edges":[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[8,9],[9,10],[10,11],[11,8]],
 "labels":[{"name":"air","at":[0,30]},
           {"name":"go","at":[-10,0],"circuit":"A","turns":10},
           {"name":"return","at":[10,0],"circuit":"A","turns":-10}]}

magnetics.fieldSolve {"sketch": …} gives L = 9.23 µH. field.force {"sketch": …, "regions": ["go"], "currents": {"A": 2}} gives a force of −0.341 mN along x: the conductors repel. Two thin wires 20 mm apart with 20 A·turns each repel with μ0·I²/(2π·d) × depth = 0.40 mN; the box's edge, where A = 0, is close and pulls the value down. With the box grown to ±200 mm the same call gives −0.392 mN. Make the air box several times larger than the part, and check that L or the force no longer moves when you grow it again (the accuracy report's boundary_distance row does exactly this for the E25). An open boundary, next, does without the box.

Open boundaries

The A = 0 edge round a drawing holds the whole field inside it, as if the part sat in a closed iron box. A closed core keeps nearly all its flux inside, so the box hardly matters. For an air-core part, a busbar, a line or the stray field of a gap, it pulls L and the forces down, as the example above shows. Instead of growing the box, put the drawing inside an open boundary. This is a circle of air with graded-permeability shells outside it, Meeker's improvised asymptotic boundary conditions (femm.info, "Improvised Asymptotic Boundary Conditions"). The shells make the circle's edge behave like the free space beyond it: each layer matches one more harmonic of the field outside exactly.

For a sketch, add openBoundary inside the sketch: {"radiusMm": …, "centreMm": [x, y], "layers": 4}.

  • centreMm defaults to [0, 0]. In an axisymmetric sketch the centre is on the axis.
  • layers defaults to 4 and runs from 1 to 10. Each layer meshes into many more nodes: a small ring takes about 29,000 nodes at 4 layers and 135,000 at 10. Four is the fewest that holds a circle drawn tight round the part, 10 % past it: L then moves less than 0.2 % from a far circle, and 0.6 % at 3 layers. With the circle at three times the part's size, 1 layer already gives the same L, so fewer layers there only save nodes.
  • The circle must hold the whole drawing, which then needs no outer edge of its own.
  • The air between the drawing and the circle is labelled open boundary air unless your drawing labels it. The shells are the regions open boundary shell 1 to N, so don't use those names in the drawing.

The same two conductors as above, without the box:

{"depthMm":100,
 "points":[[-12,-2],[-8,-2],[-8,2],[-12,2],[8,-2],[12,-2],[12,2],[8,2]],
 "edges":[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4]],
 "labels":[{"name":"go","at":[-10,0],"circuit":"A","turns":10},
           {"name":"return","at":[10,0],"circuit":"A","turns":-10}],
 "openBoundary":{"radiusMm":60}}
  • magnetics.fieldSolve gives L = 9.51 µH, against 9.23 µH in the 100 mm box.
  • field.force with the same regions and currents gives −0.397 mN, within 1 % of the thin-wire 0.40 mN. The box only came close at ±200 mm.
  • With radiusMm doubled to 120, L moves by 0.07 % and the force by 0.3 %, so the boundary no longer limits the answer.
  • The mesh still does. With elementMm: 0.5, L rises to 9.61 µH. The closed form is 9.66 µH: (μ0/π)·ln(D/g)·N² × depth, with g = 0.447 × the side of a square conductor, its geometric mean distance (F. W. Grover, Inductance Calculations, 1946).

The reply's model.openBoundary gives the centre, radius and layers, and a note says what the boundary does.

For a design, give openBoundary beside it: magnetics.fieldSolve {"design": …, "openBoundary": {"radiusMm": …}}.

  • The design's drawing goes inside the circle, and its A = 0 box becomes an inner edge.
  • centreMm defaults to the middle of the drawing. The circle must hold the box, so start at about 1.2 times the box's half-diagonal.
  • A closed core keeps its L: the gapped E25 moves by 0.0025 %.
  • The other commands refuse a design's openBoundary. Draw the part as a sketch to use one there.

Where it works:

  • A sketch's open boundary works in every 2D magnetic command that takes a sketch: Field Solve, core loss, flux map, line profile, region table and force.
  • In field.windingCapacitance the shells are graded in permittivity instead, and only the outermost shell is held at 0 V. A planar drawing gets a note there: each conductor's capacitance to ground depends on the radius, because a net charge per metre has no free-space reference in 2D. The capacitance between conductors does not depend on it.
  • 3D solves and the thermal solve refuse an open boundary.

field.openExample twoWireLine is a line inside an open boundary, checked against the open_boundary_two_wire row of the accuracy report.

Symmetry planes: solve a half or a quarter

A device symmetric about a line can be drawn as its half (or, symmetric about two lines, its quarter) and solved as the whole: magnetics.fieldSolve {"sketch": …, "symmetryPlanes": [{"axis": "y", "atMm": 0, "kind": "fluxNormal"}]}.

  • Each plane is x = atMm or y = atMm, at most one per axis. It must be a straight outer edge of the drawing, with the whole drawing on one side.
  • fluxTangential: the field is odd about the plane, as when the go side of a winding is mirrored by its return side. No flux crosses the plane, so it is held at A = 0 like the rest of the outer edge.
  • fluxNormal: the field is even about the plane, as when the plane cuts a core and its windings through their middles. The flux crosses the plane at right angles, so its nodes are left free.
  • L and M are multiplied by 2 per plane. The turns stay the drawn ones: a winding cut in half by a plane is drawn with half its turns.
  • The reply's model.symmetry gives the multiplier, model.symmetryPlanes the planes, and a note says what they did. On the two-window transformer the half on either side and the quarter give the whole drawing's L and M within 0.02 %.
  • The 2D AC solve (mode: "harmonic") takes the same planes: Z, R, L and every loss are multiplied by 2 per plane. A conductor may be cut by a fluxNormal plane (its eddy current is even about it), but not by a fluxTangential one: its eddy current is odd about that plane, so draw it whole. adaptive refines the drawn part and cuts each refined mesh the same way, and its passes report the whole device. dcBias solves the DC state on the drawn part, whose field has the same symmetry as the AC field.
  • Only the 2D Field Solve of a sketch takes planes. A design, a 3D solve and an open boundary refuse them.

Periodic sectors: solve one pole or one coil of a ring

A device that repeats n times around a centre (the poles of a winding, n identical coils on a ring) can be drawn as one sector and solved as the whole: magnetics.fieldSolve {"sketch": …, "periodicSector": {"angleDeg": 90, "kind": "antiPeriodic"}}.

  • The sector lies between two straight outer edges on the rays from centreMm (default the origin) at startDeg (default 0) and at startDeg + angleDeg. angleDeg must be 360/n, for 2 to 360 sectors. The rest of the outer edge, usually an arc, is held at A = 0.
  • periodic: every sector's currents are alike, so A on one side equals A at the same radius on the other.
  • antiPeriodic: alternate sectors' currents are reversed, as a winding's poles are, so A on one side is minus A on the other. A centre that the sector reaches is then held at A = 0.
  • The two sides are meshed with nodes at the same radii: where one side has a node the other lacks, a point is added to the drawing and the sector is meshed again.
  • L and M are n times the drawn sector's. The turns stay the drawn ones: the winding is the drawn coil once in each sector, in series. The reply's model.symmetry gives n and model.periodicSector the sector.
  • Checked against the exact solution: four annular coils (20 to 30 mm, 40° wide) in a grounded 50 mm cylinder, solved from one 90° sector with 1 mm elements, against the cylindrical-harmonic L:
    • alternating coils (anti-periodic): 0.10 % off, and within 1.3e-5 of the whole ring drawn and meshed alike;
    • like coils (periodic): 0.03 % off;
    • the same sector with its sides held at A = 0 is 10 % and 59 % off.
  • Only the 2D magnetostatic Field Solve of a sketch takes a sector, with linear triangles. mode: "harmonic", symmetryPlanes, elementOrder: 2, laminations, a design and a 3D solve refuse it.

Quadratic elements

magnetics.fieldSolve {sketch or design, elementOrder: 2} solves the 2D magnetostatic model on quadratic (six-node) triangles: the same mesh with a node added at the middle of every edge. For a smooth field the inductance error falls as h⁴ instead of h², so a coarse mesh gives what the linear elements need a much finer one for. On the two-window transformer with 4 mm elements, L is 0.03 % from its converged value, where the linear elements are 0.4 % off. The solve has about four times the unknowns. model.elementOrder says which was used. The field view shows the potential at the triangle corners. Magnets, dimension: 3 and mode: "harmonic" refuse it.

Laminated cores

magnetics.fieldSolve {sketch or design, laminations: {"core": {"stackingFactor": 0.95, "normal": "y"}}} solves a magnetic region as a stack of steel sheets with non-magnetic coats, drawn as one region. The region's muR is the sheet's; stackingFactor is the sheets' share of the stack (above 0, at most 1); normal is the drawing's axis the sheets are normal to (x or y, which are r and z in an axisymmetric drawing). Along the sheets the stack has μ = F·μr + (1 − F), across them μ = 1/(F/μr + 1 − F): with F = 0.95 and μr 10,000 that is about 9,500 along and only 20 across, so the direction matters as much as the material. The homogenized region is the limit of the stack as its sheets thin: against a stack drawn sheet by sheet, the field along the sheets gives the same energy for any sheet count, and the field across them comes within 0.4 % at eight sheets. model.laminations lists each stack with its two permeabilities, and a field view gets muAxes for its region. It is linear, in the magnetostatic solve and in the 2D AC solve (mode: "harmonic"), where each triangle of the stack takes its permeability along and across the sheets; at low frequency the AC inductance is the magnetostatic one to seven digits. The sheets' own eddy currents are in the 3D AC solve (conductivityStack), so in the 2D AC solve a stack takes no conductivity or muRLoss, and laminations takes no dcBias or adaptive. dimension: 3 and elementOrder: 2 refuse it. magnetics.fieldFluxMap takes the same laminations on a linear core: every Newton solve of the sweep keeps the stack at its two permeabilities, so λ(i) is a straight line whose slope is magnetics.fieldSolve's L for the same stack. magnetics.fieldTransient (2D) takes it too: every time step keeps the stack at its two permeabilities, so with no conductor each step's λ/i is magnetics.fieldSolve's L. When the core sits on a B-H curve (a design whose material has one, or a transient sketch given material), both commands put each sheet on that curve and the stack on its own curve along the sheets (H shared by sheet and coat) and across them (B shared), so the stack saturates; on the curve's first segment it is the linear stack at the curve's initial μr, and model.laminations names the curve (bhCurve). A stack takes no conductivity there (its sheets' eddy currents need the 3D transient's conductivityStack) and no jilesAtherton loop.

More analyses

Each of these takes a design or a sketch, as Field Solve does, and changes nothing in the circuit unless it says so.

  • Line profile (field.lineProfile): B and H at evenly spaced points along a line, the flux across it, and ∫H·dl along a path; a closed path gives the ampere-turns it encloses (Ampère's law), a good check of a model. csvPath writes the points.
  • Region table (field.regionTable): per region, its area, current, stored energy and co-energy, Lorentz force, peak and 99th-percentile |B|, and whether the peak sits on a corner of the drawing (a singularity that grows as the mesh is refined, not a real hot spot).
  • Field calculator (field.calculator): your own quantities, written as expressions of the solved field (Bx, By, B, Hx, Hy, H, A, J, muR, mu0 and the position; r, z, Br, Bz, Hr, Hz on an axisymmetric sketch; the normal nx, ny and tangent tx, ty on a path), up to 16 in one solve. Each is integrated over the regions you name (a volume integral, with the volume and the mean), over the surface a polyline sweeps through the depth or round the axis (Bx*nx+By*ny is the flux through it), or read at a point. The integrals are exact for the solver's element field, so B*H/2 over every region is the region table's energy. With dimension: 3 it works on the 3D extrusion of a sketch or an E-type design (meshed whole): volume integrals and point values [x, y, z] of Bx, By, Bz, B, Hx, Hy, Hz, H, muR, mu0 and x, y, z, and surface integrals over a flat parallelogram surface {corner, u, v} (mm) with its unit normal nx, ny, nz (Bx*nx+By*ny+Bz*nz is the flux through it; areaMm2 is the part inside the mesh). It takes magnets too: in a magnet H is on the recoil line, (B − Br)/(μ0 μrec), so mu0*muR*H^2/2 over every region is the energy, and the reply carries each magnet's demagnetization check; a drawing of magnets alone needs no coil. A ring design is revolved a whole turn about the z axis (stepDeg sets the step), each winding a current sheet on the core: the flux through the core is the surface y = 0, x > 0 across its section, and H*sqrt(x^2+y^2) over the core is N·I/(2π). A ring takes no magnets or layers.
  • Force and torque (field.force): the force and torque on a body by the weighted Maxwell stress tensor, checked by virtual work (virtualWork: true, six more solves) and, for a coil in air, by the Lorentz force. nonlinear: true solves the core on its B-H curve. An axisymmetric sketch gives the axial force. Permanent magnets (magnets, direction [r, z]) work there too, in the body or outside it, with or without nonlinear; lorentzN is null on a magnet body, and a body touching a magnet of recoil μr 1, or a path through it, is refused by name.
  • A body that slides (field.slide): the same model and regions as field.force, the body on a spring (massKg, springNPerM, dampingNsPerM, loadN) moved along axis (planar: "x", "y" or [x, y]; axisymmetric: "z") by the field's own force, one magnetostatic solve per time step (timeStepS, steps). The body moves rigidly and the air round it stretches, so the travel must stay inside the air drawn round it; a move past it stops the run at that position. smallSwing gives the force where the body is drawn, the field's stiffness −dF/dx there and the small-swing period about it; pick timeStepS about a fortieth of it and quote energy.errorPct. Eddy currents are not modelled.
  • Flux map (magnetics.fieldFluxMap): sweeps one winding's current up to maxCurrent with the core on its B-H curve and records the flux linkage of every winding: the saturating inductor's λ(i) table. apply: true writes it into the part (psiCurve for an inductor, coupledCurve for a coupled inductor or transformer), and both circuit solvers then follow the table's incremental inductance, so the simulation saturates where the core does. With a magnet bias on a two-winding sweep the coupledCurve is two-sided: its rows run from a negative current through the bias row at 0 A to a positive one, are read at the signed magnetising current, and hold their end rows beyond either end. apply writes it into a coupled inductor or a transformer, and field.tableLookup reads it at the signed current. A magnet can also sit in a design's gap: on a gapped E-type design, magnets[].region: "centre-leg gap" draws the centre leg's gap as its own region and fills it with the magnet (a ring or a gapless design is refused by name). Permanent magnets (magnets) take a built-in grade by name (Arnold N35, Arnold N42, Arnold N42H or Arnold N42UH, sintered NdFeB, each read from its Arnold Magnetic Technologies data sheet) or your grade's data-sheet values, cited. In field.lineProfile, field.regionTable and magnetics.fieldFluxMap a magnet can also take its grade's normal demagnetization curve at the temperature, demagCurve: [[H, B], …] from the same sheet (from [0, Br] through the knee). It is then solved on that curve by Newton's method: a reverse field along the magnetization follows the curve, a forward or crosswise one the recoil line, and B, H, the energies and the knee check read the curve. The curve is reversible, so a loss of magnetization past the knee is not kept after the field goes away. In the flux map every swept current is solved on the curve, so a current that drives the magnet past its knee shows in λ(i) and in the incremental inductance. magnetics.fieldTorque takes the same curve for its machine's magnets as magnetDemagCurve (its B_r within 1 % of magnetBrT): each rotor angle is then solved on the curve, so a load current or a temperature that drives the magnets past the knee shows as lower flux linkage, back-EMF and torque. Each angle also reports the largest reverse field in the magnets and the share of their area past the curve's knee (where J = B − μ0H falls to 0.9 Br), with a "demagnetization" warning naming the worst angle when any angle passes it. With magnetIrreversible: true the loss is kept: the angles are solved in the order swept, and each magnet cell of the rotor recoils at every later angle from the lowest point it has reached on the curve, along a line of slope μ0·magnetMuR, its remanence lowered to Br' = B − μ0·magnetMuR·H there (the recoil-line model: Furlani 2001 §2.6; Ruoho, Dlala and Arkkio, IEEE Trans. Magn. 43(11), 2007). Each point then gives the magnets' mean and largest remanence lost (magnetBrLossPct, magnetMaxBrLossPct), and demagnetization adds finalBrLossPct, maxBrLossPct and areaWithLossPct after the last angle. eccentricity: {kind, offsetMm, angleDeg} puts the rotor's axis off the stator's: static keeps the offset while the rotor turns about its own axis, dynamic turns it with the rotor. The whole cross-section is solved, the air-gap band takes up the offset (up to about 30 % of the gap; the error names the mesh's limit), and each angle gives the unbalanced magnetic pull on the rotor (pullN), by the Maxwell stress tensor over the stator's ring of the gap, with the torque taken about the rotor's axis. Shaft and bearings are not modelled.
  • Transient (magnetics.fieldTransient): eddy currents in conducting regions over time, with windings driven by a current or a voltage step, sine or table, and solid conductors whose skin and proximity effect follow. A table with stepMean: true drives each step with the table's mean over it, so a switched (PWM) voltage keeps its volt-seconds instead of moving each edge to the next step end. skinLayers lines a thick conductor's surface with mesh layers, as in the 2D AC solve below, two skin depths deep at skinFrequencyHz (by default the highest frequency of a sine drive). Every row gives each winding's apparent inductance λ/i and its incremental inductance Δλ/Δi over the time step, which falls below λ/i once a core passes its knee. For a periodic drive (sines of one frequency, or periodS, such as a PWM table's switching period) steadyState compares each period with the one before: reached says the last one repeats it within steadyTolerance (1e-3 by default), and lastPeriod gives the eddy and copper loss and rms currents averaged over it, the numbers a circuit simulation takes. A core on its catalogue B-H curve also gets lastPeriod.coreLoss: the iGSE of its material's Steinmetz data on each core element's own B(t) over the last period, eddy currents and saturation included. A core kept linear at its muR (a material with no B-H curve, or a design with linear or muR) gets it too, without saturation (null, with a note, when the period is not a whole number of steps, the run is not longer than one period, the material has no Steinmetz data, or a sketch names no material). When reached is false, run more periods; an L/R transient's residual shrinks by e^(−T/τ) each period. Permanent magnets (magnets, as field.regionTable takes them) step on their recoil line or, with demagCurve, by Newton's method on their demagnetization curve, so a winding current driven against the magnetization shows the flux the magnet loses past the knee; magnets in the reply gives the knee check on the last step's field. A magnet takes no core curve, Jiles–Atherton loop or lamination, and the curve is reversible: no irreversible loss is kept.
  • Transient in 3D (magnetics.fieldTransient with dimension: 3, Preview): the same time steps on the 3D model the 3D eddy-current solve below builds (a ring-core design, the wound E core with endTurns: true, or imported bodies), with eddy currents in the bodies given a conductivity (and laminated stacks). Each winding is stranded and driven by its current (a step, sine or table), so its voltage is dλ/dt; materials are linear. Every row gives each winding's flux linkage and voltage, each conductor's loss at that instant and the field energy, for the whole model. A conductor in an extrusion is refused for now, since its ends cannot yet be held at zero net current: solve that section with the 2D transient.
  • Eddy currents in 3D (magnetics.fieldSolve with dimension: 3, mode: "harmonic", Preview): the loss in a shield, clamp or plate at one frequency, and each winding's impedance, with the bodies' conductivities given. With field: true it also returns the loss density and the current density of every tetrahedron, so you can see where in a body the loss sits.
  • AC impedance in 2D (magnetics.fieldSolve with mode: "harmonic", no dimension): the same eddy-current solve on the planar drawing, giving the full impedance matrix of every drawn circuit with the mutual resistance. A ferrite or powder core's own loss comes from its complex permeability μ′ − jμ″: give the data sheet's μ″ at the frequency with muRLoss (μ′ is the region's muR), and its magnetic loss is in the resistance and the loss. A conductor many skin depths thick needs no fine mesh inside: skinLayers (for example {"plate": 3}) puts that many mesh layers under its surface, together two skin depths deep at the frequency, each twice as thick as the one outside it. Five skin depths thick or more (a shield, a tank wall), surfaceImpedance (for example "shield") leaves the conductor's inside out of the solve and gives its boundary the surface impedance of a good conductor, so its mesh can be as coarse as its shape; its loss is the power flowing into its surface. A surfaceImpedanceThin warning says when a conductor is too thin for it. With adaptive, the mesh is refined beside such a conductor, where the field at its surface sets its loss. A conducting layer much thinner than the skin depth (a foil or plated screen, a thin can wall) need not be meshed at all: draw it as the line between two regions and give sheets (for example [{"between": ["inside", "outside"], "conductivity": 5.8e7, "thicknessMm": 0.01}]). The sheet carries the eddy current that screens the field, with no net current, and its loss is listed under each winding's sheets. A sheetThick warning says when a sheet is a skin depth thick or more and should be drawn as a conducting region. For a converter current that is not a sine, give current instead of frequency: one period as points, or a branch current of the last run (signal with periodS). The drawing is solved at each of its harmonics and the eddy and core loss summed over them, harmonic by harmonic, with each region's share. For a choke that carries DC, give dcBias (for example {"P": 3}, the DC current of each circuit; a sketch also names its core material): the drawing is first solved at that DC current with the core on its B-H curve, and the AC solve then uses the core's incremental permeability there. The inductance is then the ripple inductance on the bias, which falls as the core nears saturation, and the losses are the ripple's. For the forces on the windings (a transformer's short-circuit forces, a busbar's pull), give forceCurrents with each circuit's peak current (for example {"P": 1000, "S": -2000}, or {"peakA": 2000, "phaseDeg": 180}): forces gives the Lorentz force on each winding side and each conductor, as its average and its part at twice the frequency, with the peak over the cycle. A core's own magnetic force is not in it; field.force gives that one. Paralleled layers and split windings drawn as separate circuits are joined into the part's ports with connections, as for the DC inductance; at frequency a parallel port's current divides by the layers' impedances, their eddy loss included, and connection gives each layer's share in magnitude and phase. Instead of refining by hand, adaptive: true refines the mesh pass after pass where the field's error is largest, the conductors given their own share, until each winding's resistance and reactance settle; adaptive.stopOn: "resistance" stops on the loss alone, and minConvergedPasses: 2 waits for two settled passes in a row. With current the loop refines at the highest harmonic and solves the others on its last mesh; not with dcBias.
  • DC conduction (field.dcConduction, Preview): the resistance of a copper pour, busbar or trace between its pads. Label each conductor with its conductivity (S/m, from the material's data sheet) and each pad or via with an electrode name; a planar drawing is a sheet depthMm thick seen from above (1 oz copper is 0.035), an axisymmetric one a revolved part. It gives the conductance matrix and the resistance between every pair of electrodes (the others floating), and with voltagesV each electrode's current, the loss per region and where the current density peaks. DC only: no skin or proximity effect.
  • Winding capacitance (field.windingCapacitance): an electrostatic solve of a drawing of the turns gives the capacitance matrix, each winding's self-capacitance and the interwinding capacitance. With component, the capacitors are proposed for the part on the schematic (or added with apply), so the circuit sees the winding's self-resonance.
  • Capacitance in 3D (field.electrostatic3d, Preview): the solids of an STL or STEP file, each a conductor or a dielectric with its relative permittivity, in a box of air whose sides are the ground. It gives the capacitance matrix of the conductors and, at the voltages you give, the largest electric field in each dielectric and where it is. Give each material's dielectric strength from its data sheet (strengthKVPerMm) and each dielectric gets its margin, strength over peak field, and the hot spot is the one with the least margin; below 1 the insulation breaks down there. The design report shows the latest one: the matrix, the capacitance between each pair of conductors and from each to the ground (the values a circuit model takes), and the field stress with the hot spot. Name the conductors that are a transformer's windings (windings) and the part (component), and the interwinding capacitance is proposed as a capacitor between its winding starts (or added with apply), so the EMI analysis sees the common-mode path.
  • Winding AC loss (field.windingAc): each winding's AC resistance, its proximity share and the leakage inductance against frequency for interleaved layers of foil, planar copper, round wire, litz or traces, with Dowell's result beside each number. dimension: 3 solves a foil, round-wire or litz window extruded in 3D and puts the planar result beside each row. With a design, endTurns: true and dimension: 3 it winds the design's E core with its end turns in 3D, round wire, litz or foil (one foil per turn, Dowell's foil model: exact in the window, a lower estimate in the end turns), and gives each winding's end-turn share of the loss. For foil or planar layers, secondaryThicknessMm gives the secondary its own copper thickness, and parallel joins layers of one winding at their terminals (e.g. [[1, 5]], the outer primaries): the solve splits the current between them and each row gives every layer's share, so circulating current in paralleled layers shows as extra loss (Ouyang, Thomsen and Andersen, IPEC 2010). coreDepthMm, the core's depth along its legs, adds the end turns of foil or planar layers, in series or in parallel groups: the core covers twice that depth of each turn, and the rest of the mean turn is solved in air by PEEC. Each row then gives the end turns alone and the whole turn (endTurns.total), whose Rac and leakage sit below the window's over the whole mean turn, since outside the core the field spreads round the copper's edges. Parallel layers split their group's current by the whole turn's impedances, the window's over the core's share and the end turns', and carry that split in both (endTurns.layers).
  • Thermal (field.thermalSolve): the steady temperature of the core and windings from their losses, with conduction inside and convection from the outer surfaces. The losses can be given, come from the AC winding solve (ac), or come from the core loss (core), iterated with the temperature until they settle. lumped reduces the result to a thermal network for fast sweeps. Give the heat-transfer coefficient and every conductivity except copper, aluminium, air, ferrite, Kapton HN film, Nomex 410 paper and MG 832TC potting from a data sheet or a measurement: none is built in (no core grade is, either). With dimension: 3 it solves the 3D model on the field solve's tetrahedra; with field: true as well, the 3D window opens on the temperature map (each element the mean of its corners' temperatures), with the hot spot and each region's loss, mean and highest temperature above it, and the same section plane, see-through bodies and smooth shading as a magnetic field.
  • Sweep and optimise (field.sweep): runs Field Solve, Core Loss, the AC winding solve, Thermal or PEEC over up to four parameters (the gap, the turns, the core, the element size, a frequency), each a list of values or a range: linear or log, by a step with both ends included, or so many points per decade or octave. The grid is every combination, or with combine: "synchronised" the values taken pairwise; at most 256 points. One parameter may go to several places, each scaled (paths with times and plus), so a laminated busbar's spacing moves every point of its upper layer. design draws the points from the ranges instead of a grid: a Latin hypercube (latinHypercube, runs and seed, one run in each of runs equal strata of every range) or a two-level fractional factorial (fractionalFactorial, at the range ends, the standard generators or your own), the plans of analysis.doe. surface fits a quadratic response surface to a grid's or a design's rows (in coded units, as analysis.doe does), finds its exact least or greatest value on the ranges, and runs the command once more there to confirm it, with the difference between the surface and that run. With surface.goals it weighs several outputs at once (Derringer and Suich's desirability): each goal is a column with min, max or target and the range it is acceptable over (low, high), each column gets its own surface, and the point where the weighted geometric mean D of the goals' desirabilities is greatest is run to confirm it; D is 0 when no point meets every range. optimize searches the parameters for a goal instead: a target value (such as the inductance), the least or the most of an output, by golden-section search for one parameter and Nelder–Mead for more. Each row is that single solve's result. The Field Sweep window shows the best point, a plot of the output you pick against the first numeric parameter (one line for each value of the others) and the table of every point; a point that failed keeps its reason in the table.

PCB and busbar parasitics (PEEC)

field.peec (Preview) gives the resistance and inductance matrix R(f) + jωL(f) between ports of straight conductors in air: tracks, busbars, wires and ground planes. It is the partial-element method (Ruehli 1972; Kamon, Tsuk and White 1994): each conductor is split into filaments across its section, finer near the surface than the skin depth at the highest frequency you ask for; the self and mutual partial inductances of parallel rectangular filaments come from Hoer and Love's exact equations (NBS J. Res. 69C, 1965), those of filaments at an angle from Neumann's integral, round sections are coaxial shells, and every mutual term is kept. It changes nothing in the circuit.

A model of up to 2000 filaments is solved by a dense LU; past that, up to 5000, by GMRES (Saad and Schultz 1986) with a preconditioner made of each segment's own filaments, to a relative residual of 1e-11, so a fine plane under a routed loop still solves. Filling the partial inductances grows with the square of the filaments, so a 5000-filament model takes about a minute.

You describe the copper in one of three ways, and may mix them:

  • Segments between named nodes (nodes, segments): each a straight piece with a rectangular section (width, height, widthAxis) or a round one (radius), in any direction, as FastHenry's input file describes them.
  • Busbars (busbars): a centre-line path of straight legs with one width and thickness; the path's points are nodes named <name>.1, <name>.2, … A laminated busbar is one busbar per layer.
  • Planes (planes): a rectangle given by three corners, meshed into a grid of segments (seg1 × seg2), with holes (point, rectangle or circle) cut out as FastHenry cuts them, and nodes that name the grid points you connect to.

shorts join nodes with no impedance (a track's end tied to the plane below it), and each port names the node the current goes in at (plus) and the one it leaves at (minus). Copper is annealed copper at temperatureC (20 °C by default, IEC 60028); give resistivity for another metal. Frequency 0 gives the DC limit.

A 100 mm copper bar, 10 mm wide and 2 mm thick, at DC and at 100 kHz:

{"busbars": [{"name": "bar", "path": [[0, 0, 0], [0.1, 0, 0]], "width": 0.01, "thickness": 0.002}],
 "ports": [{"name": "P1", "plus": "bar.1", "minus": "bar.2"}],
 "frequencies": [0, 100000]}

At DC it gives 0.0862 mΩ, which is ρl/(wt), and 66.91 nH, Hoer and Love's self partial inductance of the bar. At 100 kHz the skin depth (0.21 mm) is a tenth of the thickness, so the current crowds to the surface: 0.4607 mΩ and 63.44 nH. This is a partial inductance: a loop's inductance is that of the whole path, so put the return conductor in the same model and the port across the loop's opening.

To know the filaments are fine enough, add converge: {targetPercent, maxPasses} (1 % and 4 passes by default): the model is solved as given, then again with every split twice as fine (nw, nh and shells of each segment and busbar, seg1, seg2 and nh of each plane), until R and L change by less than the target between two passes. The reply is the finest pass, and convergence lists each pass's filaments, unknowns, solver (denseLu or gmres) and change; converged: false with stop maxPasses or filamentLimit (the next pass would pass 5000 filaments) means the answer is no better than the last change.

In the result window, Filament convergence under the ports gives the verdict with a tick or a cross: the last pass's change against the target, and why the study stopped when it did not converge. A second table has one row per pass (its split refinement, filaments, change in R and in L, unknowns and solver), and a plot shows the two changes against the filament count on a log axis, so you can see whether they still fall.

With meshStatistics: true the result window also shows the solve's profile: Solver (Dense LU, or Iterative (GMRES) past the dense solver's size) and Unknowns under the ports, and a table with one row per drawn segment, busbar and ground plane giving its segments and filaments and the least and most segment length, filament side and filament cross-section (in mm²), with a plane's recovered area and its repair class. Look there for the object whose filaments are much thicker than the skin depth, or whose segments are much longer than its neighbours': refine it first. Wall time is not shown, so the same model always gives the same result.

For an RF tool or a network-analyser comparison, add sParameters: {z0Ohm} (50 Ω by default, the reference a Touchstone file takes when it names none). The reply's sParameters gives, at each frequency, the scattering matrix S = (Z + Z0·U)⁻¹(Z − Z0·U) of the port impedance matrix Z = R + jωL (Pozar, Microwave Engineering, 4th ed., §4.3): its real and imaginary parts and |S| in dB, row k and column l being the wave out of port k for a wave into port l. With export: ["touchstone"] the file then holds S (# Hz S RI R 50) instead of Z.

Each port end is a terminal. By default it is a Constant Voltage terminal: every filament of the conductor joins at one potential there, so the current may crowd to the surface. uniformCurrent: "all" makes every port end a Uniform Current terminal, and a list of node names makes only those ends one: the port's current goes into each filament in proportion to its cross-section, a uniform density that approximates a point feed, and the terminal's voltage is the filament ends' potentials averaged the same way, which keeps the matrix reciprocal. A uniform terminal must be the end of exactly one segment and joined by no short. Its self-inductance usually comes out higher than a Constant Voltage terminal's; on a lone bar, with the current held uniform, R stays at its DC value. The reply's terminals lists every port end with its excitation.

A plane much wider than it is thick (a ground plane, a pour, a busbar sheet) can be a thin sheet: sheet: true on the plane gives it one filament across its thickness, and gives each of its segments the internal impedance of a slab with the same field on both faces, ρl/(wt)·x coth x with x = (1 + j)t/(2δ) (Ramo, Whinnery and Van Duzer, Fields and Waves in Communication Electronics). That is ρl/(wt) at DC and half the surface impedance once the skin depth δ is small against the thickness t, so the skin effect through the thickness costs no filaments. The partial inductance keeps the thickness. A 30 × 10 mm plane of 35 µm copper at 228 MHz (δ = t/8) comes within 3.1 % of the same plane split into 21 even filaments, whose own error at that depth is 2 %, with a twenty-first of the filaments. A sheet suits a plane whose current runs on both faces. Over a close return the current runs on the facing side only, where a sheet gives about half the loss: there give the plane sheet: "oneSided" ("twoSided" is the same as true). Each segment then gets the internal impedance of a slab driven from one face, ρl/(wt)·y coth y with y = (1 + j)t/δ (Dowell's factor for one layer): ρl/(wt) at DC and the full surface impedance once δ is small against t. Two such planes 10 µm apart come within 0.05 % of the parallel-plate line's resistance and about 2 % from the same planes split into 21 filaments through their thickness, where a two-sided sheet gives half; the gap is the field fringing round the edges, 5 % at a gap of a hundredth of the width, and the sheets' inductance is up to 2 % below the split's. A one-sided sheet far from its return is wrong the other way. nh above 1 and a perfect conductor are refused, and the reply's planes[].sheet and sheetSides say which planes are sheets and of which kind.

A ferrite plate under a coil or a track, or a core face beside a busbar, is magneticHalfSpace: {axis, at, muR}: a non-conducting material of relative permeability muR (above 0, at most 1e6) filling everything beyond the plane axis = at from the conductors, which must all lie on one side of it (they may touch it). Its field where the conductors are is that of their mirror images with strength k = (μr − 1)/(μr + 1), the image of a current along the interface running the same way and of one across it the other way (Jackson, Classical Electrodynamics, 3rd ed., Problem 5.17), so each partial inductance gains k times its mutual with the other conductor's image. A two-wire line 10 mm apart, 5 mm over ferrite of μr 1000, gains 0.138 µH/m, within 1e-5 of the 2D image solution; a 2 mm loop 50 mm over it gains the dipole image to 4e-4, twice as much lying flat as standing up. The material is taken as infinite and non-conducting: a plate thick and wide against the conductors' distance from it is close to that, and a steel part only while its skin depth is large against its thickness. It changes no capacitance. The reply's magneticHalfSpace gives imageCoefficient k; muR 1 is free space.

A plate of finite thickness, a ferrite sheet under a wireless-charging coil or a thin core face, adds thickness (m): magneticHalfSpace: {axis, at, muR, thickness} fills only the slab from the interface to thickness beyond it, with free space past it. Each plane-wave part of the field reflects from the plate with k(1 − e^(−2κt))/(1 − k² e^(−2κt)) (tangential H and normal B continuous at both faces, Jackson §5.9), which expands into the plate's image series: the mirror image of strength k, then images mirrored n·thickness farther of strength −(1 − k²)k^(2n−1). Their strengths sum to zero, so a thin plate adds little and a thick one is the half-space. The series stops when the images left out are bounded below 1e-9 of the first image's scale, or at 512 images; the reply gives imageTerms and seriesBound (0 unless the cap stopped it, which a thin plate of very high μr can need, and then it is close to the half-space anyway). A two-wire line 10 mm apart, 5 mm over a 1 mm plate of μr 20, gains its plate's share within 1e-6 of the plane-wave integral, and a 2 mm loop 50 mm over a 2 mm plate of μr 100 within 5e-4 of the dipole's.

meshStatistics: true adds the solve's profile and mesh statistics. solver names how the network was solved (denseLu up to 2000 filaments, gmres past them), unknowns counts its unknowns (one current per filament and contact, one potential per node that is not a reference), and objects has one row per segment, busbar and plane, in the order given: its segments and filaments, and the least and most of its segment lengths (lengthM), its filament sides across the section (filamentSideM: a rectangle's smaller or larger side, a shell's radial thickness) and its filament cross-sections (filamentAreaM2). Refine first where a filament side is far above the skin depth at the highest frequency, or where one object's segments are much longer than its neighbours'.

A uniform plane's row also has area: its true area (geometricM2: the rectangle less its holes, inside its outline) and its mesh area (meshM2: the cell of each grid node left with a segment, clipped to the rectangle), recoveredAreaPercent (mesh over true) and mismatchPercent, and repair, the class of the difference: strict (none), minorRepair (5 % or less), majorRepair (above 5 %) or meshLeak (above 10 %, or no mesh left). The last two also add a warning with that code. A hole or outline edge that falls between the grid's nodes moves the copper solved away from the copper drawn; refine the plane (seg1, seg2) until it is a minor repair. A nonuniform plane's row has the same area: its true area is the rectangle less its hole cells, and its mesh area is the copper its segments cover (length times width, along x and along y; the direction further from the true area is given).

meshOperations: [{kind: "length", objects?, maxLengthM, maxAdded?}] seeds the uniform planes by length, as a 3D extractor's length-based mesh operation does. Each plane it names (every uniform plane when objects is left out) gets the fewest seg1 and seg2 that keep every segment along that edge at most maxLengthM long; the counts the plane gives are never lowered. maxAdded caps the plane segments the operation may add (counted before holes): both counts then move together toward the target only as far as the cap allows. Where several operations name a plane, the finer count wins along each edge. The reply's meshOperations.planes lists each plane's given and used counts, its addedSegments and whether a cap stopped it short (capped); a convergence study starts from the used counts. Straight segments and busbar legs are not cut along their length (with every mutual kept, the pieces add up to the same R and L), and a nonuniform plane takes its own refinements, so naming either is refused.

meshOperations: [{kind: "resolution", objects?, lengthM}] sets a model resolution, as a 3D extractor's model-resolution operation does: each uniform plane it names drops the holes whose drawn size is under lengthM (a circle's diameter, a rectangle's smaller side along the plane's edges, and 0 for a point hole, which has no drawn size), and keeps its copper there. Where several resolution operations name a plane, the smallest length wins. The reply's meshOperations.droppedHoles lists each dropped hole: its plane, its place in the plane's holes (from 1), its kind, its sizeM and the lengthM that dropped it. A segment's or busbar's small features are modelCheck's (smallEdgeM, sliverM), and a nonuniform plane has no holes of its own, so naming either is refused.

setups: [{name?, duplicate?, enabled?, frequency?, unit?, cg?, dc?, ac?}] gives named solution setups in place of frequencies, as a 3D extractor's solution setups do. Each setup has a name, an enabled flag, a solution frequency in Hz, kHz, MHz or GHz, and a switch for each matrix family: C/G, DC (true for R and L, "r" for R only, or false) and AC R/L. All three are on by default. A setup given no name, or one that copies an earlier setup with duplicate (its other keys override the copy), is named Setup followed by the smallest free number, so duplicating Setup1 gives Setup2. AC R/L needs a frequency, since no default is documented. The model is solved once at 0 Hz and at each AC frequency the enabled setups need, and the reply's setups gives each setup its own dc and ac matrices (the same as the frequencies row at that frequency; R only leaves out L) and cg: solved when the model has capacitance, notModelled otherwise, with a note. A disabled setup is listed and solves nothing, and only the families a setup turns on appear in its reply.

capacitance adds the Maxwell capacitance matrix between the nets of the drawn conductors, as a 3D extractor's C solve does: a switch node to a heat sink, DC+ to DC− across a laminated busbar. Every conductor surface is cut into rectangular panels of uniform charge, graded towards the edges, and the potential is matched at each panel's centre (the moment method of Ruehli and Brennan, 1973); the zero of potential is at infinity, so no ground is assumed. Give capacitance: true to make each connected piece of the model one net (named after its first object), or capacitance: {nets: [{name, objects}], epsR?, maxPanelM?, panelsPerEdge?} to name them: objects in no net, such as the strap that closes a laminated pair's loop, are left out and listed in leftOut. epsR is the dielectric round the conductors (1 by default); a film or a laminate of its own εr goes in dielectrics (below). The reply's capacitance.maxwellF is the matrix (net i's charge with net j at 1 V and the rest at 0 V), toInfinityF each row's sum, and pairs each pair's mutual capacitance and the capacitance between the two with every other net floating. Rectangular segments, busbars and planes (their holes cut) have panels. A round section (and a via's tube) is a prism of roundFacets flat facets (default 16, 4 to 64), its corners placed so the polygon has the circle's own capacity, so a long wire comes out as a round one does: two round wires of 1 mm radius 5 mm apart give the two-wire line's π ε0 / acosh(d / 2a) per length within 0.3 %. A nonuniform plane is its conductor cells, top and bottom, with walls on its outline and round its hole cells: a 1 m plate 1 mm thick, its cells refined to 1/64 m along its edges, comes within +0.15 % of the unit square's 0.3667874 · 4π ε0 m (Read 1997). A 1 m cube comes within 0.05 % of the unit cube's published 0.6606785 · 4π ε0 m (Read 1997). The capacitance stands beside the port matrices; it does not enter them, so noCapacitance still holds for R and L.

Each named net may take a type. A "signal" net, the default, is a row of the matrix. A "ground" net, such as a heat sink or a baseplate tied to protective earth, is held at 0 V in the solve and then leaves the matrix (its row and column deleted). A "floating" net, such as an isolated heat sink, carries no net charge and leaves the matrix by the Schur complement, which lowers the other nets' own capacitance and raises their coupling. At least one net must stay a signal net. With nets, unnetted: "ground" puts every conductor named in no net into the field at 0 V, as one ground net called (unnetted), instead of leaving it out ("omit", the default); a conductor joined to a net's conductor cannot be grounded apart and is refused. priority: ["ground", "signal", "floating"], highest first, settles an object named in nets of two types, and resolved in the reply says which net kept it. The reply's groundedNets, floatingNets and groundedObjects say what left the matrix. A unit cube with a grounded or a floating unit cube 5 m away matches the potential-coefficient limit (Jackson 1999, §1.13) within 0.2 %.

A lossy dielectric gives a conductance matrix G beside C. Add lossTangent (tanδ) and, for a leaky insulator, conductivitySPerM (σ) to capacitance, and capacitance.frequencies lists, at every solved frequency, the permittivity epsR (ε′) and epsRImag (ε″), the loss tangent, the Maxwell matrices maxwellF and conductanceS, their row sums and each pair's betweenF and betweenS. In one dielectric the admittance between the nets is jω ε0 ε*(ω) times their vacuum matrix, so G is ω ε0 ε″ + σ over ε0 εr times the solved C (Cheng 1989, §5-6). A loss tangent that is the same at every frequency is not causal. causal: {atHz, upperCornerRadS, lowerCornerRadS?} turns it into the wide-band model of Djordjevic, Biljić, Likar-Smiljanić and Sarkar (2001): εr and tanδ are the values at atHz, the permittivity falls slowly with frequency, and the loss tangent stays nearly flat between the two corners. The lower corner is 10 krad/s unless given; the upper corner has no default. Given the material's DC permittivity instead, epsStatic (above εr), the lower corner is solved so that ε(0) equals it. A lossless material is left as it is. A 1 m cube in a dielectric of εr 4.3 and tanδ 0.02 comes within 0.1 % of the published unit-cube C and of ω tanδ C, and the wide-band model's ε′ matches the Kramers–Kronig transform of its own ε″ (Jackson 1999, §7.10).

A non-homogeneous dielectric, such as a laminated busbar's film between two plates in air or a board's laminate under its copper, is dielectrics: [{name, min, max, epsR}] in capacitance: axis-aligned blocks (corners in metres) of their own εr in the background epsR, 1 to 16 of them. Blocks of one material (the same εr and the same loss) may overlap: the smaller one wins and the larger is cut around it into touching pieces, so the solve is that of their union (the material override; the reply lists each overlap in dielectrics.materialOverride and a cut block's pieces). Blocks of two materials must not overlap. Blocks may touch face to face, so a stack of laminates of different εr (a board's core and prepreg, a film on a carrier) is one block per layer with no gap; the part of a face two blocks share is one interface between their two εr, and none where they are equal. A conductor face that a block's edge crosses, such as a plate under a film smaller than itself, is cut there so each panel faces one medium. Every charge is then a total (free plus bound) charge in vacuum: the block faces are cut into panels of bound charge on which the normal D is continuous, and each conductor panel's free charge is its total charge times the εr of the medium it faces (the equivalent-charge formulation of Rao, Sarkar and Harrington, 1984). Block faces that lie on a conductor, such as a film's faces pressed on the plates, or inside one, such as a laminate's face inside a via, are not interfaces and are left out; the reply's capacitance.dielectrics counts the interface panels (they count towards the 2500) and the faces left out. Two plates with a film filling the gap, and with a film filling half of it, follow the series-layer law ε0 / Σ dᵢ/εᵢ per area within 0.3 % once the fringe is taken out (Jackson 1999, §4.4), and so do two touching films of εr 2 and 6 stacked across the gap; side by side across the plates they follow the parallel law ε0 (ε₁A₁ + ε₂A₂) / d within 0.3 %.

A block can be lossy too: give it the same lossTangent, conductivitySPerM or causal as the background (a block without them is lossless), and the background may be lossy beside blocks. capacitance.frequencies then gives C and G at each solved frequency, in the same keys as one lossy dielectric, so Insert into Circuit… and the SPICE export take them. Each frequency is solved again with every medium's complex permittivity ε′ − j(ε″ + σ/(ω ε0)), whose normal εE is continuous across each face (the free and displacement current together; Cheng 1989, §7-3), and the complex matrix K gives C = Re K and G = −ω Im K. A lossy core under a low-loss film therefore gives the series layer's Maxwell–Wagner loss, not a scaled copy of one film's. Two lossy films stacked across the gap follow the complex series law ε0 / Σ dᵢ/εᵢ within 0.2 % of |ε*|, and side by side the parallel law within 0.3 %. One solve is taken per distinct set of permittivities, at most 64 (a constant tanδ without σ is one solve at every frequency); a conductivity at 0 Hz is refused, as its conduction term is infinite there.

A body drawn in a CAD tool, such as a heatsink or a baseplate under the switch node, goes in as bodies: [{name, path, unitMm?}] in capacitance: each entry reads an STL, STEP or IGES file through the same readers as the magnetic field solve's import, and every closed solid of the file is part of one conductor of that name, which nets names like a drawn object (without nets, each body is a net of its own; with type: "ground" the heatsink is held at 0 V). Its facets are cut into flat triangular panels of uniform charge, each side at most maxPanelM, and the potential of each uniformly charged triangle is in closed form (Wilton, Rao, Glisson, Schaubert, Al-Bundak and Butler, 1984). A curved body is the polyhedron its file draws, so a coarse sphere has a little less capacitance than the true one: 1280 facets give −0.34 % of 4π ε0 a. A 1 m cube read from an STL file is within 0.35 % of the unit cube's 0.6606785 · 4π ε0 m with 1200 triangles, and next to a drawn cube 10 m away the matrix follows the potential-coefficient limit within 0.01 %. The reply's capacitance.bodies gives each body's file, solids, facets, panels (they count towards the 2500) and area. A body is in the capacitance only and carries no current in the R/L network. Bodies go with dielectrics (a heatsink on a thermal pad, a baseplate over a laminate): each facet panel is cut where a block's face plane crosses it and faces the medium it touches, a block face lying on a body or inside it is no interface and is left out, and the field of each triangle at the block faces is the gradient of its closed-form potential (Wilton et al. 1984). An STL plate over a drawn plate with a pad of εr 4 filling the gap gives the same ratio to air as the plate drawn within 0.15 %, and with a pad filling half the gap within 0.01 %; with both plates' second difference taken over their size, the pad follows the series-layer law within 0.24 %. A body with a lossy block or a lossy background (lossTangent, conductivitySPerM, causal) is refused.

To take the capacitance into a SPICE model with the R and L, add "spice" to export and name one signal net per port, in port order, with spice: {nets: ["DCP", "DCN"], cells?} (null for a port with none). With 1 cell (the default) the subcircuit is a T model: half of each port's R and L, a shunt block, then the other half. The shunt block has a capacitor from each port's node to node 0, the net's capacitance to infinity and any grounded nets (the Maxwell row sum), and one between each pair of ports' nodes (minus the Maxwell entry). More cells make a ladder: each shunt block holds C / cells, the two end series blocks R and L / (2 cells) and the others R and L / cells, so the totals are unchanged. A signal net no port names is held at 0 V and listed in heldAtZero. A 200-cell ladder matches the input impedance of the uniform line (Pozar 2012, §2.3) within 2e-7 near a quarter wave, and the shunt capacitors of two unit cubes match the potential-coefficient limit within 0.2 %. Solved in a lossy dielectric, the shunt block takes the export frequency's C and G and puts each conductance beside its capacitor as a resistor of 1/G (RG to node 0, RM between ports), the shunt G + jωC of the telegrapher's line (Pozar 2012, §2.1); the reply's conductance says so. A 200-cell ladder with G matches the lossy line within 2e-7.

The SPICE export above is lumped at one frequency. For one model that holds across the band, a transient run whose switching edges reach from DC to many megahertz, add "broadband" to export and solve a sweep in increasing order with at least two frequencies above 0 Hz, for example [0, {"kind": "perDecade", "start": 10, "stop": 1e6, "points": 5}]. The export fits the port impedance matrix Z = R + jωL at every solved frequency with one set of poles shared by every entry, Z(s) ≈ D + sE + Σ R_k/(s − a_k), by vector fitting (Gustavsen and Semlyen 1999, with the relaxed condition of Gustavsen 2006 and the per-entry QR of Deschrijver et al. 2008). It fits Z itself rather than S referred to 50 Ω, which would multiply the error of milliohm R and nanohenry L. Unstable poles are flipped into the left half plane. The subcircuit draws the fitted state-space model with controlled sources: each port's current drives one 1 F state node per real pole and two per complex pair, and each port's voltage is a chain of sources for D, E and the residues (Neumayer et al. 2002), with pins as in the SPICE export. broadband: {poles, initialPoles, iterations, name} sets the order (default 2 poles per decade of the band, 4 to 30), complex or real starting poles, the relocation passes (default 10) and the model name. The reply gives the poles, D, E and the fit error worstError, the largest entry error over the largest entry at the worst frequency. A fit need not be passive: between or beyond its samples Re Z can dip below zero, and a circuit made from it then makes energy in a transient run. So the export makes it passive by default (broadband: {passivity: "enforce", passes}, 30 passes by default): where Re Z(jω) has a negative eigenvalue, on a dense grid, at the frequencies where the Hamiltonian of the model says an eigenvalue crosses zero, and at ω → ∞ (D), the deepest point of each dip is lifted just above zero by the least change to the residues and D, the poles kept, and the passes repeat until none is left (the iterated fitting of passivity violations: Gustavsen and Semlyen 2001; Grivet-Talocia and Ubolli 2008; the Hamiltonian test of Boyd, Balakrishnan and Kabamba 1989 and Grivet-Talocia 2004). A negative eigenvalue of E is set to zero. The reply's passivity.enforcement gives the passes, largestChange (the largest change at the solved frequencies over the largest entry) and the fit's passivity and error before; worstError is then the enforced model's. If largestChange is much larger than the fit's own error, the fit itself is poor: solve more frequencies or change poles. The model is then checked on a grid from 0 Hz to a decade past the band, and fitNotPassive warns if Re Z or E still has a negative eigenvalue. passivity: "check" leaves the fit as it is and only checks it. A model built to make energy, Re Z(0) = −0.2 Ω, comes out with its residue alone moved, Re Z(0) = 2e-7 Ω, passive on 2000 points per decade; a coupled pair of wires whose difference mode is 1e-4 of the common mode, fitted with 8 poles from DC to 100 MHz, goes from a negative D and a dip at 45 MHz to passive in 2 passes, moved by 2.2e-3 of the largest entry against a fit error of 2.3e-3, and no further from the exact Bessel impedance. Fitted to a round wire's exact Bessel internal impedance (Ramo, Whinnery and Van Duzer 1994, §5.12) from DC to 1 MHz, 10 real poles are within 5e-11 between the fitted points. The written netlist, solved on its own nodal equations, matches separate field.peec solves between the fitted points within 2e-11 for a skin-effect wire and within 1e-12 for two coupled tracks.

To put the result into the circuit, click Insert into Circuit… in the result window of Design > Field Solver > Extract Conductor Impedance (PEEC). It opens the form of field.peecInsert on the solve shown, at its highest solved frequency, with the first two ports in series with the parts you picked on the schematic (in pick order, each at its first terminal); change the parts, terminals or frequency there and click Run. One port goes in as an inductor with its L and R, two as one coupled inductor with k = M/√(L1 L2), and one undo takes it out again. The button is greyed while no circuit is open.

A solve with capacitance can put its capacitance in too: give field.peecInsert a capacitance list of {net, circuitNet}, one entry per solved net, with or without at. Each net gets a capacitor Cpeec_<net> to the circuit's ground, its Maxwell row sum over the nets listed, and each pair a capacitor Cpeec_<a>_<b> of minus the Maxwell entry, so the capacitors' nodal matrix is the solved one. A solved net you leave out is held at 0 V, and its coupling goes into the others' capacitors to ground. The circuit's ground stands for the solve's zero at infinity. Solved in a lossy dielectric, the C and G are those of frequencyHz (required when several frequencies were solved), and each capacitor gets a resistor Rpeec_… of 1/G in parallel, so the pair's nodal admittance is the solved G + jωC. A loss tangent's G grows with frequency, so the resistor is right near that frequency only; in a leaky insulator R·C is the relaxation time ε/σ at every frequency.

From the result window, Insert into Circuit… on a solve with capacitance fills this in: the form carries the solved C (and G) and lists every solved net, each already on the circuit's net of the same name when there is one (never a ground net), the others empty for you to fill in. Delete the at rows to put in the capacitance alone.

field.peecReduce turns a solved port matrix into another without solving again, as a Q3D-class extractor's matrix reductions do (docs/specs/q3d-matrices/SPEC.md): pass the field.peec reply as peec and a list of ops. A return path ({op: "returnPath", port}) gives the loop inductance from partials, L11 + L22 − 2 L12; joining in series or in parallel (joinSeries, joinParallel) gives two bars or two dies as one terminal; reverse, float (left open), ground (shorted), moveSink and addSink follow the SPEC. Each row also gives the coupling coefficients couplingL and couplingR, |Xij| / √(Xii Xjj). Because the other ports of a field.peec matrix are open, each reduction is exact for the structure it describes, and the reply goes on to field.peecInsert.

For a routed board, layout.extract with peecHz runs the same solver on each power loop's copper path (chapter 16, "layout.extract"), and field.sweep runs field.peec over a parameter. Three warnings say where the model stops: noMagneticMaterial (no core, steel or heat sink is in it), noCapacitance (R and L only, well below the first self-resonance) and aboveQuasiStaticLimit (a frequency above c0 / (10 · extent), where the structure is a tenth of a wavelength). Its tests check it against Hoer and Love's table 1, the round-wire Bessel impedance (Ramo, Whinnery and Van Duzer) and FastHenry's own examples, ground planes included.

Export the results

  • Export Image in the field window, or field.exportImage: the map as PNG or SVG at print resolution, in the light, dark or print palette, with flux lines or isotherms, outlines and a scale bar. range fixes the colour scale so several images share one; currents or at: "peak" draw the windings at their currents.
  • field.exportCsv: one line per mesh element (region, centroid, area, B and H per winding, and the loss density or temperature when the result has them), or the line profile, region table or thermal line, as RFC 4180 CSV with SI units in the header.
  • report.export: the report's Field solver section draws a 3D result as two views, from outside and cut at the mid-plane across the depth: a field solve's |B| on the magnetic parts (with flux tubes from outside) and a core loss's loss density (on the window's log scale), both scaled to the core's 99th percentile by volume as the 3D window scales them (the caption says so when hotter tetrahedra lie above the top), and a 3D thermal solve's temperature on every solid over its whole range. The pictures draw the window's outlines, in Viridis. Save View for Report in the 3D window keeps the view on the screen (camera, section, opacity, shading and the colour range; up to eight), and Export Design Report adds one picture of each 3D result per saved view (field3dViews); a view saved with one body's colour range scales on that body and its caption says so. field.exportImage and field.exportCsv read 2D fields only.
  • field.exportDiagnostics: the solve's diagnostics (mesh size and quality, iterations, residual, Newton steps, time, memory, solver version and input hash) as one JSON file to attach to a bug report. It holds no coordinates, names or materials.

Warnings

Every field result carries a warnings list, shown next to its numbers in the app and returned by the command, the CLI and Python. Each warning is {code, message, messageZh, data}: the code is stable for programs and never changes once released, message and messageZh say it in English and Traditional Chinese, and data holds its numbers (the region, the element, the values compared). A sweep (field.sweep) keeps each point's warnings on its row and lists every distinct code once, with the rows that raised it. The codes:

Code What it means
planarModel A planar section of a given depth with no end effects: end turns and the field outside the section are not in the result (for an electrostatic model, the capacitance is that of the slice alone).
linearMaterial A magnetic region solved with a constant permeability: it does not saturate in this result. Give it a B-H curve to model saturation.
freeFormPreview Free-form 3D from imported bodies (Preview): near a curved or slanted face the field is less accurate; solve again with a smaller elementMm to check.
outsideMaterialData The temperature is outside the material's or the magnet grade's data (the nearest point is used), the peak B is past the last point of the B-H curve, or the DC bias is above the material's DC-bias data.
dcBiasNotCovered The core flux has a DC level the material's loss data do not cover, or the most biased element is outside the measured box: the core loss reads low.
notConverged Adaptive refinement stopped at its pass limit, or ended early, without meeting its change criterion.
meshTooCoarse The estimated inductance error is above the target (0.5 % by default). Refine the mesh or raise the pass limit.
aboveSaturation The core's flux density (its 99th percentile by area or volume where the result has one, else the peak) is above the material's saturation flux density at the core temperature.
cornerPeak A region's peak |B| is on a corner of the drawing, a singularity that grows as the mesh is refined: read the 99th percentile bP99 instead.
noSaturationData The material data give no saturation flux density, so the peak was not checked.
coldRestart In a waveform solve, the Newton iteration from the previous step failed and that step was solved again from zero.
olderSolverVersion The result was computed by another solver version. Solve again to update it.
incrementalError The DC-plus-ripple core loss is off the full solve at the ripple's extremes by more than its limit: solve every time point instead.
demagnetization Part of a magnet is past the knee at its temperature and loses magnetization irreversibly; data gives the share and the worst element.
oneDimensionalModel A winding AC loss on Dowell's one-dimensional window: every layer fills the window breadth, so the field at layer edges, at an air gap and around the end turns is not included.
idealCore A winding AC loss whose window faces are an ideal core (infinite permeability, no gap): a gap's fringing field is not in the result.
outsideCheckedRange Round wire or litz homogenized past the strand diameter, in skin depths, it was checked to (within 1 %); data.fromHz is the frequency where that starts.
noMagneticMaterial A PEEC result has no magnetic material: a core, a steel enclosure or a heatsink near the conductors is not in it.
noCapacitance A PEEC result has resistance and inductance only, which holds well below the structure's first self-resonance.
aboveQuasiStaticLimit A PEEC solve is quasi-static (no retardation, no radiation) and the highest frequency asked is above c0 / (10 · extent · √εr), with the extent the diagonal of the nodes' bounding box and εr = 1 (air). data gives extentM, epsilonR, limitHz and highestHz. Read rows above limitHz as outside the model; a full-wave solver is needed there.
notPassive A PEEC result's R or L matrix fails the passivity check at one or more frequencies: its symmetric part has an eigenvalue below -tolerance times its largest, or it is asymmetric by more than the tolerance (passivityTolerance, default 1e-6). A network of conductors can't give out energy, so the result has lost accuracy. data gives matrix, failing, frequencyHz (the worst), relativeMinEigen, asymmetry and tolerance. Refine the split (converge) and solve again before making a circuit model from it.
majorRepair, meshLeak With meshStatistics: true, a field.peec plane's mesh area differs from its true area by more than 5 % (majorRepair) or 10 % (meshLeak, also a plane with no mesh left). data gives plane, repair, mismatchPercent and recoveredAreaPercent. Give the plane more segments until its row says minorRepair.
fitNotPassive The broadband export's rational fit (field.peec with "broadband" in export) is checked on a grid from 0 Hz to a decade above the band, and Re Z or its term in s (E) still has a negative eigenvalue after passivity enforcement, or with passivity: "check". Vector fitting does not enforce passivity on its own (Gustavsen and Semlyen 1999), and a circuit made from such a model can make energy in a transient run. data gives relativeMinEigen (the smallest eigenvalue of Re Z over its largest, at the worst frequency), frequencyHz and eRelativeMinEigen (the same ratio for E). Fit again with fewer poles, solve more frequencies across the band, or give the enforcement more passes.

Limits

  • 2D is planar or axisymmetric: a planar section has no end turns, so its L is per unit depth times the depth. Use 3D with endTurns when the end turns matter.
  • Field Solve in 2D is magnetostatic and linear. It gives no AC resistance: use the AC thermal solve, the transient, or the exchange items to cross-check in another solver.
  • At most two circuits per model. B-H tables and other core families than E, planar E and ring are refused for a design; draw them as a sketch.
  • B-H curves come from data sheets (ferrites such as N87 and 3C95, amorphous alloys) and, for powder grades (High Flux, Kool Mµ, XFlux, MPP, Edge), from the catalogue DC-bias roll-off as B = μ0·μi·%μ(H)·H. Any other material stays linear, and the reply says so.
  • A peak |B| on a corner of the drawing is a singularity of the linear field: read bP99, not the peak.
  • Read the warnings and notes of a reply (planar model, linear material, outside the material data, a corner peak, a current above the design's): they say where a number stops meaning what it seems to.

The accuracy report

Every field-solver claim is checked by a row of the accuracy report, docs/accuracy.md, section Field solver (magnetics FEM), regenerated by cargo xtask accuracy. Rows fall in four groups: verification (is the math right: analytic cases, convergence order, reciprocity, energy against flux linkage), validation (does it match references), hardware (does it match the bench) and performance. At the time of writing, 30 of 30 measured rows pass and 18 are pending; a pending row names the task that will fill it. A few of them:

Row Our value Reference Error Target
analytic_coax_2d: B and L per metre of a coaxial line 3.184e-5 3.195e-5 0.36 % ≤ 1 %
analytic_toroid_axisym: L and B of a toroid 1.622e-7 1.622e-7 2e-7 % ≤ 1 %
convergence_order_smooth: observed order of the energy error 2.005 2 0.005 2 ± 0.3
mesher_independence: E25 drawn as a sketch, automatic mesh, L (µH) 91.45 91.83 0.42 % ≤ 0.5 %
extrusion_3d_vs_2d: 3D extrusion against 2D, L (µH) 91.53 91.49 0.04 % ≤ 1 %
force_parallel_wires_2d: force between two wires −1.398e-7 −1.4e-7 0.17 % ≤ 0.5 %
ac_resistance_dowell: AC resistance where Dowell's assumptions hold 18.18 18.14 0.20 % ≤ 5 %

The field solver leaves Preview when the release rows (the hardware rows for saturation knee, ripple, core loss and temperature rise among them) pass. Until then, check a result that matters against a measurement or a second solver.