1D Wave Equations


By ignoring viscosity and heat conduction, which are less important in numerical computations, the resulting equations are the Euler equations which are based in Navier-Stokes equations in an ideal flow.

As numerical schemes should behave correctly with small perturbations, instead of working with a generic flow U\mathbf U, we will be working with a perturbation u\mathbf u' of a base flow U0\mathbf U_0 that is stationary and homogeneous. Therefore:

U=U0+u\mathbf U=\mathbf U_0+\mathbf u'

Then, if the scheme works for u\mathbf u', it will work for a generic flow U\mathbf U.

The 1D linearized Euler equations can be de split into 3 equations of characteristic variables with the following form:

ut+cux=0\frac{\partial u}{\partial t}+c\frac{\partial u}{\partial x}=0

Contents

Analysis

Linear wave equation with constant c>0c>0 (propagation speed):

ut+cux=0\frac{\partial u}{\partial t}+c\frac{\partial u}{\partial x}=0

Boundary conditions:

  • Non-periodic (general): u0=u0(t)u_0=u_0(t)
  • Periodic: u(0)=u(L)u(0)=u(L)

For periodic boundary conditions, solutions are plain waves.1 Using Fourier analysis:

u=k=u^k(t)eikxu=\sum_{k=-\infty}^\infty\hat u_k(t)e^{\iu kx}
  • i=1\iu=\sqrt{-1}
  • k=2π/lk=2\pi/l: Number of waves, with ll the length of the wave

Hypothesis:

  • Variable separation: Solution can be split into the product of a spatial and a temporal part
  • Linearity: Superposition, u=u^k(t)eikx+conditionsu=\hat u_k(t)e^{\iu kx}+\text{conditions}

Note that u^k(t)eikx\hat u_k(t)e^{\iu kx} is the boundary condition of u^k(t)eikx\hat u_{-k}(t)e^{-\iu kx}. Therefore, the wave equation:

eikx ⁣du^k(t) ⁣dt=icku^k(t)eikx\cancel{e^{\iu kx}}\frac{\dd\hat u_k(t)}{\dd t}=-\iu ck\hat u_k(t)\cancel{e^{\iu kx}}

Which results into an initial value problem:

 ⁣du^k(t) ⁣dt=λu^k(t);λ=ick;\boxed{\frac{\dd \hat u_k(t)}{\dd t}=\lambda\hat u_k(t)\quad;\quad\lambda=-\iu ck\quad;\quad}
  • λ\lambda: Eigenvalue of the Jacobian when linearized
  • u^k\hat u_k: Fourier mode
  • u^k(t=0)=u^k,0\hat u_k(t=0)=\hat u_{k,0}: Initial condition

Integrations

The equation can be easily integrated, obtaining:

u^k(t)=u^k(t=0)eλt=u^k(t=0)eickt\hat u_k(t)=\hat u_k(t=0)e^{\lambda t}=\hat u_k(t=0)e^{-\iu ckt}

The analytical amplification factor (gain) GG is defined as:

G=u(t+Δt)u(t)=u(t+Δt)u(t)eiΦa\boxed{G=\frac{u(t+\Delta t)}{u(t)}= \left| \frac{u(t+\Delta t)}{u(t)} \right|e^{\iu\Phi_a}\\}
  • u=u^ku=\hat u_k here, as the difference will cancel out
  • Φa\Phi_a: Analytical phase

When using numerical integration for the time:

G=un+1un=un+1uneiΦn\boxed{G=\frac{u^{n+1}}{u_n}=\left| \frac{u^{n+1}}{u^n} \right|e^{\iu\Phi_n}}

Using solutions like u^k(t)=u^k(t=0)eλt\hat u_k(t)=\hat u_k(t=0)e^{\lambda t} in analytical integration:

