SCPN-Fusion-Core¶
Neuro-symbolic control framework for tokamak fusion reactors
Version 3.9.3
SCPN-Fusion-Core is a dual-language (Python + Rust) open-source framework that treats AI and digital twins as first-class architectural primitives for tokamak plasma control. It compiles plasma control logic – expressed as stochastic Petri nets – into spiking neural network controllers that run at sub-millisecond latency, backed by a Grad-Shafranov equilibrium solver, 1.5D radial transport, and AI surrogates for turbulence, disruption prediction, and real-time digital twins.
What makes it different: Most fusion codes are physics-first (solve equations, then bolt on control). SCPN-Fusion-Core is control-first – it provides a contract-checked neuro-symbolic compilation pipeline where plasma control policies are expressed as Petri nets, compiled to stochastic LIF neurons, and executed against physics-informed plant models.
Note
Honest scope: This is not a replacement for TRANSP, JINTRAC, or GENE. It does not solve 5D gyrokinetics or full 3D MHD. It is a control-algorithm development and surrogate-modelling framework with enough physics fidelity to validate reactor control strategies against real equilibrium data (8 SPARC GEQDSK files, ITPA H-mode database).
Key Features¶
Neuro-symbolic compiler – Petri net to SNN compilation with formal verification (37 hardening tasks)
Safety interlocks – inhibitor-arc hard-stop channels with contract-proof checks for thermal/density/beta/current/vertical limits
Grad-Shafranov equilibrium – Picard + Red-Black SOR or multigrid V-cycle, validated on 8 SPARC GEQDSK files
1.5D radial transport – coupled energy/particle transport with IPB98(y,2) confinement scaling
AI surrogates – FNO turbulence, neural equilibrium, neural transport MLP, ML disruption predictor
Digital twin – real-time twin with RL-trained MLP policy and chaos monkey fault injection
Rust acceleration – 11-crate Rust workspace providing 10–50x speedups with pure-Python fallback
Real data validation – SPARC GEQDSK, ITER 15 MA baseline, ITPA H-mode confinement database
Graceful degradation – every module works without Rust, without SC-NeuroCore, without GPU
Getting Started
- Installation
- Quick Start
- Solve a Grad-Shafranov Equilibrium
- Read a SPARC GEQDSK File
- Run the Validation Suite
- Run a Compact Reactor Search
- Launch the Tokamak Flight Simulator
- Compile a Petri Net to an SNN Controller
- Generate a 3D Flux-Surface Mesh
- Use the Rust Accelerated Kernel
- Available Simulation Modes
- Tutorial Notebooks
Learning Path
Advanced Tutorials
User Guide
- Equilibrium Solver
- Transport and Stability
- Control Systems
- Design Philosophy
- Tokamak Flight Simulator
- Model-Predictive Control
- Disruption Prediction
- Shattered Pellet Injection (SPI)
- Digital Twin
- Integrated Control Room
- Neuro-Cybernetic Controller
- Safety Interlocks (v3.5.0)
- Self-Organised Criticality Learning
- Analytic Solver
- TORAX Hybrid Loop
- Related Modules
- HIL and FPGA Register Mapping
- Nuclear Engineering
- Diagnostics
- Neuro-Symbolic Compiler (SCPN)
- HPC and GPU Acceleration
- Validation Framework
API Reference
scpn_fusion.core– Physics- Equilibrium Solver
- GEQDSK I/O
- Force Balance
- Compact Reactor Optimiser
- Global Design Scanner
- Integrated Transport Solver
- RF Heating
- MHD Sawtooth
- Hall-MHD Discovery
- Stability Analyser
- Neural Equilibrium
- Neural Transport
- FNO Turbulence Suppressor
- FNO Training
- Turbulence Oracle
- Fusion Ignition Simulator
- Divertor Thermal Simulation
- Sandpile Fusion Reactor
- Warm Dense Matter Engine
- Uncertainty Quantification
- Geometry 3D
- 3D Equilibrium
- 3D Field-Line Tracing
- GPU Runtime Bridge
- Gyro-Swin Surrogate
- Heat ML Shadow Surrogate
- Rust Compatibility Layer
- Experimental Bridges
- Current Diffusion
- Current Drive Sources
- Sawtooth Dynamics
- NTM Island Dynamics
- SOL Two-Point Model
scpn_fusion.control– Control- Tokamak Flight Simulator
- Tokamak Digital Twin
- Digital Twin Ingest
- Traceable Runtime (JAX/TorchScript)
- Model-Predictive Control (Optimal)
- State-of-the-Art MPC
- Disruption Predictor
- Shattered Pellet Injection
- Integrated Control Room
- Neuro-Cybernetic Controller
- SOC Fusion Learning
- Analytic Solver
- Director Interface
- Fueling Mode Controller
- TORAX Hybrid Loop
- Real-Time EFIT
- Plasma Shape Controller
- Vertical Stabiliser (Sliding Mode)
- Fault-Tolerant Control
- Safe RL Controller
- Scenario Scheduler
- Gain-Scheduled Controller
scpn_fusion.nuclear– Nuclearscpn_fusion.diagnostics– Diagnosticsscpn_fusion.engineering– Engineeringscpn_fusion.scpn– Neuro-Symbolicscpn_fusion.hpc– HPC Bridgescpn_fusion.io– Data Interop
Example Notebooks
Reference
Project