bloc.reporting.spring_kpi#
SPRING engineering KPI extraction from solved STONE simulations.
Bridges the STONE/Boulder reactor network to the SPRING Calculation Note
output keys, mirroring the res_dic produced by the legacy
simulation_non_isothermal_reactors.py. This module is coupled by design to
the SPRING YAML node conventions and to the design reactor classes; the generic,
node-name-agnostic primitives (volumetric flows, quench solve, secondary-source
lookup) live in bloc.reporting.kpi.
Public entry points#
compute_spring_kpis()– full SPRING KPI dict (pass askpi_fntobloc.calc_note.generate_calculation_note_stone()).
Functions#
|
Compute SPRING engineering KPIs from a solved STONE Simulation. |
Module Contents#
- bloc.reporting.spring_kpi.compute_spring_kpis(sim)#
Compute SPRING engineering KPIs from a solved STONE Simulation.
This function bridges the STONE/Boulder path to produce the same outputs as
simulation_non_isothermal_reactors.py(res_dic), so that bothrun_scenarios.pyandrun_yaml_scenarios.pygenerate the same Calculation Note Excel.Reactors are located by walking
sim.config['nodes'](the STONE declaration) and pulling the first node of each expected type by id, then resolving it viasim.network.reactors(matched on.name). This is deterministic even when multiple reactors of the same Python class are present, unlike isinstance-based ordering. Input parameters are read fromsim.config(nodes+connections).- Parameters:
sim (
bloc.io.boulder_bridge.Simulation) – Solved STONE simulation returned bybloc.io.boulder_bridge.build_simulation_from_yaml().- Returns:
KPI dict with the same keys as the
res_dicproduced bysimulation_non_isothermal_reactors.py. Unavailable values are omitted. Pass askpi_fntobloc.calc_note.generate_calculation_note_stone().- Return type:
dict
Notes
KPIs that depend on SPRING-specific YAML structure (e.g. node naming conventions, insulation parameters) are resolved by reactor type rather than by hard-coded node ID, making this function portable across STONE YAML variants that use the PlasmaTorchInstantaneousHeating/ContinuousMixingReactor/RefractoryReactor components.