- "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()"
0 commit comments