Directions
This simulation models an ideal process for high-pressure ammonia synthesis (\(1.5\,\mathrm{H_2}+0.5\,\mathrm{N_2}\rightarrow \mathrm{NH_3}\)), known as the Haber process. In a commercial process, because \(\mathrm{N_2}\) in the feed is from air, the feed contains some Ar that must be removed by a purge that also contains \(\mathrm{N_2}\) and \(\mathrm{H_2}\). Use the sliders to set the reactor temperature T (K), the reactor pressure P (bar), and the reactor feed flow rate (mol/min). The diagram updates to show the extent of reaction \(\xi\), the fresh feed of nitrogen and hydrogen, the recycled nitrogen and hydrogen, and the ammonia produced.
We use the Peng–Robinson equation of state and the reaction-coordinate method to compute the extent of reaction \(\xi\), in mole of \(\mathrm{NH_3}\) per min, for user-set values of the reactor temperature T in kelvin and pressure P in bar. This simulation carries out the mass balance around the reactor and splitter in order to compute the amount of ammonia produced when chemical equilibrium is reached in the reactor and in the recycle stream. We assume that: (1) the splitter separates the product (ammonia) perfectly from the reactants (nitrogen and hydrogen); and (2) the fresh feed contains stoichiometric amounts of nitrogen and hydrogen. As expected from Le Chatelier's principle, the amount of ammonia produced is greater at low temperatures and high pressures.
Details
The reaction is
\[ 1.5\,\mathrm{H_2} + 0.5\,\mathrm{N_2} \;\rightleftharpoons\; \mathrm{NH_3} \]Let \(F\) be the total molar flow rate fed to the reactor and \(\xi\) the extent of reaction. The fresh feed is stoichiometric, so the reactor feed is \(\tfrac{1}{4}F\) nitrogen and \(\tfrac{3}{4}F\) hydrogen. The mole fractions leaving the reactor are
\[ y_{\mathrm{NH_3}} = \frac{\xi}{F-\xi}, \qquad y_{\mathrm{N_2}} = \frac{\tfrac{1}{4}F - \tfrac{1}{2}\xi}{F-\xi}, \qquad y_{\mathrm{H_2}} = 1 - y_{\mathrm{N_2}} - y_{\mathrm{NH_3}} \]Because the splitter recovers all ammonia and recycles all unreacted gas, a steady-state balance gives the fresh feed, recycle, and product streams (mol per unit time):
\[ \text{fresh N}_2=\tfrac{1}{2}\xi,\qquad \text{fresh H}_2=\tfrac{3}{2}\xi,\qquad \text{NH}_3\ \text{product}=\xi \] \[ \text{recycle N}_2=\tfrac{1}{4}F-\tfrac{1}{2}\xi,\qquad \text{recycle H}_2=\tfrac{3}{4}F-\tfrac{3}{2}\xi \]Chemical equilibrium is written with gas-phase fugacities and a 1 bar reference pressure:
\[ K_a\, y_{\mathrm{H_2}}^{1.5}\, y_{\mathrm{N_2}}^{0.5}\, \varphi_{\mathrm{H_2}}^{1.5}\, \varphi_{\mathrm{N_2}}^{0.5} = \frac{y_{\mathrm{NH_3}}}{P}\,\varphi_{\mathrm{NH_3}} \]The equilibrium constant uses \(\Delta G^{\circ}=-16.5\) kJ/mol at \(T_0=298.15\) K together with a temperature-dependent heat of reaction (J/mol):
\[ \begin{aligned} \Delta H(T)=\,&-46100 + \Delta a\,(T-T_0)+\tfrac{\Delta b}{2}(T^2-T_0^2)\\ &+\tfrac{\Delta c}{3}(T^3-T_0^3)+\tfrac{\Delta d}{4}(T^4-T_0^4) \end{aligned} \] \[ K_a(T_0)=\exp\!\left(\frac{16500}{R\,T_0}\right) \] \[ \begin{aligned} K_a(T)=K_a(T_0)\exp\Big[\,&\tfrac{\Delta a}{R}\ln\tfrac{T}{T_0} +\tfrac{\Delta b}{2R}(T-T_0)+\tfrac{\Delta c}{6R}(T^2-T_0^2)\\ &+\tfrac{\Delta d}{12R}(T^3-T_0^3) +\tfrac{\Delta H^{\circ}_{\!*}}{R}\Big(\tfrac{1}{T}-\tfrac{1}{T_0}\Big)\Big] \end{aligned} \]where \(\Delta H^{\circ}_{\!*}=46100+T_0\Delta a+\tfrac{\Delta b}{2}T_0^2 +\tfrac{\Delta c}{3}T_0^3+\tfrac{\Delta d}{4}T_0^4\), and
\[ \Delta a=-29.36,\qquad \Delta b=2.786\times10^{-2} \] \[ \Delta c=-4.10\times10^{-7},\qquad \Delta d=2.74\times10^{-9} \]Fugacity coefficients come from the Peng–Robinson equation of state. The mixture compressibility factor \(Z\) is the largest real root of
\[ Z^3-(1-B)Z^2+(A-3B^2-2B)Z-(AB-B^2-B^3)=0 \]with van der Waals mixing rules
\[ A=\sum_i\sum_j y_i y_j A_{ij},\quad B=\sum_i y_i B_i,\quad A_{ij}=\sqrt{A_i A_j}\,(1-k_{ij}) \] \[ A_i=\frac{a_i P}{(RT)^2},\qquad B_i=\frac{b_i P}{RT} \] \[ a_i=0.45724\,\alpha_i\frac{R^2 T_{c,i}^2}{P_{c,i}},\qquad b_i=0.07780\,\frac{R\,T_{c,i}}{P_{c,i}} \] \[ \alpha_i=\left[1+m_i\!\left(1-\sqrt{T/T_{c,i}}\,\right)\right]^2 \] \[ m_i=0.37464+1.54226\,\omega_i-0.26992\,\omega_i^2 \]and the vapor fugacity coefficient of species \(i\)
\[ \begin{aligned} \ln\varphi_i=\;&\frac{B_i}{B}(Z-1)-\ln(Z-B)\\ &-\frac{A}{2\sqrt{2}\,B}\!\left(\frac{2\sum_j y_j A_{ij}}{A}-\frac{B_i}{B}\right) \ln\!\frac{Z+(1+\sqrt{2})B}{Z+(1-\sqrt{2})B} \end{aligned} \]The two equations (equilibrium and the cubic in \(Z\)) are solved simultaneously for the extent of reaction \(\xi\) and the compressibility factor \(Z\).
Pure-component parameters (\(R=8.314\ \mathrm{J\,mol^{-1}K^{-1}}\)):
| species | \(T_c\) (K) | \(P_c\) (bar) | \(\omega\) |
|---|---|---|---|
| H\(_2\) | 33.2 | 13.0 | −0.22 |
| N\(_2\) | 126.2 | 33.9 | 0.04 |
| NH\(_3\) | 405.6 | 112.8 | 0.25 |
Binary interaction parameters:
\[ k_{\mathrm{H_2,N_2}}=-0.036,\qquad k_{\mathrm{H_2,NH_3}}=0,\qquad k_{\mathrm{N_2,NH_3}}=0.222 \]Symbols
| \(A,\ B\) | dimensionless Peng–Robinson mixture parameters |
| \(A_i,\ B_i\) | dimensionless Peng–Robinson parameters of species \(i\) |
| \(A_{ij}\) | dimensionless cross parameter for species \(i\) and \(j\) |
| \(a_i\) | Peng–Robinson attraction parameter of species \(i\) (J·m\(^3\)/mol\(^2\)) |
| \(b_i\) | Peng–Robinson co-volume of species \(i\) (m\(^3\)/mol) |
| \(F\) | total molar flow rate fed to the reactor (mol/min) |
| \(K_a\) | equilibrium constant (dimensionless, 1 bar reference pressure) |
| \(k_{ij}\) | binary interaction parameter for species \(i\) and \(j\) |
| \(m_i\) | Peng–Robinson parameter that depends on \(\omega_i\) |
| \(P\) | reactor pressure (bar) |
| \(P_{c,i}\) | critical pressure of species \(i\) (bar) |
| \(R\) | ideal gas constant (J/(mol·K)) |
| \(T\) | reactor temperature (K) |
| \(T_0\) | reference temperature, 298.15 K |
| \(T_{c,i}\) | critical temperature of species \(i\) (K) |
| \(y_i\) | mole fraction of species \(i\) leaving the reactor |
| \(Z\) | compressibility factor of the gas mixture |
| \(\alpha_i\) | temperature-dependent Peng–Robinson function of species \(i\) |
| \(\Delta a,\ \Delta b,\ \Delta c,\ \Delta d\) | reaction heat-capacity coefficients (products minus reactants) |
| \(\Delta G^{\circ}\) | standard Gibbs free energy of reaction at \(T_0\) (kJ/mol) |
| \(\Delta H(T)\) | heat of reaction at temperature \(T\) (J/mol) |
| \(\Delta H^{\circ}_{\!*}\) | integration constant in the \(K_a(T)\) expression (J/mol) |
| \(\varphi_i\) | fugacity coefficient of species \(i\) |
| \(\omega_i\) | acentric factor of species \(i\) |
| \(\xi\) | extent of reaction (mol NH\(_3\)/min) |
About
This simulation was created in the Department of Chemical and Biological Engineering at University of Colorado Boulder for LearnChemE.com by John L. Falconer using Claude AI. It is a JavaScript/HTML5 implementation of a Mathematica simulation by Housam Binous, Mohammad Mozahar, and Ahmed Bellagi. It was prepared with financial support from the National Science Foundation (DUE 2336987 and 2336988). Address any questions or comments to LearnChemE@gmail.com.