Airbox outer-boundary closure¶
Last changes: Documentation changelog
Physical problem¶
The mesher marks non-periodic outer airbox faces as Gamma_out; study.demag(...) separately authors the physical model. A closed mesh surface is not proof of an open-boundary closure.
Governing equations¶
Symbols and SI units¶
Symbol |
Meaning |
SI unit |
|---|---|---|
\(\Gamma_{\mathrm{out}}\) |
non-periodic outer airbox surface |
\(\mathrm{m^2}\) |
\(\partial\Omega_a\) |
boundary of auxiliary airbox domain |
\(\mathrm{m^2}\) |
\(\Gamma_{\mathrm{periodic}}\) |
outer faces assigned periodic pairing |
\(\mathrm{m^2}\) |
Assumptions and validity¶
AirboxOptions.boundary_marker is a Gmsh tag with default 99; it does not expose a Robin
coefficient. OCC first selects outer min/max surfaces for periodic pairing, assigns paired-face
physical groups, and removes those paired tags from the faces later assigned to Gamma_out.
The invalid state is simultaneous ordinary-outer and periodic ownership of one face. A solved
system can still have truncation error.
Solver lane |
Status |
Limit |
|---|---|---|
FEM CPU |
source-backed |
No runtime closure result is claimed. |
FEM GPU |
capability-gated |
No GPU closure receipt is claimed. |
FDM CPU |
not applicable |
FEM shared-domain marker contract. |
FDM GPU |
not applicable |
FEM shared-domain marker contract. |
Python API¶
# %%
import fullmag as fm
nm = 1e-9
study = fm.study("airbox_boundary")
study.engine("fem")
study.device("cpu", precision="double")
study.mode("strict")
study.universe(mode="manual", size=(600 * nm, 400 * nm, 200 * nm))
# %%
study.universe.mesh(maximum_element_size=80 * nm, minimum_element_size=10 * nm)
body = study.geometry(fm.Box(size=(200 * nm, 100 * nm, 10 * nm), name="film"), name="film")
body.mesh(maximum_element_size=8 * nm, minimum_element_size=4 * nm, order=1)
body.Ms = 800e3
body.Aex = 13e-12
body.m = fm.texture.uniform(1.0, 0.0, 0.0)
# %%
study.demag(model="airbox", variant="robin")
study.build_domain_mesh()
study.stages.add_relax(stage_id="equilibrium", algorithm="llg_overdamped", max_steps=1000)
Python |
Type |
Default |
SI unit |
Validation |
Meaning |
Backend support |
ProblemIR |
|---|---|---|---|---|---|---|---|
|
|
|
\(1\) |
direct dataclass field; mesh-group allocation avoids collisions |
Gmsh tag for |
FEM authoring and mesh metadata are source-backed; runtime lane requires separate qualification; FDM not applicable |
|
|
|
|
\(1\) |
coerced with |
demag enablement |
Authoring/lowering contract only; runtime depends on the resolved realization and a separately qualified lane |
|
|
|
|
\(1\) |
|
canonical demag model |
Authoring vocabulary only; |
|
|
|
|
\(1\) |
With |
airbox closure variant |
Authoring/lowering contract only; runtime depends on the resolved realization and a separately qualified lane |
|
|
|
|
\(1\) |
Exact string membership; accepts |
legacy realization request |
Authoring/lowering contract only; runtime depends on the resolved realization and a separately qualified lane |
|
Demagnetization branch precedence and legacy vocabulary¶
The constructor separates authored intent from resolved realization in this exact order:
Authored state |
Validation and lowering |
Resolved consequence |
|---|---|---|
|
Rejected as mutually exclusive before either model or legacy realization is selected. |
No realization is produced. |
|
The model branch validates |
|
|
The legacy realization branch runs before standalone-variant validation. It checks exact membership in |
The exact legacy value is lowered through the alias table below. |
|
Rejected because no branch owns the variant. |
No realization is produced. |
Accepted legacy authored realization (exact string) |
Resolved realization |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any other exact legacy realization is rejected; values such as " BEM " and "BEM" are not accepted. These tables establish Python validation and lowering, not runtime availability. In particular, Demag(model="bem") is accepted vocabulary but BEM is explicitly future/unimplemented in the current Python source; fmm acceptance likewise does not qualify a runtime lane.
ProblemIR¶
The marker is generated mesh data. study.demag(...) first constructs Demag, then coerces
enabled with bool and stores Demag._resolved_realization(). Canonical mappings are
airbox/auto -> poisson_robin, airbox/robin -> poisson_robin,
airbox/dirichlet -> poisson_dirichlet, and each non-airbox model with implicit auto maps to
its model name. Legacy aliases use exact-key lookup: poisson_airbox and airbox_robin map to
poisson_robin, and airbox_dirichlet maps to poisson_dirichlet; no whitespace or case
normalization is applied.
Round-trip and failure semantics¶
Requested intent is airbox mesh plus enabled, model, variant, or legacy realization.
Resolved execution contains disjoint outer/periodic marker data and a canonical demag
realization. Validation errors include model with realization, variant without model,
an airbox variant outside the supported set, any variant on a non-airbox model, invalid legacy
vocabulary, invalid mesh generation, or missing required shared-domain air. Unsupported
combinations include retaining one face simultaneously as ordinary outer and periodic, or
interpreting a marker as a physical equation.
In validator vocabulary, unsupported combinations are rejected rather than lowered to a fallback.
Discrete realization¶
The OCC path assigns periodic physical surfaces first, then adds remaining gamma_out faces using boundary_marker and name Gamma_out; interface faces are separate.
Implementation mapping¶
Responsibility |
Repository path |
Stable symbol |
|---|---|---|
marker default |
|
|
periodic marker allocation |
|
|
periodic exclusion |
|
|
demag authoring |
|
|
Validation¶
Inspect outer and interface facets, markers, and periodic-face exclusion; then run an outer-distance and mesh-refinement study. No runtime, coefficient, or parity proof is supplied.
Limitations¶
The marker default is not a global uniqueness proof and no public coefficient API is exposed.
Scientific bibliography¶
C. Abert, European Physical Journal B 92 (2019), doi:10.1140/epjb/e2019-90599-6.
Source-code index¶
Claim |
Repository path |
Stable symbol |
Evidence |
|---|---|---|---|
marker default |
|
|
source-backed |
periodic groups |
|
|
source-backed |
outer pairing |
|
|
source-backed |
canonical realization validation/lowering |
|
|
source-backed |
direct demag request |
|
|
source-backed module-level public entry point; the |
|
|
Public |
Scope and purpose¶
This page defines the public contract for FEM airbox outer-boundary closure. It is an authoring and implementation reference: the Python example, the serialized ProblemIR description, the implementation mapping, and the adjacent source map are the source-backed contract. A capability marked partial or not evaluated is not presented as a production guarantee.
Scientific and numerical model¶
The mesh or grid is a discrete approximation of the continuous domain. For a Cartesian partition, each spacing satisfies Delta_i = L_i / N_i; for a geometry-dependent FEM mesh, the requested local target is bounded by the active bulk, interface, boundary, and topology constraints. In compact form, h_target(x) = min(h_bulk(x), h_interface(x), h_boundary(x)). Length quantities use SI metres (m); counts, orders, and topology labels are dimensionless.
The equations and assumptions in the earlier physical-problem and governing-equations sections state the model-specific specialization. This section does not introduce a conversion from FEM to FDM, a hidden topology conversion, or a silent CPU fallback.
Parameters¶
The exact callable and argument names are the ones shown in the ## Python API section above. For this page the parameter family is airbox boundary mode, padding, and mesh target. Use the documented defaults, validation rules, and ProblemIR lowering exactly as shown; do not replace a canonical argument with an unlisted alias. Numerical lengths must be supplied in metres, and invalid positive-length, count, order, periodicity, or topology constraints must fail closed rather than being silently repaired.
Control Room workflow¶
In Control Room, select the engine and mesh workflow, enter the same values as the Python authoring example, inspect the planned mesh or grid report, and only then submit the run. The UI is a projection of the public contract: a missing control is not evidence that the backend accepts the option, and a visible control is not evidence that a production lane is enabled. When the page or capability register marks a field partial or not evaluated, keep the workflow explicitly bounded to the implemented path.
Diagnostics and failure semantics¶
A valid request must preserve the declared geometry, units, element or cell topology, and backend lane. Reject non-finite or non-positive lengths, invalid counts and orders, incompatible periodic or shared-boundary data, and unsupported topology combinations at the owning validation layer. Reports should retain requested and resolved values, source identity, and any capability gate. No diagnostic may hide a failed mesh realization by substituting another discretization.
Where this is implemented¶
The existing implementation-mapping and source-code-index sections identify the exact public authoring, ProblemIR, planner, realization, and runtime owners for this topic. The adjacent .source-map.json file is the machine-readable source of truth for those paths, symbols, responsibilities, backend matrix, and reviewed revision. Claims in this page must be updated together with that map when an owner moves.