04 Tutorial Simpson Method
04 Tutorial Simpson Method
f ( x)dx = f ( x0 ) + 4 f ( xi ) + 2 f ( xi ) + f ( xn )
3n i =1 i =2
a
i = odd i = even
The number of discretization points should be an even number ( or in other word,
the total number of points is an odd number)
Exercise Problem
A catalytic reaction A (g) → B (g) is carried out in an isothermal circulating fluidized bed reactor.
For reactions with surface-limited reaction mechanism, where A and B are absorbed on the
surface of the catalyst, the reaction rate equation is:
𝑘1 𝐶𝐴
−𝑟𝐴 =
1 + 𝑘2 𝐶𝐴 + 𝑘3 𝐶𝐵
The rA is the reaction rate in kmol/m3.s, CA and CB are concentrations of A and B in kmol/m3.
Parameter k1, k2 and k3 represents the reaction rate constant. It is also assumed that the
catalyst moves upward at the same velocity as the gas of U m/s.
From mass balance in the reactor, we can estimate the height of the reactor as a function of
conversion as:
𝑥
1
𝑧 = 𝐶𝐴0 𝑈 න 𝑑𝑥
0 −𝑟𝐴
3
Integration
Prepare a vector of xfinal
for loop to access each value of
result
2 Y
xfinal
…
#Plotting and prepare table 1
Integration result xf [1]
Integration result xf [2]
…
Integration result xf [N]