bloc.boulder_plugins.torch_pane#
Bloc GUI plugin: a Torch output pane showing SEI / SEO (MJ/kg).
Adds a custom results tab (Boulder OutputPanePlugin) that, when a torch
node is selected, displays the torch specific-energy metrics:
SEI — Specific Energy Input = electrical input per kg of feed.
SEO — Specific Energy Output = thermal power to gas per kg of feed.
The plugin render endpoint runs server-side with only the serialised
config (+ simulation_data); there are no live reactor objects. So SEI/SEO
are computed from the torch node properties (electric_power_kW,
torch_eff, gen_eff) and the inlet MassFlowController mass flow found
in the config, using the pure helpers in
bloc.reactors.torch_mixing. Pre-computed KPIs in simulation_data
("SEI_torch (MJ/kg)" / "SEO_torch (MJ/kg)") are preferred when present.
Attributes#
Classes#
Results tab showing torch SEI / SEO (MJ/kg) for the selected torch. |
Module Contents#
- bloc.boulder_plugins.torch_pane.logger#
- bloc.boulder_plugins.torch_pane.OutputPaneContext = None#
- class bloc.boulder_plugins.torch_pane.TorchPanePlugin#
Bases:
boulder.output_pane_plugins.OutputPanePluginResults tab showing torch SEI / SEO (MJ/kg) for the selected torch.
- property plugin_id: str#
Unique identifier for this plugin.
- property tab_label: str#
Label to display on the tab.
- property tab_icon: str | None#
Optional icon for the tab (Bootstrap icon class).
- property requires_selection: bool#
Whether this plugin requires a reactor/element to be selected.
- property supported_element_types: List[str]#
List of element types this plugin supports.
- property supported_node_types: List[str] | None#
Reactor kinds this plugin applies to (None = any).
When set (and
requires_selectionis True), the GUI only shows the plugin’s tab while a node of one of these STONE kinds is selected (e.g.["MyReactorKind"]).
- is_available(context)#
Check if this plugin should be available given the current context.
- Parameters:
context – Current context information.
- Returns:
True if the plugin should be shown, False otherwise.
- Return type:
bool
- create_content_data(context)#
Create JSON-serialisable content data for this output pane.
The returned dictionary should describe the content to render. Common shapes:
{"type": "image", "src": "data:image/png;base64,...", "alt": "..."}{"type": "text", "content": "..."}{"type": "error", "title": "...", "message": "..."}
- Parameters:
context – Current context information.
- Returns:
JSON-serialisable content descriptor.
- Return type:
dict
- property preferred: bool#
Open this pane by default when a run completes.
When True and the user has neither picked a results tab nor selected an element, the GUI auto-selects the first node this plugin supports and activates its tab instead of the generic default.
- get_callbacks()#
Return list of callbacks this plugin needs.
- Returns:
List of tuples: (outputs, inputs, callback_function).
- Return type:
list
- on_simulation_update(context)#
Handle simulation data update.
- Parameters:
context – Updated context information.
- Returns:
Optional dictionary of updates to apply to components.
- Return type:
dictorNone