Partial Differential Equations

advertisement
BIEN 501
Physiological Modeling
Partial Differential Equations
January 17, 2006
Review of Partial Differential Equations
Partial differential equations arise whenever the function to be found varies with more than one
independent variable. In fluid mechanics, solid mechanics, heat transfer and mass transfer, the
variables of interest (velocity, stress, temperature, and concentration, respectively) will vary with
three spatial dimensions and with time. Take, for example, a one-dimensional time-dependent
mass transfer problem. The concentration, cx, t  depends on both x , the spatial dimension,
and t , time. The differential equation is written in terms of partial derivatives (  ) as opposed to
total derivatives ( d ). The operator  x means that the derivative with respect to x is taken
while all other variables are held constant.
Partial Differentiation:
If a variable, such as concentration, depends on both space and time, one must evaluate the
total derivative to find a rate of change. If x and t are the variables of interest, then the total
derivative is:
dc x, t  c x, t  c x, t  t


dx
x
t x
Eq. 1
The rounded operator (  ) is a necessary element of this equation and cannot be substituted for
the straight operator ( d ), which would otherwise mean ”the rate of change of cx, t  along a
given pathway.” The second term on the right hand side of Equation 1 cannot be evaluated until
the pathway is described. Thus, the curved operator (  ) is used to denote that the derivative is
to be taken with respect to the variable x while the variable t is held constant.
To gain physical insight into the concept of partial differentiation, consider the temperature T to
which a particle is exposed as it moves in the x-direction. Assume that the ambient temperature
changes with both the x position and time, as in Figure 1. The electric field changes along the
x-direction, but also changes with time, so that T  T x, t  . One wishes to find the rate at which
the temperature surrounding the particle changes as the particle moves through a path
x p  x p t  .
T
x
Figure 1: A particle moving through a one dimensional temperature field.
BIEN 501
Physiological Modeling
Partial Differential Equations
January 17, 2006
As a specific example, let the temperature field increase linearly with x and sinusoidally in time
so that T x, t   ax sin  t  . Let the particle move with constant velocity v in the x direction, so
that x p  v t . The correct expression for the rate of change of temperature is:
dT x p t , t 
dt

T x p t , t 
t

T x p t , t  x p
x p
t
Eq. 2
 a x p cos t   av sin  t 
The first term on the right hand side is the rate of change of temperature at a given point x p
caused by the changing temperature field. The second term is the rate of change in
temperature that occurs because the particle moves along the x direction and temperature
increases with x . To demonstrate clearly that the second term is necessary, consider what
happens when there is no change in the temperature field with time, i.e. T x, t   ax . The
partial derivative of this field with respect to t is zero, so the first term on the right hand side of
Eq. 2 is zero. However, there must be a change in temperature because the particle is moving
into a region of higher T as x increases. The rate of that change is the second term on the
right hand side of Eq. 2, which becomes:
T x p t , t  x p
x
t
 a v  .
As expected, the temperature changes at a rate proportional to the velocity of the particle.
A sample partial differential equation for mass transfer is:
cx, t 
 2 c  x, t 
D
t
x 2
Eq. 3
Solutions to Partial Differential Equations:
To solve an ordinary differential equation, one seeks specific functions, such as sin t  or r n
that satisfy the equation. In contrast, solutions to partial differential equations are determined by
the argument of the functional form. For example, in Equation 3, any function whose argument
is   x 2 2 Dt  is a solution to the equation since, regardless of the form for f   ,
 2 x

1 x2

;

2
x Dt
t
D t
so
4x2
2 x  2 f  
f   f   
 x 2 f   f   









f

;
;


f




 f 
x 2
D 2t 2
x
 x
Dt
t
 t
Dt 2
cx, t 
 2 c  x, t 
D
t
x 2
Eq. 4
BIEN 501
Physiological Modeling
Partial Differential Equations
January 17, 2006
The first objective in solving a partial differential equation is to find a way to convert the partial
derivatives to total derivatives, which means that the derivatives must operate on a function of a
single variable only. In this course, three methods will be used for solving partial differential
equations. These are:
1. Separation of Variables
2. Transform Methods
3. Similarity Solutions
In all three cases, the ultimate goal is to reduce the partial differential equation to one or more
ordinary differential equations. The choice as to which method to use depends more on the
boundary conditions of the problem than on the form of the partial differential equation.
Separation of Variables:
For separation of variables, the function to be found is written as a product of two or more
functions, each of which depends on only one variable. Thus, if one seeks the solution for a
velocity vr,  ,   , where v is a velocity component, one writes that vr,  ,    Rr    .
This assumption is restrictive in that many functions cannot be written in this form. For
example, while the function vr,  ,    r 2 cos  sin  is in such a form (with Rr   r 2 ,
   cos , and    sin  ), a function such as vr, ,    r sin   cos  cannot be
