Homework 8: Solution of a Transient Conduction Problem

Convert your steady state conduction program  to a fully explicit (forward) difference method solving the transient conduction problem with the following specific conditions:

Boundary conditions, bar dimensions and heat source are the same as for previous steady state homeworks.
Test your program by temporarily setting the surface heat transfer coefficients to zero.  The temperatures on the grid should all have the same value at each time step, and the time history should follow a simple linear heatup, predictable from an analytic solution.  Provide me with your analytic solution for the heatup, and a plotted or tabulated comparison of the computer and analytic solutions between zero and 5 seconds..

For the time steps discussed below, run the program on a simple case with a 3x3 mesh for a 5 second transient. At the end of each time step calculate the difference between the steady state temperature for your mesh, and the current transient temperature in each volume.   Provide me with time history plots of the maximum  value for ABS( Tss - T) and the value of Tss - T  for the central volume in your mesh. Make separate plots for the two computed quantities, but for each quantity put curves for all four time step sizes on the same plot. Set the limits on your temperature (y-axis) to run from -10K through 300K.  Set the limits on your time axis to be 0 through 5 seconds.  The highest time step case will go off-scale.  This is a good check on your program.  If temperatures calculated during the transient don't all approach the steady state value very closely by 5 seconds, and the method is stable, you've got problems.

Take a simple stability limit of Dt < 1/(2*a*(1/Dx**2+1/Dy**2), where "a" is the thermal diffusivity.

Make transient runs for the 3x3 mesh with four different time steps: one at the stability limit for the method; one with time step a factor of 10 lower than the stability limit; one 20% higher than the stability limit; and one double the stability limit.  Plot the maximum temperature difference vs. time for all runs on the same graph. 

Make runs and plots for a case with a 9x9 mesh and time steps at and 5% above the stability limit.

Stability is influenced by boundary conditions.  The more cells in a mesh, the less boundary conditions can have a stabilizing influence.

Want a feeling for the downside of explicit methods?  Put CPU timing  into your program, rerun the calculation with a 99x99 mesh at the stability limit, and go find something else to do for a while.  Whether or not you make this calculation give me an estimate of the factor that I've increased the computer time over that needed for the 9x9 mesh running at the stability limit.  Explain your estimate.

Don't make this homework unnecessarily difficult.  By understanding the algebraic relationship between the explicit transient problem and the steady state problem that you've already solved, you will be able to reuse (with minor modifications) the matrix coefficients and right hand side terms that you've already created .

Having problems with a bug?  Before contacting me, take a look at my answers for the first three steps when the time step size is 0.04.

  time 4.000000000000000E-002
    t(1,1)    330.000000000000
    t(2,1)    330.000000000000
    t(3,1)    330.000000000000
    t(1,2)    330.000000000000
    t(2,2)    330.000000000000
    t(3,2)    330.000000000000
    t(1,3)    330.000000000000
    t(2,3)    330.000000000000
    t(3,3)    330.000000000000

 time 8.000000000000000E-002
    t(1,1)    354.739510489510
    t(2,1)    359.643356643357
    t(3,1)    354.739510489510
    t(1,2)    355.096153846154
    t(2,2)    360.000000000000
    t(3,2)    355.096153846154
    t(1,3)    354.739510489510
    t(2,3)    359.643356643357
    t(3,3)    354.739510489510

 time 0.120000000000000
    t(1,1)    377.589368132305
    t(2,1)    384.248568307130
    t(3,1)    377.589368132305
    t(1,2)    378.528839059979
    t(2,2)    385.304634178322
    t(3,2)    378.528839059978
    t(1,3)    377.589368132305
    t(2,3)    384.248568307130
    t(3,3)    377.589368132305