# Export FEMM Model (`magnetics.femmExport`)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/commands/magnetics-femmExport/)

**Menu:** **Design › Field Solver › FEMM Export** · **Runs as:** at once

## What it does

Writes the design as a FEMM 4.2 model: the planar section of an E pair, a planar E set, or an ETD, EFD or RM set (post and legs at their true sections over the depth) with the gap ground into the centre leg, or the top view of a ring core, with each winding (round, litz or foil, conductors in hand, layers) in the window, the core as μr or a B-H table, and copper at 20 °C. The Lua script opens the .fem, drives 1 A in each winding in turn and writes L, M and the winding resistance at the frequency; pass that file to magnetics.femmImport. Writes the files through the host's file service when paths are given. Changes nothing.

## Parameters

- `design`: object (a magnetics.design reply, or its best design; the design may add layout:"centreLeg"|"outerLegs" (outerLegs, an E set with two windings: winding A on the left outer leg and B on the right, the two-phase coupled inductor), gapOuterMm (a spacer gapping every leg, 0 to 100), gapCentreMm (the centre leg's whole gap, spacer included; default gapMm, else the spacer) and stacks (sets stacked, 1 to 64; default the core's))
- `frequency`: Hz? (of the AC solution; default the reply's fsw, 0 solves magnetostatics)
- `muR`: number? (core relative permeability; default the catalogue's initial permeability at the design temperature)
- `bh`: \[\[H,B\]\]? (core B-H table, A/m and T, up to 200 points)
- `clearanceMm`: number=0.1 (space between drawn regions)
- `femPath`: str?
- `luaPath`: str?
- `resultsPath`: str? (where the script writes its results; default next to the .fem)

## Reply

- model:{family,problem:"planar",depthMm,gapMm,spacerMm,layout,stacks,frequency,muR,bhPoints,windings:\[{circuit,turns,parallel,conductor}\],nodes,labels}
- fem
- lua
- femPath
- resultsPath
- notes
- written
