Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Table of Contents

Introduction ..............................................................................................................................................................................................1

Model For CSTR .......................................................................................................................................................................................4

Methodology .............................................................................................................................................................................................6

Result and Discussion............................................................................................................................................................................9

Limitations .............................................................................................................................................................................................. 11

Conclusion ............................................................................................................................................................................................... 11

Python Code ........................................................................................................................................................................................... 13

List of figures
Figure 1: Graphical solution of equilibrium and energy balance equations to obtain .................................................2
Figure 2: Reactor in series with interstage cooling. ..................................................................................................................2
Figure 3: Increasing conversion by interstage cooling for an exothermic reaction......................................................3
Figure 4: Graphical representation to obtain equilibrium conversion and equilibrium temperature of the
reactor by using mass and energy balances. ................................................................................................................................9
Figure 5: Sensitivity analysis for reactant inlet temperature. ............................................................................................ 10
Figure 6: Multiple number of reactants and cooling system in series to increase the conversion from 41% to
95 %........................................................................................................................................................................................................... 11
Introduction
A chemical process that releases energy is referred to as an exothermic reaction. Reversible
exothermic reactions and irreversible exothermic reactions are the two forms of exothermic processes.
The chemical equation for the reversible equation is as,

Similarly, the chemical equation for irreversible equation is as,

In the industry, both reactions are prevalent. An equilibrium reaction is a specific example of a
reversible reaction. When the forwarding reaction rate equals the backward reaction rate. The
reaction should be carried out at a lower temperature for optimal product yield.

The given problem assumed that the equilibrium reaction proceeds adiabatically to determine the
maximal conversion at the given operating condition of the reactor. The mathematical model is
obtained from mass and energy balance whereas in python it is solved as the lambda function. Here,
we study the conversion by the single reactor, multiple reactors in series with interstage cooling and
study of, what parameters affect the maximum conversion of the product.

This intersection of the XEB line with the Xe curve gives the adiabatic equilibrium conversion and
temperature for an entering temperature T0.

1
Figure 1: Graphical solution of equilibrium and energy balance equations to obtain
adiabatic temperature and adiabatic equilibrium conversion.

If the entering temperature is increased from T0 to T01, the energy balance line will be shifted to the
right and be parallel to the original line, as shown by the dashed line. As the inlet temperature
increases, the adiabatic equilibrium conversion decreases. With a reduction in feed temperature, the
exothermic equilibrium reaction's conversion increases.

If adding inerts or lowering the entering temperature is not feasible, then one should consider reactor
staging. Higher conversion can be achieved for adiabatic operations by connecting reactors in series
with interstage cooling.

Figure 2: Reactor in series with interstage cooling.

In figure 2 the exit temperature to Reactor 1 is very high, 800 K, and the equilibrium conversion, X e, is
low as is the reactor conversion X1, which approaches Xe. Next, we pass the exit stream from adiabatic
reactor 1 through a heat exchanger to bring the temperature back down to 500 K where Xe is high but
X is still low. To increase the conversion, the stream then enters adiabatic reactor 2 where the
conversion increases to X2, which is followed by a heat exchanger and the process is repeated.

2
Figure 3: Increasing conversion by interstage cooling for an exothermic reaction.

The conversion–temperature plot for this scheme is shown in Figure. We see that with three interstage
coolers, 88% conversion can be achieved, compared to an equilibrium conversion of 35% for no
interstage cooling(Ingham et al., 2007).

3
Model For CSTR
Pure component A is passed into the reactor to produce B. The reaction is reversible exothermic. The
adiabatic energy balance of the CSTR is given as(Oberndorfer, 2001),

𝑄̇ - FA0∑ 𝐻𝑖𝐶𝑃𝑖 (𝑇 − 𝑇𝑖0) − [∆𝐻0 (𝑇𝑅) + ∆𝐶𝑃 (𝑇 − 𝑇𝑅)] 𝐹𝐴0𝑋 = 0 (1)

At adiabatic condition Q=0, the model for the conversion is obtained as,

∑𝐻𝑖 𝐶𝑃𝑖 (𝑇−𝑇𝑖0 )


XEB = −[Δ𝐻 0 (2)
𝑅𝑥 (𝑇𝑅 )+Δ𝐶𝑃(𝑇−𝑇𝑅 )]

