化工應用數學 授課教師: 郭修伯 Lecture 6 Functions and definite integrals Vectors Chapter 5 Functions and definite integrals There are many functions arising in engineering which cannot be integrated.

Download Report

Transcript 化工應用數學 授課教師: 郭修伯 Lecture 6 Functions and definite integrals Vectors Chapter 5 Functions and definite integrals There are many functions arising in engineering which cannot be integrated.

化工應用數學
授課教師: 郭修伯
Lecture 6
Functions and definite integrals
Vectors
Chapter 5
Functions and definite integrals
There are many functions arising in engineering which cannot be
integrated analytically in terms of elementary functions. The values
of many integrals have been tabulated, much numerical work can be
avoided 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:
2

e
z2
erf x 
erf x
2


x
0
e
z2
dz
Proof in next slide
0 x
z
erf   1
z: dummy variable
R
I  e
 x2
0
I 
2
R
0
R
dx   e
0

R
0
e
( x 2  y 2 )
 y2
dy
x and y are two independent Cartesian coordinates
dxdy
in polar coordinates
I 
2
R
0
1

2
0

e
r 2
Error between the volume determined by x-y and r-
rdr d  
The volume of  has a base area which is
less than 1/2R2 and a maximum height of e-R2
1 2 R2
 Re
2
1
1 R2
2
I    e  
4
4
1
R  , I  
4
2
erf x 
2


x
0
e  z dz
2
erf   1
More about error function
erf x 
2
 
x
0
e
z2
dz
d
2  x2
Differentiation of the error function:
erf x 
e
dx

Integration of the error function:
 erf xdx  x erf x   x
 x erf x 
1

e
 x2
2

e
 x2
dx  C
C
The above equation is tabulated under the symbol “ ierf x”
with C  
1

(Therefore, ierf 0 = 0)
Another related function is the complementary error function “erfc x”
erfc x  1  erf x 
2



x
e
z2
dz
The gamma function

(n)   t n1e t dt
0
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.)

(n)   t n 1e t dt

0

n 1 t 
0
 t e

 (n  1)  t n 2e t dt
0
repeat
(n)  (n  1)(n  2)...(2)(1)(1)
 (n  1)!
 (n  1)(n  1)
The gamma function is thus a generalized factorial, for positive integer
values of n, the gamma function can be replaced by a factorial.
(Fig. 5.3 pp. 147)
More about the gamma function
2

 1   1  x
 1    2 t
t

x
    x e 2 xdx  2 e  x dx
    t e dt
0
dt  2 xdx  2  0
2 0
1
2
2
1
    erf   
2
 1

Evaluate  3 
 2
 1
 3 
 2
(n)  (n  1)(n  1) 5  1 
5 3 1 1 5 3 1
15
 2         
 

2  2 2 2 2 2 2 2 2
8
Chapter 7
Vector analysis
It has been shown that a complex number consisted of a real part and
an imaginary part. One symbol was used to represent a combination
of two other symbols. It is much quicker to manipulate a single symbol
than 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) Tensors
The principal difference between tensors and matrices is the labelling and
ordering of the many distinct parts.
Tensors
z  x  iy  z1  iz2
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 than
one subscript, thus zmn is a tensor of second rank (i.e. m, n) .
The symbolism for the general tensor consists of a main symbol such
as z with any number of associated indices. Each index is allowed to
take any integer value up to the chosen dimensions of the system. The
number 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:
Tmn
T11 T12
 T21 T22
T31 T32
T13 
T23 
T33 
The physical interpretation of the stress tensor
y
z
Tmn
 p xx

  yx
  zx

 xy
p yy
 zy
 xz 

 yz 
p zz 
xz
xy
pxx
x
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 straight
line passing through the end points of A and B.
A
B
C  B  m( B  A)
C
C  (m  1) B  mA
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 taken
by using a set of cartesian coordinates in the following manner:
Using x to measure M, y to measure H and z to measure C
C
Any process stream can be represented by a vector:
OM  M1i  H1 j  C1k
A second stream can be represented by:
ON  M 2i  H 2 j  C2 k
M
H
Using vector addition,
OR  OM  ON  (M1  M 2 )i  ( H1  H 2 ) j  (C1  C2 )k
Thus, OR with represents of the sum of the two streams must be a constant
vector 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)
The constant line OR cross the plane x = 1 at point P
point A is :
point B is :
point P is :
 H 1 C1 
1,

,
 M1 M1 
 H 2 C2 
1,

,
 M2 M2 
 H1  H 2 C1  C2 
1,

,
 M1  M 2 M1  M 2 
