femm_experiment_parametric
Run parametric sweeps in FEMM by re-opening a base model, applying case-specific parameters, solving each case, and collecting specified outputs.
Instructions
Generic parametric study. Every case re-opens the same saved base model, applies its setup, solves and collects outputs. case: {"name": "Hc=900k", "params": {"hc": 9e5}, "commands": [{"command": "mi_modifymaterial", "args": ["N42", 3, 9e5]}]} (preprocessor commands only: mi_/ei_/hi_/ci_). template: optional multi-line MicroPython run inside FEMM per case, formatted with params, e.g. "mi_selectgroup(1)\nmi_movetranslate({dx}, 0)". outputs: {"name", "kind": "point", "x", "y", "quantity": "B|Bx|By|A|H|mu|J"} | {"kind": "block", "code": 22, "groups": [1]} | {"kind": "circuit", "circuit": "A", "quantity": "flux|current|voltage|L|R"} | {"kind": "gap", "boundary": "AGE", "code": 0} | {"kind": "line", "points": [[x,y],...], "code": 3} | {"kind": "expr", "expression": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cases | Yes | ||
| outputs | Yes | ||
| session | No | main | |
| template | No |