Skip to main content

Second-order scheme, linear kinematic wave

Short answer

Central differences in time and space about the cell centre give a second-order accurate scheme. Solving yields the unknown discharge at (i+1,n+1): Q_{i+1}^{n+1} = Q_i^n + [(1-C)/(1+C)](Q_{i+1}^n – Q_i^{n+1}) + [2C Δx/(1+C)] q̄, where C = c Δt/Δx and q̄ is the average lateral inflow over the cell.

Derive a second order accurate finite difference scheme of the linear kinematic wave equation which computes discharge for unknown time and location.

Linear kinematic wave equation

∂Q∂t+c ∂Q∂x=c q\frac{\partial Q}{\partial t}+c\,\frac{\partial Q}{\partial x}=c\,q

where c=dQ/dAc=dQ/dA is taken as constant over the step and qq is the lateral inflow per unit length (zero if none). To get second-order accuracy, the derivatives are centred at the middle of the cell (i+12, n+12)(i+\tfrac12,\ n+\tfrac12) using all four corner points.

 t
 n+1 :  (i,n+1) o-------o (i+1,n+1)  <- unknown
                |   *   |
 n   :  (i,n)   o-------o (i+1,n)
              i         i+1       --> x

Central differences about the cell centre

∂Q∂t∣i+12n+12≈(Qin+1−Qin)+(Qi+1n+1−Qi+1n)2Δt,∂Q∂x∣i+12n+12≈(Qi+1n+1−Qin+1)+(Qi+1n−Qin)2Δx\left.\frac{\partial Q}{\partial t}\right|_{i+\frac12}^{n+\frac12}\approx\frac{(Q_i^{n+1}-Q_i^n)+(Q_{i+1}^{n+1}-Q_{i+1}^n)}{2\Delta t},\qquad \left.\frac{\partial Q}{\partial x}\right|_{i+\frac12}^{n+\frac12}\approx\frac{(Q_{i+1}^{n+1}-Q_i^{n+1})+(Q_{i+1}^n-Q_i^n)}{2\Delta x}

Expanding each of the four values in a Taylor series about the centre, the first-derivative terms are retained and all second-derivative terms cancel, so the truncation errors are O(Δt2)O(\Delta t^2) and O(Δx2)O(\Delta x^2). The lateral inflow is also averaged:

q≈qˉ=14(qin+qi+1n+qin+1+qi+1n+1)q\approx\bar q=\tfrac14\left(q_i^n+q_{i+1}^n+q_i^{n+1}+q_{i+1}^{n+1}\right)

Finite difference equation

Qin+1+Qi+1n+1−Qin−Qi+1n2Δt+c Qi+1n+1+Qi+1n−Qin+1−Qin2Δx=c qˉ\frac{Q_i^{n+1}+Q_{i+1}^{n+1}-Q_i^n-Q_{i+1}^n}{2\Delta t}+c\,\frac{Q_{i+1}^{n+1}+Q_{i+1}^n-Q_i^{n+1}-Q_i^n}{2\Delta x}=c\,\bar q

Multiply by 2Δt2\Delta t and let C=cΔt/ΔxC=c\Delta t/\Delta x:

(1+C) Qi+1n+1=(1+C) Qin+(1−C)(Qi+1n−Qin+1)+2c Δt qˉ(1+C)\,Q_{i+1}^{n+1}=(1+C)\,Q_i^n+(1-C)\left(Q_{i+1}^n-Q_i^{n+1}\right)+2c\,\Delta t\,\bar q

Result: discharge at the unknown time and location

 Qi+1n+1=Qin+1−C1+C(Qi+1n−Qin+1)+2C Δx1+C qˉ \boxed{\,Q_{i+1}^{n+1}=Q_i^n+\frac{1-C}{1+C}\left(Q_{i+1}^n-Q_i^{n+1}\right)+\frac{2C\,\Delta x}{1+C}\,\bar q\,}

where the last term is for lateral inflow. Check of the coefficient: 2cΔtqˉ/(1+C)=2CΔxqˉ/(1+C)2c\Delta t\bar q/(1+C)=2C\Delta x\bar q/(1+C).

Remarks

  • QinQ_i^n, Qi+1nQ_{i+1}^n are known from the previous time level and Qin+1Q_i^{n+1} from the upstream boundary (or the previous point), so Qi+1n+1Q_{i+1}^{n+1} follows directly: march downstream along ii for each time step.
  • Stability: the scheme is unconditionally stable. Accuracy is best for C≈1C\approx1; for C≫1C\gg1 or C≪1C\ll1 it can show numerical oscillations (dispersion).
  • If C=1C=1, the formula gives Qi+1n+1=QinQ_{i+1}^{n+1}=Q_i^n (exact translation of the wave).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computational Techniques in Civil Engineering chapter 5 questions →