MATLAB_Heat_Equation_2D Description and Help

MATLAB_Heat_Equation_2D is a graphical user interface (GUI) that plots solutions to the following two-dimensional heat equations:

(                ( 2            2        )
||| ∂∂ut(x,y, t) = k2  ∂∂xu2(x,y, t) + ∂∂yu2(x,y,t)  , - 1 < x < 1, - 1 < y < 1,t > 0,
|{
  u(x,y,0 ) = u0 (x,y), - 1 < x < 1, - 1 < y < 1,
||| u(x,0,t) = 0 = u (x, 1,t), - 1 < x <  1,t > 0,
|(
  u(0,y,t) = 0 = u(1,y, t), - 1 < y < 1, t > 0,
(1)

(                (                       )
|| ∂u(x,y, t) = k2  ∂2u2(x,y, t) + ∂2u2(x,y,t)  , - 1 < x < 1, - 1 < y < 1,t > 0,
||{ ∂t              ∂x           ∂y
  u(x,y,0 ) = u0 (x,y), - 1 < x < 1, - 1 < y < 1,
|| ∂u(x,0,t)=  0 = ∂u(x,1,t), - 1 < x < 1,t > 0,
||( ∂u∂(y0,y,t)       ∂u∂(y1,y,t)
  --∂x---=  0 = --∂x---, - 1 < y < 1,t > 0,
(2)

( ∂u             (∂2u          ∂2u       )
||| ∂t(x,y, t) = k2  ∂x2(x,y, t) + ∂y2(x,y,t)  , - 1 < x < 1, - 1 < y < 1,t > 0,
|{
  u(x,y,0 ) = u0 (x,y), - 1 < x < 1, - 1 < y < 1,                              .
||| u(x,0,t) = u(x, 1,t), - 1 < x <  1,t > 0,
|( u(0,y,t) = u(1,y,t), - 1 < y < 1,t > 0
(3)

In addition, the GUI investigates continuous dependence.

To use the GUI, specify a diffusivity constant, a final time to plot solutions, a boundary codition, and an initial condition, before clicking the Solve Heat Equation button.


PIC

Figure 1: MATLAB_Heat_Equation_2D GUI


The initial conditions in the dropbox menu of the GUI are labeled as 0, 1, sine, cosine, exponential and step function. These correspond to

u0(x,y) = 0,
u0(x,y) = 1,
u0(x,y) sin (πx) sin (πy),
u0(x,y) = cos (πx) + cos (πy) + 1,
u0(x,y) = e-40(x2+y2),
u0(x,y) = {
    1,x ∈ [- 12, 12] and y ∈ [- 12, 12]

    0, otherwise ,
respectively. Once all inputs have been specified, click the Solve Heat Equation button to display a movie of the solution.

PIC

Figure 2: A screenshot of the movie that displays the solution.


The movie will play twice before outputting a plot of the solution at the final time.

To explore continuous dependence using the GUI one must first solve the heat equation with a particular diffusivity constant and initial condition. Once a solution has been constructed, click the Perturb Parameters and Solve button. Pop-up boxes will appear to specify the perturbed model parameters and/or initial conditions. The GUI assumes the perturbed initial condition is of the form

Żu0(x,y) = (1 - δ)u0(x,y)
where δ is small and nonnegative. In the pop-up box δ is referred to as the Perturbation size.

PIC

Figure 3: Input perturbed parameters


Once completed, the GUI will display the norm difference between the original solution and the perturbed solution. Depending on your choice of norm(s), potentially several plots will appear on the same axis.


PIC

Figure 4: Norm Difference between original and perturbed solution.