0% found this document useful (0 votes)
103 views

Multiple Reaction in PFR

The document describes a problem involving a plug flow reactor for synthesizing methanol from carbon monoxide and hydrogen gas using a new catalyst. Rate equations and constants for the three reactions are provided. The feed composition and conditions of 332 K inlet temperature and 150 atm inlet pressure are given. The problem is to determine the optimum reactor volume to maximize methanol (Fc) production. The solution involves: 1) Defining reaction rates and constants 2) Setting up differential equations for component balances 3) Integrating the equations using odeint or solve_ivp to determine concentration profiles 4) Plotting Fc vs volume and identifying the maximum Fc and corresponding optimum reactor volume.

Uploaded by

Dilip Kadavla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Multiple Reaction in PFR

The document describes a problem involving a plug flow reactor for synthesizing methanol from carbon monoxide and hydrogen gas using a new catalyst. Rate equations and constants for the three reactions are provided. The feed composition and conditions of 332 K inlet temperature and 150 atm inlet pressure are given. The problem is to determine the optimum reactor volume to maximize methanol (Fc) production. The solution involves: 1) Defining reaction rates and constants 2) Setting up differential equations for component balances 3) Integrating the equations using odeint or solve_ivp to determine concentration profiles 4) Plotting Fc vs volume and identifying the maximum Fc and corresponding optimum reactor volume.

Uploaded by

Dilip Kadavla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

MULTIPLE REACTION IN

PLUG FLOW REACTOR

solved with:
Problem
A new catalyst has been proposed for the synthesis of methanol from carbon monoxide and
hydrogen gas. This catalyst is reasonably active between temperatures of 330 K to about 430
K. The isothermalreactions involved in the synthesis include:
𝐶𝑂 + 2𝐻2 ⇄ 𝐶𝐻3 𝑂𝐻
𝐶𝑂 + 𝐻2 𝑂 ⇄ 𝐶𝑂2 + 𝐻2
𝐶𝐻3 𝑂𝐻 → 𝐶𝐻2 𝑂 + 𝐻2
The reactions are elementary and take place in the gas phase. The reaction is to be carried out
isothermally and as a first approximating pressure drop will be neglected. The feed consists of
7/15 hydrogen gas, 1/5 carbon monoxide, 1/5 carbon dioxide, 2/15 steam. The total molar flow
rate is 300 mol/s. The entering pressure may be varied between 1 atm and 160 atm and the
entering temperature between 300 K and 400 K.
Rate of reaction
𝐶𝐶
−𝑟1𝐴 = 𝑘1 (𝐶𝐴 𝐶𝐵2 − )
𝐾1
𝐶𝐸 𝐶𝐵
−𝑟2𝐴 = 𝑘2 (𝐶𝐴 𝐶𝐷 − )
𝐾2
−𝑟3𝐶 = 𝑘3 𝐶𝐶
2
31400 1 1 𝑑𝑚3
𝑘1 = 0.933 exp [2.5 ( ( − ))] ( ) 𝑠 −1
𝑅 330 𝑇 𝑚𝑜𝑙
2
131667 2
𝑑𝑚3
𝐾1 = (0.001987𝑇) ( )
30620 1 1 𝑚𝑜𝑙
exp [− 𝑅 (𝑇 − 298)]

18000 1 1 𝑑𝑚3
𝑘2 = 0.636 exp [ ( − )]
𝑅 300 𝑇 𝑚𝑜𝑙. 𝑠

103.943
𝐾2 =
9834 1 1
exp [− 𝑅 (𝑇 − 298)]

28956 1 1
𝑘3 = 0.244 exp [1.5 ( ( − ))] 𝑠 −1
𝑅 325 𝑇

R = 1.987 cal/mol
If the inlet temperature is 332 K and inlet pressure is 150 atm, what is the optimum volume of
plug flow reactor to maximize methanol production!
Note: Problem is addapted from Elements of Chemical Reaction Engineering 3rd edition – H. Scott Fogler with
slight changes

Solution

Concentration varies as function of volume


Feed in Product

For simplicity,
𝑎 + 2𝑏 ⇄ 𝑐
𝑎+𝑑 ⇄𝑒+𝑏
𝑐 →𝑓+𝑏
Apply mole balances
𝑑𝐹𝑎
= 𝑟1𝐴 + 𝑟2𝐴
𝑑𝑉
𝑑𝐹𝑏
= 2𝑟1𝐴 − 𝑟2𝐴 − 𝑟3𝑐
𝑑𝑉
𝑑𝐹𝑐
= −𝑟1𝐴 + 𝑟3𝑐
𝑑𝑉
𝑑𝐹𝑑
= 𝑟2𝐴
𝑑𝑉
𝑑𝐹𝑒
= −𝑟2𝐴
𝑑𝑉
𝑑𝐹𝑓
= −𝑟3𝐶
𝑑𝑉
Initial condition
Fa0 = 60 mol/dm3
Fb0 = 140 mol/dm3
Fc0 = 0 mol/dm3
Fd0 = 40 mol/dm3
Fe0 = 60 mol/dm3
Ff0 = 0 mol/dm3
Stoichiometry
𝐹𝑖 𝑇0
𝐶𝑖 = 𝐶𝑇0 → 𝑇 = 𝑇0
𝐹𝑇 𝑇
𝐹𝑖
𝐶𝑖 = 𝐶𝑇0
𝐹𝑇
𝑃0
𝐶𝑇0 =
0.082𝑇
𝐹𝑇 = 𝐹𝑎 + 𝐹𝑏 + 𝐹𝑐 + 𝐹𝑑 + 𝐹𝑒 + 𝐹𝑓

