11.2. von Neumann analysis of the wave equation
The one-dimensional wave equation (equation (2.18)), repeated here is :
\[\frac{\partial^2 \eta}{\partial t^2}=c^2\frac{\partial^2 \eta}{\partial x^2}\]
, where \(\eta\) is the fluid surface, \(c=\sqrt{gH}\), \(g\sim9.81\text{ms}^-1\) is the gravitational constant and \(H\) is the depth of the fluid.
The CTCS scheme for the wave equation can be found using the centered formula (Eq. (3.23)) for the second derivative on either side of the equation and reordering the expression:
(11.11)\[\eta_m^{n+1}=2\eta_m^{n}-\eta_m^{n-1}+r^2(n_{m+1}^n-2n_{m}^n+n_{m-1}^n)\]
Substituting a solution like (4.6),\(\eta_m^n\sim B^ne^{ikm\Delta x}\), in (11.11), we have:
\[\begin{split}\begin{aligned}
B^{n+1} e^{ikm\Delta π₯}&=2π΅^π e^{ikm\Delta π₯} βB^{nβ1} π^{ikm\Delta x}+π^2 (B^n e^{ik(m+1)\Delta x}β2B^n e^{ikm\Delta x}+B^n e^{ik(mβ1)\Delta x}) \quad \text{:Divide by }$e^{ikm\Delta x}\\ 
B^{n+1}&=2B^πβB^{nβ1}+r^2 B^n e^{ik\Delta π₯}β2r^2 B^n+r^2 B^n π^{βik\Delta x} \qquad \text{:Factorize} \\
B^{n+1}&=2(1βr^2)B^nβB^{nβ1}+r^2 B^n \underbrace{(e^{ik\Delta x}+e^{βik\Delta x})}_{2cos(k\Delta x)}\\
B^{n+1}&=2(1βπ^2)B^nβB^{nβ1}+2r^2 B^n cos(k\Delta x) \qquad \text{:Factorize}\\
B^{n+1}&=2\left (1β2π^2 \left (\frac{1βcosβ‘(πΞπ₯)}{2}\right )\right )B^nβB^{nβ1}
\qquad \text{Use: } sin^2\frac{\theta}{2}=\frac{1-cos\theta}{2}\\
B^{n+1}&=2(\underbrace{1β2π^2sin^2\frac{k\Delta x}{2}}_{\gamma})B^nβB^{nβ1} \\
B^{n+1}&=2\gamma B^nβB^{nβ1}             
\end{aligned}\end{split}\]
This expression contains three timesteps of \(B\). To solve from here, we could use a recurrence matrix, or we can check for specific timesteps. The condition \(|\frac{B^{n+1}}{B^n}|<1\) only holds if it holds for any three concurrent timesteps. We can test the conditions with, e.g., inserting \(n=1\), which yields:
\[ \begin{align}\begin{aligned}\begin{aligned}
B^2&=2\gamma B-B^0\\B^2-2\gamma B+1&=0\\B_{1,2}&=\gamma\pm\sqrt{\gamma^2-1}
\end{aligned}\end{aligned}\end{align} \]
We must have \(|B_{1,2}|<1\). If \(\gamma >1\), \(B_1\) willl also be \(>1\). We must, therefore, require \(|\gamma|\le1\).
\[\begin{split}\begin{aligned}
|\gamma|&=\left|1β2π^2π ππ^2\frac{πΞπ₯}{2}\right|\le1\\
-1&\le1β2π^2π ππ^2\frac{πΞπ₯}{2}\le1 \qquad:\text{Subtract 1 everywhere}\\
-2&\leβ2π^2π ππ^2\frac{πΞπ₯}{2}\le0
\end{aligned}\end{split}\]
The right inequality always holds. We must look more closely at the left inequality. Dividing by \(-2\) and flipping the inequality, we have:
\[\begin{split}\begin{aligned}
1&\geπ^2π ππ^2\frac{πΞπ₯}{2}\\
π^2π ππ^2\frac{πΞπ₯}{2}&\le1
\end{aligned}\end{split}\]
Since the sine squared is always positive and \(\le1\), we must have \(π^2β€1\):
\[r^2=\frac{c^2\Delta t^2}{\Delta x^2}\le1\]
which yields \(r=\frac{c\Delta t}{\Delta x}\le1\). We, therefore, end up with the same CFL criterion as for the advection equation.