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

Process Modeling & Simulation File

This document outlines 9 experiments related to process modeling and simulation. The experiments include mathematical modeling and programming of various processes like batch reactors, continuous stirred-tank reactors (CSTR), distillation columns, and biochemical reactors. The document provides the assumptions, equations, MATLAB code, command files, and graphs for each experiment. It also describes programming methods like Fibonacci, Newton-Raphson, and Secant in MATLAB to find the root of functions.

Uploaded by

Jagjit Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

Process Modeling & Simulation File

This document outlines 9 experiments related to process modeling and simulation. The experiments include mathematical modeling and programming of various processes like batch reactors, continuous stirred-tank reactors (CSTR), distillation columns, and biochemical reactors. The document provides the assumptions, equations, MATLAB code, command files, and graphs for each experiment. It also describes programming methods like Fibonacci, Newton-Raphson, and Secant in MATLAB to find the root of functions.

Uploaded by

Jagjit Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Process Modeling & Simulation

Sr.
No.

List of Experiments

Page No.

Date

1.

Mathematical Modeling
and Programming of
Isothermal Batch
Reactor
Mathematical Modeling
and Programming of
Isothermal CSTR
Mathematical Modeling
and Programming of
Non-Isothermal CSTR
Mathematical Modeling
and Programming of
Gravity Flow Tank
Mathematical Modeling
and Programming of
Isothermal Distillation
Column
Mathematical Modeling
and Programming of
Isothermal Biochemical
Reactor
Programming of
Fibonacci Method in
Matlab
Programming of Newton
Raphson Method in
Matlab
Programming of Secant
Method in Matlab

05/08/16

12/08/16

19/08/16

10

26/08/16

14

09/09/16

25

23/09/16

29

30/09/16

31

14/10/16

33

04/11/16

2.

3.

4.

5.

6.

7.

8.

9.

Teachers
Signature

Index

Page | 0

Process Modeling & Simulation

Experiment No. 1: Isothermal Batch Reactor

The reaction ABC occur within the tank. The constants k1and k2 describe the reaction rate for
AB and BC respectively.
The equations are:

dC A

dCB
dCC

dt

k1C A

dt

k1C A k2CB

dt

k 2C B

M-FILE

COMMAND FILE

Page | 1

Process Modeling & Simulation

GRAPH

CONCLUSION
As the reaction proceed in isothermal batch reactor the concentration of A to form B, as B formed the
concentration of c starts by consuming B.

Page | 2

Process Modeling & Simulation

Experiment No.2: Mathematical Modeling and Programming of


Isothermal CSTR
Assumptions:

Reactor is perfectly mixed.


Volume of the reactor is constant.
First order kinetics involved.
Temperature is constant.
Density of a system is constant throughout.

Component continuity equation:


[Rate of accumulation] = [Flow in]-[Flow out]-[Consumption]
Simple O.D.E:

dC A

dt

( FC Ao FC A )
kC A
V

Page | 3

Process Modeling & Simulation

M-FILE

COMMAND FILE

GRAPH
Page | 4

Process Modeling & Simulation

CONCLUSION
In isothermal system 3 CSTR in series, the concentration vs. time graph concluded that concentration
of A decreases as B formed and B is consumed to form C after sometime reaction gets in equilibrium
stage.

Page | 5

Process Modeling & Simulation

Experiment No.3: Mathematical Modeling &Programming of NonIsothermal CSTR


Assumptions:

Irreversible and exothermic reaction.


Volume of the reactor (V) and inside the jacket (Vj) is constant.
nth order kinetics involved.
Heat of reaction is assumed to be.
Density of a system is constant and negligible heat loss throughout.
Perfectly mixed CSTR.
Temperature everywhere in the jacket is Tj.

Energy Equation for the Reactor:

( Fo To F T ) (k C An ) U AH (T T j )
dTdt

P
P

Page | 6

Process Modeling & Simulation

M-FILE

COMMAND FILE

Page | 7

Process Modeling & Simulation

GRAPH

Energy Equation for the Jacket:


Page | 8

Process Modeling & Simulation

O. D. E.

dT j

dt

( F j T jo F T j )
Vj

U AH (T T j )

M-FILE

COMMAND FILE

GRAPH
Page | 9

Process Modeling & Simulation

Page | 10

Process Modeling & Simulation

