Periodic FEM airbox mesh¶
Last changes: Documentation changelog
Physical problem¶
study.pbc records axes and derives x_faces, y_faces, z_faces mesh IDs. The OCC path pairs matching outer min/max faces. demag="periodic_airbox_k0" is a static FEM request, not FDM image summation or nonzero-\(k\) Floquet demag.
Governing equations¶
Symbols and SI units¶
Symbol |
Meaning |
SI unit |
|---|---|---|
\(\mathbf{x}_{\mathrm{slave}}\) |
destination-surface coordinate |
\(\mathrm{m}\) |
\(\mathbf{x}_{\mathrm{master}}\) |
source-surface coordinate |
\(\mathrm{m}\) |
\(\mathbf{t}\) |
axis translation |
\(\mathrm{m}\) |
\(\mathbf{k}\) |
wave vector |
\(\mathrm{m^{-1}}\) |
Assumptions and validity¶
The generator accepts axis-derived IDs only and rejects unknown IDs, zero span, and unmatched
min/max faces. PeriodicBoundaryPair is a validated object descriptor, but it is not the direct
input to this generator route. OCC owns translation, tolerance and Gmsh pairing realization;
the descriptor owns authored validation and to_ir(). Planner acceptance is not runtime parity
or convergence evidence.
Solver lane |
Status |
Limit |
|---|---|---|
FEM CPU |
partial source-backed |
No completed runtime qualification. |
FEM GPU |
capability-gated |
No GPU periodic-airbox receipt. |
FDM CPU |
authoring-only |
|
FDM GPU |
authoring-only |
|
Python API¶
# %%
import fullmag as fm
nm = 1e-9
study = fm.study("periodic_airbox_k0")
study.engine("fem")
study.device("cpu", precision="double")
study.mode("strict")
study.universe(mode="manual", size=(200 * nm, 100 * nm, 120 * nm))
# %%
study.universe.mesh(maximum_element_size=30 * nm, minimum_element_size=5 * nm)
study.pbc(x=True, y=True, z=False, demag="periodic_airbox_k0")
body = study.geometry(fm.Box(size=(200 * nm, 100 * nm, 5 * nm), name="cell"), name="cell")
body.mesh(maximum_element_size=6 * nm, minimum_element_size=3 * nm, order=1)
body.Ms = 800e3
body.Aex = 13e-12
body.m = fm.texture.uniform(1.0, 0.0, 0.0)
# %%
study.exchange()
study.demag(model="airbox")
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\) |
Coerced with |
x periodic axis |
FEM and FDM authoring contract; runtime lanes require separate qualification |
|
|
|
|
\(1\) |
Coerced with |
y periodic axis |
FEM and FDM authoring contract; runtime lanes require separate qualification |
|
|
|
|
\(1\) |
Coerced with |
z periodic axis |
FEM and FDM authoring contract; runtime lanes require separate qualification |
|
|
|
|
\(1\) |
With any true axis, |
periodic demag request |
FEM and FDM authoring contract; runtime lanes require separate qualification |
|
|
|
|
\(1\) |
Only with |
FDM image counts |
FDM authoring contract only; runtime requires separate qualification |
|
|
|
|
\(1\) |
non-empty after validation |
stable pair identity |
FEM periodic-pair metadata is source-backed; runtime lane requires separate qualification |
|
|
|
|
\(1\) |
non-empty |
authored source marker |
FEM periodic-pair metadata is source-backed; runtime lane requires separate qualification |
|
|
|
|
\(1\) |
non-empty |
authored destination marker |
FEM periodic-pair metadata is source-backed; runtime lane requires separate qualification |
|
|
|
|
\(\mathrm{m}\) |
exactly 3 components; each coerced with |
source-to-destination translation |
FEM periodic-pair metadata is source-backed; runtime lane requires separate qualification |
|
|
|
|
\(\mathrm{m}\) |
strictly positive through |
authored matching tolerance |
FEM periodic-pair metadata is source-backed; runtime lane requires separate qualification |
|
|
|
|
\(1\) |
when present, non-empty; no x/y/z enum restriction |
optional diagnostic axis hint |
FEM periodic-pair metadata is source-backed; runtime lane requires separate qualification |
|
|
|
|
\(1\) |
non-empty; no enumerated-policy validation in dataclass |
authored pairing-policy name |
FEM periodic-pair metadata is source-backed; runtime lane requires separate qualification |
|
PBC normalization and coercion¶
For at least one true axis, world.pbc constructs FdmPbc, which applies the normalization below before Problem IR serialization. A separate raw guard runs first when all axes are false:
Public input |
Coercion or normalization |
Validation condition |
Problem IR form |
|---|---|---|---|
|
Each value is converted with |
If all three results are false, |
Three strings, each |
|
When any axis is true, |
With an active axis, only |
The normalized vocabulary value when active; no PBC object for the raw open/no-axis branch. |
|
Each entry is converted with |
With an active axis, allowed only for |
|
The zero-axis branch is therefore intentionally not equivalent to passing the raw value through
FdmPbc: raw "open" is accepted, while case or whitespace variants are rejected before
normalization. This table is an authoring and IR contract; it does not establish execution support
for an FEM or FDM runtime lane.
Scope of the periodic production gate¶
fem_frequency_response_production_slice_rejection_reason is a frequency-response-only planner gate. The PeriodicAirboxK0 branch accepts a plan only when all of the following are present: shared-domain air, enabled demagnetization, spin_wave_bc=periodic, k=0, a periodic delta_m constraint on the magnetic domain, and a periodic delta_phi constraint on the magnetostatic domain that includes air.
The relaxation example on this page demonstrates authored PBC and airbox intent only. It does not call the frequency-response planner path, exercise this gate, or prove a periodic runtime solve.
ProblemIR¶
pbc coerces axes to booleans and synchronizes mesh IDs. With any true axis it constructs
FdmPbc; FdmPbc.to_ir() serializes axes as periodic/open, normalized demag text, and
optional integer image_counts. With no true axis, raw demag != "open" or non-None images
raises before FdmPbc is constructed.
PeriodicBoundaryPair.to_ir() independently serializes all required fields, fixed orientation
source_to_destination, pairing policy, and optional axis hint. These are distinct lowerings.
Round-trip and failure semantics¶
Requested intent is axes, policy, images, and an optional independent descriptor. Resolved
execution is normalized FdmPbc, derived IDs, OCC surface pairs/markers/tolerance, and planner
acceptance/rejection. Validation errors include the raw no-axis demag != "open" or non-None images guard, non-open policy without an axis, images with
any demag except truncated_images, image length other than three, negative image counts, empty
descriptor strings, translation length other than three, non-positive tolerance, unknown OCC ID,
zero span, and unmatched faces. Unsupported combinations include silent open fallback, using
FDM image semantics as FEM periodic airbox, and nonzero-\(\mathbf{k}\) use of this policy.
The resolved execution is always reported separately from the authored descriptor.
Discrete realization¶
OCC selects candidate boundary surfaces, orders matching min/max faces, derives translation and a
span-scaled tolerance, calls setPeriodic, creates dedicated periodic physical markers, and
excludes exactly those paired tags from Gamma_out. asset_pipeline preserves extracted
periodic_boundary_pairs and node pairs when assembling supported shared-domain assets. Planner
periodic-airbox conditions include shared-domain air, demag, periodic constraints, and \(k=0\).
Implementation mapping¶
Responsibility |
Repository path |
Stable symbol |
|---|---|---|
PBC authoring |
||
PBC validation and IR |
||
axis ID derivation |
||
descriptor |
||
surface pairing |
||
periodic marker ownership |
||
shared-asset pair preservation |
||
frequency-response-only planner gate |
Validation¶
Inspect one-to-one pairs, translations, markers, extraction, and Gamma_out exclusion; test planner rejection for missing air, constraints, and nonzero \(\mathbf{k}\). Runtime was not run.
Limitations¶
The direct generator input is axis IDs, not descriptors. This is static k=0 semantics, not Floquet/Bloch or GPU parity evidence.
Scientific bibliography¶
C. Geuzaine and J.-F. Remacle, International Journal for Numerical Methods in Engineering 79 (2009), doi:10.1002/nme.2579.
Source-code index¶
Claim |
Repository path |
Stable symbol |
Evidence |
|---|---|---|---|
PBC/images validation and IR |
source-backed |
||
IDs |
source-backed |
||
descriptor |
source-backed |
||
pairs |
source-backed |
||
dedicated periodic physical groups |
source-backed |
||
pair-count provenance in assets |
source-backed |
||
frequency-response planner gate |
Frequency-response-only planner gate requiring shared-domain air, demag, |
||
PBC request |
Public |