bloc.reporting.excel_scenario#

Per-scenario detail worksheet generation.

Functions#

write_scenario_detail_sheet(wb, scenario_id, ...)

Create a worksheet named {scenario_id} (detail content).

Module Contents#

bloc.reporting.excel_scenario.write_scenario_detail_sheet(wb, scenario_id, scenario_data, diagram_paths, out_dir)#

Create a worksheet named {scenario_id} (detail content).

The sheet contains six sections:

  1. Network diagram – at the top of the sheet.

  2. Per-node data – T, P, density, flow, viscosity, mole/mass fractions for every physical node (determined dynamically from the simulation).

  3. Torch / mixer profiles – the closed parcel’s temperature and composition against its residence time (linear), plus a table – the GUI Plots tab’s equivalent; solver-convergence traces are never drawn.

  4. PFR profiles – temperature and composition against position (residence time on a secondary axis), plus the profile table.

  5. Hyperlinks – interactive Sankey HTML, input YAML, run_concept.py.

  6. Sankey diagram – kept last (bottom of the sheet) since it’s a large image that would otherwise push every table below it down.

Parameters:
  • wb (openpyxl.Workbook) – The workbook to add the sheet to.

  • scenario_id (str) – Scenario identifier (used in the sheet name).

  • scenario_data (dict) – Full scenario data dict (inputs, outputs, metadata, states, node_data, physical_node_names, flow_params, yaml_path, python_path).

  • diagram_paths (dict) – {"sankey": path, "sankey_html": path, "network": path}.

  • out_dir (Path) – Output directory for saving generated images.