Field Sweep (field.sweep)
Menu: none (Quick Open, the CLI, Python and MCP) · 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. Each point is one call of the command with the point's values written into params, so its row is exactly that single solve's result; a repeated 3D solve comes from the field cache. Progress counts the points; cancel stops between points and the reply keeps the rows run so far. Changes nothing.
Parameters
command: str="magnetics.fieldSolve" (the field command each point runs: magnetics.fieldSolve, magnetics.fieldCoreLoss, field.windingAc, field.thermalSolve or field.peec)params: object (that command's params, the base every point starts from; apply is refused)parameters: [{"path":str (where the value goes in params: dotted keys, a number indexing a list, e.g. "elementMm" or "design.best.gapMm"; a bare gapMm, gapCentreMm, gapOuterMm, turns, secondaryTurns, stacks, shape, material or wire goes in the design (its best design for a magnetics.design reply), and gapMm there also sets a given gapCentreMm),"paths":[str | {"path":str,"times":number=1,"plus":number=0}]? (instead of path: 1 to 64 places the one value goes, each written as value × times + plus, e.g. both path points' z of a busbar layer at a swept spacing),"name":str? (the name its rows carry; default the path; required with paths, times or plus),"values":[any]? (the values to run, 1 to 256; numbers or text, e.g. core shapes) or "from":number,"to":number,"step":number? (from to to by step, both ends included, a negative step running down; not with points or scale),"points":int=5 (linear and log: 2 to 256 in all, both ends; decade and octave: 1 to 256 per decade or octave, from `from` up to the last not past `to`),"scale":"linear"|"log"|"decade"|"octave"="linear" (log, decade, octave: both ends above 0)}] (1 to 4)combine: "nested"|"synchronised"="nested" (nested: a grid of every combination, the first parameter slowest; synchronised: the parameters' values taken pairwise, each with as many; at most 256 points; not with optimize)design: "latinHypercube"|"fractionalFactorial"? (instead of combine: a sampled design of experiments over each parameter's from-to range, linear, or evenly in ln with scale log (no points or step), the plans of analysis.doe; latinHypercube: "runs":int=10 per parameter (2 to 256) and "seed":int=1, each range cut into runs equal strata, each stratum used once, at a random point inside it, the same seed giving the same points; fractionalFactorial: a two-level 2^(k-p) at the range ends, "fraction":int=1 with the NIST/SEMATECH e-Handbook generators (3 or 4 parameters) or your own "generators":[str] e.g. ["C=AB"]; with optimize: the design runs first and the search starts from its best point, golden-section on the bracket of that point's neighbouring design values, Nelder–Mead from that point with a step of one stratum (latinHypercube) or a quarter of each range (fractionalFactorial))outputs: {name:str (a JSON pointer into the command's reply, e.g. "/model/nodes")}? (more columns)optimize: {"output":str (a column),"goal":"target"|"min"|"max"="target" with target,"target":number? (for goal target),"tolerancePct":number=0.5 (goal target: stop once the output is this close to the target, 0 to 100 %; default the field solver's mesh tolerance, metrics.json mesher_independence),"maxEvaluations":int=40 (1 to 256; the search's own, after a design's runs, the two together at most 256)}? (instead of the grid: search the parameters, each a from-to range, for the goal; one parameter by golden-section search on its range, more by Nelder–Mead on the box, each value kept inside its range; started from the middle, or from a design's best point with design)surface: {"output":str (a column),"goal":"min"|"max"="min","goals":[{"output":str (a column),"goal":"min"|"max"|"target","low":number,"high":number (the acceptable range: min has desirability 1 at low and 0 at high, max 0 at low and 1 at high, target 0 at both and 1 at target),"target":number? (goal target, between low and high),"weight":number=1 (the shape exponent, 0.1 to 10: above 1 asks more of the output near its best),"importance":number=1 (0.1 to 10)}]? (1 to 8, one per column; instead of output and goal: several outputs at once by the Derringer-Suich desirability, D = the importance-weighted geometric mean of the goals' desirabilities, 0 when any is outside its range),"confirm":bool=true}? (with a grid or a design over from-to ranges, linear or log: fit analysis.doe's quadratic response surface to the rows' output in coded units (-1 the low end, +1 the high end, in ln for log; squares only for parameters at 3 or more values) and find its exact least or greatest value on the box (with goals: one surface per column and the point of greatest D, a grid of about 2e5 points refined by a compass search); confirm runs the command once more at that point, as one more row; not with optimize)
Reply
- command
- parameters:[{path,values} | {name,paths:[{path,times,plus}],values}] (with design: the values drawn, in run order)
- combine (nested, synchronised, or the design's name)
- plan?:{design,runs,coded:[[number]] (each run's levels, -1 the low end, +1 the high end),seed? (latinHypercube),generators?:[str] (fractionalFactorial)} (with design)
- columns:[str] (the outputs: each number of the reply's result.values by its name, the reply's numbers at its top level, peakB (the reply's peak.b, or the largest peakB[].b), bP99 (the core's 99th percentile of |B| beside it: the reply's bP99, or the largest peakB[].bP99; a corner peak grows with the mesh, the percentile does not) and the outputs given)
- rows:[{point,values:{name:value},outputs:{column:number},error?:str (that point's refusal or failure; the sweep goes on),warnings?:[object] (that reply's warnings, as the command gives them alone)}]
- warnings:[object] (every distinct warning of the rows once, by code, as first raised, with points:[int] (the rows that raised it))
- optimum?:{values,outputs,objective,evaluations (the search's, after the design),method (golden|nelderMead),stop (tolerance|bracket|simplex|evaluations|cancelled),start?:{design,runs,point (the row of the design's best point, or null when no design run gave the output),objective} (with design)}
- surface?:{output,goal,runs (rows fitted),model:{terms:[{term,coefficient}],r2},optimum:{values:{name:number},coded:[number],predicted,onBoundary},stationary:{values,coded,predicted,kind (minimum|maximum|saddle),inside}|null (the unconstrained stationary point of the canonical analysis; null when the model has none),confirmation:{point,measured,predicted,differencePct}|null} | {goals:[{output,goal,low,high,target?,weight,importance,runs,model:{terms,r2},predicted,desirability} (each at the optimum)],optimum:{values,coded,desirability (D),feasible (D above 0: every goal in its range),onBoundary},confirmation:{point,outputs:[{output,measured,predicted,differencePct}],desirability (D of the measured outputs)}|null} (with goals)
- notes