KEMBAR78
Lecture 7 | PDF | Numerical Analysis | Differential Equations
0% found this document useful (0 votes)
94 views5 pages

Lecture 7

The document describes using the Euler and Runge-Kutta 4th order methods to calculate the salt concentration in a home made soap solution over time. The initial salt concentration is given as 50 g/L. Using a step size of 0.5 minutes, the Euler method is used to calculate the concentration after 0.5 minutes as 31.8125 g/L, after 1 minute as 32.8125 g/L, and the Runge-Kutta method calculates the concentration after 1.5 minutes as 31.3916 g/L.

Uploaded by

Hoàng Khôi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views5 pages

Lecture 7

The document describes using the Euler and Runge-Kutta 4th order methods to calculate the salt concentration in a home made soap solution over time. The initial salt concentration is given as 50 g/L. Using a step size of 0.5 minutes, the Euler method is used to calculate the concentration after 0.5 minutes as 31.8125 g/L, after 1 minute as 32.8125 g/L, and the Runge-Kutta method calculates the concentration after 1.5 minutes as 31.3916 g/L.

Uploaded by

Hoàng Khôi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Problem 3

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?

Assume a step size of h  0.5 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
-

= .
.
,

The Euler's method reduces to


X x
f(ti xi)k
= +

+ +
1 , ,

For i =
0 , t
=
0 , 4 =
50
* =

xo+ f (to Xolk .

=
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
,

Step size += 0 5 min =Sh= 0 5


. .
For + 05 x(1 x101
1(k 2k2 2k (4)
: =
+ +
+ +
,
=
.

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
.

g/L after 0 5 min .

Fort 1 x (21 x(11


1(k 2k2 2k (4)
: =
+ + +
+

,
:

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

You might also like