You are on page 1of 4

Tutorial on Finite Differences and Numerical Integration

ChE211, Spring 2005


Eample !ro"lem Statement
The example problem is the start-up of an isothermal, variable-volume CSTR. The
CSTR initially contains 250.0 L of liui! "ith #ero concentration of reactive species $.
The inlet stream flo"s at %20.0 L&h an! contains '0.0 mol&L of species $. Species $
!isappears by first-or!er chemical reaction, "ith a rate constant of '.(0 h
-'
. This CSTR is
"ell mixe!, the liui! !ensity is constant, an! the exit stream is by )ravity !raina)e "ith
tan* an! exit hole parameters such that the exit volumetric flo" rate is )iven by aV
0.5
,
"ith a + ,2.0 L
0.5
&h.
The !ifferential euations !escribin) this transient problem are as follo"s-
( )
A A Ain
in A
in
kc c c
V
v
dt
dc
aV v
dt
dV

5 . 0
.t is !esire! to pro!uce three solutions for the transient volume an! concentration in this
CSTR usin) the follo"in)-
'. /inite 0ifferences 1 2xcel
2. 0ifferential 2uation Solver Soft"are 1 3!esolve 1 4athca!
,. 0ifferential 2uation Solver Soft"are 1 25-Solve
Finite Differences in Ecel
6ut all the constants from the problem statement into cells, each clearly labele!. Choose
an increment for time 7t8 an! put it in a clearly labele! cell.
Set up table hea!in)s as follo"s- t7h8 97L8 97L8 c
$
7mol&L8 c
$
7mol&L8
.n the '
st
ro" of the table, put in t + 0 an! the correspon!in) values for 9 an! c
$
7by
assi)nin) the initial values from above to these cells8. 6ut in formulas for 9 an! c
$

from the finite-!ifference forms of the above !ifferential euations. Remember to only
use : si)ns for the constants an! not for the variables 9 an! c
$
, "hich you "ant to chan)e
from ro" to ro".
.n the 2
n!
ro" of the table, put in a formula to increment time 7+ prior t ; t8, volume 7+
prior 9 ; 9 8 an! concentration. 0ra) the cells from above for 9 an! c
$
.
<o", select the entire 2
n!
ro", )rab the far ri)ht-han! lo"er corner, an! !ra) !o"n until
chan)es from ro" to ro" are small. 6lot 9 an! c
$
versus t on the same )raph.
4y solution is )iven belo".
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
A B C D E F G H
Variable Volume CST S!ar!u"
V
0
# 250$0 %
&
A0
# 0$0 mol'%
(i) # 720 %'*
(ou! # aV
0$5
a # 32$0 %
0$5
'*
&
Ai)
# 10$0 mol'%
r
+e)A
# ,-C
A
V
- # 1$8 *
,1
! # 0$10 *
! .*/ V .%/
V .%/
&
A
.mol'%/ &
A
.mol'%/
0$00 250$0 21$40356 0 2$88
0$10 271$4 19$28214 2$88 1$37044775
0$20 290$7 17$44158 4$250448 0$65902716
0$30 308$1 15$82863 4$909475 0$30579584
0$40 324$0 14$40392 5$215271 0$12466916
0$50 338$4 13$13741 5$33994 0$03043069
0
100
200
300
400
500
600
0$00 1$00 2$00 3$00 4$00 5$00
Time (h)
V
o
l
u
m
e

(
L
)
0
1
2
3
4
5
6
C
o
n
c
e
n
t
r
a
t
i
o
n

(
m
o
l
/
L
)
Numerical Integration using #desol$e in %athcad
.n 4athca!, )o to =elp&>uic*Sheets&Calculus an! 0iff2>s&Solvin) a /irst-3r!er System
of 302s. /ollo" the example to set up your problem for solution.
?ou "ill fin! it convenient to assi)n values to your constants 790, c$0, a, vin, c$in, an!
*8 before startin) the solve bloc* an! "ritin) the !ifferential euations an! their initial
con!itions. ?ou shoul! choose a lon) enou)h time interval to reasonably approach
stea!y state. 6ro!uce )raphs of 9 vs. t an! c$ vs. t.
Solution belo"-
90 250 : c$0 0 : vin %20 :
a ,2 : c$in '0 : * '.( :
T 5 :
@iven
t
y0 t 7 8
!
!
vin a y0 t 7 8
0.5
y0 0 7 8 90
t
y' t 7 8
!
!
vin
c$in y' t 7 8 7 8
y0 t 7 8
* y' t 7 8 y' 0 7 8 c$0
9
c$

,
3!esolve
y0
y'

,
t , T ,

1
1
]
:
0 2 A
200
A00
B00
9 t 7 8
t
0 2 A
0
2
A
B
c$ t 7 8
t
Solution using E&'Sol$e
.n the 25-Solve euation "in!o", assi)n values for your constants, then type in the t"o
!ifferential euations, usin) primes to in!icate !erivatives "ith respect to time 79C an!
c$C8.
=it the solve button. ?ou "ill have to put into the pop-up "in!o" the final value for
time, the number of !ata points you "ant bet"een t + 0 an! the final time, an! the initial
values for 9 an! c$.
Copy the results table into the euation "in!o" an! print out the euations an! results.
6ro!uce )raphs of 9 vs. t an! c$ vs. t an! print them out.
Solution belo"-
(i)#720
&Ai)#10
-#1$8
a#32
V0#(i),a1V20$5
&A0#(i)1.&Ai),&A/'V,-1&A
V &A ! V0 &A0 a &Ai) - (i)
2 270$37 2$2185 0$1 193$826 16$729 32 10 1$8 720
3 288$849 3$51628 0$2 176$142 9$83234 32 10
1$8 720
4 305$667 4$2795 0$3 160$533 5$77156 32 10 1$8
720
5 321$014 4$72419 0$4 146$661 3$32956 32 10
1$8 720
6 335$048 4$9765 0$5 134$261 1$83752 32 10 1$8
720
7 347$908 5$11046 0$6 123$127 0$920128 32 10
1$8 720
8 359$71 5$17156 0$7 113$087 0$355844 32 10 1$8
720
9 370$557 5$18804 0$8 104$004 0$0112452 32 10
1$8 720
10 380$539 5$17765 0$9 95$7629 ,0$195615 32 10
1$8 720
11 389$735 5$15146 1 88$2657 ,0$315368 32 10
1$8 720

You might also like