Experiment No.4: Mathematical Modeling & Programming of Gravity


Flow Tank
A tank having an incompressible liquid is pumped with a variable rate F. This inflow
rate can vary with time because of changes in operations upstream.

Assumptions:
Initial flow rate is 50% of design rate & Initial flow rate is 65% of design rate.

1. Equation of motion(conservation of momentum):

dv g
Kf v 2
h
dL L
Ap

Simple ODE for assumption 1


ODE:d(H) / d(t) = 0.311-0.0624*V
Simple ODE for assumption 2
ODE: d(V) / d(t) = 0.0107*H -0.00205*V 2
FOR 1ST ASSUMPTION:
Page | 11

Process Modeling & Simulation


M-FILE

COMMAND FILE

GRAPH

FOR 2ND ASSUMPTION:


Page | 12

Process Modeling & Simulation

M-FILE

COMMAND FILE

GRAPH

Page | 13

Process Modeling & Simulation


CONCLUSION
Due to gravity as time passes the height and the volume of the water or the feed supplied in tank get
decreases.

Page | 14

Process Modeling & Simulation

Experiment No.5 Mathematical Modeling and Programming of


isothermal Distillation Column
Distillation is used in many chemical processes for separating feed streams and for purification of
final and intermediate product streams. Most column handle multi component feeds.

Assumptions:

Binary system with constant relative volatility throughout the column.

yn

xn
1 1 xn

A single feed stream is feed at saturated liquid onto the feed tray NF.
Neglect any dead time in vapor line from top of column to reflux drum & in the reflux line
back to top tray.
Vapor density must smaller than liquid density.
Molar heat of vaporization of the two components is same.
Temperature changes from tray to tray are assumed to be negligible.
Negligible vapor hold ups. V1=V2=V3..VN.

Page | 15

Process Modeling & Simulation


Component Continuity Equation for Condenser & Reflux Drum:

dxD Vy NT ( R D ) xD

dt
MD
Simple O.D.E.,

O.D.E.

dxdt = (V*Y-(R+D)*x)/M

M-File

Command File

Page | 16

Process Modeling & Simulation


Graph

Component Continuity Equation for Top Tray:

Simple O.D.E.

O.D.E.

dxNT RxD LNT xNT Vy NT 1 Vy NT

dt
M NT

dxdt=(R*x-L*x+V*Y1-V*Y)/M

M-File

Page | 17

Process Modeling & Simulation

Command File

Graph

Page | 18

Process Modeling & Simulation

Component Continuity Equation for nth Tray:

Simple O.D.E.

O.D.E.

dxn Ln 1 xn 1 Ln xn Vyn 1 Vyn

dt
Mn

dxdt = (L1*x1-L*x+V*yn-1-V*yn)/M

M-File

Command File

Page | 19

Process Modeling & Simulation

Graph

Component Continuity Equation for Feed Tray


Page | 20

Process Modeling & Simulation

Simple O.D.E.

O.D.E.

dxNF LNF 1 xNF 1 LNF xNF VyNF 1 Vy NF Fz

dt
M NF

dxdt = (L1*x1-L*x+V*y1-V*y+F*z)/M

M-File

Command File

Graph
Page | 21

Process Modeling & Simulation

Component Continuity Equation for 1st Tray

Simple O.D.E.

O.D.E.

dx1 L2 x2 L1 x1 Vy B Vy1

dt
M1

dx1dt = (L2*x2-L1*x1+V*yB-V*y1)/M

M-File

Page | 22

Process Modeling & Simulation


Command File

Graph

Page | 23

Process Modeling & Simulation


Component Continuity Equation for Re boiler & Column Base:

Simple O.D.E.

O.D.E.

dxB L1 x1 VyB BxB

dt
MB

dxbdt = (L1*x1-V*yb-B*xb)/Mb

M-File

Command File

Page | 24

Process Modeling & Simulation


Graph

Conclusion
In the distillation column, we found that the concentration of feed on every tray varies
widely as shown in the graphs.

Page | 25

Process Modeling & Simulation

Experiment No.6 Mathematical Modeling and Programming of isothermal


Biochemical Reactor.
Consider a bio-chemical reactor consisting of biomass and substrate. Biomass is nothing but cells
that consume substrate.

Assumptions:
Reactor is perfectly mixed.