In the given equilibrium reaction heat capacities of the component A and component B are equal i.e.

ΔCp=0. So, the equation is modified as,

∑𝐻𝑖 𝐶𝑃𝑖 (𝑇−𝑇𝑖0 )


XEB = 0 (𝑇 )] (3)
−[Δ𝐻𝑅𝑥 𝑅

The pure component A is introduced into the reactor so,

𝐹 𝐹
HA = 𝐹𝐴0 = 1 and HB = 𝐹𝐵0 = 0 (4)
𝐴0 𝐵0

The final modified equation of equilibrium conversion is,

𝐶𝑃 (𝑇−𝑇𝑖0 )
𝐴
XEB = −[Δ𝐻 0 (5)
𝑅𝑥 (𝑇𝑅 )]

Overall mass balance of the component A and component B in the reactor is given as,

𝑑𝑀
Min − Mout + Mgen − Mconsumed = (6)
𝑑𝑡

Rate law of the reaction is,

−𝑟𝐴 = 𝑟forward − 𝑟backward (7)

Overall rate of the equation becomes,

𝐶
−rA = 𝑘(𝐶𝐴 − 𝑘𝐵 ) (8)
𝑒

At equilibrium condition −𝑟𝐴 = 0,

CAe = 𝐶𝐵𝑒 (9)


𝑘𝑒

4
After introduction of the conversion into the equation 8 and solving for X then the model for the mass
balance conversion XMB is given as,

𝐾𝑒 (𝑇)
Xe = (10)
1+𝐾𝑒 (𝑇)

Mass flowrate of the cooling liquid required to absorb the heat from the product of the reactor is
givenby:

𝑄
Mc = 𝐶𝑃 ( Tout-Tin ) (11)
𝑐

Table shown the initial values given to the problem.

S.N. Parameter Value of the parameter


1 -40,000 𝐶𝑎𝑙/𝑚𝑜𝑙
𝐻A0(298.15 K)
2 -60,000 𝐶𝑎𝑙/𝑚𝑜𝑙
𝐻B0(298.15 K)
3 CpA 𝐶𝑎𝑙
50 𝑚𝑜𝑙.𝐾

4 CpB 𝐶𝑎𝑙
50𝑚𝑜𝑙.𝐾

5 Ke 100,000 at 298 K
6 T0 300 K
7 T 350 K
8 FA0 𝑚𝑜𝑙/𝑠𝑒𝑐
40

9 T1 270 K
10 T2 400 K
11 Cpc 𝐶𝑎𝑙
18𝑚𝑜𝑙.𝐾

5
Methodology
For the simulation and modeling of adiabatic exothermic equilibrium reaction in the reactor
following programming steps are done in python.

Step: 1

Numpy is the fundamental package for scientific computing with Python.

from numpy import*

Step: 2

Scipy.optimize is the package provides several commonly used optimization algorithms.

From scipy.optimize import fsolve

Step: 3

PyLab combines the numerical module numpy with the graphical plotting module pyplot.

import pylab as np

Step: 4

The data values show in tabular form.

from prettytable import PrettyTable

Step: 5

Input all the data given in the modeling problem. y=PrettyTable()and z=PrettyTable() givesthe two
different table.

Step: 6
In Python, anonymous function is a function that is defined without a name is called lambda
function. Generally, these functions are used for solving the non-linear equation. In this modeling

6
problem it is used for solving mass conversion and energy conversion values. In this step other
required expression for heat exchanger and reactor modeling are also introduced.

Xe, =fsolve (lambda xe:xe-(Ke*np.exp(-33.78*((400*xe+To)-


Ts)/(400*xe+300)))/(1+(Ke*np.exp(-33.78*((400*xe+To)-
Ts)/(400*xe+To)))),.40)

Step: 7

At the first modeling problem we check the conversion of single reactor at the intersection point and
corresponding value of temperature. In case of second program, we use the ladder form of the coding
to calculate the number of reactor and heat exchanger required for 90% conversion.

np.plot([To,Te],[0.0,Xe])

np.plot([Te,T0],[Xe,Xe])

np.plot([T0,Te1],[Xe,Xe1])

Step: 8

We put the value of equilibrium conversion and equilibrium temperature of each reactor in the
tabular form:

y.field_names=(["Reactor Number","Equilibrium
temperature,(Te)","Equilibrium conversion,(Xe)"])

y.add_row([1,round(Te),round(Xe,3)])

print("Table number: 1 Concentration and Temperature")

Step: 9

The Heat removed by each reactor are calculated with their given expression as

Q1=FA0*CPA*(T0-Te)

Step: 10
7
Mass flow rate of the cooling water circulated in the heat exchanger is calculated by using the given
expression of model.

Mc1=Q1/(CPC*(Tin-Tout))

Step: 11
Calculation of area required for heat exchanger for transfer of heat duty.

A1=(-Q1*np.log((Te-Tout)/(T0-Tin)))/(U*(Te-Tout-T0+Tin))

Step: 12

Showing the values of heat loss, mass flow rate and required surface area in the tabular form

z.field_names=(["Exchanger Number","Heat Removed,(Q):cal/s","coolant


flowrate(Mc),mol/s","Exchanger area(A),m**2"])

z.add_row([1,round(Q1,2),round(Mc1,2),round(A1,2)])

print("Table number: 2 Heat removed, coolant flowrate and exchanger


area")

Step: 13

Sensitivity analysis for single reactor is done by using for loop.It is the most powerful tool to solve
any problem in array. And it is also easy to use in python.

for T0 in arange(150,550,100):

For the multiple number of reactors and cooling system sensitivity was calculated for inlet
temperature of reactant and outlet temperature of cooling system by changing only values.

8
Result and Discussion

The elementary solid catalyzed liquid phase equilibrium exothermic reaction is represented by A
== B proceed in the adiabatic condition. To calculate the equilibrium conversion and equilibrium
temperatureof the product from single reactor was found to be 0.401 and 460.4 K.

Figure 4: Graphical representation to obtain equilibrium conversion and equilibrium temperature of


the reactor by using mass and energy balances.

The equilibrium temperature and conversion of the reaction were calculated using the reactor's
mass and energy balance as shown in figure 4. The intersection of the mass and energy balances in
the modeling yields the reactor's equilibrium temperature and conversion.

To increase equilibrium conversion of reactant following technique can be used. Change the inlet
temperature of reactor from 150 K to 550 K.

9
Figure 5: Sensitivity analysis for reactant inlet temperature.

As shown in Figure 5 when an exothermic reaction occurs, the equilibrium conversion reduces as
the initial reactor temperature rises. The equilibrium conversion of reactant rose from 41% to 90%
when the reactor input temperature was reduced from 350 K to 150 K. Similarly, as the
temperature of the reactant rises from 350 K to 550 K, the conversion of the reactant falls from 41.1
percent to 5.8%. This study indicated that when the temperature of the reactant’s inlet drops,
conversion rises.

However, at very low temperatures, the kinetic energy of the reactant molecules is very low, and
reaching the maximum temperature takes a long time.

Another way to increase the equilibrium conversion by the use of multiple number of reactor and
heat exchanger alternatively in series. Number of reactant and heat exchanger can be seen python
result below.

10
Figure 6: Multiple number of reactants and cooling system in series to increase the conversion from 41%
to 95 %.

Figure 6 shows that in order to enhance the conversion of reactant from 41% to 95%, four reactors
and three cooling systems must be arranged alternately in series. The temperature of the cooling
system should be kept at 350K. The cooling system conversion will increase as the number of
reactors is increased, but the building and running costs will also rise. As a result, this technology is
exclusively employed in industry for a certain sort of exothermic reaction.

Limitations
The model for the conversion is obtained for adiabatic condition i.e., Q=0. We could have obtained a
realistic data if we had accounted different temperature dependent Cp for different components. This
model is valid for equilibrium condition only.

Conclusion
The adiabatic exothermic equilibrium reaction was effectively simulated and modelled. Equilibrium
conversion is found to be 41% for the inlet temperature of the reactant of 300 K, and equilibrium
temperature is found to be 460 K.

11
The single equilibrium conversion of reactant increases as the feed temperature decreases and
decreases as the reactant temperature rises. Although conversion is high at very low temperatures,
due to the low kinetic energy of reactant particles, the reaction takes an endlessly long time to
complete up to this point. As a result, the reactor should run at the optimum conversion temperature.

The conversion of exothermic reactions increases in a succession of reactors by using cooling systems
alternately for exothermic reactions.

References
• Ingham, J., Dunn, I. J., Heinzle, E., Přenosil, J. E., & Snape, J. B. (2007). Chemical Engineering Dynamics: An
Introduction to Modelling and Computer Simulation: Third Edition. In Chemical Engineering Dynamics: An
Introduction to Modelling and Computer Simulatiossn: Third Edition. https://doi.org/10.1002/9783527614219

• Oberndorfer, C. (2001). Chemical engineering dynamics. In Zeitschrift fuer Metallkunde/Materials Research


and Advanced Techniques (Vol. 92, Issue 2). https://doi.org/10.1002/9783527616015

12
Python Code
from numpy import *
from scipy.optimize import fsolve
import pylab as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
import mpl_interactions.ipyplot as iplt
from prettytable import PrettyTable

#Calculating the Adiabatic Equilibrium Temperature:


# A = B which is the given equilibrium reaction

HA=-40000.0 # Standard of formation of component: A : cal/mol


HB=-60000.0 # standard heat of formation of component:B cal/mol[8]
CPA=50.0 # specific heat capacity of component: A(cal/mol.K)
CPB=50.0 # specific heat capacity of component: B(cal/mol.K)
Ke=100000.0 # equilibrium reaction constant at T=298 K
n=1 # number of equal division: K
DelH=HB-HA # change in enthalpy: cal/mol
U=100.0 # Overall heat transfer coefficient: cal/s.m**2.K
R=1.987 # Universal gas constant: cal/mol.K

T0=300 # Inlet temperature of reactant: K


T1=298.15 # lower temperature limit: K

T2=600.0 # upper temperature temperature limit: K


T=np.arange(T1,T2,n)
XMB=(Ke*exp((DelH/(R*T1))*(T-T1)/T))/(1+Ke*exp((DelH/(R*T1))*(T-T1)/T))
XEB=((CPA/(-DelH))*(T-T0))
Xe =fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*T1))*(((-DelH/CPA)*xe+T0)-
T1)/((-DelH/CPA)*xe+T0)))/(1+(Ke*np.exp((DelH/(R*T1))*(((-DelH/CPA)*xe+T0)-
T1)/((-DelH/CPA)*xe+T0)))),.40)

Te=(-DelH/CPA)*Xe+T0

f1=np.figure()
np.plot(T,XMB,label="XMB")
np.plot(T,XEB,label="XEB")
np.title('Finding Equilibrium Temperature and Conversion')
np.xlabel('Temperature,K')
np.ylabel('Conversion,Xe')
13
np.legend()
np.grid()
np.show()

def graph_plot(T1 = 298):


T0=300 # Inlet temperature of reactant: K
# T1=T1 # lower temperature limit: K

T2=600.0 # upper temperature temperature limit: K


T=np.arange(T1,T2,n)
XMB=(Ke*exp((DelH/(R*T1))*(T-T1)/T))/(1+Ke*exp((DelH/(R*T1))*(T-T1)/T))
XEB=((CPA/(-DelH))*(T-T0))
Xe =fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*T1))*(((-DelH/CPA)*xe+T0)-
T1)/((-DelH/CPA)*xe+T0)))/(1+(Ke*np.exp((DelH/(R*T1))*(((-DelH/CPA)*xe+T0)-
T1)/((-DelH/CPA)*xe+T0)))),.40)

