Skip to content
SHD Sim
Menu

Validation/Magnetostatics

Straight conductor, against Ampère

Ampère’s law is exact and the geometry is trivial, which is what makes the residual difference worth reporting rather than explaining away.

VerificationSpans 0.99–8.18 % across the sweep; 1–4 % at the largest radius

Why this case

A straight, non-magnetic conductor carrying a uniform current, sampled at a radial distance well clear of its own cross-section and well inside its own length. The reference is Ampère’s law in its infinite-straight-wire form, B(r) = μ₀I / 2πr — a closed-form field, not an experiment.

Unlike the parallel-plate capacitor, which agreed with its closed form at every mesh with nothing to explain, this one only converges cleanly once two separate real problems are worked around. Both are recorded here rather than smoothed over.

PhysicsMagnetostatic, edge-element solve
Closed formB(r) = μ₀I / 2πr
Sampling windowr = 0.03 to 0.07 m, clear of the conductor and inside its length
MeshFour independent levels, 132 186 to 176 237 nodes, conductor plus air region
AgreementSpans 0.99–8.18 % across the sweep; 1–4 % at the largest radius
Last run2026-08-19

Result

A cut through the conductor cross-section coloured by magnetic flux density
Cut through the conductor’s cross-section, coloured by |B|. The field concentrates at the conductor and falls away into the surrounding air — read directly off the solve. Getting this picture to show real contrast found a second product defect: auto-ranging on the field’s exact minimum and maximum let one high-value node in the near field stretch the colour scale until every other node was compressed into a sliver indistinguishable from flat.
Ratio of measured |B| to Ampère's law at three radii, across four mesh levels
maxhNodesr ≈ 0.03 mr ≈ 0.05 mr ≈ 0.07 m
0.012132 1860.9180.9650.969
0.008135 2440.9560.9550.990
0.005139 2630.9470.9690.989
0.003176 2370.9300.9760.962
Sample radii are nearest-mesh-node matches to the stated target on an unstructured tetrahedral mesh, not exact — the actual sampled r spans 0.0245 to 0.0741 m, up to 0.0055 m from target, between levels, which is part of why the ratios do not form a perfectly monotonic sequence.

What this case exercises

Magnetostatics had an end-to-end test and a deck smoke test, but no published reference — nothing had ever checked whether the numbers it produces are right, only that it runs and matches its own prior output.

  • The air-region meshing path, unique to magnetostatic and eddy-current analyses: the field does not stop at the part’s surface, so the surrounding air has to be in the mesh too, built by subtracting the part from a padded box and gluing the two regions together.
  • The edge-element solve path — the only analysis in the product whose unknown lives on mesh edges rather than nodes, and the only one meshed at first order rather than the usual second, because the solver refuses a quadratic mesh for it.

Repeat this yourself

Every case here is set up from the worked examples in the product, with no hand-editing of solver files — so you can run it, and get the same numbers. The free tier runs real cases up to 250,000 cells of fluids, or 100,000 nodes of solid, with no account needed to download and no time limit.

All validation cases · Written by the team building SHD Sim.