Volume of the reactor is constant.

Biomass material balance:

[Rate of accumulation] = [Flow in]-[Flow out]-[Consumption]

Page | 26

Process Modeling & Simulation

Simple O.D.E.

O.D.E.

dx1 Fx1 f Fx1

r1
dt
V

dx1dt = (F*x1f F*x1) V + r1

M-File

Command File

Graph
Page | 27

Process Modeling & Simulation

Substrate Material Balance:


[Rate of accumulation] = [Flow in]-[Flow out]-[Consumption]

dx2 Fx2 f Fx2 r1

dt
V
y
Simple O.D.E.

O.D.E.

dx2dt = (F*x2f F*x2) V - r1/y

M-File

Page | 28

Process Modeling & Simulation

Command File

Graph

Page | 29

Process Modeling & Simulation

Conclusion
This is all about the Biochemical reactor in which we saw that concentration of
biomass increases gradually with respect to time as compare to the concentration of
substrate.

Experiment 7: Programming of Fibonacci Search Method in Matlab.


Fibonacci Search Method
Preface: It minimum of a function of one variable even if function is not continuous. The main
limitation is the function being optimized has to be unimodal in the initial interval of uncertainty. The
exact optimum cannot be located in this method.
Fibonacci Series:F0=F1=1;Fn=Fn-1+Fn-2,Where n= 2,3,4................................
LkLk *=Lk+1*, hence one point is always pre-calculated.
Algorithm
Step1. Choose a lower bound a & upper bound b. Set L = b-a. Assume the desired number of
function evaluation to be n. Set k=2.
Step2.ComputeLk*= (Fn-k+1 /Fn+1) L. Set x1 = a+Lk* and x2 =b-Lk*.
Step3. Compute one of f (x1) or f (x2), which was not evaluated earlier. Use the fundamental region
elimination rule to eliminate a region. Set new a and b.
Step4.Is k=n? If no, set k=k+1and go to step 2;
Page | 30

Process Modeling & Simulation


Else Terminate.

M- File

Command File

Page | 31

Process Modeling & Simulation

Experiment 8: Programming of Newton- Raphson Method in Matlab.


Newtons Raphson Method
Preface: Newton's method is an extremely powerful technique in general the
convergence is quadratic: as the method converges on the root, the difference between
the root and the approximation is squared at each step. In the Newton Raphson
method, a linear approximation to the first derivatives of the function is made at a
point using the Taylors series expansion. If the current point at iteration t is x (t) , the
point of next iteration is governed by the simple equation as follow:
x (t+1)=x(t) -f(x (t) )/f(x(t))
Algorithm:
Step1: Choose initial guess x(1) and a small number . Set k=1.Compute f(x (1) ).
Step2. Compute f (x (k)).
Step3. Calculate x (k+1) = x (k)-f (x (k)) / f(x (k)). Compute f(x (k+1)).
Page | 32

Process Modeling & Simulation


Step4. If |f(x (k+1) )| < , Terminate;
Else set k = k+1and go to step 2.
M-File

Command File

Page | 33

Process Modeling & Simulation

Results
By the use of commands, the answer of i = 5.

Experiment 9: Programming of Secant Method in Matlab


Secant Method
Page | 34

Process Modeling & Simulation


Preface: In numerical analysis, the secant method is a root-finding algorithm that uses
a succession of roots of secant lines to better approximate a root of a function f. The
secant method can be thought of as a finite difference approximation of Newton's
method. The secant method does not require that the root remain bracketed like the
bisection method does, and hence it does not always converge. If at two points x1 and
x2, the quantity f (x1) f (x2) 0. The linear approximation of the derivative x1 and
x2, will have a zero derivatives at the point z is given by z=x2 - f(x2)/(f(x2)- f(x1))/
(x2 -x1) ---(1)
Algorithm:
Step1. Choose two points a and b such that f(a)< 0 and f (b)>0. Also choose a small
number . Set x1=a and x2 =b.
Step2. Calculate the new point z using equation (1) and evaluate f(z).
Step3. If |f(z)| < , Terminate; Else if f(z)<0 set x1= z and go to Step 2; Else if
f(z)>0 set x2 = z and go to Step 2;
M-File

Command File

Page | 35

Process Modeling & Simulation

Page | 36

You might also like