Te=(-DelH/CPA)*Xe+T0

f1=np.figure()
np.plot(T,XMB,label="XMB")
np.plot(T,XEB,label="XEB")
np.title('Finding Equilibrium Temperature and Conversion')
np.xlabel('Temperature,K')

14
np.ylabel('Conversion,Xe')
np.legend('ME')
np.grid()
np.show()

from ipywidgets import interact

interact(graph_plot, T1 = (100, 350, 1))

{"version_major":2,"version_minor":0,"model_id":"90bafa44cadc4626bd6357da6c8dc2d3"}

<function __main__.graph_plot>

print()
print(Te)
print("Using single reactor we obtained about 40% conversion")
print("To increase the conversion of the reacting component up to 90%")
print("lowered the temperature using heat exchanger to the value of 350K")

[460.6933347]
Using single reactor we obtained about 40% conversion
To increase the conversion of the reacting component up to 90%
lowered the temperature using heat exchanger to the value of 350K

def various_temp():
T0=300 # Inlet temperature of reactant: K
T1=298.15 # lower temperature limit: K

t = [150 + 100 * i for i in range(0, 5)]


T2=600.0 # upper temperature temperature limit: K
T=np.arange(T1,T2,n)
XMB=(Ke*exp((DelH/(R*T1))*(T-T1)/T))/(1+Ke*exp((DelH/(R*T1))*(T-T1)/T))
XEB=((CPA/(-DelH))*(T-T0))

