Subham Poudel 28 Lab Report PDF
Subham Poudel 28 Lab Report PDF
Submitted By Instructor :
Dr. Kundan Lal Shrestha
Subham Poudel
Roll no:28
The objective in this lab is to observe the nature of concentration of reactants and products with
the time. We got to know that the concentration of reactants decreases and products increases
with time, eventually remaining in constant (equilibrium) after a certain time from the result
below.
INTRODUCTION:
There are many reactions being taken place in different industries around the world. For
this reaction to take place, we need a container known as the reactor where we are able to
perform various chemical reactions. There are various types of reactors in the modern world like
Batch reactors, Flow reactors, etc.
There are several types of the stirred reactors used in chemical or biochemical industry.
Continuous Stirred Tank Reactor (CSTR) is advantageous and are commonly used in this model
because of their technological importance. Reaction inside flows continuously and we can
control this reaction by volumetric flow rate of the reactant. The first step is introducing of the
mathematical model which describes relations between state variable in the mathematical way.
This mathematical model comes from material or heat balances inside the set of ordinary
differential equations (ODE). Simulation usually consists of steady-state analysis which observes
behavior of the system in steady state and dynamic analysis which shows dynamic behavior after
the step change of the input quantity.
MODEL DESCRIPTION
Reactor under the consideration is isothermal reactor with complex reaction that can be
described by following reactions. Mathematical description of all variables is very complicated.
Therefore, we must introduce some simplifications before we start to build the mathematical
model of the plant. We have the following assumptions:
K1
A+ B
K2
B+X Y
K3
B+Y Z
A X Y Z
V F, CA, CB
Now, we take the material balance for each component involved in the reaction that is all the
reactants and products.
We know,
For component A
For component B
For component X
For component Y
For component Z
For component A
For component B
For component Y
For component Z
Now,
At Fo = F,
A0 = 0.4 kmol/(m^3)
B0 = 0.6 kmol/(m^3)
X0 = Y0 = Z0 = 0 kmol/(m^3)
tfin = 25000
Cint = 500
B0 = 0.6
X0 = 0.0
Y0 = 0.0
Z0 = 0.0
k1 = 5.E-4
k2 = 5.E-2
k3 = 2.E-2
nint = 500.0
tfin = 25000.0
Tau = 5000.0
Step: 3
Step: 4
(B0 - x[1]) / tau - k1*x [0]*x [1] - k2* x[1]* x[2] - k3*x [1]*
Step: 5
Make the for loop for study of performance of CSTR with change in k1, k2, k3, tau etc as
follows
Step: 6
t = linspace(0.,tfin,nint)
Step: 7
x0 = ([A0,B0,X0,Y0,Z0])
Step: 8
Use the function to solve ODES and print the result for ODES and take the transpose for
solving of all ODES
print (infodict['message'])
Plot the graph using plot command, give title, legend and label the graph and finally run
the program
p.plot(t,CA,label="tau="+str(tau))
p.grid()
p.legend(loc="best")
p.xlabel("time(S)")
p.ylabel("concentration of CA(Kmol/m^3)")
p.savefig("cstrcom,png")
p.show()
SOURCE CODE:
#CSTRCOM1
from numpy import *
import pylab as p
from scipy import integrate
CA0=0.4
CB0=0.6
CX0=0
CY0=0
CZ0=0
k1=5.E-4
k2=5.E-2
print(infodict["message"])
CA,CB,CX,CY,CZ=x.T
p.plot(t,CA,label="tau="+str(tau))
f=p.figure()
p.plot(t,CA,'r--',label="A")
p.plot(t,CB,'b',label="B")
p.plot(t,CX,'g',label="X")
p.plot(t,CY,'k',label="Y")
p.plot(t,CZ,'y',label="Z")
p.grid()
p.legend(loc="best")
p.xlabel("time(S)")
p.ylabel("concentration(Kmol/m^3)")
p.title("concentration vs time")
p.savefig("cstrcom,png")
p.show()
Two basic analysis of CSTR steady state analysis and Dynamic analysis were done. We compare
the steady state value by analytically and numerically which are given following pictures. We
see the performance of CSTR i.e. change in outlet concentration. We see the sensitivity of the
concentration with some parameters. Finally we get the idea of playing with python and
modeling of the CSTR in the isothermal condition with complex reaction.
OBJECTIVE:
The main objective in this lab is to observe the molar concentration of the reactant (A) and
product (B) along the length of the reactor. Here, we have used a tubular reactor namely plug
flow reactor. Hence, from the result obtained, we can see the molar concentration of A decreases
along the reactor and molar concentration of B increases along the reactor, respectively.
INTRODUCTION:
Many reactor are being used in industries to carry out different reactions being taken place in
them. Various important reactor are being used in industries like the CSTR, PFR, PBR, etc.
Among these different reactor flow reactor have greater influence and in this lab we have used
the Plug Flow Reactor (PFR) to tackle out our problem.
PFR is a model used to describe chemical reactions in continuous, flowing systems of
cylindrical geometry. The PFR model is used to predict the behavior of chemical reactors of such
design, so that key reactor variables, such as the dimensions of the reactor, can be estimated. It is
sometimes referred to as the gas phase reactors as many gas phase reaction are being taken place
thereThe first step is introducing of the mathematical model which describes relations between
state variable in the mathematical way. This mathematical model comes from material or heat
balances inside the relations is mathematical model the set of ordinary differential equations
(ODE). Simulation usually consists of steady-state analysis which observes behavior of the
system in steady state and dynamic analysis which shows dynamic behavior after the step change
of the input quantity.
MODEL DESCRIPTION
We have a model of Plug Flow Reactor in the above lab. Mathematical description of all
variables is of course very complicated. Therefore, there must be some simplifications
introduced before we start to build the mathematical model of the plant. A tubular reactor is
considered in which the gas-phase reaction leads to a change in the molar flow rate and thus in
the linear gas velocity In gas-phase reactors, the volume and volumetric flow rate frequently
vary, owing to the molar changes caused by reaction and the effects of temperature and pressure
Now, material balance for all the reactants and products, we have
The steady-state balances are written in terms of moles. From the molar flow at each point in the
reactor, the Ideal Gas Law is used to calculate the volumetric flow rate. This also gives the
possibility of considering the influence of temperature and pressure profiles along the tube.
G= (NA+NB+NINERTS)/P……………………………. (3)
NA=yAGP/RT………………………………………. (4)
NB=yBGP/RT………………………………………. (5)
INITIAL CONDITIONS:
P=1*10^5
k=15. m=2.
NA0=5.
NB0=0.
NINERTS=1.
area=0.012
cnum=500.
zfin=4.
Step: 2
Input all the given parameters:
R=8.314
T=350.
P=1.E5
Step :3
Define the function in which we need to work with differentials
def dX_dz(X,t=0):
G=(na+nb+ni)*R*T/P
return np.array([
-k*X[0]/G*area,
m*k*X[0]/G*area
])
Step:4
Define correlations:
na=5.
nb=0.
ni=1.
G=(na+nb+ni)*R*T/P
Step:5
Give the range for time as follows
z=np.linspace(0.,zfin,cnum)
Step:6
Give initial values for ODES
X0=np.array([yaG,ybG])
Step: 7
Use the function to solve ODES and print the result for ODES and take
the transpose for solving of all ODES
X=integrate.odeint(dX_dz, X0, z)
AA,BB=X.T
na=AA*P/(R*T)
nB=BB*P/(R*T)
ya=AA/G
yb=BB/G
print (yb)
SOURCE CODE:
import numpy as np
import pylab as p
from scipy import integrate
#initial condition
R=8.314
T=350.
P=1.E5
k=15.