Skip to content

Commit ab7223f

Browse files
committed
Fix distillation example: use scope data instead of block.state for steady-state profile
1 parent 5fd2129 commit ab7223f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/source/examples/flash_distillation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
"execution_count": null,
155155
"metadata": {},
156156
"outputs": [],
157-
"source": "time, signals = scp.read()\n\nfig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))\n\n# Dynamic tray composition evolution\nfor i in range(N_trays):\n ax1.plot(time, signals[i], label=f\"Tray {i+1}\")\nax1.set_xlabel(\"Time [s]\")\nax1.set_ylabel(r\"$x$ (light component)\")\nax1.set_title(\"Tray Compositions Over Time\")\nax1.legend()\nax1.grid(True, alpha=0.3)\n\n# Steady-state composition profile\nx_profile = [tray.state[0] for tray in trays]\ntray_nums = list(range(1, N_trays + 1))\n\nax2.plot(tray_nums, x_profile, \"o-\", markersize=8)\nax2.set_xlabel(\"Tray number (top to bottom)\")\nax2.set_ylabel(r\"$x$ (light component)\")\nax2.set_title(\"Composition Profile (Steady State)\")\nax2.grid(True, alpha=0.3)\n\nplt.tight_layout()\nplt.show()"
157+
"source": "time, signals = scp.read()\n\nfig, (ax1, ax2) = plt.subplots(1, 2, figsize=(12, 5))\n\n# Dynamic tray composition evolution\nfor i in range(N_trays):\n ax1.plot(time, signals[i], label=f\"Tray {i+1}\")\nax1.set_xlabel(\"Time [s]\")\nax1.set_ylabel(r\"$x$ (light component)\")\nax1.set_title(\"Tray Compositions Over Time\")\nax1.legend()\nax1.grid(True, alpha=0.3)\n\n# Steady-state composition profile (from scope data)\nx_profile = [signals[i][-1] for i in range(N_trays)]\ntray_nums = list(range(1, N_trays + 1))\n\nax2.plot(tray_nums, x_profile, \"o-\", markersize=8)\nax2.set_xlabel(\"Tray number (top to bottom)\")\nax2.set_ylabel(r\"$x$ (light component)\")\nax2.set_title(\"Composition Profile (Steady State)\")\nax2.grid(True, alpha=0.3)\n\nplt.tight_layout()\nplt.show()"
158158
},
159159
{
160160
"cell_type": "markdown",

0 commit comments

Comments
 (0)