MATLAB_Wave_Equation_Non_2D Description and Help

MATLAB_Wave_Equation_Non_2D is a graphical user interface (GUI) that plots solutions to the following nonhomogeneous two-dimensional wave equations:

(                 (                        )
|| ∂22u(x,y,t) = c2  ∂2u2(x,y,t) + ∂2u2(x, y,t) +  f(x,y,t), - 1 < x < 1, - 1 < y <  1,t > 0,
||{ ∂t                ∂x∂u         ∂y
  u(x,y,0 ) = u0 (x,y),∂t(x,y, 0) = u1(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)

(                 (                        )
|| ∂22u(x,y,t) = c2  ∂2u2(x,y,t) + ∂2u2(x, y,t) +  f(x,y,t), - 1 < x < 1, - 1 < y <  1,t > 0,
||{ ∂t                ∂x           ∂y
  u(x,y,0 ) = u0 (x,y), ∂∂ut(x,y, 0) = u1(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)

( ∂2              ( ∂2u          ∂2u        )
||| ∂t2u(x,y,t) = c2  ∂x2(x,y,t) + ∂y2(x, y,t) +  f(x,y,t), - 1 < x < 1, - 1 < y <  1,t > 0,
|{                     ∂u
  u(x,y,0 ) = u0 (x,y),∂t(x,y, 0) = u1(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 propagation constant, a final time to plot solutions, a boundary condition, initial conditions, and forcing function before clicking the Solve Wave Equation button.


PIC

Figure 1: MATLAB_Wave_Equation_Non_2D 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,y) = 0,
u0(x,y) sin (πx) sin (2πy),
u0(x,y) = cos (2πx) + cos (3πy) + 1,
u0(x,y) = e-40(x2+y2),
u0(x,y) = {            1 1             1 1
    1,x ∈ [- 2,2] and y ∈ [- 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,y) = 0,
u1(x,y) = 1,
u1(x,y) sin (πx) sin (2πy),
u1(x,y) = cos (2πx) + cos (3πy) + 1,
u1(x,y) = e-40(x2+y2).
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,y,t) = A,A≠0,
f2(x,y,t) = A(x + y) + Bt,A,B≠0,
f3(x,t) = cos (ωt),ω > 0,
f4(x,y,t) = e-at,wherea > 0,
f5(x,y,t) = {
  A,   - 1≤  x ≤ 1, - 1 ≤ y ≤  1,t > 0
         2       2    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 solution twice.


PIC

Figure 3: 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 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

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

PIC

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