z
R
M
A
P
B
O
x
N
y
Multiplication of vectors
• Two different interactions (what’s the difference?)
– Scalar or dot product :
A  B | A || B | cos  B  A
• 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°
A

B
– Vector or cross product :
A  B | A || B | sin  n
• 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
A B  B  A
• 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 :
L  rF
• if A  B = 0
– The vector A is zero
– The vector B is zero
–  = 0°
A

B
Commutative law :
A B  B  A
A B  B  A
Distribution law :
A  (B  C)  A  B  A  C
A (B  C)  A B  A C
Associative law :
A  BC  D  ( A  B)(C  D)
A  BC  ( A  B)C
A  B  C  ( A  B)  C
A  ( B  C )  ( A  B)  C
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.
i  j  j  k  k i  0
i i  j  j  k  k 1
A  Ax i  Ay j  Az k
B  Bx i  B y j  Bz k
ii  j  j  k  k  0
i j  k
A  B  Ax Bx  Ay B y  Az Bz
i
j
k
jk  i
k i  j
A  B  Ax
Bx
Ay
By
Az
Bz
A B C
Scalar triple product
The magnitude of A  B  C is the volume of the parallelepiped with edges parallel to
A, B, and C.
AB
C
B
A
A  B  C  A  B  C  B  C  A  B  C  A  C  A  B  [ A, B, C ]
Vector triple product
A B  C
The vector A  B is perpendicular to the plane of A and B. When the further vector
product with C is taken, the resulting vector must be perpendicular to A  B and
hence in the plane of A and B :
( A  B)  C  mA nB
where m and n are scalar constants to be determined.
C  ( A  B)  C  mC A  nC  B  0
m  C  B
n  C  A
( A  B)  C   (C  B) A  (C  A) B
Since this equation is valid
for any vectors A, B, and C
Let A = i, B = C = j:
  1
( A  B)  C  ( A  C ) B  ( B  C ) A
A  ( B  C )  ( A  C ) B  ( A  B)C
AB
C
B
A
Differentiation of vectors
If a vector r is a function of a scalar variable t, then when t varies by an
increment t, r will vary by an increment  r.
 r is a variable associated with r but it needs not have either the
same magnitude of direction as r :
 r dr
lim 
t  0  t
dt
r  xi  yj  zk
dr dx
dy
dz

i
j k
dt dt
dt
dt
d
dB dA
( A  B)  A

B
dt
dt dt
d
dB d A
( A  B)  A 

B
dt
dt dt
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 process
can be performed with respect to s thus:
dr dx
dy
dz
 i
j k
ds ds
ds
ds
|
dr
dx
dy
dz
| ( ) 2  ( ) 2  ( ) 2
ds
ds
ds
ds
(dx) 2  (dy) 2  (dz) 2

1
ds
dr
is a unit vector in the direction of the tangent to the curve
ds
dr
d 2r
is perpendicular to the tangent
.
2
ds
ds
d 2r
ds2
The direction of
is the normal to the curve, and the two vectors defined
as the tangent and normal define what is called the “osculating plane” of the curve.
Partial differentiation of vectors
• Temperature is a scalar quantity which can
depend in general upon three coordinates
defining position and a fourth independent
variable time.
–
–
T
x
T
x
is a “partial derivative”.
is the temperature gradient in the x direction
and is a vector quantity.
T
– t is a scalar rate of change.
Scalar field and vector field
• 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.
Hamilton’s operator
It has been shown that the three partial derivatives of the temperature
were vector gradients. If these three vector components are added
together, there results a single vector gradient:
i
T
T
T
j
k
 T
x
y
z
應用於 scalar 的偏微
which defines the operator  for determining the complete vector
gradient 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.
More about the Hamilton’s operator ...
i



 j k
x
y
z
 T
T
T 

dr  T  dr  i
j
k
y
z 
 x
(vector) · (vector)
 T
T
T 

dr  T  idx  jdy  kdz   i
j
k
y
z 
 x
T
T
T

dx 
dy 
dz
x
y
z
dr  T  dT
T 
dT
dr
But  T is the vector equilvalent
of the generalized gradient
Physical meaning of T :
A variable position vector r to describe an isothermal surface :
T ( x, y, z )  C
dT  0
dr  T  dT  0
Since dr lies on the isothermal plane…
and
if A·B = 0
The vector A is zero
The vector B is zero
 = 90°
Thus, T must be perpendicular to dr.
T
Since dr lies in any direction on the plane,
T must be perpendicular to the tangent plane at r.
T is a vector in the direction of the most rapid change of T,
and its magnitude is equal to this rate of change.
dr
The operator  is of vector form, a scalar product can be obtained as :
 