XEB_group = [((CPA/(-DelH))*(T-i)) for i in t]

f1=np.figure()
np.ylim(0, 1)
np.xlim(300, 600)
for temp in XEB_group:
# print(temp)
np.plot(T,temp,label="XMB")

15
np.plot(T, XMB, label="XMB")
# np.plot(T,XEB,label="XEB")

np.title('Finding Equilibrium Temperature and Conversion')


np.xlabel('Temperature, K')
np.ylabel('Conversion, Xe')
np.legend(['150K', '250K', '350K', '450K', '550K'])
np.grid()
np.show()

various_temp()

# Introducing Interstage cooling system:


HA=-40000.00 # Standard of formation of component: A: cal/mol
HB=-60000.00 # standard heat of formation of component:B: cal/mol
CPA=50.00 # specific heat capacity of component: A: cal/mol.K
CPB=50.00 # specific heat capacity of component:B: cal/mol.K
Ke=100000.00 # equilibrium reaction constant at T=298 K:
T1=298.00 # lower temperature limit: K
T2=600.00 # upper temperature temperature limit: K
n=1 # number of equal division: K
T0=350.0 # Temperature of the output of cooling system: K
To=300.0 # Input temperature of the reactant : K

16
Ts=298.15 # standard room temperature: K
FA0=40.0 # Molar feed rate of component A: mol/s
DelH=HB-HA # change in enthalpy: cal/mol
U=100.0 # Overall heat transfer coefficient: cal/s.m**2.K
R=1.987 # Universal gas constant: cal/mol.K
Tin=270 # Inlet temperature of coolant: K
Tout=400 # Outlet Temperature of coolant: K
CPC=18 # specific heat capacity of coolant: cal/mol.K
DelCP=CPA-CPB

