Module

for

Parabolic P.D.E.'s

     

Background for Parabolic Equations

Heat Equation

    
As an example of
parabolic partial differential equations, we consider the one-dimensional heat equation  

        
[Graphics:Images/CrankNicolsonMod_gr_1.gif]    for   0 < x < a   and   0 < t < b.  
    
with the initial condition  

        
   [Graphics:Images/CrankNicolsonMod_gr_2.gif]    for    t = 0   and    [Graphics:Images/CrankNicolsonMod_gr_3.gif].  

and the boundary conditions  

        
[Graphics:Images/CrankNicolsonMod_gr_4.gif]    for   x = 0   and    [Graphics:Images/CrankNicolsonMod_gr_5.gif],   
        
        [Graphics:Images/CrankNicolsonMod_gr_6.gif]    for   x = a   and    [Graphics:Images/CrankNicolsonMod_gr_7.gif].  

The heat equation models the temperature in an insulated rod with ends held at constant temperatures [Graphics:Images/CrankNicolsonMod_gr_8.gif] and [Graphics:Images/CrankNicolsonMod_gr_9.gif] and the initial temperature distribution along the rod being   f(x).  Although analytic solutions to the heat equation can be obtained with Fourier series, we use the problem as a prototype of a parabolic equation for numerical solution.

Proof  Crank-Nicolson Method  Crank-Nicolson Method  

 

Computer Programs  Crank-Nicolson Method  Crank-Nicolson Method  

Program (Forward-Difference method for the heat equation)  To approximate the solution of the heat equation  [Graphics:Images/CrankNicolsonMod_gr_10.gif]  over the rectangle  [Graphics:Images/CrankNicolsonMod_gr_11.gif]  with    [Graphics:Images/CrankNicolsonMod_gr_12.gif],  for  [Graphics:Images/CrankNicolsonMod_gr_13.gif].  and  [Graphics:Images/CrankNicolsonMod_gr_14.gif],  for  [Graphics:Images/CrankNicolsonMod_gr_15.gif].  

[Graphics:Images/CrankNicolsonMod_gr_16.gif]
[Graphics:Images/CrankNicolsonMod_gr_17.gif]

Example 1.  Consider the heat equation where  [Graphics:Images/CrankNicolsonMod_gr_18.gif].   The length of the rod is  [Graphics:Images/CrankNicolsonMod_gr_19.gif].  Assume that the ends of the rod are held at the temperature  [Graphics:Images/CrankNicolsonMod_gr_20.gif].  Assume that the initial temperature distribution is

      [Graphics:Images/CrankNicolsonMod_gr_21.gif].
      
Apply the forward difference method with  [Graphics:Images/CrankNicolsonMod_gr_22.gif]  and  obtain temperature distributions for  [Graphics:Images/CrankNicolsonMod_gr_23.gif].
We will use  [Graphics:Images/CrankNicolsonMod_gr_24.gif] .  This forces  [Graphics:Images/CrankNicolsonMod_gr_25.gif].
Solution 1.

 

Example 2.  Consider the heat equation where  [Graphics:Images/CrankNicolsonMod_gr_43.gif].   The length of the rod is  [Graphics:Images/CrankNicolsonMod_gr_44.gif].  Assume that the ends of the rod are held at the temperature  [Graphics:Images/CrankNicolsonMod_gr_45.gif].  Assume that the initial temperature distribution is

      [Graphics:Images/CrankNicolsonMod_gr_46.gif].
      
Now investigate what happens when the step size is too large.  This time the t interval is larger  [0.0, 0.35], and the step size is "too large."
Apply the forward difference method with  [Graphics:Images/CrankNicolsonMod_gr_47.gif]  and  obtain temperature distributions for  [Graphics:Images/CrankNicolsonMod_gr_48.gif].
We will use  [Graphics:Images/CrankNicolsonMod_gr_49.gif] .  This forces  [Graphics:Images/CrankNicolsonMod_gr_50.gif].
Solution 2.

 

 

Crank-Nicolson Method

    
An implicit scheme, invented b  
John Crank (1916-) and  Phyllis Nicolson (1917-1968), is based on numerical approximations for solutions at the point  [Graphics:Images/CrankNicolsonMod_gr_68.gif] that lies between the rows in the grid.  Specifically, the approximation used for  [Graphics:Images/CrankNicolsonMod_gr_69.gif]  is obtained from the central-difference formula,

            
[Graphics:Images/CrankNicolsonMod_gr_70.gif].

Proof  Crank-Nicolson Method  Crank-Nicolson Method  

 

Computer Programs  Crank-Nicolson Method  Crank-Nicolson Method  

Program (Crank-Nicolson method for the heat equation)  To approximate the solution of the heat equation  [Graphics:Images/CrankNicolsonMod_gr_71.gif]  over the rectangle  [Graphics:Images/CrankNicolsonMod_gr_72.gif]  with    [Graphics:Images/CrankNicolsonMod_gr_73.gif],  for  [Graphics:Images/CrankNicolsonMod_gr_74.gif].  and  [Graphics:Images/CrankNicolsonMod_gr_75.gif],  for  [Graphics:Images/CrankNicolsonMod_gr_76.gif].  

[Graphics:Images/CrankNicolsonMod_gr_77.gif]
[Graphics:Images/CrankNicolsonMod_gr_78.gif]
[Graphics:Images/CrankNicolsonMod_gr_79.gif]
[Graphics:Images/CrankNicolsonMod_gr_80.gif]

Example 3.  Consider the heat equation where  [Graphics:Images/CrankNicolsonMod_gr_81.gif].  The length of the rod is  [Graphics:Images/CrankNicolsonMod_gr_82.gif].  Assume that the ends of the rod are held at the temperature  [Graphics:Images/CrankNicolsonMod_gr_83.gif].  Assume that the initial temperature distribution is

        [Graphics:Images/CrankNicolsonMod_gr_84.gif].
      
Apply the Crank-Nicolson method with  [Graphics:Images/CrankNicolsonMod_gr_85.gif]  and obtain temperature distributions for  [Graphics:Images/CrankNicolsonMod_gr_86.gif].  Compare the solution with the exact solution:

        [Graphics:Images/CrankNicolsonMod_gr_87.gif].
     
We will use  [Graphics:Images/CrankNicolsonMod_gr_88.gif] .  This forces  This forces  [Graphics:Images/CrankNicolsonMod_gr_89.gif].  
Solution 3.

 

Example 4.  Consider the heat equation where  [Graphics:Images/CrankNicolsonMod_gr_108.gif].  The length of the rod is  [Graphics:Images/CrankNicolsonMod_gr_109.gif].  Assume that the ends of the rod are held at the temperature  [Graphics:Images/CrankNicolsonMod_gr_110.gif].  Assume that the initial temperature distribution is

        [Graphics:Images/CrankNicolsonMod_gr_111.gif].
      
Apply the Crank-Nicolson method with  [Graphics:Images/CrankNicolsonMod_gr_112.gif]  and obtain temperature distributions for  [Graphics:Images/CrankNicolsonMod_gr_113.gif].  Compare the solution with the exact solution:

        [Graphics:Images/CrankNicolsonMod_gr_114.gif].
     
(Is the Crank-Nicolson method stable when r > 1 ?)
Solution 4.

 

Research Experience for Undergraduates

Crank-Nicolson Method  Crank-Nicolson Method  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook Parabolic P.D.E.'s

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004