應用於 vector 的偏微
  A   i  j  k   ( Ax i  Ay j  Az k )
y
z 
 x
Ax Ay Az



A  B  Ax Bx  Ay By  Az Bz
x
y
z
application
The equation of continuity :




( u )  ( v)  ( w) 
 0 where  is the density and u is the velocity vector.
x
y
z
t
  ( u ) 

0
t
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, counting
vectors into the volume as negative, and vectors out of the volume as positive.
Ain
Aout
 A  0
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” :
Divergence of a vector
  A  div A
Another form of the vector product :
i

 A 
x
Ax
j

y
Ay
k

z
Az
i
j
k
A  B  Ax
Ay
Az
Bx
By
Bz
is the “curl” of a vector ;   A  curl A
What is its physical meaning?
Assume a two-dimensional fluid element
u
B
u
y
y
y
v
v
v
x
x
i

u 
x
u
j

y
v
k
 v u 
0  k   
 x y 
0
u
O
x
A
Regarded as the angular velocity of OA, direction : k
u
Thus, the angular velocity of OA is k v ; similarily, the angular velocity of OB is  k
y
x
The angular velocityu of the fluid element is the average of the two angular velocities :
u
B
u
y
y
y
v
v
v
x
x
u
O
x
A
1  v u 
  k
2  x y 

  u  2 k
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.
i

u 
x
u
j

y
v
k
 v u 
0  k   
 x y 
0
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 variable
position vector r such that its end point sweeps out the curve between P and Q
Q
dr
r
P
A vector A can be integrated between two fixed points along the curve r :

Q
P
Q
A  dr   ( Ax dx  Ay dy  Az dz)
P
Scalar product
If the integration depends on P and Q but not upon the path r :
A  dr  d    dr
 ( A   )  dr  0
if A·B = 0
The vector A is zero
The vector B is zero
 = 90°
A    0
A    0
If a vector field A can be expressed as the gradient of a scalar field , the line integral
of the vector A between any two points P and Q is independent of the path taken.
If  is a single-valued function :

 Ax              Ay 
y
y  x  x  y  x
and
 Ay Ax 

k  0

y 
 x
 A  0
假如與從P到Q的路徑無關,則有兩個性質:
A  
 A  0
Q
Example : W  F  dr

P
Work, force and displacement
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 defined
as the displacement times the component of force opposing the displacement :
W  F  r
The total work done in moving the particle from P to Q is the sum of the increments
along the path. As the increments tends to zero:
Q
W   F  dr
P
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 :
F  W
A  
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 field
electric potential function ………………………………………..electrostatic force field
magnetic potential function……………………………………….magnetic force field
Surface : a vector by referece to its boundary
area : the maximum projected area of the element
direction : normal to this plane of projection (right-hand screw rule)
dS  ndS
The surface integral is then :
 A  dS   A  ndS
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 flow
across the surface.
Volume : a scalar by referece to its boundary
C
B
A
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
Considering a surface S having element dS and curve C denotes the curve :
S
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 :
 A  dr     A  dS     AdS
C
S
Two-dimensional system
S
A  Axi  Ay j
 Ay Ax 
k
  A  

y 
 x
dr  dxi  dyj
ndS  dxdyk
 Ay Ax 
C ( Ax dx  Ay dy)  S  x  y dxdy
你看到了一個「面」,你要如何去描述?
從「線」著手
從「面」著手
 A  dS   A  ndS
How to make a line to a surface ?
P and Q represent the same point!

Q
P
Q
A  dr   ( Ax dx  Ay dy  Az dz)
P
 A  dr     A  dS
C
P
Q
S
Gauss’ Divergence Theorem (連接「面」和「體」的關係)
Ain
Aout
  A  div A
The tubular element is “divergent” in the direction of flow.
  u  div u
The net rate of mass flow from unit volume
We also have : The surface integral of the velocity vector u gives
the net volumetric flow across the surface
The mass flow rate of a closed surface (volume)
 u  dS   u  ndS
 u  dS     ud
S
Stokes’ Theorem (連接「線」和「面」的關係)
 A  dr     A  dS     AdS
C
S
S
Gauss’ Divergence Theorem (連接「面」和「體」的關係)
 A  dS     Ad
S
Useful equations about Hamilton’s operator ...
 UA  U  A  A  U
  UA  U  A  A  U
  AB  B  A  A B
  (A  B)  B  A  A  B  A  B  B  A
A  (  B)  A  B  A  B
B  (  A)  B  A  B  A
A is to be differentiated
A  B  B  A  A  B
AB
 A  B  B  A  A  (  B)  B  (  A)
  (  A)    A   2 A
  A    A  0
  U  0