G=eλ(t+Δt)eλt=eλΔt\boxed{G=\frac{e^{\lambda(t+\Delta t)}}{e^{\lambda t}}=e^{\lambda\Delta t}}
  • In general, λ=λR+iλI\lambda=\lambda_R+\iu\lambda_I, therefore G=eλRΔteiλIδtG=e^{\lambda_R\Delta t}e^{\iu\lambda_I\delta t}
  • The modulus is therefore G=eλRΔt|G|=e^{\lambda_R\Delta t}
  • Integration is stable when G1|G|\le1

Computational Variables

  • k^=kΔx\hat k=k\Delta x: Non-dimensional wave number
    • k^=2πΔx/l=2π/Npoints per wave lengh\hat k=2\pi\Delta x/l=2\pi/N_{\text{points per wave lengh}}
    • k^0\hat k\rightarrow0: Low frequency waves. Correctly computed
    • k^π\hat k\rightarrow\pi: high frequency waves. Wrong computation (G>1G>1)
    • Refining effect: Keeping kk constant, finer discretizations gives better results: Δxk^\Delta x\propto\hat k
  • CFL=cΔt/Δx\mathrm{CFL}=c\Delta t/\Delta x: Courant-Friedrich-Lewy number
λΔt=ickΔt=iCFLk^\boxed{\lambda\Delta t=-\iu ck\Delta t=-\iu\mathrm{CFL}\hat k}

Dispersion Relation

In some problems, perturbations depend on time harmonically : u^k(t)=u^k0eiωt\hat u_k(t)=\hat u_k^0e^{\iu\omega t}.

  • ω=2π/T\omega=2\pi/T: Angular frequency
  • TT: Temporal period of the perturbation

Introducing this solution into PVI:

 ⁣du^k(t) ⁣dt=λu^k(t)iωuk0eiωt=λuk0eiωtiωλ=0\frac{\dd\hat u_k(t)}{\dd t}=\lambda\hat u_k(t)\quad \rightarrow \quad \iu\omega\cancel{u_k^0e^{\iu\omega t}}=\lambda\cancel{u_k^0e^{\iu\omega t}} \quad\rightarrow\quad \iu\omega-\lambda=0

With λ=ick\lambda=-\iu ck, then the dispersion relation is:

iω+ick=0ω+ck=0\iu\omega+\iu ck=0\quad \rightarrow \quad\omega+ck=0
  • For a harmonic perturbation ω\omega, as cc is constant, the wave is excited with k=ω/ck=-\omega/c

Linear Wave Equation with Dissipation

The equation:

ut+cux=ν2ux2\frac{\partial u}{\partial t}+c\frac{\partial u}{\partial x}=\nu\frac{\partial^2u}{\partial x^2}
  • Initial conditions: u(x,0)=uI(x)u(x,0)=u_I(x)
  • Contour conditions:
    • u(0,t)=u0(t)u(0,t)=u_0(t) for all xx
    • u(L,t)=uL(t)u(L,t)=u_L(t) for all tt

Supposing solutions like u(x,t)=u^k(t)eikxu(x,t)=\hat u_k(t)e^{\iu kx} and:

 ⁣du^k ⁣dt=λu^k(t)\frac{\dd\hat u_k}{\dd t}=\lambda\hat u_k(t)

Where λ=ickνk2\lambda=-\iu ck-\nu k^2. As λR=νk2\lambda_R=-\nu k^2 results in G<1|G|<1, the solution is damped by viscosity.

Integrating the equation gives:

u^k(t)=u^k(t=0)eλt=u^k(t=0)e(ickνk2)t\hat u_k(t)=\hat u_k(t=0)e^{\lambda t}=\hat u_k(t=0)e^{(-\iu ck-\nu k^2)t}

As u(x,t)=u^k(t)eikxu(x,t)=\hat u_k(t)e^{\iu kx} and u^k(t)=u^k(t=0)eλt\hat u_k(t)=\hat u_k(t=0)e^{\lambda t}:

u(x,t)=u^k(t=0)eik(xiλt/k)u(x,t)=\hat u_k(t=0)e^{\iu k(x-\iu\lambda t/k)}

Separating by parts:

