My arbitrary order FEM code (found here) was used to solve the Wave Equation with dissipation:

$$ \frac{\partial^2 u}{\partial t^2} + a \frac{\partial u}{\partial t} = c \nabla^2 u \,, $$

where \(u\) is the \(z\) displacement of the wave. \( a\) controls the dissipation of the wave over time and \(c\) controls the wave propogation speed. The second derivative in time was handled with a finite difference scheme:

$$ \frac{\partial^2 u}{\partial t^2} \approx \frac{u_{i+1} – 2u_i + u_{i-1}}{\Delta t^2} \,. $$

Standard time integration procedures can now be applied.

In the video below, the second order Crank-Nicholson method and a fourth order FEM discretizations were used for space and time, respectively. The video shows the relaxation of the initial sinusoidal perturbation over time in an L shaped domain.