MATH 3500: The Wave Equation.

A different PDE that’s often seen in mathematical physics is the wave equation, which is given by

This relates the acceleration of an elastic surface to the curvature: if the surface is bending downwards (as at a peak), it accelerates downwards, while if it is bending upwards (as in a valley), it accelerates upwards.

This equation governs vibrations, for instead in a audio speaker. We are going to look at some solutions to the equation. The first thing we do is define the shape of the speaker membrane.

Ω=Disk[];

RegionPlot[Ω]

We then define the wave equation as a differential operator (basically a combination of partials) by moving everything to the left hand side:

c=1;

op=D[u[t,x,y],{t,2}]-(c^2)(D[u[t,x,y],{x,2}]+D[u[t,x,y],{y,2}]);

Now we’ll assume that the membrane is supported at the edge of the domain so it can’t move. These are called Dirichlet boundary conditions.

(Subscript[Γ, D])=DirichletCondition[u[t,x,y]==0,True];

Finally, we’ll set up some initial conditions. We assume that the initial position of the membrane is

ic=u[0,x,y]==Exp[-5((x-0.2)^2+y^2)];

and that it’s stationary at time 0:

dic=Derivative[1,0,0][u][0,x,y]==0;

Now we can solve the equation numerically:

ufunWave=NDSolveValue[{op==0,ic,dic,(Subscript[Γ, D])},u,{t,0,3.π},{x,y}∈Ω]

Finally, we can make an animation of the wave:

frames=Table[Plot3D[ufunWave[t,x,y],{x,y}∈ufunWave["ElementMesh"],PlotRange->{-1,1},ImageSize->Large],{t,0,((130.π)/50),((130π)/50)(1/300.0)}];
ListAnimate[frames,SaveDefinitions->True]

The next equation we consider is the heat equation:

This equation models the transfer of heat within a medium of thermal conductivity . We set the boundary conditions to model an initial distribution of temperature given by  in a bar of length 1 with both ends held at the ambient temperature of 0:

ufun=NDSolveValue[
{D[u[x,t],{t,1}]-0.05D[u[x,t],{x,2}]==0,
u[x,0]==Sin[5π x],
 u[0,t]==0,
u[1,t]==0},
u,{x,0,1},{t,0,1}];
Plot3D[ufun[x,t],{x,0,1},{t,0,1},PlotRange->Full]

We could also view this as an animation:

Animate[Plot[ufun[x,t],{x,0,1},PlotRange->{{0,1},{-1,1}}],{t,0,1}]