scpn_fusion.engineering – Engineering

The engineering subpackage provides balance-of-plant thermal cycle models and CAD raytrace surface-loading estimation.

Balance of Plant

Balance-of-plant performance model for conversion efficiency and parasitic loads.

class scpn_fusion.engineering.balance_of_plant.PlantPowerBreakdown[source]

Bases: TypedDict

Parasitic-load breakdown for balance-of-plant accounting.

Cryo: float
Pumps: float
Heating_Plug: float
Misc: float
class scpn_fusion.engineering.balance_of_plant.PlantPerformance[source]

Bases: TypedDict

Balance-of-plant scalar performance metrics.

P_fusion: float
P_thermal: float
P_gross: float
P_recirc: float
P_net: float
Q_plasma: float
Q_eng: float
breakdown: PlantPowerBreakdown
hydraulics: PumpingPowerResult
class scpn_fusion.engineering.balance_of_plant.PowerPlantModel(coolant_type='water')[source]

Bases: object

SCPN Balance of Plant (BOP) Simulator.

Calculates the conversion of Fusion Energy to Grid Electricity. Includes parasitic loads (Magnets, Heating, Pumping).

Parameters:

coolant_type (str)

calculate_plant_performance(P_fusion_MW, P_aux_absorbed_MW, *, coolant_parallel_channels=1, coolant_length_m=100.0, coolant_diameter_m=0.05, coolant_temperature_rise_k=50.0)[source]

Calculate instantaneous plant power with explicitly configured cooling.

Parameters:
  • P_fusion_MW (float) – Nonnegative finite total alpha plus neutron fusion power in MW.

  • P_aux_absorbed_MW (float) – Nonnegative finite heating power absorbed by the plasma in MW.

  • coolant_parallel_channels (int) – Number of identical equal-flow cooling paths, default one.

  • coolant_length_m (float) – Length of each cooling path in metres.

  • coolant_diameter_m (float) – Internal diameter of each cooling path in metres.

  • coolant_temperature_rise_k (float) – Coolant temperature rise per path in kelvin.

Returns:

Thermal, gross, recirculating and net powers in MW, gain ratios, component electrical loads and explicit hydraulic diagnostics. Negative net power is preserved. Historical zero-denominator gain convention returns zero; it does not establish a finite physical gain.

Return type:

PlantPerformance

Raises:

ValueError – For invalid input powers or invalid cooling configuration.

Notes

Default cooling is one 5 cm pipe, not a plant-scale layout. Supply actual geometry and channel count; do not calibrate them solely to target net electricity. CoolantLoop’s constant-property limitations apply.

plot_sankey_diagram(metrics)[source]

Visualise power flow as a text-based or simple bar summary.

Return type:

Any

Parameters:

metrics (PlantPerformance)

CAD Raytrace Surface Loading

Reduced CAD mesh ray-tracing utilities (STEP/STL integration lane).

class scpn_fusion.engineering.cad_raytrace.CADLoadReport(face_loading_w_m2, peak_loading_w_m2, mean_loading_w_m2)[source]

Bases: object

Structured result for reduced CAD heat-load reconstruction.

Parameters:
face_loading_w_m2: ndarray[Any, dtype[float64]]
peak_loading_w_m2: float
mean_loading_w_m2: float
scpn_fusion.engineering.cad_raytrace.load_cad_mesh(path)[source]

Load CAD mesh from STL/STEP using trimesh when available.

Falls back to ASCII STL parser when trimesh is not available.

Return type:

tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[int64]]]

Parameters:

path (str | Path)

scpn_fusion.engineering.cad_raytrace.estimate_surface_loading(vertices, faces, source_points_xyz, source_strength_w, *, occlusion_cull=False, occlusion_broadphase=True, occlusion_epsilon=1e-09)[source]

Compute reduced line-of-sight heat loading on CAD triangles.

Return type:

CADLoadReport

Parameters:

Coolant Channels

Thermal-hydraulic helper utilities for flow resistance and pump power.

class scpn_fusion.engineering.thermal_hydraulics.CoolantProperties[source]

Bases: TypedDict

Thermophysical coolant properties used by the lumped loop model.

rho: float
mu: float
cp: float
class scpn_fusion.engineering.thermal_hydraulics.PumpingPowerResult[source]

Bases: TypedDict

Computed coolant-loop pumping-power diagnostics.

mdot_kg_s: float
channel_mass_flow_kg_s: float
parallel_channels: int
velocity_m_s: float
Re: float
dP_Pa: float
P_pump_MW: float
scpn_fusion.engineering.thermal_hydraulics.churchill_friction_factor(Re, epsilon_d=0.0001)[source]

Churchill Correlation for Darcy Friction Factor (f).

Valid for all flow regimes (laminar, transition, turbulent).

Return type:

float

Parameters:
class scpn_fusion.engineering.thermal_hydraulics.CoolantLoop(coolant_type='water')[source]

Bases: object

Calculate pressure drop and pumping power for reactor cooling.

Supports Water, Helium, and Liquid Metal (LiPb).

Parameters:

coolant_type (str)

__init__(coolant_type='water')[source]

Select fixed approximate coolant properties near 300 degrees Celsius.

Parameters:

coolant_type (str) – One of water, helium or lipb. Properties do not vary with pressure, temperature or phase during this lumped calculation.

Raises:

ValueError – If the coolant identifier is unknown; no substitute is selected.

Return type:

None

calculate_pumping_power(Q_thermal_MW, delta_T=50.0, L=100.0, D=0.05, *, parallel_channels=1)[source]

Calculate total pumping power for identical parallel coolant channels.

Parameters:
  • Q_thermal_MW (float) – Total thermal load across all channels, in MW; zero is permitted.

  • delta_T (float) – Coolant temperature rise in each channel, in kelvin.

  • L (float) – Length of each hydraulic path in metres, not summed channel length.

  • D (float) – Internal diameter of each circular channel in metres.

  • parallel_channels (int) – Positive number of equal-flow parallel channels. Default one retains the historical single-pipe calculation; it is not a reactor layout.

Returns:

Total and per-channel mass flows, per-channel velocity, Reynolds number and pressure drop, and total electrical pump power in MW. Pump efficiency is fixed at 0.8. Zero load yields zero flow and power.

Return type:

PumpingPowerResult

Raises:

ValueError – For nonfinite loads/geometry, negative load or nonpositive geometry and channel count, or unrepresentable intermediate/output values. Channels must be an integer, not a boolean.

Notes

This constant-property incompressible model omits headers, minor losses, boiling, compressibility and flow maldistribution. Selecting channel geometry does not certify the model’s physical applicability.

Plant cooling geometry must be supplied explicitly for a reactor design. The default is a single pipe. Parallel paths share the total thermal load equally; reported pressure drop is per path and electrical pumping power is summed across paths. Headers and flow maldistribution are not modelled.