Skip to main content

Saint-Venant, second-order explicit scheme

Short answer

Using leapfrog central differences, continuity: y_i^(n+1)=y_i^(n-1)−(Δt/(BΔx))(Q_{i+1}^n−Q_{i-1}^n)+2Δt q_i^n/B. Momentum: Q_i^(n+1)=Q_i^(n-1)−(Δt/Δx)[(Q^2/A)_{i+1}^n−(Q^2/A)_{i-1}^n]−gA_i^n(Δt/Δx)(y_{i+1}^n−y_{i-1}^n)+2gΔt A_i^n(S_0−S_f) with friction at n−1. Stability requires Δt ≤ Δx/(|V|+√(gA/B)).

Derive the finite difference equations for the full Saint-Venant equations representing the fluid flow using a second order accurate explicit scheme (dynamic wave model).

The dynamic-wave model uses the full Saint-Venant equations. A second-order accurate explicit scheme is obtained by replacing every derivative with a central difference in both space and time (the leapfrog scheme).

Governing equations

For a channel of top width BB (so ∂A/∂t=B ∂y/∂t\partial A/\partial t=B\,\partial y/\partial t):

B∂y∂t+∂Q∂x=qB\frac{\partial y}{\partial t}+\frac{\partial Q}{\partial x}=q ∂Q∂t+∂∂x(Q2A)+gA∂y∂x−gA(S0−Sf)=0\frac{\partial Q}{\partial t}+\frac{\partial}{\partial x}\left(\frac{Q^2}{A}\right)+gA\frac{\partial y}{\partial x}-gA(S_0-S_f)=0

Grid and central differences

 t
 n+1 :        o (i, n+1)   unknown
 n   :  x-----x-----x      (i-1, i, i+1) known
 n-1 :        x (i, n-1)   known
       i-1    i    i+1   --> x

For any variable ff at (i,n)(i,n):

∂f∂t≈fin+1−fin−12Δt,∂f∂x≈fi+1n−fi−1n2Δx\frac{\partial f}{\partial t}\approx\frac{f_i^{n+1}-f_i^{n-1}}{2\Delta t},\qquad \frac{\partial f}{\partial x}\approx\frac{f_{i+1}^{n}-f_{i-1}^{n}}{2\Delta x}

Both are accurate to O(Δt2)O(\Delta t^2) and O(Δx2)O(\Delta x^2) (the f′′f'' terms cancel in the Taylor series).

Finite difference equations

Continuity:

B yin+1−yin−12Δt+Qi+1n−Qi−1n2Δx=qinB\,\frac{y_i^{n+1}-y_i^{n-1}}{2\Delta t}+\frac{Q_{i+1}^n-Q_{i-1}^n}{2\Delta x}=q_i^n yin+1=yin−1−ΔtB Δx(Qi+1n−Qi−1n)+2ΔtBqiny_i^{n+1}=y_i^{n-1}-\frac{\Delta t}{B\,\Delta x}\left(Q_{i+1}^n-Q_{i-1}^n\right)+\frac{2\Delta t}{B}q_i^n

Momentum:

Qin+1−Qin−12Δt+12Δx[(Q2A)i+1n−(Q2A)i−1n]+gAinyi+1n−yi−1n2Δx−gAin(S0−Sf,i)=0\frac{Q_i^{n+1}-Q_i^{n-1}}{2\Delta t}+\frac{1}{2\Delta x}\left[\left(\frac{Q^2}{A}\right)_{i+1}^n-\left(\frac{Q^2}{A}\right)_{i-1}^n\right]+gA_i^n\frac{y_{i+1}^n-y_{i-1}^n}{2\Delta x}-gA_i^n\left(S_0-S_{f,i}\right)=0 Qin+1=Qin−1−ΔtΔx[(Q2A)i+1n−(Q2A)i−1n]−gAinΔtΔx(yi+1n−yi−1n)+2gΔt Ain(S0−Sf,i)Q_i^{n+1}=Q_i^{n-1}-\frac{\Delta t}{\Delta x}\left[\left(\frac{Q^2}{A}\right)_{i+1}^n-\left(\frac{Q^2}{A}\right)_{i-1}^n\right]-gA_i^n\frac{\Delta t}{\Delta x}\left(y_{i+1}^n-y_{i-1}^n\right)+2g\Delta t\,A_i^n\left(S_0-S_{f,i}\right)

with Sf,i=n2Qin−1∣Qin−1∣(Ain−1)2(Rin−1)4/3S_{f,i}=\dfrac{n^2Q_i^{n-1}|Q_i^{n-1}|}{(A_i^{n-1})^2(R_i^{n-1})^{4/3}}. The friction term is lagged to level n−1n-1 (a central evaluation at nn would be unstable for this explicit scheme).

Solution procedure

  1. Initial condition gives Qi0,yi0Q_i^0,y_i^0; the first step to level 1 is made with a one-step scheme (e.g. forward in time) because level −1-1 does not exist.
  2. For each later step, compute yin+1y_i^{n+1} and Qin+1Q_i^{n+1} at all interior points from the equations above.
  3. Boundaries: upstream Q(t)Q(t) from the inflow hydrograph; downstream a stage or rating curve Q=f(y)Q=f(y).
  4. Time step limit (Courant condition): Δt≤Δx∣V∣+gA/B\Delta t\le\dfrac{\Delta x}{|V|+\sqrt{gA/B}}.

Note: an equally common second-order explicit alternative is the two-step Lax-Wendroff/MacCormack scheme (predictor-corrector).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computational Techniques in Civil Engineering chapter 5 questions →