Fusion fuel cycle and balance-of-plant blocks for PathSim
Homepage • Documentation • GitHub
PathSim-Fusion extends the PathSim simulation framework with specialized blocks. All blocks follow the standard PathSim block interface and can be connected into simulation diagrams.
| Block | Description | Key Parameters |
|---|---|---|
IonisationChamber |
Flow-through tritium ionisation chamber (signal = ε(c)·c, flux passes through) | detection_efficiency, func_efficiency, detection_threshold |
Bubbler4 |
Four-vial tritium sampling bubbler (soluble + insoluble chains, catalytic conversion, scheduled vial replacement) | conversion_efficiency, vial_efficiency, replacement_times |
GLC |
Counter-current bubble-column gas–liquid contactor for tritium extraction from LiPb (Malara 1995, on BVP1D) |
P_in, L, D, T, BCs |
FuelCycleComponent |
Lumped fuel cycle component with a residence time (dI/dt = inflows + S − (1+ε)·I/τ − λ·I; outputs inventory, outflow, loss) | tau, loss_fraction, decay_constant, source_term, initial_value |
BreedingBlanket |
Breeding blanket, residence time model (outputs inventory, outflow, loss) | tau |
PlasmaFacingComponent |
First wall or divertor, residence time model | tau |
TokamakExhaustProcessing |
Exhaust processing (fuel cleanup), residence time model | tau |
DetritiationSystem |
Detritiation system, residence time model | tau |
TritiumExtractionSystem |
Tritium extraction, residence time model with an extraction efficiency (outlets extracted, residual) |
tau, efficiency |
HeatExchangerPermeation |
Heat exchanger tritium holdup with a permeated fraction (outlets permeated, returned) |
tau, permeation_fraction |
FusionChamberPump |
Fusion chamber vacuum pump with direct internal recycling (outlets recycled, exhaust) |
tau, dir_fraction |
IsotopeSeparationSystem |
Isotope separation, residence time model with a waste fraction (outlets product, waste) |
tau, waste_fraction |
StorageAndManagement |
Fuel storage: accumulates its inflows, withdrawals are negative inflows, decays | decay_constant, initial_value |
Plasma |
Plasma fuel holdup, residence time model | tau |
FuellingSystem |
Fuelling system, residence time model | tau |
DirectInternalRecycling |
Direct internal recycling loop, residence time model | tau |
IsotopeAdjustmentSystem |
Isotope adjustment system, residence time model | tau |
SecondaryPump |
Backing and roughing pumps, residence time model | tau |
CoolantPurification |
Coolant purification system, residence time model | tau |
WaterDetritiationSystem |
Water detritiation system, residence time model | tau |
GasDetritiationSystem |
Gas detritiation system, residence time model | tau |
AirDetritiationSystem |
Air detritiation system, residence time model | tau |
Stack |
Stack: accumulates the tritium released to the environment | decay_constant, initial_value |
PulsedPowerSource |
Pulse and dwell thermal power schedule with linear ramps and decay heat in the dwell; outputs power and plasma state (defaults: ARC-like cycle, Colliva 2025) | P_pulse, f_dwell, t_burn, t_dwell, t_ramp_up, t_ramp_down, t_start |
ShaftGenerator |
Turbine-generator shaft speed and grid frequency from the single-mass swing equation; inputs mechanical and electrical power (defaults: ARC-class 307.1 MW, 60 Hz, H = 4 s) | H, D, S_base, f_0, omega_0 |
TurbineGovernor |
Steam turbine governor (TGOV1): droop, valve lag with non-windup limits, reheat lead-lag; inputs speed and load reference, outputs mechanical power and valve position (defaults: 5 % droop, ARC HP share) | R, T_v, T_rh, F_HP, D_t, V_min, V_max, P_base, P_init |
pip install pathsim-fusionWater and steam properties (IAPWS-IF97, for the balance-of-plant physics) need an optional extra:
pip install pathsim-fusion[water]from pathsim import Simulation, Connection
from pathsim.blocks import Constant, Source, Scope
from pathsim_fusion import IonisationChamber
flux = Source(lambda t: 1e-3 * float(t > 1)) # tritium flux, step at t = 1
flow = Constant(0.5) # carrier gas flow rate
ic = IonisationChamber(detection_efficiency=0.9)
sco = Scope(labels=["flux", "signal"])
sim = Simulation(
blocks=[flux, flow, ic, sco],
connections=[
Connection(flux, ic["flux_in"], sco[0]),
Connection(flow, ic["flow_rate"]),
Connection(ic["signal"], sco[1]),
],
dt=0.01,
)
sim.run(5)
sco.plot()pip install -e ".[test,lint]" mypy
ruff check . # lint
ruff format . # format
mypy src/pathsim_fusion # type check
pytest tests/ -v # run tests
pytest tests/ --cov=pathsim_fusion --cov-report=term-missing # tests with coverageMIT