1
A 2  A  A  A  (  A)
2
valid when the order of differentiation is not
important 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 :
δ r  ra  rb  r sin c
dr    d
dr  δ r  0

1 
1

  a
b
c
r
r 
r sin  
The gradient of a scalar point function U :
U
1 U
1 U
U 
a
b
c
r
r 
r sin  
Assuming that the vector A can be resolved into components in terms of a, b, and c :
A  Ar a  A b  A c
 A 
1  2
1

1

(
r
A
)

(
A
sin

)

A
r

2
r r
r sin  
r sin  
 A 
1
r sin 

A 
1
(
A
sin

)

a

  
 r sin 




 Ar
 1 

Ar 

sin

(
rA
)
b

(rA
)

c
 

 


r
 

 r  r
2
1


U
1


U
1

U




 2U  2  r 2

sin





r r  r  r 2 sin   
  r 2 sin 2   2
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 :
δ r  ra  rb  zc
dr    d

dr  δ r  0

1 

a
b c
r
r 
z
The gradient of a scalar point function U :
U 
U
1 U
U
a
b
c
r
r 
z
Assuming that the vector A can be resolved into components in terms of a, b, and c :
A  Ar a  A b  Azc
 A 
1 
1 

(rAr ) 
( A )  Az
r r
r 
z
 1 Az A   Ar Az  1  (rA ) Ar 
 A  

a

b 

c



z   z r 
r  r
 
 r 
2
2
1


U
1

U

U


 2U 
r




r r  r  r 2  2 z 2
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 effect
due to friction and mass transfer are ignored :
Newtonian fluid
Independent variables
Dependent variables
: coefficient of viscosity remains constant
: x, y, z and time
: u, v, w, pressure, density
5 dependent variables  5 equations :
  ( u ) 

0
t
(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)
u
1
 u  u   p   2u  F Navier - Stokes equation
t

Solve together ?
Stokes’ Approximation (omit the inertia term , Re << 1)
u
1
 u  u   p   2u  F
t

L u
1
 2
 u  u  

p

 u
2
U t
U
LU
dimensionless groups
dimensionless form
Ut
L
LU
2p
U 2

dimensionless time
Reynolds number
dimensionless pressure coefficient
incompressible
u
1
  p   2u
t



1 2
(  u)    p   2  u   u  0
t

not useful, usually u, not p, is given


1
(  u)     p   2  u
t

2 p  0
u  
vorticity
ς
  ς2
t
analogous to the heat and mass transfer equation
The ideal fluid Approximation (omit the viscous and inertia term , Re >> )
u
1
 u  u   p   2u  F
t

incompressible
1
A 2  A  A  A  (  A)
2
u  1
1

  u 2  - u    u    p
t  2


1 2 p
u if steady state and vorticity = 0
 u    u    u 

t
2

0    (u ς ) 
ς
t
ς
 (u  ς )  0
t
The vorticity of any fluid element remains constant.
1 2
u  p  const .
2
Bernoulli’s equation :
(1) laminar flow is steady
(2) imcompressible
(3) inviscid
(4) irrotational
ς
 (u  ς )  0
t
if a fluid motion starts from rest, the vorticity is zero and flow is irrotational
 u  0
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
 u  0
2  0
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
Navier-Stokes equation
2 assumptions, they are ...
Boundary layer theory
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.
flat
Viscous effects are confined to the boundary layer and ideal fluid flow exists outside
it.
u
1
 u  u   p   2u  F
t

u
u
1 p   2u  2u 
u v

   2  2 
x
y
 x  x y 
v
v
1 p   2v  2v 
u v  
   2  2 
x
y
 y  x y 
u v

0
continuity equation
x y
two dimensional, steady-state
Leave these to the transport phenomena

0
y
1
x
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
Q
t
  kT
– Divergence operator (Q) represents the net flow of
heat from unit volume
– The total heat content of unit volume is  CpT


 ( C pT )  (  Q)
t
t
Q
  kT
t




( C pT )  (  Q)
t
t
(conservation law)
T
k

 2T
t C p
= thermal diffusivity
Mass transport
– The rate of mass transport by diffusion :
N
  DC
t
N : molar flux density; D : diffusivity ; C : molar concentration
– Divergence operator (N) represents the net flow of
mass from unit volume
– Similarily
C
 D 2 C
t
When bulk motion is involved :
T
k
 u  T 
 2T
t
C p
Heat transfer (scalar equation)
C
 u  C  D 2C
t
Mass transfer (scalar equation)
u
1
2
 u  u   u  p  F
t

Momentum transfer (vector equation)
They are very similar in vector form, but the momentum transfer is the ONLY
vector equation, having two extra terms.