T=np.arange(T1,T2,n)
XMB=(Ke*exp((DelH/(R*Ts))*(T-Ts)/T))/(1+Ke*exp((DelH/(R*Ts))*(T-Ts)/T))
XEB=((CPA/(-DelH))*(T-To))

Xe,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*xe+To)-
Ts)/((-DelH/CPA)*xe+To)))/(1+(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*xe+To)-
Ts)/((-DelH/CPA)*xe+To)))),.40)

Te=(-DelH/CPA)*Xe+To

Xe1,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*(xe-Xe)+T0)-Ts)/((-DelH/CPA)*((xe-Xe))+T0)))/(1+(Ke*np.exp
((DelH/(R*Ts))*(((-
DelH/CPA)*(xe-Xe)+T0)-Ts)/((-DelH/CPA)*(xe-Xe)+T0)))),.40)
Te1=(-DelH/CPA)*(Xe1-Xe)+T0

Xe2,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*(xe-Xe1)+T0)-Ts)/((-DelH/CPA)*((xe-Xe1))+T0)))/(1+(Ke*np.exp
((DelH/(R*Ts))*(((-
DelH/CPA)*(xe-Xe1)+T0)-Ts)/((-DelH/CPA)*(xe-Xe1)+T0)))),.40)

Te2=(-DelH/CPA)*(Xe2-Xe1)+T0

Xe3,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((- DelH/CPA)*(xe-Xe2)+T0)-Ts)/((-DelH/CPA)*((xe-Xe2))+T0)))/(1+(Ke*np.exp


((DelH/(R*Ts))*(((-
DelH/CPA)*(xe-Xe2)+T0)-Ts)/((-DelH/CPA)*(xe-Xe2)+T0)))),.40)

