MATLAB_Heat_Equation_Semi_1D Description and Help

MATLAB_Heat_Equation_Semi_1D is a graphical user interface (GUI) that plots solutions to the following one-dimensional semilinear heat equations:

(
|{ ∂∂tu(x,t) = k2∂∂2x2u(x,t) + f(x,t,u(x, t)), - 1 < x < 1,t > 0,

| u(x,0) = u0(x), - 1 < x < 1,
( u(0,t) = u(1,t) = 0,t > 0.
(1)

(               2
|{ ∂∂tu(x,t) = k2∂∂x2u(x,t) + f(x,t,u(x, t)), - 1 < x < 1,t > 0,
  u(x,0) = u (x), - 1 < x < 1,
|( ∂u        0∂u
  ∂x(0,t) = ∂x(1,t) = 0,t > 0.
(2)

(
| ∂-u(x,t) = k2-∂2-u(x,t) + f(x,t,u(x, t)), - 1 < x < 1,t > 0,
{ ∂t           ∂x2
| u(x,0) = u0(x), - 1 < x < 1,
( u(0,t) = u(1,t),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, an initial condition, and a forcing function before clicking the Solve Heat Equation button.


PIC

Figure 1: MATLAB_Heat_Equation_Semi_1D 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) = 0,
u0(x) = 1,
u0(x) sin (πx),
u0(x) = cos (πx) + 1,
u0(x) = e-100x2 ,
u0(x) = {
    1,x ∈ [- 12, 12]

    0, otherwise ,
respectively. The forcing functions in the dropbox menu of the GUI are labeled as f1 and f2. These labels refer to the functions
f1(x,t,u(x,t)) = Ae-bu(x,t)-1
f2(x,t,u(x,t)) = {
    A |cos(t)|sin (u(x,t)), if u(x,t) > 0

    0,otherwise
where A is a nonzero real number.

Once all inputs have been specified, click the Solve Heat Equation to input the forcing function parameters.


PIC

Figure 2: Input forcing function parameters.


Once the forcing function parameters have been specified the GUI will display a movie of the solution.


PIC

Figure 3: Movie of solution.


The movie will play twice before outputting a surface plot of the solution.


PIC

Figure 4: A surface plot in t and x of the solution.


To explore continuous dependence using the GUI one must first solve the heat equation with a particular model parameters. 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) = (1 - δ)u0(x)
where δ is small and nonnegative. In the pop-up box δ is referred to as the perturbation size.

PIC

Figure 5: 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 6: Norm Difference between original and perturbed solution.