Sie sind auf Seite 1von 10

Engr. I. I.

Cheema
Chemical Engineering Mathematics
(Ch. E 304)
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 1
Engr. I. I. Cheema
Ordinary Differential Equations
(Symbolic Solution) dsolve Command (Symbolic Solution) dsolve Command
(Numerical Solution) ODE Solver
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 2
Class Task
Solve the given ODE problem:
Engr. I. I. Cheema
Either by using;
1. ODE Solvers
2. dsolve Command 2. dsolve Command
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 3
Class Task
Problem: The following set of differential equations
describes the change in concentration three species in a
Engr. I. I. Cheema
describes the change in concentration three species in a
tank. The reactions A B C occur within the tank. The
constants k
1
, and k
2
describe the reaction rate for A B &
B C respectively. The following odes are obtained:
Where, k =1 hr and k =2 hr and at time t=0, C =5mol and Where, k
1
=1 hr
-1
and k
2
=2 hr
-1
and at time t=0, C
A
=5mol and
C
B
=C
C
=0mol. Solve the system of equations and plot the
change in concentration of each species over time. Select an
appropriate time interval for the integration.
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 4
Engr. I. I. Cheema
Class Task
(Numerical Solution) ODE Solver
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 5
(Numerical Solution) ODE Solver
Step 1: Create function file:
Engr. I. I. Cheema
Note: C
A
, C
B
and C
C
must be defined within the same matrix.
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 6
(Numerical Solution) ODE Solver
Step 2: Call function in M-file:
Engr. I. I. Cheema
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 7
(Numerical Solution) ODE Solver
Step 3: Plotting required graphs:
Engr. I. I. Cheema
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 8
(Numerical Solution) ODE Solver
Graphical Results:
Engr. I. I. Cheema
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 9
Engr. I. I. Cheema
Class Task
(Symbolic Solution) dsolve Command
10
th
Week Chemical Engineering Mathematics (Ch.E - 304) 10

Das könnte Ihnen auch gefallen