Code solution
1. Import python extension

2. Input feed data

3. Calculate reaction constant


4. Input feed composition

5. Make a function for dF/dV and initial condition

The first line in dfdv (-k1*(CT0 …)) stands for dFa/dV, the second line (-2*k1*(CT0 …))
stands for dFb/dV, etc.
The initial condition is given by fa_0, fb_0, etc where fa_0, fb_0 is mole of each compound
in inlet stream.
6. Solve the ODE
Method 1

To see the result and make a dataframe use this code:


Method 2

To see the result and make a dataframe use this code:

7. Plot the result


Method 1

Method 2

Complete code →
In [1]: import numpy as np
import matplotlib.pyplot as plt
import scipy as sp
import pandas as pd
from scipy.integrate import odeint
from scipy.integrate import solve_ivp

Input Data

In [2]: initial_pressure=150 #atm


initial_temp=332 #K
feed_mol=300 #mol/s
CT0=initial_pressure/(0.082*initial_temp)

Reaction

CO + 2H2 <--> CH3OH


CO + H2O <--> CO2 + H2
CH3OH --> CH2O + H2

CO = a
H2 = b
CH3OH = c
H2O = d
CO2 = e
CH2O = f

In [3]: k1=0.933*np.exp(2.5*31400/1.987*(1/330-1/initial_temp))
k2=0.636*np.exp(18000/1.987*(1/300-1/initial_temp))
k3=0.244*np.exp(1.5*28956/1.987*(1/325-1/initial_temp))
k1_reverse=131.667*(0.001987*initial_temp)**2/np.exp(-30620/1.987*(1/initial
k2_reverse=103.943/np.exp(-9843/1.987*(1/initial_temp-1/298))
k1,k2,k3,k1_reverse,k2_reverse

Out[3]: (1.9190687276748413,
11.680580752301399,
1.0075468263077965,
0.28721721442642556,
18.943706597435295)

In [4]: # Feed Compound


xa=1/5
xb=7/15
xc=0
xd=2/15
xe=1/5
xf=0

Solution

Loading [MathJax]/extensions/Safe.js
In [5]: def dfdv(v,f):
fa,fb,fc,fd,fe,ff=f
return[-k1*(CT0*fa/(fa+fb+fc+fd+fe+ff)*(CT0*fb/(fa+fb+fc+fd+fe+ff))**2-C
2*-k1*(CT0*fa/(fa+fb+fc+fd+fe+ff)*(CT0*fb/(fa+fb+fc+fd+fe+ff))**2
k1*(CT0*fa/(fa+fb+fc+fd+fe+ff)*(CT0*fb/(fa+fb+fc+fd+fe+ff))**2-CT
-k2*(CT0*fa/(fa+fb+fc+fd+fe+ff)*CT0*fd/(fa+fb+fc+fd+fe+ff)-CT0*fe
k2*(CT0*fa/(fa+fb+fc+fd+fe+ff)*CT0*fd/(fa+fb+fc+fd+fe+ff)-CT0*fe/
k3*CT0*fc/(fa+fb+fc+fd+fe+ff)
]
fa_0=xa*feed_mol
fb_0=xb*feed_mol
fc_0=xc*feed_mol
fd_0=xd*feed_mol
fe_0=xe*feed_mol
ff_0=xf*feed_mol

f_0=(fa_0,fb_0,fc_0,fd_0,fe_0,ff_0)

In [6]: #Methode 1
#Solver = odeint

v=np.linspace(0,200,200)
sol=odeint(dfdv,y0=f_0,t=v,tfirst=True)
sol

Out[6]: array([[6.00000000e+01, 1.40000000e+02, 0.00000000e+00, 4.00000000e+01,


6.00000000e+01, 0.00000000e+00],
[4.19017612e+01, 1.25180298e+02, 1.08950906e+01, 3.29131865e+01,
6.70868135e+01, 1.16334728e-01],
[3.07392335e+01, 1.17128863e+02, 1.71031852e+01, 2.82535925e+01,
7.17464075e+01, 4.11173727e-01],
...,
[2.99762814e-01, 1.47379864e+02, 7.35434494e-01, 6.09223224e+00,
9.39077678e+01, 2.50570349e+01],
[2.94974493e-01, 1.47389993e+02, 7.23731434e-01, 6.09062511e+00,
9.39093749e+01, 2.50719192e+01],
[2.90263639e-01, 1.47399955e+02, 7.12216290e-01, 6.08904609e+00,
9.39109539e+01, 2.50865662e+01]])

In [7]: fa_sol=sol.T[0]
fb_sol=sol.T[1]
fc_sol=sol.T[2]
fd_sol=sol.T[3]
fe_sol=sol.T[4]
ff_sol=sol.T[5]

df=pd.DataFrame({"Volume":v,"Fa":fa_sol,"Fb":fb_sol,"Fc":fc_sol,"Fd":fd_sol,
df

Loading [MathJax]/extensions/Safe.js
Out[7]: Volume Fa Fb Fc Fd Fe Ff

0 0.000000 60.000000 140.000000 0.000000 40.000000 60.000000 0.000000

1 1.005025 41.901761 125.180298 10.895091 32.913186 67.086814 0.116335

2 2.010050 30.739234 117.128863 17.103185 28.253592 71.746408 0.411174

3 3.015075 23.793576 113.233996 20.446905 25.056337 74.943663 0.815857

4 4.020101 19.383055 111.806145 22.082721 22.747094 77.252906 1.281319

... ... ... ... ... ... ... ...

195 195.979899 0.309577 147.359094 0.759417 6.095533 93.904467 25.026539

196 196.984925 0.304630 147.369565 0.747329 6.093868 93.906132 25.041909

197 197.989950 0.299763 147.379864 0.735434 6.092232 93.907768 25.057035

198 198.994975 0.294974 147.389993 0.723731 6.090625 93.909375 25.071919

199 200.000000 0.290264 147.399955 0.712216 6.089046 93.910954 25.086566

200 rows × 7 columns

In [8]: df.plot(x="Volume",y="Fc",ylabel="Concentration")
plt.title("Solver: odeint",fontweight="bold");
fc_max=round(np.max(fc_sol),3)
reactor_volume=round(df.loc[df.loc[df['Fc'].idxmax()].name][0],3)
print(f"Maximum concentration:",fc_max,"mol")
print(f"Reactor volume:",reactor_volume,"dm^3")

Maximum concentration: 22.775 mol


Reactor volume: 6.03 dm^3

Loading [MathJax]/extensions/Safe.js
In [9]: #Methode 2
#Solver = solve_ivp, method=DOP853

v=np.linspace(0,200,200)
sol2=solve_ivp(dfdv,t_span=(0,200),y0=f_0,method="DOP853",t_eval=v,rtol=1e-1
sol2

Out[9]: message: The solver successfully reached the end of the integration inter
val.
success: True
status: 0
t: [ 0.000e+00 1.005e+00 ... 1.990e+02 2.000e+02]
y: [[ 6.000e+01 4.190e+01 ... 2.950e-01 2.903e-01]
[ 1.400e+02 1.252e+02 ... 1.474e+02 1.474e+02]
...
[ 6.000e+01 6.709e+01 ... 9.391e+01 9.391e+01]
[ 0.000e+00 1.163e-01 ... 2.507e+01 2.509e+01]]
sol: None
t_events: None
y_events: None
nfev: 1607
njev: 0
nlu: 0

In [10]: fa_sol2=sol2.y[0]
fb_sol2=sol2.y[1]
fc_sol2=sol2.y[2]
fd_sol2=sol2.y[3]
Loading [MathJax]/extensions/Safe.js
fe_sol2=sol2.y[4]
ff_sol2=sol2.y[5]

df2=pd.DataFrame({"Volume":v,"Fa":fa_sol2,"Fb":fb_sol2,"Fc":fc_sol2,"Fd":fd_
df2

Out[10]: Volume Fa Fb Fc Fd Fe Ff

0 0.000000 60.000000 140.000000 0.000000 40.000000 60.000000 0.000000

1 1.005025 41.901761 125.180298 10.895091 32.913187 67.086813 0.116335

2 2.010050 30.739233 117.128863 17.103185 28.253592 71.746408 0.411174

3 3.015075 23.793575 113.233996 20.446905 25.056337 74.943663 0.815857

4 4.020101 19.383055 111.806145 22.082721 22.747094 77.252906 1.281319

... ... ... ... ... ... ... ...

195 195.979899 0.309577 147.359094 0.759417 6.095533 93.904467 25.026539

196 196.984925 0.304630 147.369565 0.747329 6.093868 93.906132 25.041909

197 197.989950 0.299763 147.379864 0.735435 6.092232 93.907768 25.057035

198 198.994975 0.294975 147.389993 0.723731 6.090625 93.909375 25.071919

199 200.000000 0.290264 147.399955 0.712216 6.089046 93.910954 25.086566

200 rows × 7 columns

In [11]: df2.plot(x="Volume",y="Fc",ylabel="Concentration")
plt.title("Solver: solve_ivp; method:DOP853",fontweight="bold");
fc_max=round(np.max(fc_sol),3)
reactor_volume=round(df2.loc[df.loc[df['Fc'].idxmax()].name][0],3)
print(f"Maximum concentration:",fc_max,"mol")
print(f"Reactor volume:",reactor_volume,"dm^3")

Maximum concentration: 22.775 mol


Reactor volume: 6.03 dm^3

Loading [MathJax]/extensions/Safe.js
Loading [MathJax]/extensions/Safe.js

You might also like