MATLAB_Wave_Equation_Damp_Non_1D Description and Help

MATLAB_Wave_Equation_Damp_Non_1D is a graphical user interface (GUI) that plots solutions to the following one-dimensional damped non homogeneous wave equations:

(
|{ ∂∂2t2u (x,t) + α ∂∂tu(x,t) - c2 ∂∂2x2-u(x,t) = 0, - 1 < x <  1,t > 0,
                 ∂u
| u(x,0) = u0(x), ∂t(x, 0)              = u1(x ), - 1 < x <  1,
( u(- 1,t) = u (1, t)                     = 0,t > 0.
(1)

(  2                         2
|{ ∂∂t2u (x,t) + α ∂∂tu(x,t) - c2 ∂∂x2-u(x,t) = 0, - 1 < x <  1,t > 0,
  u(x,0) = u (x), ∂u (x, 0)             = u (x ), - 1 < x <  1,
|( ∂u        0 ∂u  ∂t                      1
  ∂x(- 1,t) = ∂x(1,t)                  = 0,t > 0.
(2)

(
| ∂2u (x,t) + α ∂-u(x,t) - c2 ∂2-u(x,t) = 0, - 1 < x <  1,t > 0,
{ ∂t2           ∂t∂u         ∂x2
| u(x,0) = u0(x),-∂t(x, 0)              = u1(x ), - 1 < x <  1,
( u(- 1,t)                              = u(1,t),t > 0.
(3)

In addition, the GUI investigates continuous dependence.

To use the GUI, specify a propagation constant, a dampening constant, a final time to plot solutions, a boundary condition, and the initial conditions, before clicking the Solve Wave Equation button.


PIC

Figure 1: MATLAB_Wave_Equation_Damp_Non_1D GUI


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

u0(x) = 0,
u0(x) sin (πx),
u0(x) = cos (πx) + cos (4πx),
u0(x) = e-40x2 ,
u0(x) = {            1 1
    1,x ∈ [- 2,2]
    0, otherwise ,
respectively. Where as the initial velocities in the dropbox menu of the GUI are labeled as 0, 1, sine, cosine, and exponential. These correspond to
u1(x) = 0,
u1(x) = 1,
u1(x) sin (πx),
u1(x) = cos (πx) + cos (4πx) + 1,
u1(x) = e-40x2 .
The forcing functions in the dropbox menu of the GUI are labeled as f1, f2, f3, f4, and f5. These labels refer to the functions
f1(x,t) = A,whereA≠0,
f2(x,t) = Ax + Bt,whereA,B≠0,
f3(x,t) = cos (ωt),whereω > 0,
f4(x,t) = e-at,wherea > 0,
f5(x,t) = {
  A,  - 1 ≤ x ≤  1,t > 0
        2        2
  0   otherwise .
Once all inputs have been specified, click the Solve Wave Equation button 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 damped and undamped solution.


PIC

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


The movie will play twice before outputting a surface plot of both solutions.


PIC

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


To explore continuous dependence using the GUI one must first solve the wave equation with a particular propagation constant and initial conditions. 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

uŻ0 (x ) = (1 - δ)u0(x ), Żu1(x) = (1 - δ )u1 (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.