u(x,t)=u^k(t=0)eik(x+λIt/k)eλRtu(x,t)=\hat u_k(t=0)e^{\iu k(x+\lambda_I t/k)}e^{\lambda_Rt}

In this case, the dispersion relation is:

iω+ick+νk2=0\iu\omega+\iu ck+\nu k^2=0

Numerical Resolution

Method of lines for a generic internal node jj:

 ⁣duj ⁣dt=cuxj\frac{\dd u_j}{\dd t}=-c \left. \frac{\partial u}{\partial x} \right|_j

Central Discretization without Viscosity

Given the central discretization:

 ⁣duj ⁣dt=c2Δx(uj+1uj1)\frac{\dd u_j}{\dd t}=-\frac{c}{2\Delta x}(u_{j+1}-u_{j-1})

Using Fourier:

  • uj=u^k(t)eikxju_j=\hat u_k(t)e^{\iu kx_j}
  • uj1=u^k(t)eikxj1=u^k(t)eikxjikΔx=u^k(t)eikxjeik^u_{j-1}=\hat u_k(t)e^{\iu kx_{j-1}}=\hat u_k(t)e^{\iu kx_j-\iu k\Delta x}=\hat u_k(t)e^{\iu kx_j}e^{-\iu\hat k}
  • uj+1=u^k(t)eikxj+1=u^k(t)eikxj+ikΔx=u^k(t)eikxjeik^u_{j+1}=\hat u_k(t)e^{\iu kx_{j+1}}=\hat u_k(t)e^{\iu kx_j+\iu k\Delta x}=\hat u_k(t)e^{\iu kx_j}e^{\iu\hat k}

Injecting into the previous equation and cancel out eikxje^{\iu kx_j}:

 ⁣du^k ⁣dt=c2Δx(eik^eik^)u^k\frac{\dd \hat u_k}{\dd t}=-\frac{c}{2\Delta x} \left( e^{\iu\hat k}-e^{-\iu\hat k} \right)\hat u_k

As eik^eik^=2isin(k^)e^{\iu\hat k}-e^{\iu\hat k}=2\iu\sin(\hat k):

 ⁣du^k ⁣dt=icΔxsin(k^)u^k=λu^k\frac{\dd\hat u_k}{\dd t}=-\iu\frac{c}{\Delta x}\sin(\hat k)\hat u_k=\lambda\hat u_k

The new eigenvalue λ=icsin(k^)/Δx\lambda=-\iu c\sin(\hat k)/\Delta x is the same as analytical value for k^1\hat k\ll1, not for k^=π\hat k=\pi, which are not damped.

The phase velocity vf=λI/kv_f=-\lambda_I/k is then:

vf=csin(k^)k^{cif k^10if k^=πv_f=\frac{c\sin(\hat k)}{\hat k} \begin{cases} c&\text{if }\hat k\ll1\\ 0&\text{if }\hat k=\pi \end{cases}

High frequency waves are therefore, wrongly computed.

Central Discretization with Artificial Viscosity

We will be using artificial viscosity to damp high frequency waves, keeping the low frequency waves intact:

ut+cux=μxcΔx2ux2\frac{\partial u}{\partial t}+c\frac{\partial u}{\partial x}=\mu_x|c|\Delta x\frac{\partial^2 u}{\partial x^2}

The above equations results in, after using method of lines:

 ⁣du^k ⁣dt=[icΔxsin(k^)2μ2cΔx(1cos(k^))]u^k=λu^k\frac{\dd\hat u_k}{\dd t}= \left[ -\iu\frac{c}{\Delta x}\sin(\hat k)-\frac{2\mu_2c}{\Delta x}(1-\cos(\hat k)) \right]\hat u_k=\lambda\hat u_k

That is:

Δtλ=iCFLsin(k^)2μ2CFL(1cos(k^))\boxed{\Delta t\lambda=-\iu\mathrm{CFL}\sin(\hat k)-2\mu_2\mathrm{CFL}(1-\cos(\hat k))}

Where the maximum damping is at k^=π\hat k=\pi.

Footnotes

  1. Von Neumann analysis of wave equation