You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Simulating the startup transient of an exothermic first-order reaction in a cooled CSTR, showing the dynamic interaction between concentration decay and temperature rise."
10
+
]
11
+
},
12
+
{
13
+
"cell_type": "markdown",
14
+
"metadata": {},
15
+
"source": [
16
+
"The CSTR model couples a material balance with an energy balance. For a first-order irreversible reaction $A \\to \\text{products}$ with Arrhenius kinetics:\n",
"where $k(T) = k_0 \\exp(-E_a / RT)$ and $\\tau = V/F$ is the residence time."
23
+
]
24
+
},
25
+
{
26
+
"cell_type": "code",
27
+
"execution_count": null,
28
+
"metadata": {},
29
+
"outputs": [],
30
+
"source": [
31
+
"import matplotlib.pyplot as plt\n",
32
+
"\n",
33
+
"from pathsim import Simulation, Connection\n",
34
+
"from pathsim.blocks import Source, Scope\n",
35
+
"\n",
36
+
"from pathsim_chem.process import CSTR"
37
+
]
38
+
},
39
+
{
40
+
"cell_type": "markdown",
41
+
"metadata": {},
42
+
"source": [
43
+
"Configure the reactor with parameters typical of an exothermic liquid-phase reaction. The reactor starts empty ($C_A = 0$) at ambient temperature and is fed with a concentrated stream."
"source": "Feed a constant concentration of 1000 mol/m³ at 320 K, with the coolant held at 290 K. A `Scope` records both the outlet concentration and temperature."
"The reactor starts cold and empty. As fresh feed enters, concentration rises initially but then the Arrhenius kinetics kick in — the exothermic reaction heats the fluid, which accelerates the rate, consuming more reactant. The cooling jacket prevents thermal runaway and the system settles to a steady state where reaction rate balances the feed."
"Simulating two fundamental separation processes: an isothermal binary flash drum and a multi-tray distillation column built from individual `DistillationTray` blocks wired in series."
10
+
]
11
+
},
12
+
{
13
+
"cell_type": "markdown",
14
+
"metadata": {},
15
+
"source": [
16
+
"## Part 1: Isothermal Flash Drum\n",
17
+
"\n",
18
+
"A flash drum separates a liquid feed into vapor and liquid streams using vapor-liquid equilibrium (VLE). The drum uses Raoult's law with Antoine correlations to compute K-values:\n",
19
+
"\n",
20
+
"$$K_i = \\frac{P^\\text{sat}_i(T)}{P}$$\n",
21
+
"\n",
22
+
"The Rachford-Rice equation determines the vapor fraction $\\beta$, from which the vapor ($y_i$) and liquid ($x_i$) compositions follow."
"source": "Configure a flash drum for a benzene-toluene mixture (default Antoine coefficients). Feed an equimolar mixture at 1 atm and sweep temperature from 340 K to 400 K. This range covers the bubble point (~365 K) and dew point (~380 K) of the mixture, so we can observe the transition from all-liquid to two-phase to all-vapor."
"As temperature increases, more liquid vaporizes (higher vapor rate). The vapor is enriched in the lighter component (benzene), while the liquid becomes richer in toluene — the classic VLE separation."
63
+
]
64
+
},
65
+
{
66
+
"cell_type": "markdown",
67
+
"metadata": {},
68
+
"source": [
69
+
"## Part 2: Distillation Column (5 Trays)\n",
70
+
"\n",
71
+
"A distillation column is built by wiring multiple `DistillationTray` blocks in series. Each tray enforces vapor-liquid equilibrium with a constant relative volatility $\\alpha$:\n",
"The column separates the light and heavy components across its trays. The top tray is enriched in the light component (high $x$) while the bottom tray is depleted. The steady-state composition profile shows the characteristic staircase that a McCabe-Thiele diagram would predict for this relative volatility."
0 commit comments