12Notebooks
6Tutorial Scripts
1Streamlit Dashboard
4CLI Commands

Jupyter Notebooks

#NotebookDescriptionTopics
01phase_dynamics_intro.ipynbKuramoto oscillators, order parameter, synchronisation transitionphase
02knm_coupling.ipynbKnm matrix construction, exponential decay, visualisationphase Knm
03upde_pac_gating.ipynbUPDE solver with PAC gating, γ parameter sweepphase UPDE
04grad_shafranov.ipynbGS equilibrium solve, flux surface contours, q-profilephysics
05gk_transport_tiers.ipynbAll 5 GK tiers compared on ITER scenariophysics GK
06q10_scenario.ipynbFull Q=10 ITER scenario: equilibrium + transport + controllerphysics control
07snn_compiler.ipynbSPN → SNN compilation, LIF neuron visualisation, bitstreamSNN
08hinf_synthesis.ipynbH∞ controller design, DARE solve, closed-loop Bode plotcontrol
09ppo_training.ipynbPPO agent training, reward curves, comparison with MPC/PIDcontrol RL
10mhd_stability.ipynb5 MHD criteria evaluated on ITER equilibriumphysics
11digital_twin.ipynbFull digital twin simulation, disruption scenario, SPI mitigationcontrol physics
12frontier_physics.ipynbNonlinear δf GK, Dimits shift, zonal flow generationphysics GK

Tutorial Scripts

ScriptDescriptionLines
tutorial_01_basic_pid.pyMinimal PID controller on a simple tokamak model. 5 minutes to first result.85
tutorial_02_gs_equilibrium.pySolve GS equilibrium, plot flux surfaces, extract q-profile and pressure.120
tutorial_03_phase_sync.pyKuramoto synchronisation with Knm, animate phase evolution.95
tutorial_04_mpc_control.pyMPC with 20-step horizon on digital twin. Compare with PID baseline.140
tutorial_05_rust_speedup.pyBenchmark Python vs Rust backends. Reproduce speedup table.75
tutorial_06_full_scenario.pyEnd-to-end: equilibrium → transport → stability → controller → simulation.200

CLI Commands

# Run interactive demo (opens browser dashboard)
scpn-control demo

# Run Kuramoto + GK benchmark suite
scpn-control benchmark --suite all

# Validate physics solvers against reference data
scpn-control validate --strict

# Start live WebSocket phase streaming
scpn-control live --port 8765 --fps 30