Te3=(-DelH/CPA)*(Xe3-Xe2)+T0

f1=np.figure()
np.xlim(300, 600)
np.ylim(0, 1.05)
17
np.plot([To,Te],[0.0,Xe])
np.plot([Te,T0],[Xe,Xe])
np.plot([T0,Te1],[Xe,Xe1])
np.plot([Te1,T0],[Xe1,Xe1])
np.plot([T0,Te2],[Xe1,Xe2])
np.plot([Te2,T0],[Xe2,Xe2])
np.plot([T0,Te3],[Xe2,Xe3])
np.plot(T,XMB,label="XMB")
np.title('Reactor staging with Interstage cooling system')
np.xlabel('Temperature,K')
np.ylabel('Conversion,Xe')
np.legend('123')
np.savefig("adiabatic,png")
np.grid()
np.show()

# Showing the output of 4 reactors in the tabular form with final concentration and temperature of each reactor:

HA=-40000.00 # Standard of formation of component: A: cal/mol


HB=-60000.00 # standard heat of formation of component:B: cal/mol
CPA=50.00 # specific heat capacity of component: A: cal/mol.K
CPB=50.00 # specific heat capacity of component:B: cal/mol.K
Ke=100000.00 # equilibrium reaction constant at T=298 K:

18
T1=298.00 # lower temperature limit: K
T2=600.00 # upper temperature temperature limit: K
n=1 # number of equal division: K
T0=350.0 # Temperature of the output of cooling system: K
To=300.0 # Input temperature of the reactant : K
Ts=298.15 # standard room temperature: K
FA0=40.0 # Molar feed rate of component A: mol/s
DelH=HB-HA # change in enthalpy: cal/mol
U=100.0 # Overall heat transfer coefficient: cal/s.m**2.K
R=1.987 # Universal gas constant: cal/mol.K
Tin=270 # Inlet temperature of coolant: K
Tout=400 # Outlet Temperature of coolant: K
CPC=18 # specific heat capacity of coolant: cal/mol.K
DelCP=CPA-CPB

T=np.arange(T1,T2,n)
XMB=(Ke*exp((DelH/(R*Ts))*(T-Ts)/T))/(1+Ke*exp((DelH/(R*Ts))*(T-Ts)/T))
XEB=((CPA/(-DelH))*(T-To))

Xe,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*xe+To)-
Ts)/((-DelH/CPA)*xe+To)))/(1+(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*xe+To)-
Ts)/((-DelH/CPA)*xe+To)))),.40)

Te=(-DelH/CPA)*Xe+To

Xe1,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*(xe-Xe)+T0)-Ts)/((-DelH/CPA)*((xe-Xe))+T0)))/(1+(Ke*np.exp
((DelH/(R*Ts))*(((-
DelH/CPA)*(xe-Xe)+T0)-Ts)/((-DelH/CPA)*(xe-Xe)+T0)))),.40)
Te1=(-DelH/CPA)*(Xe1-Xe)+T0

Xe2,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((-DelH/CPA)*(xe-Xe1)+T0)-Ts)/((-DelH/CPA)*((xe-Xe1))+T0)))/(1+(Ke*np.exp
((DelH/(R*Ts))*(((-
DelH/CPA)*(xe-Xe1)+T0)-Ts)/((-DelH/CPA)*(xe-Xe1)+T0)))),.40)

Te2=(-DelH/CPA)*(Xe2-Xe1)+T0

Xe3,=fsolve(lambda xe:xe-(Ke*np.exp((DelH/(R*Ts))*(((- DelH/CPA)*(xe-Xe2)+T0)-Ts)/((-DelH/CPA)*((xe-Xe2))+T0)))/(1+(Ke*np.exp


((DelH/(R*Ts))*(((-
DelH/CPA)*(xe-Xe2)+T0)-Ts)/((-DelH/CPA)*(xe-Xe2)+T0)))),.40)

19
Te3=(-DelH/CPA)*(Xe3-Xe2)+T0

