化工應用數學
授課教師: 郭修伯
Lecture 6 Functions and definite integralsVectors
Chapter 5
Functions and definite integrals
There are many functions arising in engineering which cannot be integrated analytically in terms of elementary functions. The valuesof many integrals have been tabulated, much numerical work can beavoided if the integral to be evaluated can be altered to a form that is tabulated.
Ref. pp.153
We are going to study some of these special functions…..
Special functions
• Functions– Determine a functional relationship between two or more
variables– We have studied many elementary functions such as
polynomials, powers, logarithms, exponentials, trigonometric and hyperbolic functions.
– Four kinds of Bessel functions are useful for expressing the solutions of a particular class of differential equations.
– Legendre polynomials are solutions of a group of differential equations.
Learn some more now….
The error function
• It occurs in the theory of probability, distribution of residence times, conduction of heat, and diffusion matter:
dzexx z
0
22erf
0 x z
erf x
22 ze
z: dummy variable
1erf
Proof in next slide
dyedxeIR yR x
00
22
x and y are two independent Cartesian coordinates
dydxeIR yxR
0
)(
0
2 22
drdreI rR2
1
00
2 2
in polar coordinates Error between the volume determined by x-y and r-
The volume of has a base area which isless than 1/2R2 and a maximum height of e-R2
22
2
1 ReR
2
4
1
4
12 ReI
4
1, 2 IR
dzexx z
0
22erf
1erf
More about error function
Differentiation of the error function:22
erf xexdx
d
dzexx z
0
22erf
Integration of the error function:
Cexx
Cdxexxxxdx
x
x
2
2
1erf
2erferf
The above equation is tabulated under the symbol “ ierf x” with 1
C
(Therefore, ierf 0 = 0)
Another related function is the complementary error function “erfc x”
dzexxx
z
22erf1 erfc
The gamma function
dtetn tn 0
1)(
for positive values of n.t is a dummy variable since the value of the definite integral is independent of t.(N.B., if n is zero or a negative integer, the gamma function becomes infinite.)
)1()1(
)1(
)(
0
20
1
0
1
nn
dtetnet
dtetn
tntn
tn
repeat
)!1(
)1()1)(2)...(2)(1()(
n
nnn
The gamma function is thus a generalized factorial, for positive integervalues of n, the gamma function can be replaced by a factorial.
(Fig. 5.3 pp. 147)
More about the gamma function
0
2
1
2
1dtet t
2xt xdxdt 2
00
1 22
222
1dxexdxex xx
erf
2
1
Evaluate
2
13
)1()1()( nnn
2
13
8
15
2
1
2
3
2
5
2
1
2
1
2
3
2
5
2
12
2
5
Chapter 7
Vector analysis
It has been shown that a complex number consisted of a real part andan imaginary part. One symbol was used to represent a combinationof two other symbols. It is much quicker to manipulate a single symbolthan the corresponding elementary operations on the separate variables.
This is the original idea of vector.
Any number of variables can be grouped into a single symbol in two ways:(1) Matrices(2) TensorsThe principal difference between tensors and matrices is the labelling andordering of the many distinct parts.
Tensors
21 izziyxz Generalized as zm
A tensor of first rank since one suffix m is needed to specify it.
The notation of a tensor can be further generalized by using more thanone subscript, thus zmn is a tensor of second rank (i.e. m, n) .
The symbolism for the general tensor consists of a main symbol suchas z with any number of associated indices. Each index is allowed totake any integer value up to the chosen dimensions of the system. Thenumber of indices associated with the tensor is the “rank” of the tensor.
Tensors of zero rank (a tensor has no index)
• It consists of one quantity independent of the number of dimensions of the system.
• The value of this quantity is independent of the complexity of the system and it possesses magnitude and is called a “scalar”.
• Examples:– energy, time, density, mass, specific heat, thermal conductivity,
etc.
– scalar point: temperature, concentration and pressure which are all signed by a number which may vary with position but not depend upon direction.
Tensors of first rank (a tensor has a single index)
• The tensor of first rank is alternatively names a “vector”.
• It consists of as many elements as the number of dimensions of the system. For practical purposes, this number is three and the tensor has three elements are normally called components.
• Vectors have both magnitude and direction.• Examples:
– force, velocity, momentum, angular velocity, etc.
Tensors of second rank (a tensor has two indices)
• It has a magnitude and two directions associated with it.
• The one tensor of second rank which occurs frequently in engineering is the stress tensor.
• In three dimensions, the stress tensor consists of nine quantities which can be arranged in a matrix form:
333231
232221
131211
TTT
TTT
TTT
Tmn
The physical interpretation of the stress tensor
x
zy
pxx
xyxz
zzzyzx
yzyyyx
xzxyxx
mn
p
p
p
T
The first subscript denotes the plane and the second subscript denotes the direction of the force.
xy is read as “the shear force on the x facing plane acting in the y direction”.
Geometrical applications
If A and B are two position vectors, find the equation of the straightline passing through the end points of A and B.
A B C)( ABmBC
mABmC )1(
Application of vector method for stagewise processes
In any stagewise process, there is more than one property to be conserved and for the purpose of this example, it will be assumed that the three properties, enthalpy (H),total mass flow (M) and mass flow of one component (C) are conserved.
In stead of considering three separate scalar balances, one vector balance can be takenby using a set of cartesian coordinates in the following manner:Using x to measure M, y to measure H and z to measure C
Any process stream can be represented by a vector:
kCjHiMOM 111
MH
C
kCjHiMON 222
A second stream can be represented by:
kCCjHHiMMONOMOR )()()( 212121
Using vector addition,
Thus, OR with represents of the sum of the two streams must be a constantvector for the three properties to be conserved within the system.
To perform a calculation, when either of the streams OM or ON is determined,the other is obtained by subtraction from the constant OR.
Example : when x = 1, Ponchon-Savarit method (enthalpy-concentration diagram)
xy
zM
R
NB
A P
The constant line OR cross the plane x = 1 at point P
O
1
1
1
1 ,,1M
C
M
H
2
2
2
2 ,,1M
C
M
H
21
21
21
21 ,,1MM
CC
MM
HH
point A is :
point B is :
point P is :
Multiplication of vectors
• Two different interactions (what’s the difference?)– Scalar or dot product :
• the calculation giving the work done by a force during a displacement
• work and hence energy are scalar quantities which arise from the multiplication of two vectors
• if A·B = 0– The vector A is zero
– The vector B is zero = 90°
ABBABA cos||||
A
B
– Vector or cross product :
• n is the unit vector along the normal to the plane containing A and B and its positive direction is determined as the right-hand screw rule
• the magnitude of the vector product of A and B is equal to the area of the parallelogram formed by A and B
• if there is a force F acting at a point P with position vector r relative to an origin O, the moment of a force F about O is defined by :
• if A B = 0– The vector A is zero– The vector B is zero = 0°
nsin|||| BABA
A
B
ABBA
FrL
Commutative law :
ABBA
ABBA
Distribution law :
CABACBA )(
CABACBA )(
Associative law :
))(( DCBADBCA
CBABCA )(
CBACBA )(
CBACBA )()(
Unit vector relationships
• It is frequently useful to resolve vectors into components along the axial directions in terms of the unit vectors i, j, and k.
1
0
kkjjii
ikkjji
jik
ikj
kji
kkjjii
0
zyx
zyx
zzyyxx
zyx
zyx
BBB
AAA
kji
BA
BABABABA
kBjBiBB
kAjAiAA
Scalar triple product CBA
The magnitude of is the volume of the parallelepiped with edges parallel to A, B, and C.
CBA
A
BC
AB
],,[ CBABACACBACBCBACBA
Vector triple product CBA
The vector is perpendicular to the plane of A and B. When the further vectorproduct with C is taken, the resulting vector must be perpendicular to and hence in the plane of A and B :
BA
A
BC
AB
BA
nBmACBA )( where m and n are scalar constants to be determined.
0)( BnCAmCCBACACn
BCm
BACABCCBA )()()( Since this equation is validfor any vectors A, B, and CLet A = i, B = C = j:
1
CBABCACBA
ACBBCACBA
)()()(
)()()(
Differentiation of vectors
If a vector r is a function of a scalar variable t, then when t varies by anincrement t, r will vary by an increment r. r is a variable associated with r but it needs not have either thesame magnitude of direction as r :
dt
d
tt
rr
0lim
zkyjxir kji
r
dt
dz
dt
dy
dt
dx
dt
d
BAB
ABA
BAB
ABA
dt
d
dt
d
dt
ddt
d
dt
d
dt
d
)(
)(
As t varies, the end point of the position vector r will trace out a curve in space.Taking s as a variable measuring length along this curve, the differentiation processcan be performed with respect to s thus:
kds
dzj
ds
dyi
ds
dx
ds
dr
1)()()(
)()()(||
222
222
ds
dzdydx
ds
dz
ds
dy
ds
dx
ds
dr
ds
dris a unit vector in the direction of the tangent to the curve
2
2
ds
rdis perpendicular to the tangent .
ds
dr
2
2
ds
rdThe direction of is the normal to the curve, and the two vectors definedas the tangent and normal define what is called the “osculating plane” of the curve.
• Temperature is a scalar quantity which can depend in general upon three coordinates defining position and a fourth independent variable time.– is a “partial derivative”.– is the temperature gradient in the x direction
and is a vector quantity.– is a scalar rate of change.
x
T
x
T
t
T
Partial differentiation of vectors
• A dependent variable such as temperature, having these properties, is called a “scalar point function” and the system of variables is frequently called a “scalar field”.– Other examples are concentration and pressure.
• There are other dependent variables which are vectorial in nature, and vary with position. These are “vector point functions” and they constitute “vector field”.– Examples are velocity, heat flow rate, and mass transfer rate.
Scalar field and vector field
Hamilton’s operator
It has been shown that the three partial derivatives of the temperaturewere vector gradients. If these three vector components are addedtogether, there results a single vector gradient:
Tz
Tk
y
Tj
x
Ti
which defines the operator for determining the complete vectorgradient of a scalar point function.The operator is pronounced “del” or “nabla”.The vector T is often written “grad T” for obvious reasons. can operate upon any scalar quantity and yield a vector gradient.
應用於 scalar 的偏微
zk
yj
xi
More about the Hamilton’s operator ...
z
Tk
y
Tj
x
TidrTdr (vector) · (vector)
dzz
Tdy
y
Tdx
x
T
z
Tk
y
Tj
x
TikdzjdyidxTdr
TT ddrdr
dTT
But T is the vector equilvalentof the generalized gradient
Physical meaning of T :
A variable position vector r to describe an isothermal surface :
CzyxT ),,(
0dT
0 dTTdr
Since dr lies on the isothermal plane…
and
Thus, T must be perpendicular to dr.
Since dr lies in any direction on the plane,T must be perpendicular to the tangent plane at r.
if A·B = 0The vector A is zeroThe vector B is zero = 90°
dr
T
T is a vector in the direction of the most rapid change of T,and its magnitude is equal to this rate of change.
The operator is of vector form, a scalar product can be obtained as :
z
A
y
A
x
A
kAjAiAz
ky
jx
iA
zyx
zyx
)( 應用於 vector 的偏微
application
The equation of continuity :
0)()()(
tw
zv
yu
x
where is the density and u is the velocity vector.
0)(
t
u
Output - input : the net rate of mass flow from unit volume
A is the net flux of A per unit volume at the point considered, countingvectors into the volume as negative, and vectors out of the volume as positive.
zzyyxx BABABABA
Ain Aout
0 A
The flux leaving the one end must exceed the flux entering at the other end.The tubular element is “divergent” in the direction of flow.
Therefore, the operator is frequently called the “divergence” :
AA divDivergence of a vector
Another form of the vector product :
zyx AAAzyx
kji
A
zyx
zyx
BBB
AAA
kji
BA
is the “curl” of a vector ; AcurlA
What is its physical meaning?
Assume a two-dimensional fluid element
uv
x
y xx
vv
yy
uu
O A
B
Regarded as the angular velocity of OA, direction : kThus, the angular velocity of OA is ; similarily, the angular velocity of OB is
x
vk
y
uk
y
u
x
vk
vuyx
kji
0
0u
The angular velocityu of the fluid element is the average of the two angular velocities :
uv
x
y xx
vv
yy
uu
O A
Bk
y
u
x
v
2
1
y
u
x
vk
vuyx
kji
0
0u
ku 2
This value is called the “vorticity” of the fluid element,which is twice the angular velocity of the fluid element.This is the reason why it is called the “curl” operator.
We have dealt with the differentiation of vectors.
We are going to review the integration of vectors.
Vector integration
• Linear integrals
• Vector area and surface integrals
• Volume integrals
An arbitrary path of integration can be specified by defining a variableposition vector r such that its end point sweeps out the curve between P and Q
rP
Q
dr
A vector A can be integrated between two fixed points along the curve r :
)( dzAdyAdxA zy
Q
P x
Q
P drA
Scalar product
If the integration depends on P and Q but not upon the path r :
0)(
drA
drA
drd if A·B = 0
The vector A is zeroThe vector B is zero = 90°
0 A
If a vector field A can be expressed as the gradient of a scalar field , the line integralof the vector A between any two points P and Q is independent of the path taken.
If is a single-valued function :
yx Axyxxy
Ay
and 0
ky
A
x
Axy
0 A
假如與從 P 到 Q 的路徑無關,則有兩個性質:
A
0 AExample :
Q
PdrFW
0 A
If the vector field is a force field and a particle at a point r experiences a force f,then the work done in moving the particle a distance r from r is definedas the displacement times the component of force opposing the displacement :
rFW The total work done in moving the particle from P to Q is the sum of the incrementsalong the path. As the increments tends to zero:
Q
PdrFW
When this work done is independent of the path, the force field is “conservative”.Such a force field can be represented by the gradient of a scalar function :
Work, force and displacement
AWF
When a scalar point function is used to represent a vector field, it is called a“potential” function :
gravitational potential function (potential energy)……………….gravitational force fieldelectric potential function ………………………………………..electrostatic force fieldmagnetic potential function……………………………………….magnetic force field
Surface : a vector by referece to its boundaryarea : the maximum projected area of the elementdirection : normal to this plane of projection (right-hand screw rule)
dSndS
The surface integral is then :
dSnAdSA
If A is a force field, the surface integral gives the total forace acting on the surface.
If A is the velocity vector, the surface integral gives the net volumetric flowacross the surface.
Volume : a scalar by referece to its boundary
A
BC
Both the elements of length (dr) and surface (dS) are vectors,but the element of volume (d) is a scalar quantity.
There is no multiplication for volume integrals.
What are the relationships between them ?
Stokes’ theorem
S
Considering a surface S having element dS and curve C denotes the curve :
Stokes’ Theorem (連接「線」和「面」的關係)
If there is a vector field A, then the line integral of A taken round C is equal to the surface integral of × A taken over S :
SSC
dSAdSAdrA
Two-dimensional system jiA yx AA
jidr dydx
kn dxdydS
kA
y
A
x
Axy
C S
xyyx dxdy
y
A
x
AdyAdxA )(
PQ
)( dzAdyAdxA zy
Q
P x
Q
P drA
How to make a line to a surface ?
P and Q represent the same point!
SC
dSAdrA
你看到了一個「面」,你要如何去描述?
從「線」著手 從「面」著手
dSnAdSA
Ain Aout
The tubular element is “divergent” in the direction of flow.
uu div The net rate of mass flow from unit volume
Gauss’ Divergence Theorem (連接「面」和「體」的關係)
AA div
We also have : The surface integral of the velocity vector u givesthe net volumetric flow across the surface dSnudSu
dS
udSuThe mass flow rate of a closed surface (volume)
Gauss’ Divergence Theorem (連接「面」和「體」的關係)
Stokes’ Theorem (連接「線」和「面」的關係)
SSC
dSAdSAdrA
dS
AdSA
Useful equations about Hamilton’s operator ...
)()( ABBAABBA
BAABBA
A is to be differentiated
UUU AAAUUU AAA
BAABBA ABBABAABB)A (
BABABA )(
ABABAB )(
BA )(2
1AAAAA2
0U
0
AA
AAA( 2)
valid when the order of differentiation is notimportant in the second mixed derivative
Coordinates other than cartesian
• Spherical polar coordinates (r, , )– Fig 7.15
– the edge of the increment element is general curved.
– If a, b, c are unit vectors defined as point P :
cbarδ sinrrr
ddr 0 rδdr
cba
sin
11
rrr
The gradient of a scalar point function U :
cba
U
r
U
rr
UU
sin
11
A
rA
rAr
rrA r
sin
1)sin(
sin
1)(
1 22
Assuming that the vector A can be resolved into components in terms of a, b, and c :
cbaA AAAr
cba
rr A(rA
rrrA
r
A
r
AA
rA )
1)(sin
sin
1)sin(
sin
1
2
2
2222
22
sin
1sin
sin
11
U
r
U
rr
Ur
rrU
Coordinates other than cartesian
• Cylindrical polar coordinates (r, , z)– Fig 7.17
– the edge of the increment element is general curved.
– If a, b, c are unit vectors defined as point P :
cbarδ zrr
ddr 0 rδdr
cbazrr
1
The gradient of a scalar point function U :
cbaz
UU
rr
UU
1
zr Az
Ar
rArr
A
)(1
)(1
Assuming that the vector A can be resolved into components in terms of a, b, and c :
cbaA zr AAA
cba
rzrz A
r
rA
rr
A
z
A
z
AA
rA
)(11
2
2
2
2
22 11
z
UU
rr
Ur
rrU
How can we use vectors in chemical engineering problems?
Why the Hamilton’s operator is important for chemical engineers?
Considering the study of “fluid flow”, the heating effectdue to friction and mass transfer are ignored :
Newtonian fluid : coefficient of viscosity remains constant Independent variables : x, y, z and timeDependent variables : u, v, w, pressure, density
5 dependent variables 5 equations :
(1) continuity equation (mass balance)(2) equation of state (density and pressure)(3) ~ (5) Newton’s second law of motion to a fluid element (relating external forces, pressure force, viscous forces to the acceleration of fluid element)
0)(
t
u
Fuuuu
21
p
tNavier - Stokes equation
Solve together ?
Stokes’ Approximation (omit the inertia term , Re << 1)
Fuuuu
21
p
tdimensionless form
uuuu 2
2
1
LUp
UtU
L
dimensionless groups
L
Ut2
2
U
p
LU
dimensionless timedimensionless pressure coefficient
Reynolds number
uu 21
p
t0 u
incompressible
uu 221
)(
pt
02 p
not useful, usually u, not p, is given
uu 21
)(
pt ς
ς 2
t
u
vorticity
analogous to the heat and mass transfer equation
The ideal fluid Approximation (omit the viscous and inertia term , Re >> )
Fuuuu
21
p
t
)(2
1AAAAA2
pt
1
2
1uu-u
u 2
t
p
uuuu2
2
1 if steady state and vorticity = 0.
2
1constp 2u
Bernoulli’s equation :(1) laminar flow is steady(2) imcompressible(3) inviscid(4) irrotational
incompressible
t
ς
ςu )(0
0)(
ςuς
t
The vorticity of any fluid element remains constant.
0)(
ςuς
t
if a fluid motion starts from rest, the vorticity is zero and flow is irrotational
0 u
Recall : if the curl of a vector is zero, the vector itself can be expressed as the gradient of a scalar point function (i.e. a potential function).
An inviscid irrotational fluid
u where is the velocity potential
0 u
02
Can only be used in ideal fluid flow
Boundary layer theory (Prandtl)
• Assuming that ideal fluid flow existed everywhere except in a thin layer of fluid near any solid boundary : – within this thin layer, viscous effects are not negligible
– velocity gradient normal to the boundary are quite large
– velocity gradient parallel to the boundary are relatively small
Boundary layer theoryNavier-Stokes equation2 assumptions, they are ...
The thickness of the boundary layer at any point on a surface is small compared with the length of the surface to that point measured along the surface in the direction of flow.
Viscous effects are confined to the boundary layer and ideal fluid flow exists outside it.
flat
Fuuuu
21
p
ttwo dimensional, steady-state
xy
2
2
2
21
y
u
x
u
x
p
y
uv
x
uu
2
2
2
21
y
v
x
v
y
p
y
vv
x
vu
0
y
v
x
ucontinuity equation
0 1
Leave these to the transport phenomena
Heat transport– The rate of flow of heat per unit area at any point is
proportional to the temperature gradient at that point
– The constant of proportionality is the thermal conductivity
– Divergence operator (Q) represents the net flow of heat from unit volume
– The total heat content of unit volume is CpT
Tkt
Q
)()( Qt
TCt p
(conservation law)
Tkt
Q
)()( Qt
TCt p
T
C
k
t
T
p
2
= thermal diffusivity
Mass transport
– The rate of mass transport by diffusion :
– Divergence operator (N) represents the net flow of mass from unit volume
– Similarily
CDt
N
CDt
C 2
N : molar flux density; D : diffusivity ; C : molar concentration
When bulk motion is involved :
CDCt
C 2
u
TC
kT
t
T
p
2
u
Fuuuu
pt
12
Heat transfer (scalar equation)
Mass transfer (scalar equation)
Momentum transfer (vector equation)
They are very similar in vector form, but the momentum transfer is the ONLY vector equation, having two extra terms.