Вы находитесь на странице: 1из 31

1

CHE654


Modeling Chemical Processes

Using MATLAB



Homework Set #4 Solutions

Class-16




Prepared by







Dr. Hong-ming Ku







King Mongkuts University of Technology Thonburi
Chemical Engineering Department
Chemical Engineering Practice School

July 2004-2012 Use with Permission of the Author Only

2
42. Modeling Liquid Heights in a Two-Vessel System
An open spherical vessel is connected to a closed rectangular tank through an open
valve as shown in the figure below. Water flows continuously into the spherical
vessel at a volumetric flow rate of F
1
with some of the water in the sphere also flowing
into the rectangular tank at a rate of F
2
. Water then flows out of the rectangular tank
at a flow rate of F
3
, and the temperature inside the tank is always maintained at 298.15
K. We wish to study the dynamics of the liquid heights in the two vessels using
MATLAB.














The following data are known about the system:

C
V
= 110
-5
m
3
/Pa
1/2
-min (characteristic valve constant) P
0
= 1.0132510
5

Pascal
Cross-sectional area of rectangular tank = 3 m
2
Radius of sphere R = 2 m
Height of rectangular tank = 10 m
Initially at t = 0, z
1
= 3 m, z
2
= 2 m, P = 1.0132510
5
Pascal
Gravitational acceleration g = 9.80665 m/s
2
(water) = 1000 kg/m
3


Universal gas constant R = 8314 m
3
-Pa/kmol-K = 8314 J/kmol-K
Liquid volume inside a sphere as a function of liquid height z is given by:




Use MATLABs ode45 to determine whether the liquid heights in the two vessels will
ever be equal, i.e. z
1
= z
2
. If so, report the time (accurate to one decimal place) at
which this happens and the height.. If z
1
is never equal to z
2
, determine when the two
liquid heights are at the closest. Run your model for 20 minutes, which should be
sufficient to answer the questions.

Answer the following questions:

Are the two liquid heights ever equal? Yes No

If yes, z
1
= z
2
= ____________ meters

Time at which the two liquid heights are equal or at the closest = _____________ minutes
F
1
= 0.1 m
3
/min
F
3
= 0.3 m
3
/min
F
2

P
0

P
2

P
1

P
z
2

z
1

Air
3
3
2
z
z R V

=
3
Solution:

Answer the following questions:

Are the two liquid heights ever equal? Yes No

If yes, z
1
= z
2
= ________ meters

Time at which the two liquid heights are equal or at the closest = ____0_____ minutes
.
Solution:

Mass balance around the spherical vessel:



















Mass balance around the rectangular tank:

