f1=np.figure()
np.xlim(300, 600)
np.ylim(0, 1.05)
np.plot([To,Te],[0.0,Xe])
np.plot([Te,T0],[Xe,Xe])
np.plot([T0,Te1],[Xe,Xe1])
np.plot([Te1,T0],[Xe1,Xe1])
np.plot([T0,Te2],[Xe1,Xe2])
np.plot([Te2,T0],[Xe2,Xe2])
np.plot([T0,Te3],[Xe2,Xe3])
np.plot(T,XMB,label="XMB")
np.title('Reactor staging with Interstage cooling system')
np.xlabel('Temperature,K')
np.ylabel('Conversion,Xe')
np.legend('123')
np.savefig("adiabatic,png")
np.grid()
np.show()
y= PrettyTable()
z=PrettyTable()
y.field_names=(["Reactor Number","Equilibrium temperature,(Te)","Equilibrium conversion,(Xe)"])
y.add_row([1,round(Te),round(Xe,3)])
y.add_row([2,round(Te1),round(Xe1,3)])
y.add_row([3,round(Te2),round(Xe2,3)])
y.add_row([4,round(Te3),round(Xe3,3)])
print("Table number: 1 Concentration and Temperature")
print(y)
print("To get the final product about 95%")
print("we should use 4 reactor and 3 heat exchanger alternatively in series")
print("Number of exchanger used counted from graph=3(no. of left peaks)")
print("number of reactor used counted from graph = 4(no.of right peaks)")

# Heat removed by 3 Exchanger, flow:


Q1=FA0*CPA*(T0-Te)
Q2=FA0*CPA*(T0-Te1)
Q3=FA0*CPA*(T0-Te2)

20
# Molar flow rate of coolant {Initial temperature of coolant:270K,Specific Heat capacity: CPC: 18cal/mol.K, final Temperature of coolant:400
K

Mc1=Q1/(CPC*(Tin-Tout))
Mc2=Q2/(CPC*(Tin-Tout))
Mc3=Q3/(CPC*(Tin-Tout))

# Heat transfer area in the Exchanger:{countercurrent flow of the reactant and the coolant}
# Let us assume that Overall heat transfer coefficient U=100.0 cal/s.m**2.K

A1=(-Q1*np.log((Te-Tout)/(T0-Tin)))/(U*(Te-Tout-T0+Tin))
A2=(-Q2*np.log((Te1-Tout)/(T0-Tin)))/(U*(Te1-Tout-T0+Tin))
A3=(-Q3*np.log((Te2-Tout)/(T0-Tin)))/(U*(Te2-Tout-T0+Tin))

z.field_names=(["Exchanger Number","Heat Removed,(Q):cal/s","coolant flowrate(Mc),mol/s","Exchanger area(A),m**2"])


z.add_row([1,round(Q1,2),round(Mc1,2),round(A1,2)])
z.add_row([2,round(Q2,2),round(Mc2,2),round(A2,2)])
z.add_row([3,round(Q3,2),round(Mc3,2),round(A3,2)])
print("Table number: 2 Heat removed,coolant flowrate and exchanger area")
print(z)

21
Table number: 1 Concentration and Temperature
+---+------------------------------+-----------------------------+
| Reactor Number | Equilibrium temperature,(Te) | Equilibrium conversion,(Xe) |
+---+------------------------------+-----------------------------+
|1| 461 | 0.402 |
|2| 442 | 0.631 |
|3| 424 | 0.816 |
|4| 401 | 0.945 |
+---+------------------------------+-----------------------------+
To get the final product about 95%
we should use 4 reactor and 3 heat exchanger alternatively in series
Number of exchanger used counted from graph=3(no. of left peaks)
number of reactor used counted from graph = 4(no.of right peaks)
Table number: 2 Heat removed,coolant flowrate and exchanger area
+------------------+------------------------+----------------------------+------------------------+
| Exchanger Number | Heat Removed,(Q):cal/s | coolant flowrate(Mc),mol/s | Exchanger area(A),m**2 |
+------------------+------------------------+----------------------------+------------------------+
| 1 | -221386.67 | 94.61 | 31.67 |
| 2 | -183554.31 | 78.44 | 31.2 |
| 3 | -148051.8 | 63.27 | 31.82 |
+------------------+------------------------+----------------------------+------------------------+

22

You might also like