bloc.io.boulder_bridge#
STONE YAML bridge — load, build, and solve networks via BlocRunner.
Combines the former stone_parser shim and simulation_builder API.
All loading, normalisation, validation, mechanism resolution, and plugin
registration flow through BlocRunner.
Public API#
>>> from bloc.io.boulder_bridge import build_simulation_from_yaml
>>> sim = build_simulation_from_yaml("sandbox/from_boulder/design_torch_psr_pfr.yaml")
>>> net, results = sim.solve()
Classes#
Thin wrapper around a solved STONE YAML network. |
Functions#
|
Load and normalise a STONE config using Bloc's runner. |
|
Build a network and results from a STONE YAML file. |
|
Build a |
Module Contents#
- bloc.io.boulder_bridge.load_config_boulder(yaml_path)#
Load and normalise a STONE config using Bloc’s runner.
Returns a Boulder-normalised config dict (including Bloc-specific deprecated-key validation).
- bloc.io.boulder_bridge.build_network_from_yaml(yaml_path)#
Build a network and results from a STONE YAML file.
Returns
(network, results)wherenetworkis the raw visualizationReactorNetproduced bybuild()(beforesolve()upgrades it to theStagedReactorNetfacade).Callers that need the typed staged network facade should use
build_simulation_from_yaml()instead and accesssim.network(aStagedReactorNet). If a rawReactorNetis needed downstream, usesim.network.visualization_network.
- class bloc.io.boulder_bridge.Simulation(config, results, result=None)#
Thin wrapper around a solved STONE YAML network.
Provides a minimal, stable API for downstream scripts and notebooks, and exposes a
SimulationResultasresultfor typed access to the staged network, trajectory, per-reactor states and plugin scalars.The central object is
network, aStagedReactorNet— a ReactorNet-compatible staged network facade. It is not a single global CVODE integrator; staged solves with mechanism switches and custom PFR solvers are not one monolithic ODE problem.Key accessor pattern:
sim.network # StagedReactorNet sim.network.draw(...) # delegates to viz network sim.network.get_stage("default") # PFRHomogeneousShellNet / DesignTubeFurnaceNet sim.network.networks # {stage_id: stage solver} sim.network.visualization_network # raw ct.ReactorNet (Sankey etc.)
- config#
- results#
- result = None#
- solve()#
Return the staged network facade and results captured during build.
- property network: boulder.staged_network.StagedReactorNet#
The
StagedReactorNetfacade.
- property reactors#
Convenience delegate to
network.reactors.
- property trajectory#
Convenience delegate to
network.trajectory.
- property scalars: Dict[str, Any]#
Convenience delegate to
network.scalars.
- bloc.io.boulder_bridge.build_simulation_from_yaml(yaml_path)#
Build a
Simulationfrom STONE YAML.All loading, normalisation, validation, mechanism resolution, and plugin registration flow through
BlocRunner.sim.networkis aStagedReactorNet— a ReactorNet-compatible staged network facade that owns both the global visualizationReactorNet(sim.network.visualization_network) and the stage solver networks (sim.network.networks).- Parameters:
yaml_path – Path to a STONE-standard YAML config defining components and connections.