Field Solve (magnetics.fieldSolve)
Menu: Design › Field Solver › Field Solve · Runs as: a job, with progress and Cancel
Preview: turn on Preview features in Edit › Preferences › Simulation, or run
preview.set {"enabled":true}. Its replies carrypreview: trueand a note.
What it does
Preview. Solves the magnetic field with Voltecx's own 2D solver, without FEMM: the planar model magnetics.femmExport writes for a design (the front section of an E pair with the gap ground into the centre leg, or the top view of a ring core), or the sketch; meshed automatically, magnetostatic with linear materials, 1 A in each winding in turn. Returns what magnetics.femmImport returns for these values: L of each winding from the field energy, M, 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); no rac (mode harmonic gives the AC impedance with the eddy loss of solid conductors; the windings' own copper loss is field.windingAc's, or magnetics.femmExport's). With apply, an inductor gets l, a coupled inductor l1, l2 and k, a transformer lm, llk1 and llk2. A job: progress counts the windings solved, and cancel stops the solve within one iteration. Memory: before the job starts, the fewest nodes the element sizes need give an estimate of the memory the solve takes, and once meshed (before the matrix is built) the mesh gives it exactly; past 60 % of the memory available now the solve is refused with what to change (the same refusal and Run Anyway as simulation.run), unless ignoreMemoryCheck. model.provenance names, per winding's solve, the solver (its form and method) and a hash of its input (fnv1a64 of the mesh, materials, sources and stopping rule, as field.exportDiagnostics records it), so a stored result can be checked against a fresh solve: the same call gives the same hashes. Other core families, B-H tables, axisymmetric sketches and more than two circuits (without connections or mode harmonic) are refused. With dimension 3 the reply adds dimension:3, inductance:{fromEnergy:{l:[H],m,k},fromFluxLinkage:{l:[H],m12,m21,k},maxRelativeDifference} (L from the field energy and from the flux linkage, M from the mutual energy and from each winding's linkage; the values and apply use L from the energy and M from the flux linkage, as in 2D), peakB:[{circuit,b (T at 1 A in that winding),atMm:[x,y,z],region,element,bP99 (T at 1 A: the core's 99th percentile of |B| by volume, per core region the |B| below which 99 % of its volume lies, the largest region's; the saturation rule, which small elements crowded into an edge do not move; null without a core),atCorner (the peak's tetrahedron has a node on an edge where its region's surface bends: a field singularity that grows with the mesh; read bP99)}], warnings:[{code,message,messageZh,…}] (planarModel for an extrusion, linearMaterial per core; with adaptive, notConverged when it stopped at maxPasses or maxElements and meshTooCoarse when the last pass's estimate puts the L error above 0.5 %) and model:{dimension:3,construction:extruded|revolved|imported|wound,symmetry (the whole model is this many times the meshed part: 8 for wound, 4 for an extrusion meshed as its quarter or a ring revolved through a quarter turn (without field or adaptive: the ring is the same at every angle, so the cut planes are left free), 2 for an extrusion meshed as its half through the depth, else 1),family,circuits,turns,depthMm,gapMm,muR,elementMm,layers,revolveStepDeg,nodes,elements (tetrahedra),edges,freeEdges,minDihedralDeg,maxDihedralDeg,iterations:[per winding],residual:[per winding],reciprocity (|M12 − M21|/|M| of the flux linkages, 0 with one winding),amgLevels,tolerance,estimatedPeakMemoryBytes,solverVersion,provenance:[{circuit,solver,solverVersion,inputHash}]}, fieldCache:{enabled,mesh (the model came from the cache),solution (the solves came from the cache),entries,bytes (what the cache holds now)}, and with field, field:{dimension:3,nodes:[[x,y,z]] (m),tetrahedra:[[a,b,c,d]],elementRegions:[region],regions:[{name,muR}],circuits,b:[[[Bx,By,Bz] per tetrahedron, T at 1 A in that circuit, single precision]]} (the materials are linear, so the field at any winding currents is the sum of each list times its current). With import (Preview, T49) the model is the bodies meshed on a graded lattice, with a plane through each vertex coordinate along an axis when there are at most 64 (flat-faced bodies then lie on lattice planes) and three cells or more across each interval; model.construction and model.family are imported, and a freeFormPreview warning says faces off the lattice planes are less accurate. A 3D model past the node or element limit, or whose memory estimate is past 60 % of the memory available (unless ignoreMemoryCheck), is refused before it is built; cancel stops the 3D solve within a second. Cache: the 3D model is kept by the parameters that build it (design, sketch, muR, clearanceMm, elementMm, layers, stepDeg, endTurns; not for import, whose file may change) and the solves by model.provenance's inputHash (a nonlinear sweep with its currents), at most 256 MiB for the process, the least recently used dropped first; a repeated call skips the meshing and the solve, gives the same reply but fieldCache, and checks the memory again; magnetics.fieldCacheClear empties it. Nonlinear 3D: a design whose core material has a catalogue B-H curve (N87, N97, 3C90, 3C95), without linear or muR, is solved on that curve at the core temperature by damped Newton iteration, each winding driven alone at every current of currents (warm-started from the one before); a sketch, muR, linear:true or a material with no curve takes the linear solve; endTurns is solved on the curve the same way, its eighth's ψ and L scaled to the whole core (a note says which). The reply then has nonlinear:true, material:{name,temperatureC}, inductance:{incremental:{l:[H],m,k},atCurrent} (L_jj and M = the mean of the two mutual terms of the incremental matrix f̂ᵀJ⁻¹f̂ at the first current, which the values and apply use), lOfI:[{circuit,points:[{current,fluxLinkage:[Wb per winding],secant (ψ/I, H),incremental (dψ/dI, H),incrementalMatrix,newtonSteps,halvings,converged,residual,step,cgIterations,peakB}]}], peakB at the largest current, warnings (planarModel for an extrusion; outsideMaterialData for the material data at the temperature and for a region whose peak |B| is past its curve's last point; aboveSaturation when the core's 99th percentile of |B| by volume passes the material's saturation flux density at the temperature at any current, data {bP99,b (the core's peak),element,region,saturation,temperature}; noSaturationData when the material gives none) and model.newton:{tolerance,maxSteps,cgTolerance}; progress counts windings × currents, the memory check adds what Newton holds, field is refused (it is the linear superposition), and a Newton solve that does not converge is an error naming the saturating region, its curve and its peak |B|. Harmonic 3D (mode harmonic, #3824): the 3D model as above with the conductivities given, solved time-harmonically (complex A* of the A,V–A formulation with V = 0 in the conductors, Bíró and Preis 1989; Whitney edge elements; AMS-preconditioned COCG; 3d.md §15), each winding driven alone at 1 A peak; the reply is {source,dimension:3,mode:"harmonic",frequency,result:{headline,values:[r1 (Ω),l1 (H),r2?,l2?,f]},windings:[{circuit,resistance (Re Z, Ω: twice the loss at 1 A),reactance (Ω),inductance (H, Im Z/ω),lossW (the whole model's),regions:[{region,lossW}] (each conducting region),fluxLinkage:[{re,im} (Wb, per winding)],drives:[{region,re,im}] (an extrusion: the field along the depth, V/m, that holds each conducting region at zero net current),iterations,residual}],impedance:[[{re,im}]] (row i, column j: winding i's voltage per ampere in winding j, Ω; the windings' own copper is not in it, field.windingAc gives that),conductors:[{region,conductivity,muR,skinDepthMm,elementMm (the median of the region's tetrahedra's shortest edges)}],warnings (planarModel, linearMaterial, freeFormPreview; skinDepthUnresolved per conductor whose skin depth is below its element size, data {region,skinDepthMm,elementMm}),notes,model:{dimension:3,construction,family,circuits,turns,depthMm,elementMm,layers,revolveStepDeg,symmetry,nodes,elements,edges,freeEdges,minDihedralDeg,maxDihedralDeg,iterations,residual,amgLevels,tolerance,estimatedPeakMemoryBytes,solver,solverVersion},field?,fieldCache}; with field:true, field is the 3D field as for the magnetostatic solve (nodes, tetrahedra, elementRegions, regions, circuits, the whole extrusion unfolded from its half; b per winding at 1 A peak is the real part of the B phasor) with bIm (its imaginary part), lossDensity ([[W/m³ per tetrahedron] per winding at 1 A peak: the time-averaged ½σ|E|², the drives included; it integrates to lossW]) and currentDensity ([[A/m² per tetrahedron] per winding: √(2σ·lossDensity), the RMS over the tetrahedron of the peak |J|; 0 where nothing conducts]); with terminals the reply adds terminals:[{region,between:[str,str] (its two terminals, the first at 1 V),resistance,reactance,inductance,impedance:{re,im} (Ω, U/I between its end faces),current:{re,im} (A at 1 V peak),lossW (at 1 V peak, every conducting region's; ½ Re(U Ī)),regions:[{region,lossW}],mutual:[{circuit,re,im}] (winding i's voltage per ampere in the conductor, Ω; equal to the conductor's drive in that winding's row times the depth),iterations,residual}] and values rt1,lt1,…; adaptive refines the mesh as for the linear magnetostatic solve, on the recovery error of the complex B (its real and imaginary parts, each winding counted alike), and stops when every winding's resistance and reactance (or only the one stopOn names) change by less than stopChangePct (or at maxPasses or maxElements; an extrusion with field is meshed whole), the reply adding adaptive:{stop,maxElements,maxPasses,stopChangePct,minPasses,minConvergedPasses,refinePct,stopOn,passes:[{pass,nodes,elements,resistance:[Ω per winding],inductance:[H per winding],energy:[J per winding, ½∫ν(|Re B|²+|Im B|²) of the whole model],changePct,estimatedErrorPct,minDihedralDeg,maxDihedralDeg,terminalResistance?:[Ω per terminal],terminalInductance?:[H per terminal]}]} with the warnings notConverged and meshTooCoarse as there, and model describing the last mesh; the memory check counts the complex solve (of a mesh at maxElements with adaptive) (two more matrices, the complex iteration's vectors, copies of the mesh and each held region's solve, and with field the reply's lists) once the model's size is known, and the solve uses at most the cores less one, as every 3D solve. Harmonic 2D (mode harmonic without dimension 3, #3069 N1): the planar drawing of the design or sketch, meshed as the magnetostatic solve meshes it, solved time-harmonically (plan.md T12: A–V on linear triangles, sparse LU or COCG), each circuit driven alone at 1 A peak through its stranded coils and each region given a conductivity a solid body held at zero net current (a shield, a plate, a conducting core); the reply is {source,dimension:2,mode:"harmonic",frequency,result:{headline,values:[r1 (Ω),l1 (H),r2?,l2?,f]},windings:[{circuit,resistance (Re Z, Ω: twice the loss at 1 A),reactance (Ω),inductance (H, Im Z/ω),lossW,regions:[{region,lossW}] (each conducting name),fluxLinkage:[{re,im} (Wb, per circuit)]}],impedance:[[{re,im}]] (row i, column j: circuit i's voltage per ampere in circuit j, Ω; the off-diagonal real part is the mutual resistance; the windings' own copper is not in it),reciprocity (the largest |Z_ij − Z_ji|/|Z_ij|),conductors:[{region,conductivity,muR,skinDepthMm,elementMm (the median of the region's triangles' shortest edges),skinLayers:{layers,depthMm,firstMm}|null}],lossyMagnetic:[{region,muR,muRLoss,lossTangent (μ″/μ′)}] (the regions muRLoss gives a loss; windings[].regions lists their loss too),current:{circuit (null for a port),port (with connections),trace:{signal,window:[t0,t1],samples}|null,periodS,fundamentalHz,dcA,rmsA,capturedPct (the share of the mean square the DC part and the harmonics taken carry),harmonics:[{n,frequencyHz,rmsA,resistance (Re Z, Ω),lossW,regions:[{region,lossW}]|null}],dcLossW (0),totalLossW,regions:[{region,lossW}]|null (summed; null for a port, whose windings' fields mix),fundamentalOnlyLossW (the AC part's mean square at the fundamental's Re Z)}? (with current),warnings (planarModel, linearMaterial; skinDepthUnresolved per conductor whose skin depth is below its element size: give the region a maxSizeMm below it),notes,model:{dimension:2,family,circuits,turns,depthMm,gapMm,muR,elementMm,nodes,elements,minAngleDeg,iterations,direct,estimatedPeakMemoryBytes,openBoundary,solver,solverVersion}}; adaptive (#3069 N6) refines the drawing's mesh from the one without it, pass after pass: the worst refinePct of the triangles by the Zienkiewicz–Zhu recovery error of the complex B (real and imaginary parts, each circuit counted alike, the conducting and muRLoss regions counted a second time against their own field energy, so their loss is resolved and not only the core's energy) split at their edge midpoints, the mesher then restoring the angles; it stops as the 3D loop does, on each circuit's own resistance and reactance (or the one stopOn names), at maxPasses, when the next mesh would pass maxElements (default ten times the first mesh's triangles) or at the node limit; with current it refines at the highest harmonic and the others are solved on the last mesh; not with dcBias; the reply adds adaptive:{stop (converged, passes, elements or refinement),frequency,maxElements,maxPasses,stopChangePct,minPasses,minConvergedPasses,refinePct,stopOn,passes:[{pass,nodes,elements,resistance:[Ω per circuit],inductance:[H per circuit],changePct,estimatedErrorPct,minAngleDeg}]}, notConverged when it did not converge, and model describes the last mesh; the memory check counts the complex solve and its sparse factor once meshed (with adaptive, of a mesh at maxElements); progress counts the circuits, and cancel stops between them.
Parameters
design: object? (a magnetics.design reply, or its best design, or one written by hand with no circuit open and no magnetic part placed: {shape:"E 25/13/7",material:"N87",wire:"Round 0.5 - Grade 1" (catalogue names, magnetics.library lists them),turns:34,gapMm:1.0}; layout, gapOuterMm, gapCentreMm and stacks in it as magnetics.femmExport takes them)network: {"windings":[str] (every winding element of a core drawn in the circuit as a magnetic network, its reluctances, leakage paths and flux probes),"core":{"shape":str,"material":str,"wire":str (catalogue names),"parallel":int=1,"core":str?,"stacks":int?,"gapOuterMm":number?,"gapCentreMm":number? (as a design takes them)}}? (instead of design or sketch, not with component or apply: the windings one flux runs through in series are one leg, their turns summed, and the two legs are the windings A and B of the outer-legs design of the core (layout outerLegs), the leg of the first winding named being A; the reply adds network:{legs:[{circuit,windings,turns,totalTurns}],reversed (leg B's current is turned round to match the template's sense),network:{l1,l2,m,k} (from the network's reluctances),field?:{l1,l2,m,k},difference?:{l1,l2,m,k} ((field − network)/|network|, M in the network's sense)})sketch: object? (instead of design: a planar drawing in mm, {depthMm, points:[[x,y]], edges:[[a,b] | [a,b,sweepRad]], labels:[{name?, at:[x,y], muR? | circuit+turns?, maxSizeMm?}]}; a label with muR is a linear core, with circuit and turns a coil of that circuit (negative turns for the return side), with neither air; one or two circuits (up to 32 joined by connections); openBoundary?:{radiusMm, centreMm=[0,0], layers=4 (1 to 10; each layer matches one more harmonic of the field outside, and meshes into many more nodes)} puts the drawing in a circle of air of that radius with Meeker's graded-permeability shells outside it (an open boundary, for air-core parts, busbars and lines) instead of A = 0 on the drawing's outer edge; the air between the drawing and the circle is labelled "open boundary air" unless the drawing labels it, and the shells are regions "open boundary shell 1…N")muR: number? (design only: core relative permeability; default the catalogue's initial permeability at the design temperature)clearanceMm: number=0.1 (design only: space between drawn regions)openBoundary: object? (design only, 2D: {radiusMm, centreMm (default the middle of the design's drawing), layers=4} puts the design's drawing, its A = 0 box then an inner edge, inside an open boundary as sketch.openBoundary does; the stray field then spreads as in open space instead of stopping at the box; a closed core keeps its L)connections: [{"name":str (the port's name, 1 to 64 characters),"join":"series"|"parallel","windings":[str|{"circuit":str,"reversed":bool=false}] (the drawn circuits it joins, each in at most one port; reversed swaps a winding's start and finish)}]? (2D: join the drawn windings into one or two ports before reporting, for paralleled planar layers and split primaries; the drawing may then hold up to 32 circuits, each solved alone, and the values, the split and apply are the ports', in this order: in series one current, L = Σ s_j s_k L_jk, turns Σ s N; in parallel one voltage, the current dividing to keep one flux linkage, turns those its windings share (none when they differ); a winding in no port is left open; the reply adds connection:{ports:[{name,join,turns,windings:[{circuit,reversed,currentPerA}]}],l:[[H]] (port matrix),currents:[[A per winding in model.circuits order] per ampere into each port],open:[circuit]}; model keeps every drawn circuit; with mode harmonic the ports join the impedance matrix instead (#3069 N8: one current phasor in series, one voltage phasor in parallel, so a parallel port's current divides by the windings' impedances, their eddy loss included): result.values and the headline are the ports', windings and impedance stay the drawn circuits', and connection is {ports:[{name,join,turns,resistance (Re Z, Ω),inductance (Im Z/ω, H),windings:[{circuit,reversed,currentPerA:{re,im}}]}],impedance:[[{re,im}]] (the port matrix, Ω),currents:[[{re,im}]],open})symmetryPlanes: [{"axis":"x"|"y","atMm":number=0,"kind":"fluxTangential"|"fluxNormal"}]? (sketch only, 2D, magnetostatic or mode harmonic, #3069 N16: the sketch is a half (one plane) or a quarter (one plane per axis) of the device, cut along x = atMm or y = atMm, which must be a straight outer edge with the whole drawing on one side; fluxTangential: the field odd about the plane (go and return sides mirrored), A = 0 on it; fluxNormal: the field even about it (a winding or core cut through its middle), its nodes free (dA/dn = 0); L and M (with mode harmonic Z, R, L and every loss) are multiplied by 2 per plane, the turns stay the drawn ones; with mode harmonic a conductor may not reach a fluxTangential plane (its eddy current is odd about it), and adaptive (each refined mesh cut the same way, the passes the whole device's) and dcBias (solved on the cut drawing) take the planes too, and forceCurrents is refused; model.symmetry gives the multiplier and model.symmetryPlanes the planes)periodicSector: {"angleDeg":number (360/n for n from 2 to 360 sectors),"startDeg":number=0,"centreMm":[x,y]=[0,0],"kind":"periodic"|"antiPeriodic"}? (sketch only, 2D magnetostatic, linear triangles, #3069 N16: the sketch is one of n sectors of a device that repeats around the centre, between two straight outer edges on the rays at startDeg and startDeg + angleDeg, the rest of its outer edge (an arc) held at A = 0; periodic: every sector's currents alike, A on one side equals A at the same radius on the other; antiPeriodic: alternate sectors' currents reversed (a winding's poles), A is minus it, and a centre on both sides is held at 0; the sides are meshed with nodes at the same radii (points added to the drawing until they match) and tied; L and M are n times the drawn sector's, the turns the drawn ones (a winding is its drawn coils once in each sector, in series); model.symmetry gives n and model.periodicSector the sector; not with symmetryPlanes, mode harmonic, elementOrder 2 or laminations)elementOrder: int=1 (2D magnetostatic only, #3069: 1 linear triangles, 2 quadratic six-node triangles on the same mesh, a node added at every edge's middle: the inductance converges as h⁴ against h² for a smooth field, so the same accuracy takes about a quarter of the nodes or fewer (the window transformer: 0.04 % off on a mesh where linear is 0.45 % off); the solve has about four times the unknowns; model.elementOrder says which; the field view shows the vertex values; magnets are refused)laminations: object? (2D only, magnetostatic or mode harmonic, #3069: magnetic region name to {stackingFactor:number (the sheets' share of the stack, above 0, at most 1),normal:"x"|"y" (the drawing's axis the sheets are normal to; r or z in an axisymmetric drawing)}, up to 64, e.g. {"core":{"stackingFactor":0.95,"normal":"y"}}: the region (every label of that name, one muR, the sheet's) is a stack of steel sheets with non-magnetic coats, solved as one homogeneous region with μ along the sheets F·μr + (1 − F) and across them 1/(F/μr + 1 − F) (layers in parallel and in series, laminations.md §1), the stack's limit as its sheets thin; a coil, air or an unknown region is refused; not with elementOrder 2; no eddy currents inside the sheets (the 3D mode harmonic takes conductivityStack); in mode harmonic the stack is each of its triangles' reluctivity tensor, so a laminated region takes no conductivity or muRLoss, and laminations take no dcBias or adaptive; model.laminations gives [{region,stackingFactor,normal,sheetMuR,muAlong,muAcross}] and the field's regions muAxes:[μx, μy])elementMm: number? (largest element in the core and the windings, 0.01 to 50 mm; default the automatic mesher's: 3 elements across every gap, graded out from there)component: str? (inductor, coupled inductor or transformer to write)ratio: number? (N1/N2 for the transformer split; default the windings' turns)apply: bool=false (write ONE history step named after the source)field: bool=false (also return the solved field, for a field view: in 2D the mesh and each winding's potential, in 3D the tetrahedral mesh and each winding's B)ignoreMemoryCheck: bool=false (solve even when the memory estimate is past the limit)cache: bool=true (dimension 3: take the 3D model and its solution from the cache of identical solves, and keep them for the next call; false meshes and solves afresh and keeps nothing)dimension: int=2 (2 or 3; 3 builds the model in 3D and solves it with the 3D field solver: a sketch or an E-core design is its planar section extruded straight through the depth with no flux leaving the end faces (its section meshed with one element across each gap and arcs in 30° pieces, so the layers stay short), so L matches the 2D solve and checks it; a ring-core design is its section revolved about the axis with each winding an ideal current sheet around the core)layers: int? (dimension 3, extruded: element layers through the depth, 1 to 64; default 8; an even count without adaptive meshes only the half z ≥ 0, the middle plane being a symmetry plane no flux crosses, and doubles the totals: model.symmetry 2; when the section is also antisymmetric about x = 0 (every region mirrored by one of the same material, coils by the same circuit with opposite turns), only the quarter x ≥ 0, z ≥ 0: model.symmetry 4; with field the reply's field is the whole extrusion reflected from the half or quarter, in the drawing's regions)stepDeg: number? (dimension 3, a ring-core design: the largest angular step of its revolution about the axis, 1 to 30°; default 10; halving it doubles the tetrahedra and quarters the faceting error of L and of a terminal's Re Z (second order in the step); not for an extrusion, endTurns or import)endTurns: bool=false (dimension 3, an E or planar E design with one or two round or litz windings on the centre leg: each winding wound around the leg as a bobbin with its end turns, the second over the first, the core and winding solved in 3D in the air box of the 2D drawing (twice the core's largest half-size, grown to hold the winding through the depth); one eighth is meshed and L is eight times its value; on the core's B-H curve unless linear:true, as an extrusion; elementMm is the largest element of the top view and the thickest layer (default: the top view graded from the gap and the winding's clearances, coarser inside the core, and no layer thicker than its largest element); no layers; with field (linear only) the reply's field is the whole core, the eighth reflected across its three symmetry planes; an E design with layout outerLegs: each winding wound round its outer leg with its end turns, one eighth solved twice, for equal and opposed ampere-turns, model.construction woundOuterLegs and inductance.eighth {common,differential}; with field the reply's field is the whole pair, both circuits each alone at 1 A (the two parts unfolded and superposed); with adaptive (linear:true or muR) the eighth is refined with both parts solved on each mesh, each pass's energy [common, differential] the model's at 1 A in winding B, and with field the cap is at most an eighth of the view's limit; on the core's B-H curve (no linear or muR) the full-width quarter holding both windings is meshed (the eighth mirrored across x = 0, the whole model 4 times it) and each winding swept through currents in turn, the reply the nonlinear one above (lOfI, inductance.incremental, field refused), with adaptive the quarter refined by the nonlinear loop below, or with operatingPoint both windings solved at once (with adaptive each pass that one solve, the loop stopping when both flux linkages and every entry of the incremental matrix settle, each pass adding fluxLinkage:[Wb] and incrementalMatrix:[[H]], the whole model's))gapElements: number? (dimension 3, the outer-legs model only, 0 to 3; default 1: elements across each thin region of the top view (the winding's clearance from its leg and the strips beside it), each graded out from there; 0 refines across none of them, only the mesher's 25° angle bound, a mesh several times smaller (the thesis pair of 2 × E 65/32/27: about 8 times fewer nodes), for a core too large for the default; model.gapElements says which)adaptive: bool|object=false (dimension 3, linear or on the B-H curve, or the 2D mode harmonic: refine the 3D mesh where the element error estimate is largest and solve again, pass after pass (Zienkiewicz–Zhu recovery of B per region; the worst 30 % of elements bisected at their longest edge, the mesh kept conforming; a winding drawn in a sketch is carried onto the new edges exactly, so L rises pass to pass); the built mesh is the first pass, so a large elementMm starts it coarse; with even layers and no field that is the extrusion's half or quarter, as without adaptive, and nodes and elements count it; {maxElements:int? (the largest mesh solved, 1 to the element limit; default ten times the first),maxPasses:int=8 (1 to 20),stopChangePct:number=0.1 (stop when every winding's energy changes by less than this, 0.01 to 10 %),minPasses:int=1 (1 to maxPasses: no converged stop before this many solves),minConvergedPasses:int=1 (1 to 19, below maxPasses when above 1: that many passes in a row must each change by less than stopChangePct, so one that settles by chance does not stop the loop),refinePct:number=30 (1 to 100: the share of elements marked each pass, the worst first; closing the mesh bisects more),stopOn:str? (mode harmonic only: "impedance" (default: each winding's resistance and reactance), "resistance" (the loss at a given current) or "inductance"; the magnetostatic loop always watches the energy, the inductance at 1 A),estimate:str? (operatingPoint on the B-H curve only: "chord" (default: the DC field in the chord reluctivity H/B, aimed at the flux linkages), "incremental" (each winding's incremental field in the Jacobian's differential reluctivity, whose norm is that winding's incremental L: aimed at the L and M reported) or "both"; the reply's adaptive.estimate names it)}; the memory check is of a mesh at maxElements; the reply adds adaptive:{stop (converged, passes or elements),maxElements,maxPasses,stopChangePct,minPasses,minConvergedPasses,refinePct,passes:[{pass,nodes,elements,energy:[J per winding, the whole model's],changePct,estimatedErrorPct,minDihedralDeg,maxDihedralDeg}]} and model describes the last mesh; on the B-H curve (#3069 N6) each pass sweeps every winding through currents by Newton iteration, the estimate takes each element's chord reluctivity H/B at the largest current, the loop stops when every flux linkage of every point changes by less than stopChangePct, each pass adds secant:[H per winding, ψ/I at the largest current, the whole model's] and its energy is the stored energy ∫w(|B|)dV there, the memory check is of the Newton solve, the cache is not used, and lOfI, the values and model are the last mesh's)linear: bool=false (dimension 3: keep every material linear even when the design's core material has a B-H curve; 2D is always linear)currents: [A]? (dimension 3, nonlinear only: the winding currents to solve at, rising, 1 to 16, each above 0 and at most 1e5 A; default [1])operatingPoint: object? (dimension 3, the outer-legs model on the B-H curve only, not with currents; adaptive refines its mesh, one solve a pass: each winding's current at one instant by circuit name, A, signed in the drawing's polarity, each at most 1e5 in size, not all 0, e.g. {"A":21.7,"B":12.5}: one Newton solve with both windings driven at once (a saturating core does not superpose the windings' sweeps), then the incremental matrix there; L and M (what apply writes) are the incremental ones at the point; the reply adds inductance.atCurrents and operatingPoint:{currents,fluxLinkage:[Wb per winding, the whole model's],incrementalMatrix:[[H]],peakB:{b,atMm,region,element,atCorner},bP99,legs:{A,centre,B: {peakB,atCorner,bP99,meanBz (T: the leg's flux over its section averaged along its height, signed)}},newtonSteps,halvings,residual,step,cgIterations,converged})temperatureC: number? (dimension 3, nonlinear only, or the 2D mode harmonic with dcBias: core temperature for the B-H curve, -40 to 200 °C; default the design's, else 25)import: object? (dimension 3, instead of design or sketch: closed bodies from an STL file or the solids of a STEP file (ISO 10303-21) with plane, cylinder, cone, sphere and torus faces and line and circle edges (circles cut into 5° pieces, so a round leg or bore comes in as its inscribed 72-gon, a chamfer or taper as the frustum on those polygons, and a sphere or a ring torus bounded by parallels and meridians (a rounded end, a fillet) as flat pieces of at most 5° by 5° with their corners on it; a cone's semi-angle is read in the file's plane angle unit; B-spline curves and faces, rational or not, as flat pieces that bend no more than a 5° piece of a circle, their corners on the surface; a solid with voids (BREP_WITH_VOIDS) as the material between its outer shell and its voids; the parts of an assembly come in at their places, one body per placed solid), {path:str (read through the host's file service; a file starting with ISO-10303-21; is STEP; a fixed-format IGES 5.3 file (S in column 73 of its first record) is IGES, read for its manifold solid B-rep objects (type 186) with plane faces (types 108, 190), right circular cylinder, cone, sphere and ring torus faces (types 192, 194, 196, 198; cut as STEP cylinders, cones, spheres and tori), rational B-spline surface faces (type 128; cut as STEP B-spline faces) and line, circular arc and rational B-spline curve edges (types 110, 100, 126; arcs cut into 5° pieces as STEP circles, B-spline curves as STEP B-spline curves), or with no solid its trimmed surfaces (type 144: bounded by curves on the surface, N1 = 1, or a rational B-spline surface's domain, N1 = 0: its whole knots' range or the part its parameter range U(0), U(1), V(0), V(1) names) and bounded surfaces (type 143: bounded by boundary entities, type 141, of model-space curves) welded into closed bodies, any other IGES surface or edge curve refused by name),unitMm:number? (mm per file unit: default 1 for STL; a STEP or IGES file states its own (IGES: the Global units flag), and unitMm is taken only when it names none, refused when it disagrees),bodies:[{muR:number (1e-3 to 1e7, linear),name:str?}] (one per solid of the file, in its order; a binary STL's one solid is named after the file, a STEP solid after its name or #n, an IGES solid after its directory entry label or D<n>; in a STEP assembly one per placed solid, top assembly first, a solid placed more than once named after it and its occurrences, as 'half in lower'),windings:[{circuit:str,turns:number (nonzero; negative winds the other way),bobbin:{centerMm:[x,y],halfSizeMm:[a,b],cornerRadiusMm:number=0,thicknessMm:number,zMm:[z0,z1]} (around an axis parallel to z) | straight:{yMm:[y0,y1],goMm:[x0,x1],backMm:[x0,x1]} (conductors along z through the whole box, go and return) | toroid:{rMm:[r0,r1],zMm:[z0,z1]} (an ideal sheet around a ring core about the z axis; only mesh edges with both ends in the section carry it, so the section grows to wrap the meshed bodies it overlaps (a faceted ring's bore reaches in to r·cos 2.5° for a STEP file's 5° pieces), and a note says to what) | spiral:{centerMm:[x,y],halfSizeMm:[a,b] (the outermost turn's outer edge),cornerRadiusMm:number=0,widthMm:number,pitchMm:number (at least widthMm),zMm:[z0,z1] (the copper),startAngleDeg:number=0,pitched:bool=true} (a planar spiral around an axis parallel to z with turns:int whole turns, each where it is: pitched steps in once a turn from startAngleDeg and returns by a radial lead across the turns in the same layer; pitched:false gives closed concentric turns; needs a hole: (turns, one fewer unpitched)·pitch + width below the smaller half size) | helix:{centerMm:[x,y],halfSizeMm:[a,b],cornerRadiusMm:number=0,thicknessMm:number,heightMm:number,pitchMm:number (at least heightMm),bottomMm:number,startAngleDeg:number=0,pitched:bool=false} (turns:int whole turns stacked along z from bottomMm, each a closed ring heightMm tall, the helix's one-turn axial current and leads left out; pitched:true makes it a true helix rising counter-clockwise about +z one pitch a turn from bottomMm at startAngleDeg, with its axial current and a straight return lead from the top back down through the turns' shell at startAngleDeg, as for a coil with both terminals at the bottom; needs cornerRadiusMm at least thicknessMm)}] (one or two),boxMm:{lo:[x,y,z],hi:[x,y,z]}? (the box of air, whose sides let no flux out and may cut a body: a symmetry plane; default the bounds of the bodies and windings grown by half their largest extent)}; elementMm is then the largest lattice cell, default a twentieth of the box's largest side)mode: str="magnetostatic" ("harmonic" solves the eddy currents of solid conductors at frequency instead, linear, each winding driven alone at 1 A peak; not with apply or currents; in 2D not with field, and every drawn circuit (up to 32) is solved, then joined into ports by connections when given; dimension 3: not with temperatureC; with endTurns the wound E core's eighth, its loss and Z eight times the eighth's, only the core conducting; an extrusion is meshed whole or as its half through the depth, never its quarter, and each of its conducting regions is held at zero net current along the depth as in the 2D AC solve, one more solve per region)frequency: number? (Hz, above 0 and at most 1e9; mode harmonic only, and required there)conductivity: object? (mode harmonic only, and required there unless muRLoss gives a loss: region name to S/m, 0 to 1e9, at least one above 0, e.g. {"plate":3.77e7}; a sketch label's name (every label of that name), an imported body's name or a design region, and core for every magnetic region when none is named core (the wound model's core bodies); a winding's region is refused (with endTurns every region but the core's), its turns being stranded, and so is an open boundary's shell)terminals: [str]? (dimension 3, mode harmonic, an extrusion (then meshed whole), import, or a ring design (its quarter turn; not with field or adaptive, which mesh the whole ring): conducting regions by name, each a solid conductor driven between the extrusion's two end faces, an imported body between the one pair of opposite box sides that cut it (boxMm; a body cut by no pair or by more than one is refused), or a ring region as one turn around the axis cut once at φ = 0 (the quarter turn solved between its cut planes, the four quarters in series), at 1 V peak in one more solve, every winding at 0 A and the other conducting regions held at zero net current; up to 16; with adaptive each pass drives them too and the loop watches their resistance and reactance as well; with field, field.terminals holds each one's b, bIm, lossDensity and currentDensity at 1 V peak)muRLoss: object? (mode harmonic, 2D only, #3069 N3: magnetic region name to μ″, 0 to 1e7, the loss part of its complex relative permeability μ′ − jμ″ with μ′ its muR (a ferrite's or powder core's data-sheet μ″ at the frequency, IEC 60401-3), e.g. {"core":30}; every label of that name; air, windings and an open boundary's shells are refused; the region's magnetic loss (ω/2)·Im(1/μ)·|B|² is in Re Z, lossW and regions, and conductivity may then be left out)skinLayers: object? (mode harmonic, 2D only, #3069 N5: conducting region name to n, 1 to 20, e.g. {"plate":3}: n mesh layers under the region's surface, together 2 skin depths deep at the frequency (its own conductivity and muR), each twice as thick as the one outside it (the first 2δ/(2ⁿ − 1)); every label of that name; a region conductivity does not give a conductivity above 0 is refused; conductors[].skinLayers gives {layers,depthMm,firstMm}, and a region whose first layer is thinner than its skin depth gets no skinDepthUnresolved)surfaceImpedance: [str]? (mode harmonic, 2D only, #3069 N10: conducting regions by name solved by their surface impedance, for a shield, wall or busbar many skin depths thick: the region's inside is left out of the field and its boundary carries the Leontovich condition (Jackson §8.1), so its mesh needs no element finer than its shape and no skinLayers; its loss is the Poynting flux ½R_s∮|H_t|², R_s = 1/(σδ); valid where δ is small against its thickness and radius of curvature (a round bar of radius a loses a/(2δ) of its DC loss by it, against a/(2δ) + 1/4 exactly); every label of that name; a region conductivity gives no conductivity above 0, one in skinLayers, and two that touch are refused; with adaptive each pass solves it by its surface impedance and the estimate weights the elements beside it instead of its inside; conductors[].surfaceImpedance is true for it, with thicknessOverSkinDepth (2·area/perimeter over δ), and a surfaceImpedanceThin warning when that is below 5, where the condition is more than about 1 % off)current: object? (mode harmonic, 2D only, #3069 N2: one period of a converter current, as field.peec takes it (waveform, or signal with periodS and t1 from the last run), with "circuit":str? (the drawn circuit it flows in, or a port of connections; default the only one) in place of port and harmonics 1 to 50 (default 15); leave out frequency: the drawing is solved at each harmonic n/T, the other circuits open, and harmonic n of rms In loses In² Re Z(n/T), summed by Parseval (Hurley, Gath and Breslin 2000); the DC part loses nothing, the windings being stranded and the solids at zero net current; skinLayers are meshed for the highest harmonic, the skin warnings checked there, and the rest of the reply is the fundamental's)dcBias: object? (mode harmonic, 2D only, #3069 N4: drawn circuit name to its DC current, A, -1e5 to 1e5, at least one not 0, e.g. {"P":3}: the drawing is first solved magnetostatically at those currents with every core region (magnetic, not an open boundary's shell) on the catalogue B-H curve of its material at the core temperature (Newton, 2d.md §3.2; N87, N97, 3C90, 3C95; a material with no curve is refused), and the AC solve takes each core triangle's incremental reluctivity tensor there (dH/dB along the bias field, H/B across it), so Z is the small-signal impedance on the bias: inductance is the incremental L, the ripple's, and the losses are the ripple's; conductivity may then be left out; not with muRLoss on a core; with current, its harmonics are solved on the bias; the reply adds dcBias:{currents:[{circuit,a}],material:{name,temperatureC},newton:{steps,residual},peakB (T, the cores' largest |B| at the bias),incrementalMuR:{mean (the cores' area mean of the incremental μr along the field),min}})forceCurrents: object? (mode harmonic, 2D only: drawn circuit name to its peak current, A, as a number (negative for the opposite phase) or {"peakA":A,"phaseDeg":°=0}, -1e5 to 1e5 A and -360 to 360°, at least one not 0, a circuit left out at 0 A, e.g. {"P":1000,"S":-2000}: the Lorentz force J × B through the depth on every winding side (its stranded current) and every conducting region (its eddy current) at those currents, the time-averaged AC winding force and the short-circuit forces; with i = I cos ωt it is a mean part and a part at twice the frequency, F(t) = mean + Re(F₂ e^{j2ωt}) (mean ½ Re ∫ J* ∇A, F₂ = ½ ∫ J ∇A); a magnetic core's own force (its magnetisation) is not in it; not with current, dcBias, surfaceImpedance or symmetryPlanes; the reply adds forces:{frequency,doubleFrequency (Hz),currents:[{circuit,peakA,phaseDeg}],regions:[{region,circuit (null for a conductor),meanN:[x,y],doubleFrequencyN:[x,y] (the amplitudes of the 2f part),peakN:[x,y] (each component's largest |F| over the cycle, |mean| + amplitude),peakMagnitudeN (the largest |F| over the cycle)}] (labels of one name summed),windings:[{circuit,meanN,doubleFrequencyN,peakN,peakMagnitudeN}] (each circuit's coil regions summed),method})material: str? (with dcBias on a sketch, and required there: the catalogue material of its core regions, e.g. "N87"; a design names its own)conductivityStack: object? (dimension 3, mode harmonic: region name to {normal:"x|y|z"|[x,y,z] (the sheets' normal, any direction),across:S/m=0 (σ across the sheets, 0 to the region's conductivity; 0 for insulated coats)}, up to 64, each region also in conductivity with σ above 0, which is then σ along the sheets: a lamination stack whose tensor is σ_along I + (σ_across − σ_along) n nᵀ (laminations.md (9)); a tilted normal meshes an extrusion whole and is refused on a model solved as a part (endTurns' eighth; a ring's quarter turn, which takes only normal z); conductors[].stack gives {normal,conductivityAcross})magnets: [object]? (as magnetics.fieldFluxMap takes them; dimension 3 only, an extruded design or sketch with a coil, linear (a design on its B-H curve asks for linear: true); each magnet is its region through the depth, magnetized in the drawing's plane; the extrusion keeps its half through the depth (even layers) or the whole (odd), never the quarter; L is each winding's alone at 1 A; a magnet's demagCurve (#3069) puts it on its curve: the magnets' field is then the 3D Newton solve at no current, a reverse field along the magnetization on the curve and any other on the recoil line, its check reads that field, model.magnets is "demagCurve" with model.newtonSteps, and incrementalInductanceH:[[H]] is the incremental inductance matrix f̂ᵀJ⁻¹f̂ there (the curve's slope past the knee), while the values and apply keep L at the recoil permeability; not with field, adaptive, mode harmonic, endTurns, import or a ring design)
Reply
- source
- frequency
- gapMm
- magnets? (each magnet's data and demagnetization check at no current, as magnetics.fieldCoreLoss {dimension: 3} gives them, with demagCurve:{points,brT}|null)
- incrementalInductanceH? (with a demagCurve)
- magnetWarnings? (also in warnings)
- result:{values}
- apply:[edits]
- applied
- notes
- model:{family,circuits,turns,depthMm,gapMm,muR,elementMm,nodes,elements,minAngleDeg,iterations,residual,reciprocity,openBoundary:{centreMm,radiusMm,layers}|null,solverVersion,provenance:[{circuit,solverVersion,inputHash}]}
- warnings:[{code,message,messageZh,data}] (planarModel with the depth in m; linearMaterial for each magnetic region but an open boundary's shells, since the 2D solve has no B-H curve)
- field?:{nodes:[[x,y]] (m),triangles:[[a,b,c]],elementRegions:[region],regions:[{name,muR}],fixed:[node held at A = 0],circuits,potentials:[[A_z per node, Wb/m, 1 A in that circuit]]}
- preview
- previewNote