Professional Documents
Culture Documents
2. Numerical method
Approximate solutions in the form of discrete values
or numbers
Differential Equations:
A differential equation (DE) may be
defined as an equation involving one or
more derivatives of an unknown
dependent variable or several variables
with respect to one or more
independent variable or variables.
Linear DE versus Non-Linear DE
A linear differential equation is one in which
the dependent variable and its derivatives with
respect to the independent variable are of the
first degree and all multiplicative factors are
either constants or functions of the
independent variable. An example follows.
dy
P( x) y Q( x) y ' + 4xy = x
dx
2
d y dy
2 2 5 3 y sin 4t
dt dt 8
Two Examples of Non-Linear Differential
Equations
dy
y2
y 10
dt
2
dy
5 y 20
dt
9
Ordinary DE versus Partial DE
The preceding equations have been ordinary
types since the dependent variable was a
function of only one independent variable.
An example of a partial differential equation
follows.
y
2
y 2
a 2 b
x 2
t
10
Realistic mathematical process models in
chemical engineering field usually consist
of
Ordinary differential equations (ODEs) coupled
with nonlinear algebraic equations
• ODEs are generally derived making mass and energy
balance
• Supporting algebraic equations usually correlate the
parameters with the process variables
Example:
Distillation column. An ODE is formed if a mass
balance is made around a tray, whereas an
algebraic equation correlates the vapor–liquid
equilibrium coefficient with the phase composition,
temperature and pressure.
• Simplest of the equations is a linear algebraic equation
• Exact solution of this linear equation is immediate and consists of a
single value or point
• Algebraic quadratic equations can also be solved exactly, if solutions
exist, leading to two solutions
• Finding exact solutions to higher-order algebraic equations is not a
feasible task and numerical methods must be employed to find
approximate solutions
• For a system having two or more coupled nonlinear algebraic
equations, numerical methods are routinely employed to find
approximate solutions
• Ordinary differential equations are in general much more difficult to
solve exactly
• Exact analytical solutions of ODES are available only for linear
differential equations
•For the case of nonlinear ODEs, explicit exact
solutions are quite impossible and numerical
methods are employed
•It is common to convert the PDE to a set of
ordinary differential equations and the
standard techniques are followed for solving
those transformed ODEs
Ordinary Differential Equation
Differential equation
An equation relating a dependent variable to one or
more independent variables by means of its
differential coefficients with respect to the
independent variables is called a “differential
equation”.
d 3 y dy 2 Ordinary differential equation --------
3
( ) 4 y 4e x
cos x only one independent variable involved: x
dx dx
T 2T 2T 2T Partial differential equation ---------------
C p k ( 2 2 2 ) more than one independent variable involved: x, y, z,
x y z
Ordinary Differential Equation
Differential equation
Ordinary differential equations are classified in terms
of order and degree
Order of an ordinary differential equation is the same
as the highest order derivative
The degree of a differential equation is the highest
power of the highest order differential coefficient that
the equation contains after it has been rationalized.
Ordinary Differential Equation
Differential equation
Ordinary differential equations are classified in terms
of order and degree
3rd order O.D.E.
d 3 y dy 2
3
( ) 4 y 4e x
cos x
dx dx
Product between two derivatives ---- non-linear
dy
4 y 2 cos x
dx
Product between the dependent variable themselves ---- non-linea
Ordinary Differential Equation
ODE in chemical engineering
Illustrative Example: A Blending Process
dV
w1 w2 w (2-12)
dt
d Vx
w1x1 w2 x2 wx (2-13)
dt
Ordinary Differential Equation
ODE in chemical engineering
Equation 2-13 can be simplified by expanding the accumulation term using the “chain
rule” for differentiation of a product:
d Vx dx dV
V x (2-14)
dt dt dt
Substitution of (2-14) into (2-13) gives:
dx dV
V x w1x1 w2 x2 wx (2-15)
dt dt
Substitution of the mass balance in (2-12) for dV/dt in (2-15) gives:
dx
V x w1 w2 w w1x1 w2 x2 wx (2-16)
dt
Ordinary Differential Equation
ODE in chemical engineering
After canceling common terms and rearranging (2-12) and (2-16), a more convenient
model form is obtained:
dV 1
w1 w2 w (2-17)
dt
dx w1 w2
1
x x x2 x (2-18)
dt V V
Ordinary Differential Equation
ODE in chemical engineering
Unsteady – State Material and Energy
Balances
• The macroscopic balance ignores all of the detail within a system and
consequently results in a balance about the entire system.
Assumption
• System is well mixed so that the output concentrations and
temperatures are equivalent to the concentrations and temperatures
inside the system.
17.1
System
Boundry
Consumption
Transport (Sink) Transport
In Out
1 2
Generation
(Source)
2 2
E t t E t H gh mt H gh mt
2 S1 2 S2
t2
E t2 Et1 Q B W H K P m dt (17.9)
t1
Example 17.1 Unsteady-State Material
Balance without Generation
A tank holds 100 gal of a water-salt solution in
which 4.0 lb of salt are dissolved. Water runs
into the tank at the rate of 5 gal/min and salt
solution overflows at the same rate. If the
mixing in the tank is adequate to keep the
concentration of salt in the tank uniform at all
times, how much salt is in the tank at the end
of 50 min? Assume that the density of the salt
solution is essentially the same as that of
water.
This is the initial condition:
at t = 0 x = 4.0 lb
assumption of uniform concentration of salt in the tank, the concentration of salt
leaving the tank is the same as that in the tank, or x lb/100 gal of solution.
Example 17.2 Unsteady-State Material
Balance without Generation
A square tank 4 m on a side and 10 m
high is filled to the brim with water. Find
the time required for it to empty through
a hole in the bottom 5 cm2 in area.
Sol:
5 10 t kg
4 *
100 cm s m
3
density of water
* average velocity of the water leaving the tank
The depletion of water inside the tank in terms of variable h
16 m 2 kg h m 16 m 2 kg h m
3
3
16 h kg
m t t m t
An overall material balance is
Accumulation = In - out
16 h = 0 - 5 10-4 * t (a)
h 5 10-4 *
t 16
Taking the limit as h and t approch zero, we get the differential form
dh 5 10-4 *
(b)
dt 16
This is an equation with one independent variable, t, and two dependent
variables, h and * . We must find another equation to eliminate either h
or * if we want to obtain a solution.
With W = 0 and E = 0 the steady-state mechanical energy
balances reduce to
(v* ) 2
gh 0
2
We have assumed that the atmospheric pressure is the same at section
1 the water surface and section 2 the hole for the system consisting of
the water in the tank. Equation (c) can be rearranged to
(2* ) 2 (1* ) 2
g (h2 h1 ) 0 (d)
2
2* exit velocity through the 5 cm 2 hole at boundary 2
1* velocity of water in the tank at boundary 1
If v1* 0, a reasonable assumption for the water in the large tank
at any time, at least compared to v*2
(v*2 ) 2 2 g (0 h1 ) 2 gh
v*2 2 gh (e)
Because the exit-stream flow is not frictionless and because of turbulence
and orifice effects in the exit hole, we must correct the value of given by
Equation (e) for frictionless flow by an empirical
adjustment factor as follows:
v*2 c 2 gh (f)
where c is an orifice correction that we could find (from a text
discussing fluid dynamics) with a value of 0.62 for this case. Thus
v*2 0.62 2(9.8)h 2.74 h m / s
Let us substitute this relation into Equation (b) in place of v*
dh (5.0 104 )(2.74)(h)1/2
(g)
dt 16
Equation (g) can be integrated between
h = 10 m at t = 0
h = 0 m at t = , the unknown time
0
dh
-1.17 10 1/2 dt
4
10
h 0
0
dh 10
1.17 10 1/2 1.17 10 2 h 7.38 104 s
4 4
10
h 0
Now suppose that in addition to the loss of fluid through the hole in
the bottom of the tank additional fluid is poured continuously into the
top of the tank at varying rates. Numerical integration of the resulting
differential equations yields a varying height of fluid as illustrated in
Figure E17.2c.
Example 17.3. Material Balance in
Batch Distillation
A small still is separating propane and butane at 135°C and
initially contains 10 kg mol of a mixture whose composition is
x = 0.30 (x = mole fraction butane). Additional mixture (xF =
0.30) is fed at the rate of 5 kg mol/hr. If the total volume of
the liquid in the still is constant, and the concentration of the
vapor from the still (xD) is related to xS as follows:
xS
xD (a)
1 xS
how long will it take for the value of xS to change from 0.3 to
0.4? What is the steady-state (“equilibrium”) value of xS in the
still (i.e., when xS becomes constant)? See Figure E17.3.
Sol:
Since butane and propane form ideal solutions, we do not have
to worry about volume changes on mixing or separation. Only
the material balance is needed to answer the questions posed.
If t is the independent variable and xS is the dependent variable,
Butane balance (C4): The input to the still is:
5 mol feed 0.30 mol C4
hr mol feed
The output from the still is equal to the amount condensed:
5 mol condensed xD mol C4
hr mol condensed
10dxS
The accululation is
dt
Accumulation = in - out
10dxS
= 1.50 - 5x D
dt
dxS
= 0.15 - 0.5x D (b)
dt
dxS xS
= 0.15 - 0.5 (c)
dt 1 xS
Integration of Equations(c) between the following limit
at t = 0 x S = 0.30
t= x S = 0.40
0.40
dxS
0.30 0.15 0.5 xS / (1 xS ) 0 dt
0.40`
0.40
(1 xS )dxS xS 1
0.30 0.15 0.35xS 0.35 (0.35)2 ln(0.15 0.35xS )
0.30
5.85 hr
The steady-state value of x S is established at infinite time or,
alternatively, when the accumulation is zero. At that time,
0.5 xS
0.15 = or x S 0.428
1 xS
The value of x S could never be any greater than
0.428 for the given conditions
Problem 17.1
A tank containing 100 kg of a 60% brine (60%
salt) is filled with a 10% salt solution at the
rate of 10 kg/min. Solution is removed from
the tank at the rate of 15 kg/min. Assuming
complete mixing, find the kilograms of salt in
the tank after 10 min.
(1 15 x) (100 50)
ln ln
(1 9) 100
x 0.1333
kg of solution after 10 min = 100 - 50 = 50 g
kg of salt in the tank = (0.1333)(50) = 6.67 kg
Problem 17.2
1
x 0
1500(4.605 0) 30t
t 230.25 min
Problem 17.3
A 2% uranium oxide slurry (2 lb UO2/100 lb H2O)
flows into a 100 gal tank at the rate of 2 gal/min.
The tank initially contains 500 lb of H2O and no UO2.
The slurry is well mixed and flows out at the same
rate at which it enters. Find the concentration of
slurry in the tank at the end of 1 hr.
dV 5 dt (4150 3590) 5t
V1 0
t 112 min
b) Assuming the rate of escaping is proportional to the volume
and initially at 5(ft)3 /min
V2 t
dV 5
V V 4190 0 dt
1
4190 V2 4190
t ln 858ln 131 min
5 V1 3590
c) Not without any piece of information as the mass balance contains two
unknown, such as p and V
Problem 17.6
A plant at Canso, Nova Scotia, makes fish-protein
concentrate (FPC). It takes 6.6 kg of whole fish to
make 1 kg of FPC, and therein is the problem—to
make money, the plant must operate most of the
year. One of the operating problems is the drying of
the FPC. It dries in the fluidized dryer at a rate
approximately proportional to its moisture content. If
a given batch of FPC loses one-half of its initial
moisture in the first 15 min, how long will it take to
remove 90% of the water in the batch of FPC?
w t
dw
Sol: w w k 0 dt
0
ln w w k t 0
W t
o
h2
113 1 h
t 56.5h h
h2
tan
1
2 2 h1
h1 5m, h2 ( 3 0.25)h1 3.15m
t 56.6(3.15 5) 79.9(tan 1 2.227 tan 1 3.336)
t 567.3min
b) The rate of discharge at that time is
dV
0.02(2 h 2 )
dt
0.02(2 (3.15) 2 ) 0.24m3 / min
Problem 17.8
A sewage disposal plant has a big concrete holding
tank of 100,000 gal capacity. It is three-fourths full of
liquid to start with and contains 60,000 Ib of organic
material in suspension. Water runs into the holding
tank at the rate of 20,000 gal/hr and the solution
leaves at the rate of 15,000 gal/hr. How much organic
material is in the tank at the end of 3 hr?
Initially 75,000
20,000 gph gal
15,000 gph
0 lb organic 60,000 lb
organic X lb organic/gal
total
1) Overall Balance
Sol: Let y = total gal of mixture in the tank at time t (in hours)
dy
20000 15000 5000
dx
y t
75000
dy 5000 dt
0
y 5000(15 t )
2)
Organic Material Balance
lb organic
Let x = in the tank at time t
gal of mix
Initially, x 60000 / 75000 0.8
total amount of organic in the tank at time t is (yx) lbs
The rate of accumulation will be d(yx)/dt, lb/hr
Rate of accumulation = Rate in - Rate out
d ( yx)
0 15000 x
dt
dx dy
d x 15000
dt dt
dx 20000 x
dt 5000(15 t )
x 3
dx 4dt x 15
0.8 x 0 15 t ln 0.8 4 ln 18
x 0.396
The total wt of organic material in the tank after 3 hr is:
yx 75000 (5000)(3) (0.396) 34, 640lb
Alternative Solution:
If x = total lb of organic in the tank at any time t,
then the concentration of organic is x/y
The balance becomes:
dx 15000 gal x lb
dt hr y gal
x 3
dx 15000 dt
60000
x
0
5000(15 t )
x 18
ln 3ln
60000 15
x 34640 lb organic
Problem 17.9
Suppose that in problem 17.8 the bottom of the tank is
covered with sludge (precipitated organic material) and that
the stirring of the tank causes the sludge to go into
suspension at a rate proportional to the difference between
the concentration of sludge in the tank at any time and 10 Ib
of sludge/gal. If no organic material were present, the sludge
would go into suspension at the rate of 0.05 Ib/(min) (gal
solution) when 75,000 gal of solution are in the tank. How
much organic material is in the tank at the end of 3 hr?
Initially 75,000
20,000 gph gal 15,000 gph
60,000 lb
organic
Suspension rate = k(10 - x) lb/hr
Sol: 1) Overall balance: Assuming the sludge does not effect the volume
of the mixture in the tank, the overall balance will be the same as
that in the problem 17.8, i.e. y = 5000 (15+t) gal
2) Organic Balance
Let x = lb of organic in suspension per gal of total in the tank
at time t in hours
z = lb of sludge going into suspension at time t
Rate of sludge going into suspension
dx
k (10 x)
dt
x 0, y 75, 000 gal
dz 0.05lb 75000 60 min
k (10) lb/gal
dt (min)( gal ) hr
(0.05)(75, 000)(60)
k= 22,500 gal/hr
10
d ( yx)
Rate of accumulation of organic =
dt
Rate of accumulation = Rate in - Rate out
d ( yx)
22500(10 x) 15000 x
dt
dx dy
y x
dt dt
dx 45 8.5 x
dt 15 t
x t
dx 8.5dt
0.8 5.3 x 0 15 t
5.3 x 18
ln 8.5ln
5.3 0.8 15
x 4.345 lb/gal
The total weight of the organic in the tank after 3 hrs is
=(90000)(4.345)
=391050 lbs
Problem 17.10
In a chemical reaction the products X and Y are
formed according to the equation
C x y
The rate at which each of these products is being
formed is proportional to the amount of C present.
Initially: C = I, X = 0, Y = O. Find the time for the
amount of X to equal the amount of C.
Let C, x, y = the number of moles of X, x, y respectively
Sol: 1) C balance: C0 = 1, initial moles of C
C t
dc dC
kC k dt
dt C0
C 0
C
ln kt C C0 e kt e kt
C0
2) x balance
dx
kC ke kt
dt
x t
dt
kt
dx ke
0 0
x 1 e kt or 2e kt 1
1 ln 2
ln kt t
2 k