written in such a manner.
Exercise 1: Which of the following forms is not separable?
a. f x, y   xy
b. f x, y  
xy
c. f x, y  
x y
e. f r,    e r 
f. f r, l ,    r 2 sin    

  
g. f r, z,    r 2 1  z 2 sin  3
h. f r, z,    r 2  zr cos 
d. f r,    e r
Exercise 2: For each of the separable forms in Exercise 1, what are the separated functions?
(Example: for f x, y   x y , the separated functions are X x   x and Y  y   y 1 ).
If a solution to a partial differential equation is separable, then the boundary conditions must be
separable.
To illustrate the method of separation of variables, the following equation will be considered:
2 f 
2 f 2 f

0
x 2 y 2
Eq. 3
with the boundary conditions:
→
f 0, y   0
f 1, y   g  y 
f  x, 0   0
f  x, 1  0
Eq. 4
BIEN 501
Physiological Modeling
Partial Differential Equations
January 17, 2006
→
→
→
The function g  y  will not yet be specified, but in general it is given an explicit form in the
statement of the problem. The boundary conditions are separable. The substitution
f x, y   X x Y  y  is made in the differential equation so that:
 2 X x Y  y   2 X x Y  y 
 f 

0
x 2
y 2
2
Since Y  y  is not a function of x , it can be treated as a constant with respect to the derivative
in x . Similarly, since X x  is not a function of y , it can be treated as a constant with respect
to the derivative in y . Therefore:
2 f  Y  y 
 2 X x 
 2Y  y 
 2 X x 
 2Y  y 
.







X
x

0

Y
y


X
x
x 2
y 2
x 2
y 2
Next, the equation is divided by the product X x Y  y  to yield.
1  2 X x 
 1  2Y  y 
.

X x  dx 2
Y  y  y 2
The left hand side of this equation is a function of x only, and the right hand side of the
equation is a function of y only. But if the left hand side changes as x changes, it is not
possible for the right hand side to change because it does not vary with x . Similarly, it is not
possible for the left hand side to change as the right hand side changes with y . Thus, the only
way the two sides can be equal is if they are both independent of x and y . They must
therefore be equal to some constant k . It follows that:
1  2 X x 
k
X  x  x 2
 1  2Y  y 
1  2Y  y 

k
,
or
 k
Y  y  y 2
Y  y  y 2
In addition, since the functions X x  and Y  y  are functions of x only and y only,
respectively, it is now possible to replace the partial derivative with an ordinary derivative so
that:
BIEN 501
Physiological Modeling
1 d 2 X x 
k
X  x  dx 2
1 d 2Y  y 
 k
Y  y  dy 2
Partial Differential Equations
January 17, 2006
.
Each equation can now be multiplied by X x  or Y  y  , as appropriate and the two ordinary
differential equations to be solved are:
d 2 X x 
 kX x   0
dx 2
.
d 2Y  y 
 kY  y   0
dy 2
The solution to the equation in x is
 
X x   Ax cosh k x  Bx sinh
 k x ,
and the solution to the equation in y is
 
Y  y   Ay cos k y  B y sin
 k y .
The boundary conditions at x  0 and y  0 require that Ax  Ay  0 . Furthermore, the
boundary condition for y  1 requires that B y sin
 k   0 , so that
k  n , where n is any
integer value from   to   . These are the eigenvalues of the equation. With these
eigenvalues,
f n x, y   X x Y  y   Bx sinh nx B y sin ny   Cn sinh nx  sin ny  ,
where the two constants B x and B y have been combined into the single constant Cn . The
subscript n in f n  x, y  designates that this is the solution corresponding to a specific
eigenvalue n .
Now the boundary condition for x  1 must be satisfied. In the simplest case, where g  y  has
the form A sin my  (with some specified constants A and m ), the solution is readily obtained
with C  A and n  m . It is not likely, however, that we will be lucky enough to enjoy this
result. Therefore, we must consider the more general case of an arbitrary g  y  . Note that
g  y  must satisfy the boundary conditions at x  0 and x  1 or else it will not be a valid
boundary condition for this problem.
Through the process of separation of variables, we have found a family of solutions to the
differential equations. Because the differential equation is linear, any linear combination of
these solutions is also a solution to the equation. Specifically, we can write:
BIEN 501
Physiological Modeling
f  x, y  
Partial Differential Equations
January 17, 2006


 f  x, y    C
n  
n
n  
n
sinh nx  sin ny  .
This is then evaluated at x  1 , using the last boundary condition to evaluate the coefficients
Cn . The following equation is obtained:
gy 

C
n  
n
sinh n  sin ny  .

  sin  n x  sin  m x  dx  0

if m  n
 if m  n
Students who are familiar with the techniques used to derive Fourier series will immediately
recognize the method required to determine the value of Cn for a given value of n . First,
multiply the equation by sin my  . Then integrate both sides from   to  . One obtains:



g  y  sin my  dy  



C
n  
n
sinh n  sin ny  sin my  dy .
The integral and summation on the right hand side can be interchanged, and since Cn sinh n 
is independent of y ,



