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:
TypedDictParasitic-load breakdown for balance-of-plant accounting.
- class scpn_fusion.engineering.balance_of_plant.PlantPerformance[source]¶
Bases:
TypedDictBalance-of-plant scalar performance metrics.
-
breakdown:
PlantPowerBreakdown¶
-
hydraulics:
PumpingPowerResult¶
-
breakdown:
- class scpn_fusion.engineering.balance_of_plant.PowerPlantModel(coolant_type='water')[source]¶
Bases:
objectSCPN 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:
- 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:
- 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:
objectStructured result for reduced CAD heat-load reconstruction.
- Parameters:
- 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.
Coolant Channels¶
Thermal-hydraulic helper utilities for flow resistance and pump power.
- class scpn_fusion.engineering.thermal_hydraulics.CoolantProperties[source]¶
Bases:
TypedDictThermophysical coolant properties used by the lumped loop model.
- class scpn_fusion.engineering.thermal_hydraulics.PumpingPowerResult[source]¶
Bases:
TypedDictComputed coolant-loop pumping-power diagnostics.
- 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).
- class scpn_fusion.engineering.thermal_hydraulics.CoolantLoop(coolant_type='water')[source]¶
Bases:
objectCalculate 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,heliumorlipb. 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:
- 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.