Lecture 7
Lecture 7
The concentration of salt x in a home made soap maker is given as a function of time by
dx
37.5 - 3.5x
dt
At the initial time, t = 0 , the salt concentration in the tank is 50 g/L Using Euler and Runge-Kutta
4th order methods, what is the salt concentration after 3 minutes?
Course:
Course: Modeling, Process Modeling
Simulation and Simulation
and Optimization | Lecture:
for Chemical Process Modeling
Engineering
= 37 5 3 5x
-
. .
37 5 5x
((t x) 3
-
= .
.
,
+ +
1 , ,
For i =
0 , t
=
0 , 4 =
50
* =
=
50 +
f(0 ,
50)0 5 .
=
50 +
137 5 .
-
3 5(50))0 5
. .
= 50 +
( 137 5)0 5
-
.
.
=
-
18 75 .
X is the
approximate concentration
of salt at :
It =
+
,
=
t +h
=
0 +
0 5 .
=
0 5 min
.
x (0 5) .
=
x
,
= -
18 .
75g/L
For i 1 05 -18 75
t X =
=
= . .
, , ,
X x + 11t x , )h
=
, ,
= 18 75 .
+
810 5 .
,
-18 75) 0 5
. .
=
-
18 75 .
+ (37 5 .
-
3 5) 18 75)) 0 5
.
-
. .
=
-
18 75 .
+
51 5625 .
=
32 .
8125g/1
X
2
is the
approximate concentration
of salt at :
05
T +2 +2+ h 0 5 1 min
= = + =
= . .
. . .
For i= 3 t - 25 X 1 3916
5
. = .
S
5
I
X =
x5
+
flt5,x, )h
1 3916 + 3916/0 5
8/2 5
= +
. . .
.
,
= 1 3916
, + (37 5 - 3 5(1 3916))0 5
. . .
.
=
1 3916 . + 16 3147 .
17
7063g/2
=
X
6
is the
approximate concentration
of salt at :
T h 25 0 5 3
+
5 min
= + = + =
= . .
Ruege -
Kutta 4t order method :
x
z(k 2k2 2k3 (4)
=
x
+ +
+ +
,
Where :
Ke =
Gf(xo to ,
k =
hy[(t + ) , (x + ]
k =
hf[(+o 2) +
, (x +
+2)]
kx =
kf[(+ +
h) , (x +
ky))
Given that :
:
37 5-3 5x . .
Initially at + 0
50g/L
=
:
= x
,
k = 0 5 x(37 5
. .
-
3 .
5x50) = -
68 75 .
k =
0 .
5x(37 5 .
-
3 .
5 x/
-
675 50)) +
-
=
8 59375
.
k 0
5 x/37 5 3 5x) 9375
50)7 61 23047
-
- -
= =
+
. .
. .
" =
0 .
5x(37 5 .
-
3 5 x) 61 23047
.
-
.
+
501] =
38 4033225 .
= x(t) 50
f(k 2k2 2k3 (4)
= + +
+ +
,
=
21 66748
.
,
:
k = 0 5 x(37 5
. .
-
3 .
5x21 66748) . =- 19 16809
.
k =
0 .
5x(37 5 .
-
3 .
5x(180 +
21 .
664487 =
-
2 396
.
k =
0 .
5 x/37 5 .
-
3 .
5x) 9
- +
21 .
66448)7 =- 17 07159
.
" =
0 .
5x(37 5 .
-
3 5 x) 17 07155 21
.
-
.
+
.
667481) =
10 7071925 .
= xx2) 21 66748
1/k 2k2 2k3 (4)
= + +
+ +
.
,
- ...
x(67
For t 3 x (5)
1/k 2k2 2k3 (4)
= : + +
+ +
=
k =
hf(x5 , to
k =
hy[(t 4) +
,
(x + 1)
ky =
hy[(+ 2) +
,
(x +
22)]
kx =
kf[(+ +
h) , (x +
ky))
=) x(6) 3 minutes
= ...
after