Skip to content
Apex
All recipes
Fusion · energy

Solve tokamak MHD equilibrium for a D-shaped plasma

ITER-like D-shaped plasma · q-profile evolution · 18 MW/m² divertor heat-flux. Couples to the breeding-blanket neutronics and the magnet structural model.

Artefact returned
Equilibrium field · q-profile · divertor heat-flux map
Typical runtime
~3 h wall · 480 CU
Cost
≈ $1.5k per shot + Pro seat
01 · The recipe

The expanded snippet.

The version that lands in production — with the annotations a colleague would want when picking up the work. Copy-paste, swap in your inputs, run.

from apex import Aether

simos = Aether(api_key=os.environ["APEX_API_KEY"])

# Solve tokamak MHD equilibrium for an ITER-like D-shaped plasma, with
# couplings to the divertor thermal model, breeding-blanket neutronics, and
# magnet structural model. Reproduces the methodology from the August 2025
# release.
eq = simos.simulate(
    domain="mhd",
    geometry="iter-like-d-shape",
    plasma={
        "Bt_T": 5.3,
        "Ip_MA": 15.0,
        "q95": 3.0,
        "ne_avg_m3": 1.0e20,
        "Te_keV": 8.0,
    },
    couplings=[
        "divertor_thermal",
        "blanket_neutronics",
        "magnet_structural",
    ],
    convergence={"max_outer_iters": 40, "tol": 1e-5},
)

print(f"q_axis = {eq.q_axis:.3f}")
print(f"q_95   = {eq.q_95:.3f}")
print(f"peak divertor flux = {eq.peak_divertor_flux_mw_m2:.2f} MW/m^2")
print(f"blanket tritium breeding ratio = {eq.tbr:.3f}")
print(f"max magnet stress = {eq.max_magnet_stress_MPa:.0f} MPa")
02 · Reproduction notes

The numbers in this recipe are real.

What we ran. What we used for inputs. Where the reproduction kit lives, and what reproduces within published bounds.

  • 01Geometry: built-in tokamak shapes (iter-like-d-shape, st-spheromak, fields). Custom shapes via geometry= STEP.
  • 02Plasma inputs: any consistent (Bt, Ip, q95) triple within the runtime's bounds.
  • 03Reproduces ITER-class baseline within the published margin on managed cloud.
  • 04Wall time scales with coupled-domain count; estimate uses three couplings.
03 · How to adapt this

Make it your workload.

The recipe is a starting point. The four variations below are the ones we get asked about most. Anything else, write to docs@apexworldlabs.com.

  • Different machine: pass geometry="st-spheromak" or a custom STEP. The MHD solver is geometry-agnostic.
  • Different scenario: hot ion mode, hybrid mode, advanced scenarios via plasma_mode="...".
  • Closed loop with control: integrate with your machine's control system via the live-simulation API.

Adapt this to your stack.

Swap in your geometry / target / repo and run it. If your workload is novel, send it and we will co-author the recipe with you.