04: Numerical PDE

8.1


Consider the 1D wave equation \[\frac{\partial^2{u}}{\partial{t^2}} = v^2 \frac{\partial^2{u}}{\partial{x^2}}\]
(a) Write down the straightforward finite-difference approximation.
(b) What order approximation is this in time and in space?
(c) Use the von Neumann stability criterion to find the mode amplitudes.
(d) Use this to find a condition on the velocity, timestep, and space step for stability (hint: consider the product of the two amplitude solutions).
(e) Do different modes decay at different rates for the stable case?
(f) Numerically solve the wave equation for the evolution from an initial condition with u = 0 except for one nonzero node, and verify the stability criterion.



(a)

The equation is solved by any function of the form \[u = f(x\pm vt)\] \[\frac{\partial^2{u}}{\partial{t^2}} \sim \frac{u_j^{n+1}-u_j^n-(u_j^n-u_j^{n-1})}{\Delta t^2} = \frac{u_j^{n+1}-2n_j^n+u_j^{n-1}}{\Delta t^2}\] \[\frac{\partial^2{u}}{\partial{x^2}} \sim \frac{u_{j+1}^n-u_j^n-(u_j^n-u_{j-1}^n)}{\Delta x^2} = \frac{u_{j+1}^n-2u_j^n+u_{j-1}^n}{\Delta x^2}\] \[u_j^{n+1} = (\frac{v\Delta t}{\Delta x})^2 (u_{j+1}^n-2u_j^n+n_{j-1}^n)+2n_j^n-n_j^{n-1}\]

(c)

Let's plug the linear mode \(u_j^n = A(k)^n e^{ijk\Delta x}\) into the equation. \[A^{n+1}e^{ijk\Delta x} = (\frac{v\Delta t}{\Delta x})^2(A^{n}e^{i(j+1)k\Delta x}-2A^{n}e^{ijk\Delta x}+A^{n}e^{i(j-1)k\Delta x}) + 2A^ne^{ijk\Delta x}-A^{n-1}e^{ijk\Delta x}\] \[A^2 - (\frac{v\Delta t}{\Delta x})^2 (e^{ik\Delta x}+e^{-ik\Delta x}-2)A - 2A +1 = 0\] \[A^2 -2\{(\frac{v\Delta t}{\Delta x})^2(\cos k\Delta x -1)+1\}A+1 = 0\] Using quadratic formula, we get \[ A = b \pm \sqrt{b^2-1},\] where \(b = 1-(\dfrac{v\Delta t}{\Delta x})^2(1-\cos k\Delta x)\)

(d)

Product of the two amplitude solutions are \[(b+\sqrt{b^2-1})(b-\sqrt{b^2-1})=1\]



(g) If the equation is replaced by \[\frac{\partial^2{u}}{\partial{t^2}} = v^2 \frac{\partial^2{u}}{\partial{x^2}} + \gamma \frac{\partial}{\partial{t}}\frac{\partial^2{u}}{\partial{x^2}} \] assume that \[u(x,t) = Ae^{i(kx-\omega t)}\] and find a relationship between \(k\) and \(\omega\), and simplify it for small \(\gamma\). Comment on the relationship to the preceding quesiton.


\[A \omega^2 e^{i(kx-\omega t)} = Av^2k^2e^{i(kx-\omega t)}-iA\gamma\omega k^2e^{i(kx-\omega t)}\]