Professional Documents
Culture Documents
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
Order and degree
• The order of a differential equation is equal to the
order of the highest differential coefficient that it
contains.
• 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.
3rd order O.D.E.
3
d y dy 2
( ) 4 y 4e x
cos x
dx 3
dx 1st degree O.D.E.
Linear or non-linear
• Differential equations are said to be non-
linear if any products exist between the
dependent variable and its derivatives, or
between the derivatives themselves.
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-linear
First order differential equations
• No general method of solutions of 1st
O.D.E.s because of their different degrees
of complexity.
• Possible to classify them as:
– exact equations
– equations in which the variables can be
separated
– homogenous equations
– equations solvable by an integrating factor
Exact equations
• Exact? M ( x, y)dx N ( x, y)dy 0
F F
dx dy dF
x y
For example
dy
x y sin x (cos x 2 y) 0
3
dx
Separable-variables equations
• In the most simple first order differential
equations, the independent variable and its
differential can be separated from the
dependent variable and its differential by
the equality sign, using nothing more than
the normal processes of elementary algebra.
For example
dy
y sin x
dx
Homogeneous equations
• Homogeneous/nearly homogeneous?
• A differential equation of the type,
dy y
f
dx x
k1 = 8 k2 ; k2 = 30 k3
C6H6+Cl2 C6H5Cl +HCl
C6H5Cl+Cl2 C6H4Cl2 + HCl
C6H4Cl2 + Cl2 C6H3Cl3 + HCl
Take a basis of 1 mole of benzene fed to the reactor and introduce
the following variables to represent the stage of system at time ,
Then q + r + s + t = 1
and the total amount of chlorine consumed is: y = r + 2s + 3t
From the material balances : in - out = accumulation
dq u = r/q
0 k1 pq V
d
dr
k1 pq k 2 pr V dr k2 r
d
ds
( ) 1
k 2 pr k3 ps V
d
dq k1 q
dt
k3 ps V
d
Equations solved by integrating factor
dy
Py Q where P and Q are functions of x only
dx
Assuming the integrating factor R is a function of x only, then
dy
R yRP RQ
dx
dy dR d
R exp Pdx is the integrating factor
R y (Ry )
dx dx dx
Example
dy 3 x 2
Solve xy y exp
4
dx 2 dz 3x 2
3xz 3 exp
Let z = 1/y3 dz 3 dz 3 dy dx 2
4 4
dy y dx y dx
integral factor 3x 2
exp 3xdx exp
2
1 3x 2 3x 2 dz 3x 2
exp 3x C 3xz exp exp 3
y3 2 2 dx 2
3x 2 d 3x 2
z exp z exp 3
2 3x C
dx
2
Summary of 1st O.D.E.
• First order linear differential equations
occasionally arise in chemical engineering
problems in the field of heat transfer,
momentum transfer and mass transfer.
First O.D.E. in heat transfer
An elevated horizontal cylindrical tank 1 m diameter and 2 m long is insulated with
asbestos lagging of thickness l = 4 cm, and is employed as a maturing vessel for a
batch chemical process. Liquid at 95 C is charged into the tank and allowed to
mature over 5 days. If the data below applies, calculated the final temperature of the
liquid and give a plot of the liquid temperature as a function of time.
t dT
0.0235T 0.235 0.235 cos( / 12)
d
Ts
B.C. = 0 , T = 95
Tw
T
Second O.D.E.
• Purpose: reduce to 1st O.D.E.
• Likely to be reduced equations:
– Non-linear
• Equations where the dependent variable does not occur explicitly.
• Equations where the independent variable does not occur explicitly.
• Homogeneous equations.
– Linear
• The coefficients in the equation are constant
• The coefficients are functions of the independent variable.
Non-linear 2nd O.D.E.
- Equations where the dependent variables does not
occur explicitly
dy dp d 2 y
Let p and therefore
dx dx dx 2
dp
xp ax
dx
1
integral factor exp x 2
2
dp 12 x 2 1 2
x
1 2
x
e xpe axe
2 2
dx
error function
1 2 1 2
d x x
( pe 2
) axe 2
dx
Non-linear 2nd O.D.E.
- Equations where the independent variables does
not occur explicitly
dy d2y dp
Let p
dx
and therefore p
dx 2 dy
dp
yp 1 p2
dy
dx dx
Dividing by 2xy
2
d 2 y 1 y 1 x dy
x 2
dx 2 x 2 y dx
d2y y dy
homogeneous x f ,
y Ax
2
dx x dx Singular solution
Let y ux
2
y x( B ln x C ) 2
2
2 d u du 2 du
2ux 2
2ux x General solution
dx dx dx
Let x et
du
2
d u du
2 p
dt dp
2u 2
2up p2
dt dt du
A graphite electrode 15 cm in diameter passes through a furnace wall into a water
cooler which takes the form of a water sleeve. The length of the electrode between
the outside of the furnace wall and its entry into the cooling jacket is 30 cm; and as
a safety precaution the electrode in insulated thermally and electrically in this section,
so that the outside furnace temperature of the insulation does not exceed 50 C.
If the lagging is of uniform thickness and the mean overall coefficient of heat transfer
from the electrode to the surrounding atmosphere is taken to be 1.7 W/C m2 of
surface of electrode; and the temperature of the electrode just outside the furnace is
1500 C, estimate the duty of the water cooler if the temperature of the electrode at
the entrance to the cooler is to be 150 C.
The following additional information is given.
Surrounding temperature = 20 C
Thermal conductivity of graphite kT = k0 - T = 152.6 - 0.056 T W/m C
The temperature of the electrode may be assumed uniform at any cross-section.
T0
x
The sectional area of the electrode A = 1/4 x 0.152 = 0.0177 m2
A heat balance over the length of electrode x at distance x from the furnace is
input - output = accumulation
dT dT d dT
kT A kT A (kT A )x DU (T T0 )x 0
dx dx dx dx
where U = overall heat transfer coefficient from the electrode to the surroundings
D = electrode diameter
d dT DU d dT
T
k x (T T0 )x (k0 T ) (T T0 ) 0
dx dx A dx dx
2
d 2T dT
(k0 T ) 2 (T T0 ) 0
dx dx
dT dp d 2T
T0 p
dx
p
dT dx 2
T dp
(k0 T ) p p 2 (T T0 ) 0
x dT
dp
(k0 T ) p p 2 (T T0 ) 0
dT
p2 z y (T T0 )
dz
[(k0 T ) y] 2z 2 y 0
dy
2dy
Integrating factor exp k0 T0 y 2
k0 T0 y
(k0 T )dT
x
[C (k0 T )(T T0 ) 2 2 3 (T T0 )3 ]
Linear differential equations
• They are frequently encountered in most chemical
engineering fields of study, ranging from heat,
mass, and momentum transfer to applied chemical
reaction kinetics.
• The general linear differential equation of the nth
order having constant coefficients may be written:
dny d n1 y dy
P0 n P1 n 1 ... Pn 1 Pn y ( x)
dx dx dx
d 2u du
P 2
Q Ru 0
dx dx
The general solution of the linear differential equation will be the sum of
a “complementary function” and a “particular solution”.
purpose
The complementary function
d2y dy
P 2
Q Ry 0
dx dx
dy d2y
Let the solution assumed to be: y Am e
mx
Am memx Am m 2 mx
e
dx dx 2
Am e mx ( Pm 2 Qm R) 0
Unequal roots
Equal roots
Real roots
Complex roots
Unequal roots to auxiliary equation
• Let the roots of the auxiliary equation be distinct and of
values m1 and m2. Therefore, the solutions of the auxiliary
equation are:
y A1em1x A2em2 x
m2 5m 6 0
m1 2
m2 3
y Ae 2 x Be 3 x
Equal roots to auxiliary equation
• Let the roots of the auxiliary equation equal and of value
m1 = m2 = m. Therefore, the solution of the auxiliary
equation is: y Ae mx
dy mx dV d2y 2
mx d V mx dV
Let y Ve mx
e mVe mx e 2 me m 2
Ve mx
dx dx dx 2 dx 2 dx
m2 6m 9 0
m1 m2 3
y ( A Bx )e3 x
Solve d2y dy
2
4 5y 0
dx dx
auxiliary function
m2 4m 5 0
m 2i
( 2i ) x ( 2 i ) x
y Ae Be y e ( E cos x F sin x)
2x
Particular integrals
• Two methods will be introduced to obtain
the particular solution of a second linear
O.D.E.
– The method of undetermined coefficients
• confined to linear equations with constant
coefficients and particular form of (x)
– The method of inverse operators
• general applicability
d2y dy
P 2
Q Ry ( x)
dx dx
Method of undetermined coefficients
d2y dy
P 2
Q Ry ( x)
dx dx
y p qx rx2 sx3
dy
q 2rx 3sx2
dx
d2y
2r 6sx
dx 2
2r 4q 4 p 0
6 s 8r 4q 4
4r 12 s 0 yc ( A Bx )e 2 x
4s 8
y p 7 10 x 6 x 2 2 x3 y general yc y p
Method of inverse operators
• Sometimes, it is convenient to refer to the
symbol “D” as the differential operator:
dy
Dy
dx
d2y dy
2
D ( Dy) D y
2
But, ( Dy)
2
dx 2 dx
...
dny
D y
n
dx n
d2y dy
2
3 2y D2 y 3Dy 2 y ( D2 3D 2) y ( D 1)( D 2) y
dx dx
The differential operator D can be treated as an ordinary algebraic
quantity with certain limitations.
D( ye px ) e px Dy yDe px e px ( D p) y
D 2 ( ye px ) e px ( D p) 2 y
...
D n ( ye px ) e px ( D p) n y
More convenient!
f ( D)( ye ) e f ( D p) y
px px
Differential operator to
trigonometrical functions
D n (sin px) D n Im eipx Im D n eipx Im(ip ) n eipx
where “Im” represents the imaginary part of the function which follows it.
eipx cos px i sin px
D 2 n (sin px) ( p 2 ) n sin px
D 2 n 1 (sin px) ( p 2 ) n p cos px
D 2 n (cos px) ( p 2 ) n cos px
D 2 n 1 (cos px) ( p 2 ) n p sin px
The inverse operator
The operator D signifies differentiation, i.e.
D f ( x)dx f ( x) f ( x)dx D 1 f ( x)
( D 4) y e 2 x
1 f ( D)e px f ( p)e px 1
y e2 x y e2 x
( D 4) (2 4)
p2
1
y e2 x
1
4(1 D)
4
binomial expansion
1 2x 1 1 1
y e [1 ( D) ( D) 2 ( D) 3 ...]1
4 4 4 4
=2
1 1 1 1 1
y e 2 x [1 ( ) ( ) 2 ( )3 ...] y e2 x
4 2 2 2 2
1 f ( D)e px f ( p)e px 1
y e2 x y e2 x
( D 4) (2 4)
p2
1 1
e
px
e px
f ( D) f ( p)
如果 f(p) = 0, 使用因次分析
1 1
e px e px
f ( D) ( D p ) n ( D)
非0的部分
f ( D)e px f ( p)e px
1 e px
1 f ( D) ye px e px f ( D p) y 1 e px 1
e px e
px
f ( D) ( p) ( D p) n y = 1, p = 0, 即將 D-p換為 D f ( D) ( p) D n
1 e px x n integration 1 e px n
e
px
e
px
D
f ( D) ( p) n! f ( D) ( p)
Solve
d2y dy m2 8m 16 0
8 16 y 6 xe 4x
dx 2 dx
differential operator
( D 2 8D 16) y ( D 4) 2 y 6 xe 4 x yc ( A Bx )e 4 x
6
yp xe 4x
( D 4) 2 y = yc + yp
f(p) = 0
f ( D)e px e px f ( D p)
y p 6 xe 4 x D 2
integration
x2
y p 6 xe 4 x y p 3 x 3e 4 x
2!
Solve
d 2 y dy m2 m 6 0
6 y 4 x 3
3 x 2
dx 2 dx
differential operator
( D 2 D 6) y ( D 3)( D 2) y 4 x3 3x 2
yc Ae 3 x Be 2 x
1
yp (4 x 3 3x 2 )
( D 3)( D 2)
1 1 1 3 y = yc + yp
yp ( 4 x 3 x 2
)
5 (3 D) (2 D)
expanding each term by binomial theorem
1 1 D D 2 D 3 1 D D 2 D3
y p ... ...(4 x 3 3x 2 )
5 3 9 27 81 2 4 8 16
4 x 3 3x 2 12 x 2 6 x 7(24 x 6) 13 24
yp 0...
6 36 216 1296
O.D.E in Chemical Engineering
• A tubular reactor of length L and 1 m2 in cross section is
employed to carry out a first order chemical reaction in
which a material A is converted to a product B,
A B
• The specific reaction rate constant is k s-1. If the feed rate is
u m3/s, the feed concentration of A is Co, and the
diffusivity of A is assumed to be constant at D m2/s.
Determine the concentration of A as a function of length
along the reactor. It is assumed that there is no volume
change during the reaction, and that steady state conditions
are established.
L
The concentraion will vary in the entry section
u u due to diffusion, but will not vary in the section
C0 C following the reactor. (Wehner and Wilhelm, 1956)
Ce
x 分開兩個section
x
x x+x
dC
Bulk flow of A uC uC u x
dx
dC dC d dC
Diffusion of A D D D x
dx dx dx dx
A material balance can be taken over the element of length x at a distance x fom the inlet
dC dC dC d dC
uC D dx uC u dx x D dx dx D dx x kCx 0
dC dC dC d dC
uC D
uC u x
D D x kCx 0
dx dx dx dx dx
dividing by x
dC d dC
u D kC 0
dx dx dx
rearranging
d 2C dC In the entry section d 2C dC
D 2 u kC 0 D 2 u 0
dx dx dx dx
auxillary function auxillary function
Dm2 um k 0 Dm2 um 0
ux
C A exp 1 a B exp ux 1 a ux
C exp
2D 2D D
a 1 4kD / u
2
ux
C A exp 1 a B exp ux 1 a ux
C exp
2D 2D D
B. C. B. C.
dC dC
x0 x C C0
dx dx
xL
dC
0
x0 C C
dx
ux
C 2
exp
ua
a 1 exp L x a 1exp ua L x
C0 K 2 D 2D 2D
1.017 kg/s of a tallow fat mixed with 0.286 kg/s of high pressure hot water is fed into
the base of a spray column operated at a temperature 232 C and a pressure of
4.14 MN/m2. 0.519kg/s of water at the same temperature and pressure is sprayed
into the top of the column and descends in the form of droplets through the rising fat
phase. Glycerine is generated in the fat phase by the hydrolysis reaction and is extracted
by the descending water so that 0.701 kg/s of final extract containing 12.16% glycerine
is withdrawn continuously from the column base. Simultaneously 1.121 kg/s of fatty
acid raffinate containing 0.24% glycerine leaves the top of the column.
If the effective height of the column is 2.2 m and the diameter 0.66 m, the glycerine
equivalent in the entering tallow 8.53% and the distribution ratio of glycerine between
the water and the fat phase at the column temperature and pressure is 10.32, estimate
the concentration of glycerine in each phase as a function of column height. Also find
out what fraction of the tower height is required principally for the chemical reaction.
The hydrolysis reaction is pseudo first order and the specific reaction rate constant is
0.0028 s-1.
Raffinate
L kg/s G kg/s
L kg/s
xH yH
zH
x+x
z+z y+y
h
x y
z
h
Tallow fat Hot water
G kg/s
Extract
x0 y0
z0
mG
r
kS L
p
L
KaS
q (r 1)
G
d2y dy pq mz0
( p q ) pqy 0
ry 2nd O.D.E. with constant coefficients
dh 2 dh r 1 w
Complementary function
Particular solution
pq mz0
yc A exp( ph) B exp( qh) yp ry0 / pq
r 1 w
1 mz0
y A exp( ph) B exp( qh) ry0
r 1 w
B.C.
We don’t know y0, either
h 0, x 0 h 0, y y0
We don’t really want x here!
h H, y 0 h H, y 0
r 1 dy
mx y
q dh
r 1
mx y pA exp( ph) qB exp( qh)
q
y(veqH re pH )
1 mz
qH
ry0 0 (r e )e
r 1 w
pH
(e pH v)e qh veqH re pH
q rp p Substitute y0 in terms of other variables
v h 0, y y0
q
mz0 pH e pH v qH ve qH re pH
y e e
qH qH
w(r v) r e r e
1.017 1.121
L~ 1.069
2
0.286 0.519
G~ 0.403
2
0.701 0.1216 0.276
y0 ~ 0.165
0.701 0.286
m 10.32
k 0.0028
S 0.66 2
4
730
Simultaneous differential
equations
• These are groups of differential equations
containing more than one dependent
variable but only one independent variable.
• In these equations, all the derivatives of the
different dependent variables are with
respect to the one independent variable.
Our purpose: Use algebraic elemination of the variables until only
one differential equation relating two of the variables remains.
Elimination of variable
Independent variable or dependent variables?
dx
f1 ( x, y )
dt Elimination of independent variable dx f1 ( x, y )
dy dy f 2 ( x, y )
f 2 ( x, y )
dt 較少用
( D 5)
( D 3)( D 2) y ( D 3) 2 z 0 ( D 3)( D 2)( D 5) y ( D 5)( D 3) 2 z 0
and and
( D 3)
( D 2)( D 5) y ( D 2)( D 1) z 0 ( D 3)( D 2)( D 5) y ( D 3)( D 2)( D 1) z 0
13
x
z Ae 11
Be 3 x
( D 2 D 6) y ( D 2 6D 9) z 0
13 2 6 13 13 x 13
( D D 6) y
2
9 Ae 11 1 x
yp 2 Ee 11
11 11 ( D D 6)
=E
f ( D)e px f ( p)e px 13
p
11
13
1 x
yp Ee 11
yc He Je 2x 3 x 13 13
(( ) 2 ( ) 6)
11 11
121 13 x
y = yc + yp yp Ee 11
700
Example of simultaneous O.D.E.s
1.25 kg/s of sulphuric acid (heat capacity 1500 J/kg C) is to be cooled in a two-stage counter-
current cooler of the following type. Hot acid at 174 C is fed to a tank where it is well stirred in
contact with cooling coils. The continuous discharge from this tank at 88 C flows to a second
stirred tank and leaves at 45C. Cooling water at 20 C flows into the coil of the second tank and
thence to the coil of the first tank. The water is at 80 C as it leaves the coil of the hot acid tank.
To what temperatures would the contents of each tank rise if due to trouble in the supply, the
cooling water suddenly stopped for 1h?
On restoration of the water supply, water is put on the system at the rate of 1.25 kg/s. Calculate
the acid discharge temperature after 1 h. The capacity of each tank is 4500 kg of acid and the
overall coefficient of heat transfer in the hot tank is 1150 W/m2 C and in the colder tank
750 W/m2 C. These constants may be assumed constant.
Tank 1 Tank 2
80 C 40 C 20 C 0.96 kg/s
88 C
1.25 kg/s 45 C
174 C
Heat transfer area A1 Heat transfer area A2
1.25 1500 (174 45) Fwater 4200 (80 20) Fwater 0.96kg / s
1.25 1500 (88 45) 0.96 4200 (Tmiddle 20) Tmiddle 40 C
dT1
Tank 1 MCT0 MCT1 VC M: mass flow rate of acid
dt C: heat capacity of acid
dT V: mass capacity of tank
Tank 2 MCT1 MCT2 VC 2
dt Ti: temperature of tank i
B.C.
dT1 t = 0, T1 = 88
T0 T1 T1 174 86e t
dt
dT2 t = 1, T1=142.4 C
T1 T2
dt
t = 1, T2 = 94.9 C
When water supply restores after 1 hour, heat balance for tank 1 and tank 2:
ln(T1 t1 ) ln(T1 t2 )
T1 (1 ) t1 t2
e WCw
(T2 t 2 ) (T2 t3 ) U 2 A2
WCw (t2 t3 ) U 2 A2 e
WCw T2 (1 ) t2 t3
ln(T2 t 2 ) ln(T2 t3 )
再由出現次數次少的 t2 消去
…..
代入各數值
…..
Check exact
Separate variables
homogenous equations, u = y/x
equations solvable by an integrating factor
我們會解的部分
Linear O.D.E. 缺 x 的 O.D.E., reduced to 1st O.D.E.
缺 y 的 O.D.E., reduced to 1st O.D.E.
homogeneous 的 O.D.E., u = y/x