Scientific Computing

This module illustrates fully discrete finite difference methods for
numerically solving the heat equation. The heat equation (also called
the diffusion equation) in one space dimension is the partial
differential equation *u*_{t} = *c*
*u*_{xx}*u*(*t*, *x*)*t* and the spatial variable *x*, and subscripts
indicate partial differentiation with respect to the given independent
variable. The equation is defined for any *x* in a given interval
*a*, *b*]*t*. The
initial condition is given by *u*(0, *x*) =
*f*(*x*)*f*, and
boundary conditions are given by *u*(*t*, *a*) =
*α**u*(*t*, *b*) =
*β**α**β**c* =
1*α* = 0*β* =
0

The user begins by selecting an initial function from the menu
provided. The initial function, represented by a truncated Fourier
sine series approximation, is plotted on a predetermined interval
*a*, *b*]*u*(0, *a*)
= *u*(0, *b*) = 0

To view the numerical solution, the user chooses between
two-dimensional and three-dimensional display modes and then clicks
*Start*. The approximate solution is advanced time step by time
step, and the plot of the solution is updated accordingly. In
two-dimensional display mode, the solution at the current time is
plotted as a curve on the spatial interval *a*,
*b*]*Stop*. When the solution
process is stopped before reaching the final time, it can be resumed by
again clicking *Start*. Clicking *Reset* halts any solution
that may be in progress and redisplays the initial condition, allowing
the user to select a different initial condition, a different solution
method, or different step sizes.

**Reference:** Michael T. Heath, *Scientific Computing,
An Introductory Survey*, 2nd edition, McGraw-Hill, New York,
2002. See Section 11.2.2, especially Example 11.2 and Figure 11.5.

**Developers:** Evan VanderZee and Michael Heath