g  y  sin my  dy 

C
n  

n
sinh n  sin ny  sin my  dy

But the sine wave is an orthogonal function so that the integral is zero unless m  n , in which
case it has the value of  . Therefore:

1
g  y  sin  n y  dy  Cn .
 sinh  n  
If we substitute this result back into the functional form for f  x, y  , we find that
f  x, y  


n 

1


   sinh  n    g  y  sin  n y  dy  sinh  n x  sin  n y 


Exercise 3: Evaluate the coefficients Cn for the case in which g  y  has a triangular shape at
x  1 (i.e. it is zero at y  0 and y  1 and has a maximum at y  0.5 ).
Transform Methods:
BIEN 501
Physiological Modeling
Partial Differential Equations
January 17, 2006
The invocation of Fourier series at the end of the above discussion suggests that the various
transforms may be valuable in solving partial differential equations. In illustration of the
transform method, a solution to equations 3 and 4 will be sought with via the Fourier transform
method.
First, one chooses the variable to be transformed, and then the differential equation and
boundary conditions are transformed with respect to that variable. In this case, the variable y
will be transformed. The differential equation becomes:
 2 F  x,  
  2 F  x,    0
2
x
Eq. 5
where F x,   is the Fourier transform of f x, y  with respect to y . The boundary conditions
become:
F 0,    0
F 1,    G  
f  x, 0  0
Eq. 6
f  x, 1  0
The solution to equation 5 is immediately recognized as:
F x,    Az   cosi x   Bx   sin i x 
Eq. 7
Again, the first boundary condition leads to Ax    0 . The second boundary condition leads
to:
F 1,    Bx   sin i   G  ,
so that:
Bx   
G  
.
sin i 
This result and Equation 7 combine to yield:
F  x,   
G  
sin i x  .
sin i 
It follows that f x, y  is the inverse Fouirer transform of the equation above.
BIEN 501
Physiological Modeling
f  x, y  
2
Partial Differential Equations
January 17, 2006
G  
sin i x  e i  y d .
  sin i 


Once this inverse Fourier transform is evaluated, the boundary conditions for y  0 and y  1
can be applied.
Note that other transform methods can be used in place of the Fourier transform. The most
obvious of these is the Laplace transform. However, transforms can be based on any group of
functions that are orthogonal to one another. The Fourier transform is based on sines and
cosines, whereas the Laplace transforms are based on exponentials. Other types of transforms
include Legendre transformes (based on the orthgonality of the Legendre polynomials), and
Fourier Bessel transforms (based on the orthogonality of the Bessel functions).
Similarity Solutions:
Similaritiy solutions are sometimes referred to as “Combination of Variables.” One seeks to
combine the variables in the problem in such a way that the solution depends only on that
combination. Similarity solutions are often useful in mass transfer problems, and can also be
used in many nonlinear problems. The example to be used here is the differential equation
c
 2c
 D 2  0,
t
x
with the boundary conditions:
cx,0  0
c0, t   C0
c, t   0
First, we seek a reasonable combination of the governing parameter D and the independent
variables x and t . Because the units of D are cm2/s, the combination   x Dt is non
dimensional. Next, we must write the differential equation in terms of  . We make use of the
following relationships:
c c  c   x 
x
c




12 32 
12 32
t  t   2 D t 
2 D t 
c c  c  1 




x  x   Dt 
1 c
Dt 
BIEN 501
Physiological Modeling
Partial Differential Equations
January 17, 2006
 2 c   c    1 c 
c
1   c 
1  1  2c  1  2c


.



0








2
2
 
x 2 x  x  x  Dt  

Dt x   
Dt  Dt   Dt 
With these substitutions, the differential equation becomes:

x
2 D1 2 t 3 2
 1  2c 
c
0
 D
2 

 Dt  
This can be divided by  x 2 D1 2 t 3 2 to yield:
c 2 Dt  2 c

 0.

x  2
The combination x
Dt can now be replaced with  to give:
c 2  2 c

 0.
   2
This form of the equation depends on  only. Thus, the partial differential equation has been
converted to the ordinary differential equation:
d 2 c  dc

 0.
d 2 2 d
This equation can be solved by seeking a solution for   dc d . The equation is rewritten as:
d 
  0
d 2
which is separated as:
d



2
d .
Thus:
ln    14  2  C1 .
So:

 2
dc
 exp  14  2  C1   Ce 4 ,
d
1
Eq. 8
BIEN 501
Physiological Modeling
Partial Differential Equations
January 17, 2006
C
where C  e 1 . The concentration becomes:

c     Ce
0
1
 2
4
d  C0 .
The boundary condition at x  0 means that c   C0 for   0 and t  0 . Hence, the limits
of the integration and the constant C 0 were selected to satisfy this condition.
This integral is the well-known error function and cannot be evaluated in closed form. However,
the error function is easy to calculate numerically. The lower limit is taken as  since we know
that for    the concentration must go to zero (because x is large and/or because t  0 ).
Download