2 1
1
F F
dt
dV
=
2 1
3
2
1
)
3
(
F F
dt
z
z R d

2 1
1 2
1 1
) 2 ( F F
dt
dz
z Rz =
2 1
1 2
1 1
1 . 0 ) 4 ( P P C
dt
dz
z z
V
=
3 2
2
F F
dt
dV
=
3 . 0
2 1
2
2
= P P C
dt
dz
A
V
2 1
5 1 2
1 1
10 1 1 . 0 ) 4 ( P P
dt
dz
z z =


3 . 0 10 1 3
2 1
5 2
=

P P
dt
dz
1 0 1
gz P P + =
2 2
gz P P + =
2
V V
nRT
V
nRT
P
T G

= =
kmol t
RT
PV
n
G
981 . 0
) 15 . 298 )( 8314 (
) 24 )( 101325 (
) 0 ( = = = =
4




























subject to z
1
(t = 0) = 3 m z
2
(t = 0) = 2 m




%
% Solve for Liquid Heights: Problem #42
%
clc
clear
simtime = [0:0!:20"# % Le$gth of simulatio$
i$it% = [&' 2"# % ($itial values at t=0
[t' %" = ode4)*+f%+' simtime' i$it%,# % Solve the -./s
[t' %"
0lot*t'%,#
1label*+2ime i$ 3i$utes+,
4label*+5alues of %! a$d %2+,
lege$d*+%!+' +%2+,



fu$ctio$ f% = ode*t' %,
2 2
10
810600
3 30
) 15 . 298 )( 8314 )( 981 . 0 (
z z
P

=
) sec / / 1 )( sec)( / 80665 . 9 )( / 1000 (
10
810600
2
2
2 3
2
2
m kg N m z m m kg
z
P +

=
2
2
2
65 . 9806
10
810600
z
z
P +

=
1 1
65 . 9806 101325 z P + =
1 . 0
10
810600
) ( 65 . 9806 101325 10 333 . 3
2
2 1
6 2

+ =

z
z z
dt
dz
) 4 (
10
810600
) ( 65 . 9806 101325 10 1 1 . 0
1 1
2
2 1
5
1
z z
z
z z
dt
dz


+
=

5
f% = %eros*2'!,# % ($itiali%e f% as 21! matri1 to %eros
f%*!, = *0!6!e6)7sqrt*!0!&2)89:0;;)7*%*!,6%*2,,6*:!0;0<*!06%*2,,,,,<*%*!,7*46%*!,,70i,#
f%*2, = &&&&e6;7sqrt*!0!&2)89:0;;)7*%*!,6%*2,,6*:!0;00<*!06%*2,,,,60!#





6

44. Modeling Liquid Heights in a Two-Vessel System
Consider two tanks in series as shown where the water flow out of the first tank enters
the second tank. The first tank is a cubic vessel with a width of 10 ft, a length of 10
ft, and a height of 10 ft, whereas the second tank is a cone-shaped vessel with a radius
of 5 ft at the top and a height of 20 ft. The first tank is filled with water at a
volumetric flow rate F
1
and is drained through a hole (radius = 1 inch) at the bottom.
Studies in fluid mechanics have identified the relation between the volume flow
through the bottom hole and the liquid height as:



where A is the area of the hole, g is the acceleration due to gravity (32.2 ft/sec
2
), and
C
d
is an experimentally determined value that depends partly on the type of fluid (for
water, C
d
= 0.6). Initially at t = 0, the cubic tank is filled with 2 ft of water and the
cone-shaped tank is filled with 15 ft of water.





















(a) Derive an analytical expression of liquid height z
1
of the cubic tank as a function
of time. Does z
1
ever reach the steady-state, and if so, what is this value? Based
on your analytical answer, also comment on whether z
1
reaches a maximum,
reaches a minimum, overflows, or goes to zero and the time for that to happen. In
your derivation, you are not allowed to use tables of integrals to perform the
integration. Instead, use substitution and be careful with your unit conversions.

(b) Derive an ODE that describes the liquid height z
2
in the second tank. Together
with the ODE for z
1
in Part (a), use MATLAB (ode45) to solve for z
2
as a function
of time and plot both z
1
and z
2
as a function of time. Run the simulation for 20
minutes.




F
2

F
1
= 15 ft
3
/min
z
1

1 2
2gz A C F
d
=
z
2

F
3
= 20 ft
3
/min
7
Answer the following questions:

z
1
(t = 10 minutes) = __2.5481__ ft z
2
(t = 10 minutes) = __12.1046__ ft

Solution:

(a) Mass balance around Tank 1:



















Now, do variable transformation by defining:

u = 2.37990 z
1
1/2
z
1
1/2
= 2.37990 u





















ft z state steady at
dt
dz
z
dt
dz
z
dt
dz
z gz A C F F
dt
dV
d
664 . 5 0
) 37990 . 2 ( 10 30279 . 6
30279 . 6 15 100
) 3600 )( 2 . 32 ( 2
12
1
)( )( 6 . 0 ( 15 2 15
max
1
1
1
2 1
1
1
1
2
1 2 1
1
= =
=
=
|

\
|
= = =



= =

1
2
2
0
2
1
1
10 30279 . 6 10 30279 . 6
37990 . 2
z t
t dt
z
dz
du u du z dz or dz z du ) 37990 . 2 ( 2 2
2
1
2
1
1 1 1
2
1
1
= = =



=

1
2
1
1
37990 . 2
2
37990 . 2
z
du
u
u
z
dz
1 1
2
2
1
1
2
2
1
1
37990 . 2 2 37990 . 2 ln 7598 . 4
z z
z z
(

+
(

=
(
(
(

=
965686 . 0
37990 . 2
ln 99016 . 75 ) 414214 . 1 ( 73198 . 31
2
1
1
2
1
1
z
z t
8
Check: At z
1
= 2 ft, the analytical expression does give t = 0.

As t , 2.37990 z
1
1/2
= 0 so that ln(0) , or z
1
= 5.664 ft.

Comments: Notice that the liquid height in Tank 1 will reach a maximum steady-
state height at 5.664 ft. However, this value will not change after it has been
reached because this is when F
1
is equal to F
2
. That is, liquid flow in is exactly
equal to liquid flow out. By plugging in the maximum liquid height into the
analytical solution, one can see that it will take t , to reach steady state.

(b) Mass balance around Tank 2 now:






















So the two ODEs are:

















|
|

\
|

=
=
|

\
|
|

\
|
= |

\
|
=
=
(
(

\
|
= =
2
2
1 2
1
2 2
2
2
2
3
2
2
2
1
3
2
2
1 3 2
2
20 30279 . 6
09296 . 5
20 30279 . 6
20
5
3
1
20 30279 . 6
3
1
20 2
z
z
dt
dz
z
dt
dz
z
r
R
H
z from z
H
R
V because
z z
H
R
dt
d
gz A C F F
dt
dV
d

15 ) 0 ( 2 ) 0 ( . .
20 30279 . 6
09296 . 5
) 37990 . 2 ( 10 30279 . 6
2 1
2
2
1 2
1
2 1
= =
|
|

\
|

=
=

z and z t s
z
z
dt
dz
z
dt
dz
9
%
% =H/;)4: Problem #44
% Liquid Heights i$ a 2>o62a$? S4stem
%
clc
clear
format short
simtime = [0:!:20"#
i$it% = [2 !)"#
[t' %" = ode4)*+f%+' simtime' i$it%,#
[t' %"
0lot*t' %,

fu$ctio$ f% = ode*t' %,
f% = %eros*2'!,#
f%*!, = *!)6;&02@97sqrt*%*!,,,<!00#
f%*2, = )0929;7*;&02@97sqrt*%*!,,620,<%*2,A2#

ans =

0 2.0000 15.0000
1.0000 2.0602 14.7463
2.0000 2.1191 14.4867
3.0000 2.1767 14.2207
4.0000 2.2331 13.9475
5.0000 2.2883 13.6664
6.0000 2.3424 13.3764
7.0000 2.3954 13.0766
8.0000 2.4474 12.7657
9.0000 2.4982 12.4423
10.0000 2.5481 12.1046
11.0000 2.5970 11.7506
12.0000 2.6450 11.3775
13.0000 2.6920 10.9821
14.0000 2.7382 10.5601
15.0000 2.7834 10.1058
16.0000 2.8279 9.6110
17.0000 2.8715 9.0645
18.0000 2.9143 8.4483
19.0000 2.9563 7.7329
20.0000 2.9975 6.8611

10
48. Energy Balance in a Two-Tank System
Consider the following two-tank system in which water in the first tank flows into the
second one with a flow rate of F
1
= 2 kg/min and vice versa with a flow rate F
2
= 2
kg/min. Water in both vessels is being heated with a heating coil with the same
constant heat transfer area of A = 0.5 m
2
and the same heat transfer coefficient of U =
4 kcal/m
2
-min-C. However, the temperature of the heating coil in Tank 1 (100 C) is
lower than that of the heating coil in Tank 2 (120 C). We define M
1
, T
1
, M
2
, and T
2

as the mass and the temperature of water in the first vessel and in the second vessel,
respectively.












(a) Using the following data about the system, derive two ODEs that describe T
1
and
T
2
as a function of time.

C
P
(water) = 1.0 kcal/kg-C

Initially at t = 0: M
1
= 50 kg of water, T
1
= 20 C, M
2
= 100 kg of water, T
2
= 10C

(b) Solve the two ODEs in Part (a) and derive an analytical expression for T
1
and T
2
as
a function of time.

(c) What is the domain of this system, i.e. the maximum time the derived model is
valid for? Also, determine the time at which the temperatures in Tank 1 and Tank 2
are equal.


Answer the following questions:

Domain of this system = ____________ minutes

T
1
= T
2
= ____________ C when t = ____________ minutes

Solution:

(a) Mass and energy balances around the first vessel




F
2

M
2
T
2
F
1

M
1
T
1
Tank 1

Tank 2

50 0
1 1 2
1
= = = M F F
dt
dM
11
















Mass and energy balances around the second vessel























The two ODEs are:









( )
1 1 2 2 1 1 ,
1 1
) ( T C F T C F T T UA
dt
T C M d
P P S
P
+ =
1 1 2 2 1
1
1
1
1
) ( T C F T C F T T UA
dt
dM
T
dt
dT
M C
P P S P
+ =
(

+
1 2 1
1
2 2 ) 100 )( 5 . 0 )( 0 . 4 ( 50 T T T
dt
dT
+ =
+ =
1 2
1
08 . 0 04 . 0 4 T T
dt
dT
100 2 25
1
1
2
+ = T
dt
dT
T
100 0
1 2 1
2
= = = M F F
dt
dM
( )
2 2 1 1 2 2 ,
2 2
) ( T C F T C F T T UA
dt
T C M d
P P S
P
+ =
2 2 1 1 2 2 ,
2
2
2
2
) ( T C F T C F T T UA
dt
dM
T
dt
dT
M C
P P S P
+ =
(

+
2 1 1
2
2 2 ) 120 )( 5 . 0 )( 0 . 4 ( 100 T T T
dt
dT
+ =
2 1
2
4 2 240 100 T T
dt
dT
+ =
2 1
2
04 . 0 02 . 0 4 . 2 T T
dt
dT
+ =
20 ) 0 ( . . 08 . 0 04 . 0 4
1 1 2
1
= + = T t s T T
dt
dT
10 ) 0 ( . . 04 . 0 02 . 0 4 . 2
2 2 1
2
= + = T t s T T
dt
dT
12
(b) Now combine the two ODEs to derive T
1
(t) and T
2
(t)

First, take another derivative of the first-order ODE for T
1
:





Substituting the second ODE for T
2
into the above equation:





Now eliminating T
2
in the above equation:

















This is a second-order ODE with constant coefficients which can be solved by the
method of undetermined coefficients.








Now, we need to determine the values of c
1
, c
2
, and c
3
using initial conditions:







dt
dT
dt
dT
dt
T d
1 2
2
1
2
08 . 0 04 . 0 =
| |
dt
dT
T T
dt
dT
T T
dt
T d
1
2 1
1
2 1
2
1
2
08 . 0 0016 . 0 0008 . 0 096 . 0 08 . 0 04 . 0 02 . 0 4 . 2 04 . 0 + = + =
dt
dT
T
dt
dT
T
dt
T d
1
1
1
1
2
1
2
08 . 0 100 2 25 0016 . 0 0008 . 0 096 . 0
(

+ + =
dt
dT
T
dt
dT
T
dt
T d
1
1
1
1
2
1
2
08 . 0 16 . 0 0032 . 0 04 . 0 0008 . 0 096 . 0 + + =
dt
dT
T
dt
T d
1
1
2
1
2
12 . 0 0024 . 0 256 . 0 =
256 . 0 0024 . 0 12 . 0
1
1
2
1
2
= + + T
dt
dT
dt
T d
02535 . 0 09465 . 0 0 0024 . 0 12 . 0
2
= = + + and
3 2 1 1
) 02535 . 0 exp( ) 09465 . 0 exp( ) ( c t c t c t T + + =
20 ) 0 (
3 2 1 1
= + + = c c c T
) 02535 . 0 exp( 02535 . 0 ) 09465 . 0 exp( 09465 . 0
2 1
1
t c t c
dt
dT
=
13




Plugging the analytic expression into the ODE for T
1
:

















Solving for c
1
and c
2
:




Therefore,






















| |
70 63375 . 0 36625 . 2
10 100 ) 20 ( 2 02535 . 0 09465 . 0 25 ) 0 ( 100 2 25
2 1
2 1 2 1
1
2
=
= + = + =
c c
c c T T
dt
dT
T
) 02535 . 0 exp( 10 4262 . 6 ) 09465 . 0 exp( 00896 . 0
2
4
1
2
1
2
t c t c
dt
T d
+ =

667 . 106
0024 . 0 256 . 0 0024 . 0 12 . 0
3
3 1
1
2
1
2
=
= = + +
c
c T
dt
dT
dt
T d
667 . 86
2 1
= + c c
9656 . 77 7014 . 8
2 1
= = c c
) 02535 . 0 exp( 9656 . 77 ) 09465 . 0 exp( 7014 . 8 667 . 106 ) (
1
t t t T =
| |
| | 100 ) 02535 . 0 exp( 9656 . 77 ) 09465 . 0 exp( 7014 . 8 667 . 106 2
) 02535 . 0 exp( 9764 . 1 ) 09465 . 0 exp( 8236 . 0 25
100 2 25
2
1
1
2

+ + =
+ =
t t
t t T
T
dt
dT
T
) 02535 . 0 exp( 5212 . 106 ) 09465 . 0 exp( 1872 . 3 334 . 113 ) (
2
t t t T + =
14
(c) Now compute the time at which T
1
= T
2
:










Using the solve function in MATLAB gives: t = 57.07 minutes with T = 88.28 C

The domain of this system is when either T
1
or T
2
reaches the boiling-point
temperature of water at 100 C, whichever comes first.

For Tank 1:

Again, using the solve function in MATLAB gives: t = 97.01 minutes

For Tank 2:

Again, using the solve function in MATLAB gives: t = 81.97 minutes

Therefore, the domain is t = 81.97 minutes.

The following are results from solving the two ODEs numerically using MATLAB to
confirm the analytical answers:

clc
clear
format short
simtim = [0:!::0"#
i$it2 = [20# !0"#
[t' 2" = ode4)*+f2+' simtim' i$it2,#
[t' 2"
0lot *t'2,
title *+2em0eratures i$ a 2>o62a$? S4stem+,
1label *+2ime i$ 3i$utes+,
4label *+2em0erature i$ .egrees =elcius+,
lege$d *+2!+' +22+,


fu$ctio$ f2 = ode*t' 2,
f2 = %eros*2'!,#
f2*!, = 4 8 00472*2,600:72*!,#
f2*2, = 24 8 00272*!, 6 00472*2,#




) 02535 . 0 exp( 9656 . 77 ) 09465 . 0 exp( 7014 . 8 667 . 106 ) (
1
t t t T =
) 02535 . 0 exp( 5212 . 106 ) 09465 . 0 exp( 1872 . 3 334 . 113 ) (
2
t t t T + =
0 667 . 6 ) 02535 . 0 exp( 5556 . 28 ) 09465 . 0 exp( 8886 . 11
2 1
= + = t t T T
100 ) 02535 . 0 exp( 9656 . 77 ) 09465 . 0 exp( 7014 . 8 667 . 106 ) (
1
= = t t t T
100 ) 02535 . 0 exp( 5212 . 106 ) 09465 . 0 exp( 1872 . 3 334 . 113 ) (
2
= + = t t t T
15








16
49. Mass and Energy Balance in a Stirred Tank Heater
Consider the following stirred tank heater shown below, where the tank inlet stream is
received from another process unit. A heat transfer fluid is circulated through a jacket
to heat the fluid in the tank. Assume that no change of phase occurs in either the tank
liquid or the jacket liquid. The following symbols are used: F
i
= volumetric flowrate
of stream i, and T
i
= temperature of stream i.

Tank Inlet F
1
T
1



Jacket Inlet
F
3
T
3



Jacket Outlet V T Tank Outlet
F
4
T
4

Jacket

V
j
F
2
T
2




Additional assumptions are:
1. The liquid levels in both the tank and the jacket are constant.
2. There is perfect mixing in both the tank and the jacket.
3. The rate of heat transfer from the jacket to the tank is governed by the equation Q =
UA(T
4
T
2
), where U is the overall heat transfer coefficient and A is the area of
heat exchange.

(a) Write the dynamic modeling equations (ODEs) to find the tank and jacket
temperatures. Do not use any numerical values leave these equations in terms
of the process parameters and variables. Be sure to define any new symbols you
introduce into the equations.

(b) Assume that both the tank fluid and the jacket fluid are water. The steady-state
values of this system variables and some parameters are:

F
1
= 1.0 ft
3
/min C
P
(in tank) = C
P
(in jacket) = 61.3 Btu/F-ft
3
T
1
= 50 F T
2
= 125 F V = 10 ft
3

T
3
= 200 F T
4
= 150 F V
j
= 1 ft
3


Solve for F
3
and UA (show units) at steady-state.

(c) If initially (t = 0), T
2
= 50 F and T
4
= 200 F, solve for T
2
and T
4
from the ODEs
in Part (a) analytically as a function of time.

Solution:

(a) Define variables and process parameters:

= liquid density in tank
V = liquid density in tank
17
F
1
= tank inlet flow
F
2
= tank inlet flow
F
3
= jacket flow (inlet and outlet)
T
1
= tank inlet temperature
T
2
= tank outlet temp
T
3
= jacket inlet temp
T
4
= jacket outlet temp
C
P
= liquid heat capacity in tank
P
j
= liquid density in jacket
C
ij
= liquid heat capacity in jacket
U = overall heat transfer coefficient
A = heat transfer area
V
j
= liquid volume in jacket

Overall mass balance in the tank:


2 1 1
) (
F F
dt
V d
=


Assume
i
= and V is constant


0
) (
=
dt
V d
F
1
= F
2



Energy balance in the tank:


) ( ) ( ) (
)) ( (
2 4 2 2 1 2
2
T T UA T T C F T T C F
dt
T T C V d
rep p ref p
ref p
+ =




Assume C
p
is not a function of temperature

0

) (
2 2 2 2 2 1 2
2
T T UA T C F T C F T C F T C F
dt
dT
C V
dt
dT
C V
j ref p p ref p p
ref
p P
+ + =


or ) ( ) (
2 4 2 1
2 2
T T
C V
UA
T T
V
F
dt
dT
p
+ =

(1)

Similarly for the jacket:

18

) ( ) (
2 4 4 3
3 4
T T
C V
UA
T T
V
F
dt
dT
pi j j j
=

(2)


There are 2 modeling equations.


(b)
min
1
3
1
ft
F =
3
3 . 61
Fft
Btu
pC
o P
=
3
3 . 61
Fft
Btu
C p
o pj j
=


F T
o
50
1
= F T
o
125
2
=
3
10ft V =


F T
o
200
3
= F T
o
150
4
=
3
1ft V
j
=


Find F
3
and UA at steady state:


At steadystate: 0
2
=
dt
dT
and 0
4
=
dt
dT



Eq. (1) becomes


0 ) 125 150 (
) 3 . 61 )( 10 (
) 125 50 (
10
1
= +
UA



and Eq. (2) gives


0 ) 125 150 (
) 3 . 61 )( 1 (
) 150 200 (
1
3
=
UA F



UA = 183.9 Btu/
o
F min

F
3
= 1.50 ft
3
/ min

(c) Dynamic profile of both Ts analytically ! T
2
(t = 0) = 50
o
F

T
4
(t = 0) = 400
o
F

19

) ( 3 . 0 ) 50 ( 1 . 0
2 4 2
2
T T T
dt
dT
+ =



2 4
4 . 0 3 . 0 5 T T + =


) ( 3 ) 200 ( 5 . 1
2 4 4
4
T T T
dt
dT
=


= 300 45 T
4
+ 3T
2




dt
dT
dt
dT
dt
T d
2 4
2
2
2
4 . 0 3 . 0 =


| |
dt
dT
T T
2
2 4
4 . 0 3 5 . 4 300 3 . 0 + =



dt
dT
T T
2
2 4
4 . 0 9 . 0 35 . 1 90 + =


But ) 5 4 . 0 (
3 . 0
1
2
2
4
+ = T
dt
dT
T


So that



dt
dT
T
dt
dT
dt
T d
2
2
2
2
2
2
4 . 0 5 . 22 9 . 0 5 . 4 90 + =
5 . 112 9 . 0 9 . 4
2
2
2
2
2
= + + T
dt
dT
dt
T d



Solve by method of undetermined coefficients:


Homogeneous solution is


20

t X
z
t x
h z
e c e c t T
2 1
1 ,
) ( + =



2
) 9 . 0 )( 1 ( 4 9 . 4 9 . 4
; 0 9 . 0 9 . 4
2
2

= = + + X X X


x
1
= -0.1911 x
2
= 4.7089



t t
n
e c e c t T
7089 . 4
2
1911 . 0
1 , 2
) (

+ =


A t T
p
= ) (
, 2
(trial function)


A e c e c T T t T
t t
p n
+ + = + =
7089 . 4
2
1911 . 0
1 , 2 , 2 2
) (


Solve for 3 constants C
1
, C
2
and A


At t : T (t ) = A = 125


So 125
7089 . 4
2
1911 . 0
1 2
+ + =
t t
e c e c T


At t = 0 , T
2
= 50
o
F


50 = C
1
+ C
2
+ 125 or C
1
+ C
2
= -75

Recall T
4
=
(

+ 5 4 . 0
3 . 0
1
2
2
T
dt
dT



=
| | 5 50 4 . 0 , 4 . 0 7089 . 4 1911 . 0
3 . 0
1
7089 . 4
2
1911 . 0 7089 . 4 1911 . 0
1 2
+ + +
t t t t
e c e c e c e c


T
4
= 150 363 . 14 6963 . 0
7089 . 4
2
1911 . 0
1
+
t t
e c e c


21
At t = 0, T
4
= 200 0.6963 C
1
- 14.363 C
2
= 50


0.6963 C
1
0.6963C
2
= 52.2225



C
2
= 6.7880 C
1
= 68.2120


T
1
= 125 - 68.2120
t
e
1911 . 0
- 6.7880
t
e
4.7089



T
4
= 150 47.4960
t t
e e
4.7089 0.1911
97.4960

+



22
50. Mass and Energy Balance in a Gas Surge Drum
Consider a gas surge drum with variable inlet and outlet molar flowrates, q
f
and q,
respectively. Assume that heat is being added to the tank at a rate of Q and ideal gas
behavior in the drum.


T
f
,

q
f
,

P
f
q, P, T





(a) Write the modeling equations (ODEs) that describe how the temperature, T, and
pressure, P, inside the drum vary with time. Note that for a gas, the accumulation
term on the left-hand side of the energy equation is

dH d(PV) = energy in energy out
dt dt

where dH/dt = d(C
P
VT)/dt and C
P
is assumed constant. For liquids, the d(PV)/dt
term is considered negligible (incompressible fluid and constant volume). So do
not forget the PV term in your energy balance.

(b) Solve the two ODEs in the Part (a) using MATLAB and find the values of P and T
after 10 minutes. The data are:

V = 100 m
3
R = 8.205x10
-2
m
3
-atm/kmol-K
= 8.315 kJ/kmol-K
C
P
(gas) = 125 kJ/kmol-K q
f
= 1.0 kmol/min
T
f
= 25 C q = 0.5 kmol/min
Q = 1.5x10
4
kJ/min T(t=0) = 298.15 K = 25 C
P(t=0) = 1 atm

Solution:

a) What are 2 unknowns that change with time? P and T

Overall mass balance:

d(PV/RT)/dt = q
f


q



Constant volume drum (V/R)[d(P/T)/dt] = q
f


q



(1/T)(dP/dt) (P/T
2
)(dT/dt) = (R/V)( q
f


q

)

For gas, the accumulation term on the left hand side of the energy equation is:


dH/dt d(PV)/dt where dH/dt = d(C
P
VT)/dt

P, V, T
23
The energy equation is:

dH/dt d(PV)/dt = q
f
H
f


qH + Q


But d(PV)/dt = P dV/dt + V dP/dt


C
P
Vd(T)/dt = C
P
V(dT/dt) + C
P
VT(d/dt)


But = P/RT d/dt = (1/RT)(dP/dt) (P/RT
2
)(dT/dt)


C
P
VP/RT (dT/dt) + C
P
VT) (1/RT) (dP/dt) (P/RT
2
) (dT/dt)



= (C
P
VP/RT) (C
P
VP/RT) (dT/dt) + C
P
V/R (dP/dt)



C
P
V/R (dP/dt) V (dP/dt) = q
f
C
p
T
f


qC
p
T

+ Q



dP/dt = (R/V){1/(C
p
R)}{ C
p
(q
f
T
f


qT) + Q}
(Equation 1)




dT/dt = (T
2
/P) {(1/T)(dP/dt) (R/V) (q
f


q)}

= (RT/PV){1/(C
p
R)}{ C
p
(q
f
T
f


qT) + Q} (RT
2
/PV)(q
f


q)



dT/dt = (RT/PV)[{1/(C
p
R)}{C
p
(q
f
T
f


qT) + Q} T(q
f


q)]
(Equation 2)



b) Solve Part (a) using MATLAB

At t = 0, T = 2981.5 K and P = 1 atm




24

dP/dt = (8.205x10
-2
) 1 125(298.15 0.5T) + 1.5x10
4


100 125 8.315



dP/dt = 7.03175x10
-6
(52268.75 62.5T) = 0.36754 4.39484x10
-4
T
(Equation 1)




dT/dt = (8.205x10
-2
)T 1 125(298.15 0.5T) + 1.5x10
4
0.5T

100P 125 8.315



dT/dt = (T/P) [0.36754 8.49735x10
-4
T]
(Equation 2)


P is in atm and T is in Kelvin.

The MATLAB Script File:

%
% CHE 654: Problem #50
%
% Mass and Energy Balance in a Gas Surge Drum
% P and T are the variables in atm and Kelvin respectively
%
clc
clear
simtime = 10;
initpt = [1 298.15];
[t,pt] = ode45('fpt',simtime,initpt);
pres = pt(:,1);
temp = pt(:,2);
size = length(pres);
fprintf ('Time(min.) Pressure(atm) Temperature(K)\n');
for i = 1:size
fprintf ('%8.4f ',t(i))
fprintf ('%8.4f ',pres(i))
fprintf ('%8.4f \n',temp(i));
end
plot(t,pres)
title('Pressure in the Gas Surge Tank')
xlabel('Time in Minutes')
25
ylabel('Pressure in atm')
plot(t,temp)
title('Temperature in the Gas Surge Tank')
xlabel('Time in Minutes')
ylabel('Temperature in Kelvin')


The MABLAB M-File for the ODE:

function fv = ode(t,pt)
fv = zeros(2,1);
fv(1) = 0.36754-4.39484e-4*pt(2);
fv(2) = pt(2)/pt(1)*(0.36754-8.49735e-4*pt(2));

The MABLAB Output:

Time(min.) Pressure(atm) Temperature(K)
0.0000 1.0000 298.1500
0.2124 1.0499 305.1033
0.4248 1.0992 311.5360
0.6372 1.1479 317.4987
0.8497 1.1961 323.0360
1.0997 1.2521 329.0610
1.3497 1.3075 334.6070
1.5997 1.3624 339.7234
1.8497 1.4167 344.4532
2.0997 1.4705 348.8343
2.3497 1.5238 352.8998
2.5997 1.5767 356.6792
2.8497 1.6292 360.1986
3.0997 1.6813 363.4813
3.3497 1.7331 366.5477
3.5997 1.7846 369.4165
3.8497 1.8357 372.1042
4.0997 1.8866 374.6256
4.3497 1.9372 376.9941
4.5997 1.9875 379.2217
4.8497 2.0376 381.3194
5.0997 2.0875 383.2970
5.3497 2.1372 385.1634
5.5997 2.1866 386.9268
5.8497 2.2359 388.5946
6.0997 2.2850 390.1736
6.3497 2.3339 391.6698
6.5997 2.3827 393.0890
6.8497 2.4313 394.4363
7.0997 2.4798 395.7165
7.3497 2.5282 396.9339
7.5997 2.5764 398.0926
7.8497 2.6245 399.1962
26
8.0997 2.6724 400.2482
8.3497 2.7203 401.2517
8.5997 2.7680 402.2096
8.8497 2.8157 403.1247
9.0997 2.8632 403.9994
9.3497 2.9107 404.8361
9.5997 2.9580 405.6369
9.8497 3.0053 406.4039
9.8872 3.0124 406.5164
9.9248 3.0195 406.6282
9.9624 3.0266 406.7392
10.0000 3.0337 406.8496
>>

27
51. Mass and Energy Balance in a 2-Tank System
Consider the following 2 tanks (both cylindrical vessels) in series used to store a liquid
solution. Tank 1 is heated while Tank 2 is not. Liquid is drawn from Tank 1 into
Tank 2 at the rate of 10 kg/min. At the same time, a feed (40 C) enters Tank 2 at the
rate of 20 kg/min, and an outflow of 30 kg/min leaves the vessel. Initially (at t = 0),
Tank 1 is charged with 300 kg of the solution at a temperature of 20 C, while Tank 2
is charged with 100 kg at a temperature of 30 C.

20 kg/min
Tank 1 Tank 2 40 C



T
1

T
2

10 kg/min 30 kg/min


(a) Assuming that Tank 1 is being heated with a heating coil that remains submerged
at all times (hence, the heat transfer area remains constant), derive an analytical
expression for T
2
, the temperature inside Tank 2 as a function of time. Also,
compute T
2
at the time when Tank 1 is completely emptied. Use the following
data:

C
P
= liquid heat capacity = 2.0 kJ/kg-C UA = 40 kJ/min-C
T
S
= heating coil temperature = 200 C

Assume there is no phase change in either tank (i.e. no boiling occurs).

(b) Consider again a similar 2-tank system in which Tank 1 is jacketed and is heated
with steam at 200 C as shown in the figure below. In this case, the heat transfer
area is no longer constant and will vary with the liquid volume inside Tank 1.

20 kg/min
40 C



T
1

Steam T
2

10 kg/min 30 kg/min



This liquid solution is known to boil at 150 C. Determine the time it takes for the
liquid in Tank 1 to boil off completely (including the time to heat the liquid to the
boiling temperature). Use the following data:
28

C
P
= liquid heat capacity = 2.0 kJ/kg-C
U = overall heat transfer coefficient = 25 kJ/m
2
-min-C
T
S
= steam temperature = 200 C
= liquid mass density = 1200 kg/m
3

R = radius of both cylindrical vessels = 0.3 m
= heat of vaporization at 150 C = 1500 kJ/kg
Use the initial conditions given in Part (a)

Solution:

(a) Derive an analytical expression for T
2
as a function of time.

20 kg/min
40 C



T
1

T
2

10 kg/min 30 kg/min


Mass balances:

dM
1
= 10 -----> M
1
= 300 10t
dt

dM
2
= 0 -----> M
2
= 100
dt


Energy balances:

d[M
1
C
P
T
1
] = UA(T
S
T
1
) w
1
C
P
T
1


dt -10

C
P
M
1
(dT
1
/dt) + C
P
T
1
(dM
1
/dt) = UA(T
S
T
1
) w
1
C
P
T
1


300 10t


2 (300 10t) dT
1
20T
1
= 40(200 T
1
) 20T
1

dt


29
0.05 dT
1
= 0.1 dt ----> Integrate from T
1
= 20 to T
1

and from t = 0 to t.
(200 T
1
) (30 t)


ln 200 T
1

1/2
= ln 30 t
180 30


T
1
= 200 0.2(30 t)
2



d[M
2
C
P
T
2
] = w
1
C
P
T
1
+ w
2
C
P
T
F
w
3
C
P
T
2


dt
0

C
P
M
2
(dT
2
/dt) + C
P
T
2
(dM
2
/dt) = w
1
C
P
T
1
+ w
F
C
P
T
F
w
2
C
P
T
2



200 dT
2
= 20T
1
+ 1600 60T
2

dt

10 dT
2
= [200 0.2(30 t)
2
] + 80 3T
2

dt


dT
2
+ 0.3T
2
= 10 + 1.2t 0.02t
2

dt


1
st
-order constant-coefficient heterogeneous ODE!

Solve using the method of undetermined coefficient.


T
2
= c
1
exp[-0.3t] + c
2
t
2
+ c
3
t + c
4


At t = 0, T
2
= 30 so that c
1
+ c
4
= 30

(dT
2
/dt) = -0.3c
1
exp[-0.3t] + 2c
2
t + c
3


= 10 + 1.2t 0.02t
2
0.3c
1
exp[-0.3t] 0.3c
2
t
2
0.3c
3
t 0.3c
4


Comparing the LHS and RHS:

(0.02 + 0.3c
2
)t
2
= 0 c
2
= 0.06667

1.2t = (2c
2
+ 0.3c
3
)t 2c
2
+ 0.3c
3
= 1.2 c
3
= 4.4445

30
10 = c
3
+ 0.3c
4
c
4
= 18.5183 c
1
= 11.4817



T
2
= 11.4817e
-0.3t
0.06667t
2
+ 4.4445t + 18.5183




Check: At t = 0, T
2
= 11.4817 + 18.5183 = 30 C Correct


When Tank empties, M
1
= 300 10t = 0 t = 30 minutes


Therefore, at t = 30 min: T
2
= 91.85 C




(b) First calculate the time for liquid in Tank 1 to reach 150 C:


T
1
= 200 0.2(30 t)
2
= 150 t = 14.19 minutes

When calculating this time, I treated the heat transfer area as being constant. In
reality, it is not because the liquid moves up and down although there is no boiling
yet. If you take into account the non-constant area, the answer is 14.94 minutes, but
the math is somewhat complex. This gives z
1
= 0.4442 m.


Energy balance after boiling occurs in Tank 1:


dM
1
= 10 v but v = q/
dt

= 10 UA
T
(200 T
1
)/

= 10 UA
T
(200 T
1
)/

= 10 (25)(4V/D + D
2
/4 )(200 150)/1500

= 10 (25)(6.6667V+0.28274)(50)/1500 = 10.23562 5.5556V

But = M
1
/V or M
1
= V

V(t = 14.94 min) = 0.4442(0.3)
2
= 0.1256 m
3

31
1200 dV = 10.23562 5.5556V
dt

1200 _______dV_______ = dt
10.23562 + 5.5556V

Integrate from V = 0.25 to 0 (when the vessel is empty) and time from 0 to t:

(1200/5.5556) ln[10.23562/(10.23562+5.5556*0.1256)] = -t

t = 14.24 minutes

So the total time it takes to boil off Tank 1 = 14.94 + 14.24 = 29.18 minutes

Вам также может понравиться