Skip to main content

Chapter 5 · 7 hours

Finite difference method

IOE past exam questions

Past questions and answers

23 questions set from this chapter, 3 of them more than once. Most repeated first.

  • Asked 2 times
  • 2079 Jestha · 4 marks
  • 2073 Magh · 4 marks

With appropriate expressions and graphs, explain first and second order accurate schemes of finite differences of partial differential equations.

Answer

A finite difference scheme is of order pp if its truncation error (the terms dropped from the Taylor series) is proportional to Δxp\Delta x^p (or Δtp\Delta t^p). Higher order means the error falls faster when the grid is refined.

First-order accurate schemes

From Taylor's series,

fi+1−fiΔx=fi′+Δx2fi′′+… ⇒ fi′=fi+1−fiΔx+O(Δx)\frac{f_{i+1}-f_i}{\Delta x}=f'_i+\frac{\Delta x}{2}f''_i+\dots\ \Rightarrow\ f'_i=\frac{f_{i+1}-f_i}{\Delta x}+O(\Delta x)

The forward difference (fi+1−fi)/Δx(f_{i+1}-f_i)/\Delta x and the backward difference (fi−fi−1)/Δx(f_i-f_{i-1})/\Delta x are first-order accurate. Applied to ∂Q/∂t+c ∂Q/∂x=0\partial Q/\partial t+c\,\partial Q/\partial x=0 with forward time and backward space:

Qin+1−QinΔt+cQin−Qi−1nΔx=0,error O(Δt,Δx)\frac{Q_i^{n+1}-Q_i^n}{\Delta t}+c\frac{Q_i^n-Q_{i-1}^n}{\Delta x}=0,\qquad \text{error } O(\Delta t,\Delta x)

Second-order accurate schemes

Subtract the two Taylor series for fi+1f_{i+1} and fi−1f_{i-1}; the f′′f'' terms cancel:

fi+1−fi−12Δx=fi′+Δx26fi(3)+… ⇒ fi′=fi+1−fi−12Δx+O(Δx2)\frac{f_{i+1}-f_{i-1}}{2\Delta x}=f'_i+\frac{\Delta x^2}{6}f_i^{(3)}+\dots\ \Rightarrow\ f'_i=\frac{f_{i+1}-f_{i-1}}{2\Delta x}+O(\Delta x^2)

This central difference is second-order accurate. Likewise fi′′=fi+1−2fi+fi−1Δx2+O(Δx2)f''_i=\dfrac{f_{i+1}-2f_i+f_{i-1}}{\Delta x^2}+O(\Delta x^2). A second-order scheme in both variables is the four-point (box) scheme centred at (i+12, n+12)(i+\tfrac12,\ n+\tfrac12):

Qin+1+Qi+1n+1−Qin−Qi+1n2Δt+c Qi+1n+1+Qi+1n−Qin+1−Qin2Δx=0\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}=0

Graphical meaning

 f
 |                     . f(i+1)
 |                 . '
 |            f(i)
 |         .'
 |   f(i-1)
 +----|---------|---------|----> x
     i-1        i        i+1

 forward : chord i  -> i+1
 backward: chord i-1-> i
 central : chord i-1-> i+1 (closest to tangent at i)

The slope of the chord approximates the slope of the tangent at ii. The forward and backward chords are tilted either side of the tangent (error proportional to Δx\Delta x); the central chord is almost parallel to it (error proportional to Δx2\Delta x^2).

Grid view of the two PDE schemes

 t
 n+1 :   o--------o            o   o
         |        |              \ |
 n   :   o        x         x-----x-----x   
        (i-1)    (i)       (i-1)  (i)  (i+1)
   first order (forward t,      second order (central
   backward x): 2 known pts     in x): 3 known points

Comparison

First orderSecond order
Truncation errorO(Δx)O(\Delta x)O(Δx2)O(\Delta x^2)
Effect of halving Δx\Delta xerror halveserror falls to one quarter
Main numerical errornumerical diffusion (smearing)numerical dispersion (oscillations)
Cost per stepsmallslightly larger
  • Asked 2 times
  • 2077 Chaitra · 2+3 marks
  • 2078 Chaitra · 2+1+1 marks

What is the finite difference method? Explain explicit and implicit finite difference schemes with examples.

Answer

The finite difference method (FDM) is a numerical technique that replaces the continuous solution domain by a grid of discrete points and replaces the derivatives in a differential equation by differences between the values at neighbouring grid points. The differential equation becomes a set of algebraic equations in the unknown grid values.

Explicit and implicit schemes (example: ∂Q/∂t+c ∂Q/∂x=0\partial Q/\partial t+c\,\partial Q/\partial x=0, C=cΔt/ΔxC=c\Delta t/\Delta x)

Explicit: the spatial derivative is evaluated at the known time level nn.

Qin+1−QinΔt+c Qin−Qi−1nΔx=0 ⇒ Qin+1=Qin−C (Qin−Qi−1n)\frac{Q_i^{n+1}-Q_i^n}{\Delta t}+c\,\frac{Q_i^n-Q_{i-1}^n}{\Delta x}=0\ \Rightarrow\ Q_i^{n+1}=Q_i^n-C\,(Q_i^n-Q_{i-1}^n)

Each unknown is found directly from known values. It is conditionally stable (needs C≤1C\le1).

Implicit: the spatial derivative is evaluated at the new time level n+1n+1.

Qin+1−QinΔt+c Qin+1−Qi−1n+1Δx=0 ⇒ Qin+1=Qin+C Qi−1n+11+C\frac{Q_i^{n+1}-Q_i^n}{\Delta t}+c\,\frac{Q_i^{n+1}-Q_{i-1}^{n+1}}{\Delta x}=0\ \Rightarrow\ Q_i^{n+1}=\frac{Q_i^n+C\,Q_{i-1}^{n+1}}{1+C}

The unknown at point ii depends on other unknowns at n+1n+1. For problems such as groundwater flow the result is a set of simultaneous equations (tridiagonal matrix). It is unconditionally stable.

Comparison

PointExplicitImplicit
Spatial terms atknown level nnunknown level n+1n+1
Solutiondirect, point by pointsimultaneous equations (matrix)
Effort per stepsmalllarger
Stabilityconditional (C≤1C\le1)unconditional (large Δt\Delta t allowed)
Typical usedynamic-wave models with small Δt\Delta tgroundwater, kinematic wave, long simulations

Example (groundwater, λ=TΔt/SΔx2\lambda=T\Delta t/S\Delta x^2): explicit hin+1=hin+λ(hi+1n−2hin+hi−1n)h_i^{n+1}=h_i^n+\lambda(h_{i+1}^n-2h_i^n+h_{i-1}^n) needs λ≤12\lambda\le\tfrac12; implicit −λhi−1n+1+(1+2λ)hin+1−λhi+1n+1=hin-\lambda h_{i-1}^{n+1}+(1+2\lambda)h_i^{n+1}-\lambda h_{i+1}^{n+1}=h_i^n is stable for any λ\lambda.

  • Asked 2 times
  • 2074 Bhadra · 6 marks
  • 2072 Asoj · 6 marks

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).

Answer

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).

  • 2079 Jestha · 4+4 marks

Describe numerical dispersion, diffusion, and stability of finite difference schemes. The value of flow rate QQ at four points in the space-time grid is shown in the figure below. Determine the value of first-order derivatives ∂Q/∂t\partial Q/\partial t and ∂Q/∂x\partial Q/\partial x by using the four-point implicit method. Given: Δt=1\Delta t = 1 hour, Δx=500\Delta x = 500 m and θ=0.55\theta = 0.55.
[Figure: space-time grid with time levels n and n+1 and distance points i and i+1; QQ at (i, n+1) =75= 75 m3^3/s, at (i+1, n+1) =72= 72 m3^3/s, at (i, n) =73= 73 m3^3/s, at (i+1, n) =69= 69 m3^3/s]

Similar questions: Numerical dispersion, stability; four-point implicit (600 m) (2074 Bhadra)

Answer

Numerical diffusion

The leading truncation error of an odd-order scheme (e.g. first-order upwind) behaves like a physical diffusion term. For Qt+cQx=0Q_t+cQ_x=0 with backward-space, forward-time:

Qt+cQx=cΔx2(1−C) Qxx+…Q_t+cQ_x=\frac{c\Delta x}{2}(1-C)\,Q_{xx}+\dots

The solution is smeared: peaks are lowered and sharp fronts spread out, although the true equation has no diffusion.

Numerical dispersion

For second-order (central) schemes the leading error term has an odd derivative, ∝Qxxx\propto Q_{xxx}. Different wavelengths then travel at different speeds, so a sharp front produces spurious oscillations (ripples ahead of or behind the front). It is a phase error, with little change in amplitude.

Stability

A scheme is stable if errors (round-off or truncation) do not grow from step to step. For explicit schemes, the von Neumann or Courant-Friedrichs-Lewy condition requires

C=c ΔtΔx≤1C=\frac{c\,\Delta t}{\Delta x}\le1

Implicit schemes (and the four-point scheme with θ≥0.5\theta\ge0.5) are unconditionally stable, but a large Δt\Delta t still reduces accuracy.

Four-point implicit method

∂Q∂t≈(Qin+1−Qin)+(Qi+1n+1−Qi+1n)2Δt\frac{\partial Q}{\partial t}\approx\frac{(Q_i^{n+1}-Q_i^n)+(Q_{i+1}^{n+1}-Q_{i+1}^n)}{2\Delta t} ∂Q∂x≈θ Qi+1n+1−Qin+1Δx+(1−θ) Qi+1n−QinΔx\frac{\partial Q}{\partial x}\approx\theta\,\frac{Q_{i+1}^{n+1}-Q_i^{n+1}}{\Delta x}+(1-\theta)\,\frac{Q_{i+1}^n-Q_i^n}{\Delta x}

Data: Qin+1=75Q_i^{n+1}=75, Qi+1n+1=72Q_{i+1}^{n+1}=72, Qin=73Q_i^n=73, Qi+1n=69Q_{i+1}^n=69; Δt=3600\Delta t=3600 s, Δx=500\Delta x=500 m, θ=0.55\theta=0.55.

Time derivative

∂Q∂t=(75−73)+(72−69)2×3600=57200=6.9444×10−4 m3/s2\frac{\partial Q}{\partial t}=\frac{(75-73)+(72-69)}{2\times3600}=\frac{5}{7200}=6.9444\times10^{-4}\ \text{m}^3/\text{s}^2

Space derivative

∂Q∂x=0.55 72−75500+0.45 69−73500=−0.00330+(−0.00360)=−0.00690 m3/s per m\frac{\partial Q}{\partial x}=0.55\,\frac{72-75}{500}+0.45\,\frac{69-73}{500}=-0.00330+(-0.00360)=-0.00690\ \text{m}^3/\text{s per m}

Answer: ∂Q/∂t=6.9444×10−4\partial Q/\partial t=6.9444\times10^{-4} m3^3/s2^2 and ∂Q/∂x=−0.00690\partial Q/\partial x=-0.00690 m2^2/s.

  • 2078 Kartik · 6 marks

Using any explicit finite difference scheme for the full Saint-Venant equations, compute discharge and flow depth at grid (i,n+1)(i, n+1) for the following data. Rectangular channel width =50= 50 m, bed slope =0.0002= 0.0002, Manning's n=0.035n = 0.035, no lateral inflow, Δx=1.0\Delta x = 1.0 km and Δt=10\Delta t = 10 min. Discharge: Qi−1n=38Q_{i-1}^n = 38 m3^3/s, Qin=36Q_i^n = 36 m3^3/s, Qi+1n=35Q_{i+1}^n = 35 m3^3/s. Flow depth: yi−1n=1.87y_{i-1}^n = 1.87 m, yin=1.82y_i^n = 1.82 m, yi+1n=1.97y_{i+1}^n = 1.97 m.

Similar questions: Full Saint-Venant explicit scheme numerical (10 m) (2073 Magh)

Answer

A simple explicit scheme is the Lax diffusive scheme: forward in time, central in space, with the old value at ii replaced by the average of its two neighbours. The equations for a rectangular channel are

B∂y∂t+∂Q∂x=0,∂Q∂t+∂∂x(Q2A)+gA∂y∂x−gA(S0−Sf)=0B\frac{\partial y}{\partial t}+\frac{\partial Q}{\partial x}=0,\qquad \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

Finite difference form (grid (i,n+1)(i,n+1) from (i−1,n),(i,n),(i+1,n)(i-1,n),(i,n),(i+1,n)):

yin+1=yi+1n+yi−1n2−Δt2BΔx(Qi+1n−Qi−1n)y_i^{n+1}=\frac{y_{i+1}^n+y_{i-1}^n}{2}-\frac{\Delta t}{2B\Delta x}\left(Q_{i+1}^n-Q_{i-1}^n\right) Qin+1=Qi+1n+Qi−1n2−Δt2Δx[(Q2)i+1Ai+1−(Q2)i−1Ai−1]−gAiΔt2Δx(yi+1−yi−1)+gAiΔt (S0−Sf,i)Q_i^{n+1}=\frac{Q_{i+1}^n+Q_{i-1}^n}{2}-\frac{\Delta t}{2\Delta x}\left[\frac{(Q^2)_{i+1}}{A_{i+1}}-\frac{(Q^2)_{i-1}}{A_{i-1}}\right]-gA_i\frac{\Delta t}{2\Delta x}\left(y_{i+1}-y_{i-1}\right)+gA_i\Delta t\,(S_0-S_{f,i})

Data

B=50B=50 m, S0=0.0002S_0=0.0002, n=0.035n=0.035, Δx=1000\Delta x=1000 m, Δt=600\Delta t=600 s, so Δt2Δx=0.300\dfrac{\Delta t}{2\Delta x}=0.300.

Step 1: Areas and friction slope

Ai−1=93.50A_{i-1}=93.50, Ai=91.00A_i=91.00, Ai+1=98.50A_{i+1}=98.50 m2^2.

Pi=B+2yi=53.64 m,Ri=AiPi=1.6965 m,Sf,i=n2Qi2Ai2Ri4/3=9.475×10−5P_i=B+2y_i=53.64\ \text{m},\quad R_i=\frac{A_i}{P_i}=1.6965\ \text{m},\quad S_{f,i}=\frac{n^2Q_i^2}{A_i^2R_i^{4/3}}=9.475\times10^{-5}

Step 2: Flow depth

yin+1=1.97+1.872−0.00600 (35−38)=1.9200−(−0.0180)=1.9380 my_i^{n+1}=\frac{1.97+1.87}{2}-0.00600\,(35-38)=1.9200-(-0.0180)=1.9380\ \text{m}

Step 3: Discharge

  • Average term: 35+382=36.500\dfrac{35+38}{2}=36.500
  • Convective term: Q2A\dfrac{Q^2}{A} at i+1i+1 is 12.437, at i−1i-1 is 15.444; difference =−3.0073=-3.0073; term =−0.300(−3.0073)=0.902=-0.300(-3.0073)=0.902
  • Pressure term: −gAiΔt2Δx(yi+1−yi−1)=−9.81(91.00)(0.300)(0.10)=−26.781-gA_i\dfrac{\Delta t}{2\Delta x}(y_{i+1}-y_{i-1})=-9.81(91.00)(0.300)(0.10)=-26.781
  • Gravity and friction: gAiΔt(S0−Sf)=9.81(91.00)(600)(0.0002−9.475×10−5)=56.374gA_i\Delta t(S_0-S_f)=9.81(91.00)(600)(0.0002-9.475\times10^{-5})=56.374
Qin+1=36.500+(0.902)+(−26.781)+(56.374)=66.99 m3/sQ_i^{n+1}=36.500+(0.902)+(-26.781)+(56.374)=66.99\ \text{m}^3/\text{s}

Answer: yin+1=1.9380y_i^{n+1}=1.9380 m and Qin+1=66.99Q_i^{n+1}=66.99 m3^3/s.

Remark: the very large change in QQ comes from the time step: Δt=600\Delta t=600 s gives a Courant number (V+gy)Δt/Δx≈2.8>1(V+\sqrt{gy})\Delta t/\Delta x\approx2.8>1, so the explicit scheme is outside its stability limit and a smaller Δt\Delta t would be needed to continue the simulation. One step is computed here as asked.

  • 2074 Bhadra · 4+4 marks

Describe numerical dispersion, diffusion and stability of finite difference schemes. The value of flow rate QQ at four points in the space-time grid are shown in the figure below. Determine the value of first-order derivatives ∂Q/∂t\partial Q/\partial t and ∂Q/∂x\partial Q/\partial x by using the four-point implicit method. Given: Δt=1\Delta t = 1 hour, Δx=600\Delta x = 600 m and θ=0.55\theta = 0.55.
[Figure: space-time grid with time levels n and n+1 and distance points i and i+1; QQ at (i, n+1) =95= 95 m3^3/s, at (i+1, n+1) =92= 92 m3^3/s, at (i, n) =93= 93 m3^3/s, at (i+1, n) =89= 89 m3^3/s]

Similar questions: Numerical dispersion, stability; four-point implicit (500 m) (2079 Jestha)

Answer

Numerical diffusion

The leading truncation error of an odd-order scheme (e.g. first-order upwind) behaves like a physical diffusion term. For Qt+cQx=0Q_t+cQ_x=0 with backward-space, forward-time:

Qt+cQx=cΔx2(1−C) Qxx+…Q_t+cQ_x=\frac{c\Delta x}{2}(1-C)\,Q_{xx}+\dots

The solution is smeared: peaks are lowered and sharp fronts spread out, although the true equation has no diffusion.

Numerical dispersion

For second-order (central) schemes the leading error term has an odd derivative, ∝Qxxx\propto Q_{xxx}. Different wavelengths then travel at different speeds, so a sharp front produces spurious oscillations (ripples ahead of or behind the front). It is a phase error, with little change in amplitude.

Stability

A scheme is stable if errors (round-off or truncation) do not grow from step to step. For explicit schemes, the von Neumann or Courant-Friedrichs-Lewy condition requires

C=c ΔtΔx≤1C=\frac{c\,\Delta t}{\Delta x}\le1

Implicit schemes (and the four-point scheme with θ≥0.5\theta\ge0.5) are unconditionally stable, but a large Δt\Delta t still reduces accuracy.

Four-point implicit method

∂Q∂t≈(Qin+1−Qin)+(Qi+1n+1−Qi+1n)2Δt\frac{\partial Q}{\partial t}\approx\frac{(Q_i^{n+1}-Q_i^n)+(Q_{i+1}^{n+1}-Q_{i+1}^n)}{2\Delta t} ∂Q∂x≈θ Qi+1n+1−Qin+1Δx+(1−θ) Qi+1n−QinΔx\frac{\partial Q}{\partial x}\approx\theta\,\frac{Q_{i+1}^{n+1}-Q_i^{n+1}}{\Delta x}+(1-\theta)\,\frac{Q_{i+1}^n-Q_i^n}{\Delta x}

Data: Qin+1=95Q_i^{n+1}=95, Qi+1n+1=92Q_{i+1}^{n+1}=92, Qin=93Q_i^n=93, Qi+1n=89Q_{i+1}^n=89; Δt=3600\Delta t=3600 s, Δx=600\Delta x=600 m, θ=0.55\theta=0.55.

Time derivative

∂Q∂t=(95−93)+(92−89)2×3600=57200=6.9444×10−4 m3/s2\frac{\partial Q}{\partial t}=\frac{(95-93)+(92-89)}{2\times3600}=\frac{5}{7200}=6.9444\times10^{-4}\ \text{m}^3/\text{s}^2

Space derivative

∂Q∂x=0.55 92−95600+0.45 89−93600=−0.00275+(−0.00300)=−0.00575 m3/s per m\frac{\partial Q}{\partial x}=0.55\,\frac{92-95}{600}+0.45\,\frac{89-93}{600}=-0.00275+(-0.00300)=-0.00575\ \text{m}^3/\text{s per m}

Answer: ∂Q/∂t=6.9444×10−4\partial Q/\partial t=6.9444\times10^{-4} m3^3/s2^2 and ∂Q/∂x=−0.00575\partial Q/\partial x=-0.00575 m2^2/s.

  • 2073 Magh · 6 marks

Using any explicit finite difference scheme for the full Saint-Venant equations, compute discharge and flow depth at grid (i,n+1)(i, n+1) for the following data. Rectangular channel, width =10= 10 m, bed slope =0.0002= 0.0002, Manning's n=0.04n = 0.04, no lateral flow, Δx=1\Delta x = 1 km and Δt=5\Delta t = 5 min. Discharge: Qi−1n=40Q_{i-1}^n = 40 m3^3/s, Qin=38Q_i^n = 38 m3^3/s, Qi+1n=37.5Q_{i+1}^n = 37.5 m3^3/s. Flow depth: yi−1n=1.9y_{i-1}^n = 1.9 m, yin=1.85y_i^n = 1.85 m, yi+1n=2.0y_{i+1}^n = 2.0 m.

Similar questions: Full Saint-Venant explicit scheme numerical (50 m) (2078 Kartik)

Answer

A simple explicit scheme is the Lax diffusive scheme: forward in time, central in space, with the old value at ii replaced by the average of its two neighbours. The equations for a rectangular channel are

B∂y∂t+∂Q∂x=0,∂Q∂t+∂∂x(Q2A)+gA∂y∂x−gA(S0−Sf)=0B\frac{\partial y}{\partial t}+\frac{\partial Q}{\partial x}=0,\qquad \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

Finite difference form (grid (i,n+1)(i,n+1) from (i−1,n),(i,n),(i+1,n)(i-1,n),(i,n),(i+1,n)):

yin+1=yi+1n+yi−1n2−Δt2BΔx(Qi+1n−Qi−1n)y_i^{n+1}=\frac{y_{i+1}^n+y_{i-1}^n}{2}-\frac{\Delta t}{2B\Delta x}\left(Q_{i+1}^n-Q_{i-1}^n\right) Qin+1=Qi+1n+Qi−1n2−Δt2Δx[(Q2)i+1Ai+1−(Q2)i−1Ai−1]−gAiΔt2Δx(yi+1−yi−1)+gAiΔt (S0−Sf,i)Q_i^{n+1}=\frac{Q_{i+1}^n+Q_{i-1}^n}{2}-\frac{\Delta t}{2\Delta x}\left[\frac{(Q^2)_{i+1}}{A_{i+1}}-\frac{(Q^2)_{i-1}}{A_{i-1}}\right]-gA_i\frac{\Delta t}{2\Delta x}\left(y_{i+1}-y_{i-1}\right)+gA_i\Delta t\,(S_0-S_{f,i})

Data

B=10B=10 m, S0=0.0002S_0=0.0002, n=0.04n=0.04, Δx=1000\Delta x=1000 m, Δt=300\Delta t=300 s, so Δt2Δx=0.150\dfrac{\Delta t}{2\Delta x}=0.150.

Step 1: Areas and friction slope

Ai−1=19.00A_{i-1}=19.00, Ai=18.50A_i=18.50, Ai+1=20.00A_{i+1}=20.00 m2^2.

Pi=B+2yi=13.70 m,Ri=AiPi=1.3504 m,Sf,i=n2Qi2Ai2Ri4/3=0.00452P_i=B+2y_i=13.70\ \text{m},\quad R_i=\frac{A_i}{P_i}=1.3504\ \text{m},\quad S_{f,i}=\frac{n^2Q_i^2}{A_i^2R_i^{4/3}}=0.00452

Step 2: Flow depth

yin+1=2.0+1.92−0.01500 (37.5−40)=1.9500−(−0.0375)=1.9875 my_i^{n+1}=\frac{2.0+1.9}{2}-0.01500\,(37.5-40)=1.9500-(-0.0375)=1.9875\ \text{m}

Step 3: Discharge

  • Average term: 37.5+402=38.750\dfrac{37.5+40}{2}=38.750
  • Convective term: Q2A\dfrac{Q^2}{A} at i+1i+1 is 70.312, at i−1i-1 is 84.211; difference =−13.8980=-13.8980; term =−0.150(−13.8980)=2.085=-0.150(-13.8980)=2.085
  • Pressure term: −gAiΔt2Δx(yi+1−yi−1)=−9.81(18.50)(0.150)(0.10)=−2.722-gA_i\dfrac{\Delta t}{2\Delta x}(y_{i+1}-y_{i-1})=-9.81(18.50)(0.150)(0.10)=-2.722
  • Gravity and friction: gAiΔt(S0−Sf)=9.81(18.50)(300)(0.0002−0.00452)=−235.358gA_i\Delta t(S_0-S_f)=9.81(18.50)(300)(0.0002-0.00452)=-235.358
Qin+1=38.750+(2.085)+(−2.722)+(−235.358)=−197.25 m3/sQ_i^{n+1}=38.750+(2.085)+(-2.722)+(-235.358)=-197.25\ \text{m}^3/\text{s}

Answer: yin+1=1.9875y_i^{n+1}=1.9875 m and Qin+1=−197.25Q_i^{n+1}=-197.25 m3^3/s.

Remark: the very large change in QQ comes from the time step: Δt=300\Delta t=300 s gives a Courant number (V+gy)Δt/Δx≈1.9>1(V+\sqrt{gy})\Delta t/\Delta x\approx1.9>1, so the explicit scheme is outside its stability limit and a smaller Δt\Delta t would be needed to continue the simulation. One step is computed here as asked.

  • 2079 Shrawan · 5+1 marks

Derive the space-time discretization of the second order accurate non-linear kinematic wave model. Write the principle of the finite difference method.

Answer

Non-linear kinematic wave model

Continuity: ∂A∂t+∂Q∂x=q\dfrac{\partial A}{\partial t}+\dfrac{\partial Q}{\partial x}=q. Kinematic approximation (Sf=S0S_f=S_0) with Manning's equation gives a unique QQ-AA relation, Q=S01/2nP2/3A5/3Q=\dfrac{S_0^{1/2}}{nP^{2/3}}A^{5/3}, or

A=αQβ,α=(nP2/3S01/2)0.6,β=0.6A=\alpha Q^{\beta},\qquad \alpha=\left(\frac{nP^{2/3}}{S_0^{1/2}}\right)^{0.6},\quad \beta=0.6

Therefore

∂(αQβ)∂t+∂Q∂x=q\frac{\partial(\alpha Q^\beta)}{\partial t}+\frac{\partial Q}{\partial x}=q

Space-time discretisation (second order, four-point/box)

Centre the derivatives at the middle of the cell, (i+12, n+12)(i+\tfrac12,\ n+\tfrac12):

 t
 n+1 :  (i,n+1) o------o (i+1,n+1)   <- Q(i,n+1) known,
                |  *   |                  Q(i+1,n+1) unknown
 n   :  (i,n)   o------o (i+1,n)    <- both known
              i        i+1       --> x
∂A∂t≈(Ain+1−Ain)+(Ai+1n+1−Ai+1n)2Δt,∂Q∂x≈(Qi+1n+1−Qin+1)+(Qi+1n−Qin)2Δx,q≈qˉ\frac{\partial A}{\partial t}\approx\frac{(A_i^{n+1}-A_i^n)+(A_{i+1}^{n+1}-A_{i+1}^n)}{2\Delta t},\qquad \frac{\partial Q}{\partial x}\approx\frac{(Q_{i+1}^{n+1}-Q_i^{n+1})+(Q_{i+1}^n-Q_i^n)}{2\Delta x},\qquad q\approx\bar q

Taylor expansion about the cell centre shows that both errors are O(Δt2)O(\Delta t^2) and O(Δx2)O(\Delta x^2), so the scheme is second-order accurate. Substituting A=αQβA=\alpha Q^\beta:

α[(Qin+1)β+(Qi+1n+1)β−(Qin)β−(Qi+1n)β]2Δt+Qi+1n+1+Qi+1n−Qin+1−Qin2Δx=qˉ\frac{\alpha\left[(Q_i^{n+1})^\beta+(Q_{i+1}^{n+1})^\beta-(Q_i^n)^\beta-(Q_{i+1}^n)^\beta\right]}{2\Delta t}+\frac{Q_{i+1}^{n+1}+Q_{i+1}^n-Q_i^{n+1}-Q_i^n}{2\Delta x}=\bar q

Solution for the one unknown Qi+1n+1Q_{i+1}^{n+1}

Multiply by 2Δt2\Delta t and collect the unknown x=Qi+1n+1x=Q_{i+1}^{n+1} on the left:

f(x)=ΔtΔx x+αxβ−K=0f(x)=\frac{\Delta t}{\Delta x}\,x+\alpha x^{\beta}-K=0 K=α[(Qin)β+(Qi+1n)β−(Qin+1)β]−ΔtΔx(Qi+1n−Qin+1−Qin)+2Δt qˉK=\alpha\left[(Q_i^n)^\beta+(Q_{i+1}^n)^\beta-(Q_i^{n+1})^\beta\right]-\frac{\Delta t}{\Delta x}\left(Q_{i+1}^n-Q_i^{n+1}-Q_i^n\right)+2\Delta t\,\bar q

Because xx appears non-linearly, solve by Newton-Raphson:

xk+1=xk−f(xk)f′(xk),f′(x)=ΔtΔx+αβxβ−1x_{k+1}=x_k-\frac{f(x_k)}{f'(x_k)},\qquad f'(x)=\frac{\Delta t}{\Delta x}+\alpha\beta x^{\beta-1}

starting from x0=Qi+1nx_0=Q_{i+1}^n (or Qin+1Q_i^{n+1}) and repeating until ∣xk+1−xk∣|x_{k+1}-x_k| is small. Marching along ii from the upstream boundary and then in time gives the whole hydrograph.

Principle of the finite difference method

The solution domain is covered by a grid; every derivative in the differential equation is replaced by a difference of grid-point values (from the Taylor series), converting the PDE into algebraic equations that are solved for the unknown values at the grid points.

  • 2079 Shrawan · 6 marks

A river which can be generalized as a trapezoidal channel is 350 m wide with side slope 6:1 and a bed slope 1.5% and Manning's n=0.0359n = 0.0359. The initial discharge through the river is 420 cumecs. Due to a flood observed at upstream, the value of discharge rises to 580 cumecs. Calculate the discharge that will occur at 4.65 km downstream. Take Δx=4650\Delta x = 4650 m and take Δt=1.5\Delta t = 1.5 hours. Use the non-linear kinematic wave solution.

Answer

The non-linear kinematic wave model is used with A=αQβA=\alpha Q^\beta and the second-order four-point scheme (centred in space and time), solved by Newton's method.

Step 1: Channel properties at the mean flow

Mean discharge =(420+580)/2=500=(420+580)/2=500 m3^3/s. Trapezoid: bottom width b=350b=350 m, side slope z=6z=6, S0=0.015S_0=0.015, n=0.0359n=0.0359.

Q=S01/2nA5/3P2/3,A=(b+zy)y,P=b+2y1+z2Q=\frac{S_0^{1/2}}{n}\frac{A^{5/3}}{P^{2/3}},\quad A=(b+zy)y,\quad P=b+2y\sqrt{1+z^2}

Solving for Q=500Q=500: y=0.592y=0.592 m, A=209.30A=209.30 m2^2, P=357.20P=357.20 m.

Step 2: Kinematic coefficients

α=(nP2/3S01/2)0.6=5.0280,β=0.6\alpha=\left(\frac{nP^{2/3}}{S_0^{1/2}}\right)^{0.6}=5.0280,\qquad \beta=0.6

Then Ain=α(420)0.6=188.51A_i^n=\alpha(420)^{0.6}=188.51 m2^2 and Ain+1=α(580)0.6=228.80A_i^{n+1}=\alpha(580)^{0.6}=228.80 m2^2. (Wave celerity c≈3.98c\approx3.98 m/s, so C=cΔt/Δx≈4.6>1C=c\Delta t/\Delta x\approx4.6>1: an explicit scheme would be unstable, the four-point scheme is not.)

Step 3: Finite difference equation

Known: Qin=420Q_i^n=420 (initial flow), Qi+1n=420Q_{i+1}^n=420, Qin+1=580Q_i^{n+1}=580 (upstream flood). Δx=4650\Delta x=4650 m, Δt=1.5×3600=5400\Delta t=1.5\times3600=5400 s, Δt/Δx=1.1613\Delta t/\Delta x=1.1613, no lateral inflow.

ΔtΔxx+αx0.6=K,K=α[4200.6+4200.6−5800.6]−ΔtΔx(420−580−420)=821.779\frac{\Delta t}{\Delta x}x+\alpha x^{0.6}=K,\qquad K=\alpha\left[420^{0.6}+420^{0.6}-580^{0.6}\right]-\frac{\Delta t}{\Delta x}\left(420-580-420\right)=821.779

with x=Qi+1n+1x=Q_{i+1}^{n+1}.

Step 4: Newton iteration

f(x)=1.1613x+5.0280x0.6−821.779f(x)=1.1613x+5.0280x^{0.6}-821.779, f′(x)=1.1613+3.0168x−0.4f'(x)=1.1613+3.0168x^{-0.4}.

Iterationxkx_kf(xk)f(x_k)xk+1x_{k+1}
1420.0000-145.5231521.7220
2521.7220-1.1957522.5711
3522.5711-0.0001522.5711
4522.5711-0.0000522.5711

Answer: Qi+1n+1=522.6Q_{i+1}^{n+1}=522.6 m3^3/s at 4.65 km downstream after 1.5 h (it rises from 420 towards the upstream value of 580 m3^3/s).

  • 2078 Chaitra · 2+3 marks

Write down the governing equations used for analyzing the movement of fluid. Discuss forward, backward and central differencing with expressions.

Answer

Governing equations of fluid movement

The unsteady flow of water in an open channel is governed by the Saint-Venant (1D shallow water) equations.

Continuity (conservation of mass):

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

Momentum (conservation of momentum):

∂Q∂t⏟local acc.+∂∂x ⁣(Q2A)⏟convective acc.+gA∂y∂x⏟pressure force−gAS0⏟gravity+gASf⏟friction=0\underbrace{\frac{\partial Q}{\partial t}}_{\text{local acc.}}+\underbrace{\frac{\partial}{\partial x}\!\left(\frac{Q^2}{A}\right)}_{\text{convective acc.}}+\underbrace{gA\frac{\partial y}{\partial x}}_{\text{pressure force}}-\underbrace{gAS_0}_{\text{gravity}}+\underbrace{gAS_f}_{\text{friction}}=0

where AA = flow area, QQ = discharge, yy = flow depth, qq = lateral inflow per unit length, S0S_0 = bed slope, Sf=n2Q∣Q∣A2R4/3S_f=\dfrac{n^2Q|Q|}{A^2R^{4/3}} = friction slope (Manning), gg = gravity. These are the Saint-Venant equations (1D unsteady open-channel flow).

In terms of velocity VV and depth yy for a wide rectangular channel:

∂y∂t+V∂y∂x+y∂V∂x=0,∂V∂t+V∂V∂x+g∂y∂x=g(S0−Sf)\frac{\partial y}{\partial t}+V\frac{\partial y}{\partial x}+y\frac{\partial V}{\partial x}=0,\qquad \frac{\partial V}{\partial t}+V\frac{\partial V}{\partial x}+g\frac{\partial y}{\partial x}=g(S_0-S_f)

Forward, backward and central differencing

The grid has points xi=iΔxx_i=i\Delta x. The derivative at point ii is approximated using neighbouring values.

Expand ff about xix_i by Taylor's series:

fi+1=fi+Δxfi′+Δx22fi′′+Δx36fi(3)+…,fi−1=fi−Δxfi′+Δx22fi′′−Δx36fi(3)+…f_{i+1}=f_i+\Delta x f'_i+\frac{\Delta x^2}{2}f''_i+\frac{\Delta x^3}{6}f_i^{(3)}+\dots,\qquad f_{i-1}=f_i-\Delta x f'_i+\frac{\Delta x^2}{2}f''_i-\frac{\Delta x^3}{6}f_i^{(3)}+\dots
SchemeExpressionError
Forward$\left.\dfrac{\partial f}{\partial x}\righti\approx\dfrac{f{i+1}-f_i}{\Delta x}$
Backward$\left.\dfrac{\partial f}{\partial x}\righti\approx\dfrac{f_i-f{i-1}}{\Delta x}$
Central$\left.\dfrac{\partial f}{\partial x}\righti\approx\dfrac{f{i+1}-f_{i-1}}{2\Delta x}$
Second derivative$\left.\dfrac{\partial^2 f}{\partial x^2}\righti\approx\dfrac{f{i+1}-2f_i+f_{i-1}}{\Delta x^2}$

The same formulas are used for the time derivative with Δt\Delta t (e.g. forward in time: ∂Q/∂t≈(Qin+1−Qin)/Δt\partial Q/\partial t\approx (Q_i^{n+1}-Q_i^n)/\Delta t).

 f
 |                     . f(i+1)
 |                 . '
 |            f(i)
 |         .'
 |   f(i-1)
 +----|---------|---------|----> x
     i-1        i        i+1

 forward : chord i  -> i+1
 backward: chord i-1-> i
 central : chord i-1-> i+1 (closest to tangent at i)
  • Forward uses the point ahead; backward uses the point behind (suited to flow from upstream, "upwind"); central uses both neighbours and is more accurate, but is less stable for explicit time marching.
  • 2078 Chaitra · 6 marks

The following are data pertaining to a rectangular channel: width of channel = 200 ft, length of channel = 15000 ft, bed slope S0=1%S_0 = 1\%, Manning's n=0.035n = 0.035. At t=0t = 0, there is a uniform flow of 2000 cfs along the channel. The discharge value at the upstream boundary from the inflow hydrograph at time t=3t = 3 min is obtained as 2250 cfs. Determine the discharge at a distance of 3000 ft downstream along the channel. Use the linear kinematic wave model. Take Δx=3000\Delta x = 3000 ft and Δt=3\Delta t = 3 min. There is no lateral inflow (q=0q = 0).

Answer

The linear kinematic wave equation is ∂Q∂t+c∂Q∂x=0\dfrac{\partial Q}{\partial t}+c\dfrac{\partial Q}{\partial x}=0 (no lateral inflow), with a constant celerity cc taken from the initial uniform flow. It is solved with the second-order four-point scheme, which uses all four grid points (i,n)(i,n), (i+1,n)(i+1,n), (i,n+1)(i,n+1), (i+1,n+1)(i+1,n+1).

Step 1: Initial uniform flow (US units, Manning constant 1.49)

Q=1.49nAR2/3S01/2,A=200y, P=200+2y, R=A/PQ=\frac{1.49}{n}AR^{2/3}S_0^{1/2},\qquad A=200y,\ P=200+2y,\ R=A/P

Trial for Q=2000Q=2000 cfs gives y=1.680y=1.680 ft, so A=336.09A=336.09 ft2^2, P=203.36P=203.36 ft, R=1.653R=1.653 ft and Q=2000Q=2000 cfs (check).

V=2000336.09=5.951 ft/sV=\frac{2000}{336.09}=5.951\ \text{ft/s}

Step 2: Kinematic wave celerity

With Manning's equation Q=αA5/3Q=\alpha A^{5/3}, c=dQdA=53Vc=\dfrac{dQ}{dA}=\dfrac53V:

c=53(5.951)=9.918 ft/s,C=c ΔtΔx=9.918×1803000=0.5951c=\tfrac53(5.951)=9.918\ \text{ft/s},\qquad C=\frac{c\,\Delta t}{\Delta x}=\frac{9.918\times180}{3000}=0.5951

Step 3: Finite difference equation

Qin+1+Qi+1n+1−Qin−Qi+1n2Δt+c Qi+1n+1+Qi+1n−Qin+1−Qin2Δx=0\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}=0

Solving for the unknown:

Qi+1n+1=Qin+1−C1+C(Qi+1n−Qin+1)Q_{i+1}^{n+1}=Q_i^n+\frac{1-C}{1+C}\left(Q_{i+1}^n-Q_i^{n+1}\right)

Step 4: Substitution

Qin=2000Q_i^n=2000, Qi+1n=2000Q_{i+1}^n=2000 (uniform flow at t=0t=0), Qin+1=2250Q_i^{n+1}=2250 (upstream, t=3t=3 min); the point at 3000 ft is i+1i+1.

Qi+1n+1=2000+1−0.59511+0.5951(2000−2250)=2000+(0.2539)(−250)=1936.5 cfsQ_{i+1}^{n+1}=2000+\frac{1-0.5951}{1+0.5951}(2000-2250)=2000+(0.2539)(-250)=1936.5\ \text{cfs}

Answer: the discharge at 3000 ft downstream after 3 min is Q=1936.5Q=1936.5 cfs (about 1937 cfs); the flood wave has only started to arrive.

  • 2078 Kartik · 2+2+1 marks

Write down the governing equations used for analyzing the movement of fluid. What are the kinematic wave approximations of these governing equations? Also define Courant number.

Answer

Governing equations

For 1D unsteady open-channel flow (Saint-Venant equations):

Continuity (conservation of mass):

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

Momentum (conservation of momentum):

∂Q∂t⏟local acc.+∂∂x ⁣(Q2A)⏟convective acc.+gA∂y∂x⏟pressure force−gAS0⏟gravity+gASf⏟friction=0\underbrace{\frac{\partial Q}{\partial t}}_{\text{local acc.}}+\underbrace{\frac{\partial}{\partial x}\!\left(\frac{Q^2}{A}\right)}_{\text{convective acc.}}+\underbrace{gA\frac{\partial y}{\partial x}}_{\text{pressure force}}-\underbrace{gAS_0}_{\text{gravity}}+\underbrace{gAS_f}_{\text{friction}}=0

where AA = flow area, QQ = discharge, yy = flow depth, qq = lateral inflow per unit length, S0S_0 = bed slope, Sf=n2Q∣Q∣A2R4/3S_f=\dfrac{n^2Q|Q|}{A^2R^{4/3}} = friction slope (Manning), gg = gravity. These are the Saint-Venant equations (1D unsteady open-channel flow).

In terms of velocity VV and depth yy for a wide rectangular channel:

∂y∂t+V∂y∂x+y∂V∂x=0,∂V∂t+V∂V∂x+g∂y∂x=g(S0−Sf)\frac{\partial y}{\partial t}+V\frac{\partial y}{\partial x}+y\frac{\partial V}{\partial x}=0,\qquad \frac{\partial V}{\partial t}+V\frac{\partial V}{\partial x}+g\frac{\partial y}{\partial x}=g(S_0-S_f)

Kinematic wave approximation

In many flood-routing problems on steep slopes the local acceleration, convective acceleration and pressure terms are small compared with the gravity and friction terms. Dropping them, the momentum equation becomes

S0−Sf=0⇒Sf=S0S_0-S_f=0\quad\Rightarrow\quad S_f=S_0

so the flow is always at its normal-depth value for the local area and a unique relation exists:

Q=αkAβ,β=53 (Manning)Q=\alpha_kA^{\beta},\qquad \beta=\frac53\ \text{(Manning)}

Together with continuity, ∂A∂t+∂Q∂x=q\dfrac{\partial A}{\partial t}+\dfrac{\partial Q}{\partial x}=q, this gives the kinematic wave equation

∂Q∂t+c ∂Q∂x=c q,c=dQdA=βV\frac{\partial Q}{\partial t}+c\,\frac{\partial Q}{\partial x}=c\,q,\qquad c=\frac{dQ}{dA}=\beta V

The wave moves downstream at speed cc without attenuation (no backwater effects).

Courant number

The Courant number is the ratio of the distance a wave travels in one time step to the grid spacing:

C=c ΔtΔxC=\frac{c\,\Delta t}{\Delta x}

For explicit schemes, stability requires C≤1C\le1. For the dynamic wave, c=V±gyc=V\pm\sqrt{gy}.

  • 2077 Chaitra · 6 marks

For a 30 m wide and 0.015 bed slope rectangular channel the following flow rates are given: Qin=20Q_i^n = 20 m3^3/s, Qin+1=28Q_i^{n+1} = 28 m3^3/s and Qi+1n=18Q_{i+1}^n = 18 m3^3/s. Taking Manning's n=0.025n = 0.025, Δx=1200\Delta x = 1200 m and Δt=10\Delta t = 10 min, determine Qi+1n+1Q_{i+1}^{n+1} using the finite difference scheme for the linear kinematic wave model. Assume lateral inflow to be zero. Take wetted perimeter approximately equal to the width of the channel.

Answer

The linear kinematic wave equation ∂Q∂t+c∂Q∂x=0\dfrac{\partial Q}{\partial t}+c\dfrac{\partial Q}{\partial x}=0 is solved with the second-order four-point scheme using the three known values Qin, Qin+1, Qi+1nQ_i^n,\ Q_i^{n+1},\ Q_{i+1}^n.

Step 1: Celerity (wide channel, P≈BP\approx B)

Manning: Q=1nS01/2B y5/3Q=\dfrac{1}{n}S_0^{1/2}B\,y^{5/3} (with A=ByA=By, R≈yR\approx y). A representative discharge is taken as the mean of the three known values: Q=(20+28+18)/3=22Q=(20+28+18)/3=22 m3^3/s.

y=(nQS01/2B)3/5=0.3200 m,V=QBy=2.2918 m/sy=\left(\frac{nQ}{S_0^{1/2}B}\right)^{3/5}=0.3200\ \text{m},\qquad V=\frac{Q}{By}=2.2918\ \text{m/s} c=dQdA=53V=3.8197 m/s,C=cΔtΔx=3.8197×6001200=1.9099c=\frac{dQ}{dA}=\frac53V=3.8197\ \text{m/s},\qquad C=\frac{c\Delta t}{\Delta x}=\frac{3.8197\times600}{1200}=1.9099

Step 2: Scheme

Qin+1+Qi+1n+1−Qin−Qi+1n2Δt+c Qi+1n+1+Qi+1n−Qin+1−Qin2Δx=0\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}=0 Qi+1n+1=Qin+1−C1+C(Qi+1n−Qin+1)Q_{i+1}^{n+1}=Q_i^n+\frac{1-C}{1+C}\left(Q_{i+1}^n-Q_i^{n+1}\right)

Step 3: Substitution

Qi+1n+1=20+1−1.90991+1.9099(18−28)=20+(−0.3127)(−10)=23.13 m3/sQ_{i+1}^{n+1}=20+\frac{1-1.9099}{1+1.9099}(18-28)=20+(-0.3127)(-10)=23.13\ \text{m}^3/\text{s}

Answer: Qi+1n+1≈23.13Q_{i+1}^{n+1}\approx23.13 m3^3/s. (Because C>1C>1 the four-point scheme is still stable, as it is unconditionally stable; the value depends on the celerity assumed, here from the mean of the known flows.)

  • 2075 Bhadra · 2+2+2 marks

Describe the basic steps in the finite difference method. Explain explicit and implicit schemes in the finite difference method using suitable examples and expressions.

Answer

Basic steps in the finite difference method

  1. State the problem: write the governing PDE with its domain, initial conditions (at t=0t=0) and boundary conditions.
  2. Discretise the domain: draw a grid with spacing Δx\Delta x and time step Δt\Delta t; points are (xi,tn)(x_i,t^n).
  3. Approximate the derivatives: replace each derivative by a forward, backward or central difference obtained from the Taylor series.
  4. Write the algebraic equation at every grid point (explicit or implicit form).
  5. Insert the initial and boundary values into the equations.
  6. Solve: march forward in time (explicit), or solve the simultaneous equations at each time step (implicit, e.g. by the Thomas algorithm).
  7. Check consistency, accuracy (truncation error), stability (Courant number) and convergence by refining Δx,Δt\Delta x,\Delta t.
 t
 n+1 : o   o   o   o      unknown
 n   : o   o   o   o      known (initial / previous step)
 n-1 : .   .   .   .
       i-1 i  i+1 i+2    --> x

Explicit and implicit schemes (example: ∂Q/∂t+c ∂Q/∂x=0\partial Q/\partial t+c\,\partial Q/\partial x=0, C=cΔt/ΔxC=c\Delta t/\Delta x)

Explicit: the spatial derivative is evaluated at the known time level nn.

Qin+1−QinΔt+c Qin−Qi−1nΔx=0 ⇒ Qin+1=Qin−C (Qin−Qi−1n)\frac{Q_i^{n+1}-Q_i^n}{\Delta t}+c\,\frac{Q_i^n-Q_{i-1}^n}{\Delta x}=0\ \Rightarrow\ Q_i^{n+1}=Q_i^n-C\,(Q_i^n-Q_{i-1}^n)

Each unknown is found directly from known values. It is conditionally stable (needs C≤1C\le1).

Implicit: the spatial derivative is evaluated at the new time level n+1n+1.

Qin+1−QinΔt+c Qin+1−Qi−1n+1Δx=0 ⇒ Qin+1=Qin+C Qi−1n+11+C\frac{Q_i^{n+1}-Q_i^n}{\Delta t}+c\,\frac{Q_i^{n+1}-Q_{i-1}^{n+1}}{\Delta x}=0\ \Rightarrow\ Q_i^{n+1}=\frac{Q_i^n+C\,Q_{i-1}^{n+1}}{1+C}

The unknown at point ii depends on other unknowns at n+1n+1. For problems such as groundwater flow the result is a set of simultaneous equations (tridiagonal matrix). It is unconditionally stable.

Remark: with the implicit form the new value at ii also depends on the unknown Qi−1n+1Q_{i-1}^{n+1}; for the one-way kinematic wave this is solved by sweeping from the upstream boundary, while for diffusion-type equations a tridiagonal system must be solved.

  • 2075 Bhadra · 6 marks

A finite difference grid of points constructed to solve for the unsteady flow problems in a wide rectangular channel is shown in the figure below. Using an appropriate finite difference scheme for the two governing equations of fluid flow (continuity and momentum), compute the velocity and flow depth at grid point (i,j+1)(i, j+1) for the following given data. Velocity: Vi−1j=2.2V_{i-1}^j = 2.2 m/s, Vij=1.8V_i^j = 1.8 m/s, Vi+1j=1.5V_{i+1}^j = 1.5 m/s. Flow depth: yi−1j=1.6y_{i-1}^j = 1.6 m, yij=2.0y_i^j = 2.0 m, yi+1j=2.4y_{i+1}^j = 2.4 m (units printed as m/sec). Bed slope =1%= 1\%, Manning's n=0.032n = 0.032, Δx=1000\Delta x = 1000 m, Δt=4\Delta t = 4 minutes, no lateral inflow.
[Figure: grid with points i−1i-1, ii, i+1i+1 at time level jj (spacing Δx\Delta x) and the point ii at time level j+1j+1 (spacing Δt\Delta t)]

Answer

For a wide rectangular channel the two governing equations in terms of velocity VV and depth yy are

∂y∂t+V∂y∂x+y∂V∂x=0,∂V∂t+V∂V∂x+g∂y∂x=g(S0−Sf),Sf=n2V2y4/3\frac{\partial y}{\partial t}+V\frac{\partial y}{\partial x}+y\frac{\partial V}{\partial x}=0,\qquad \frac{\partial V}{\partial t}+V\frac{\partial V}{\partial x}+g\frac{\partial y}{\partial x}=g(S_0-S_f),\quad S_f=\frac{n^2V^2}{y^{4/3}}

Scheme (explicit, Lax diffusive form)

The old value at ii is replaced by the average of its neighbours, and central differences are used in space:

yij+1=yi+1j+yi−1j2−Δt2Δx[Vij(yi+1j−yi−1j)+yij(Vi+1j−Vi−1j)]y_i^{j+1}=\frac{y_{i+1}^j+y_{i-1}^j}{2}-\frac{\Delta t}{2\Delta x}\left[V_i^j\left(y_{i+1}^j-y_{i-1}^j\right)+y_i^j\left(V_{i+1}^j-V_{i-1}^j\right)\right] Vij+1=Vi+1j+Vi−1j2−Δt2Δx[Vij(Vi+1j−Vi−1j)+g(yi+1j−yi−1j)]+gΔt (S0−Sf,ij)V_i^{j+1}=\frac{V_{i+1}^j+V_{i-1}^j}{2}-\frac{\Delta t}{2\Delta x}\left[V_i^j\left(V_{i+1}^j-V_{i-1}^j\right)+g\left(y_{i+1}^j-y_{i-1}^j\right)\right]+g\Delta t\,(S_0-S_{f,i}^j)

Data

Δt=4×60=240\Delta t=4\times60=240 s, Δx=1000\Delta x=1000 m, so Δt2Δx=0.120\dfrac{\Delta t}{2\Delta x}=0.120. S0=0.01S_0=0.01, n=0.032n=0.032.

Step 1: Friction slope at ii

Sf=n2Vi2yi4/3=0.0322(1.8)22.04/3=0.001317S_f=\frac{n^2V_i^2}{y_i^{4/3}}=\frac{0.032^2(1.8)^2}{2.0^{4/3}}=0.001317

Step 2: Depth

yij+1=2.4+1.62−0.120[1.8(2.4−1.6)+2.0(1.5−2.2)]=2.0−0.120 (0.04)=1.9952 my_i^{j+1}=\frac{2.4+1.6}{2}-0.120\left[1.8(2.4-1.6)+2.0(1.5-2.2)\right]=2.0-0.120\,(0.04)=1.9952\ \text{m}

Step 3: Velocity

  • Average: (1.5+2.2)/2=1.85(1.5+2.2)/2=1.85
  • Convective: −0.120 [1.8(1.5−2.2)]=0.1512-0.120\,[1.8(1.5-2.2)]=0.1512
  • Pressure: −0.120 [9.81(2.4−1.6)]=−0.9418-0.120\,[9.81(2.4-1.6)]=-0.9418
  • Gravity and friction: 9.81(240)(0.01−0.001317)=20.44419.81(240)(0.01-0.001317)=20.4441
Vij+1=1.85+(0.1512)+(−0.9418)+(20.4441)=21.504 m/sV_i^{j+1}=1.85+(0.1512)+(-0.9418)+(20.4441)=21.504\ \text{m/s}

Answer: yij+1=1.9952y_i^{j+1}=1.9952 m and Vij+1=21.50V_i^{j+1}=21.50 m/s.

Remark: the very large velocity arises because the gravity term (S0=1%S_0=1\%) is far from balanced by friction and the pressure gradient for these data, and Δt=240\Delta t=240 s exceeds the Courant limit Δx/(V+gy)≈161\Delta x/(V+\sqrt{gy})\approx161 s. The values are the one-step result of the scheme; a real simulation would use a smaller Δt\Delta t.

  • 2072 Asoj · 6 marks

A channel with a width of 40 m, bed slope 2% and Manning's n=0.03n = 0.03 carries a discharge of 100 m3^3/s through a section. If Δx\Delta x is taken as 1500 meters, recommend the maximum time step for kinematic wave routing in this condition. Assume hydraulic radius equal to flow depth.

Answer

For an explicit kinematic wave scheme the time step is limited by the Courant condition:

C=c ΔtΔx≤1 ⇒ Δtmax=ΔxcC=\frac{c\,\Delta t}{\Delta x}\le1\ \Rightarrow\ \Delta t_{max}=\frac{\Delta x}{c}

where c=dQ/dAc=dQ/dA is the kinematic wave celerity.

Step 1: Normal depth

With R≈yR\approx y and A=ByA=By, Manning's equation gives

Q=1nBy y2/3S01/2 ⇒ y=(nQBS01/2)3/5=(0.03×10040×0.02)0.6=0.6835 mQ=\frac1nBy\,y^{2/3}S_0^{1/2}\ \Rightarrow\ y=\left(\frac{nQ}{BS_0^{1/2}}\right)^{3/5}=\left(\frac{0.03\times100}{40\times\sqrt{0.02}}\right)^{0.6}=0.6835\ \text{m}

Step 2: Velocity and celerity

V=QBy=10040×0.6835=3.6577 m/sV=\frac{Q}{By}=\frac{100}{40\times0.6835}=3.6577\ \text{m/s}

Since Q=αA5/3Q=\alpha A^{5/3}, c=dQdA=53V=53(3.6577)=6.0962 m/sc=\dfrac{dQ}{dA}=\dfrac53V=\dfrac53(3.6577)=6.0962\ \text{m/s}.

Step 3: Maximum time step

Δtmax=Δxc=15006.0962=246.1 s≈4.1 min\Delta t_{max}=\frac{\Delta x}{c}=\frac{1500}{6.0962}=246.1\ \text{s}\approx4.1\ \text{min}

Answer: the time step should not exceed about 246 s (about 4.1 minutes); a practical choice is slightly less, e.g. 4 minutes (240 s).

  • 2071 Bhadra · 6 marks

Derive the first order accurate implicit finite difference equation for the kinematic wave model in the non-linear form.

Answer

Starting equations

Continuity with lateral inflow qq: ∂A∂t+∂Q∂x=q\dfrac{\partial A}{\partial t}+\dfrac{\partial Q}{\partial x}=q. The kinematic approximation Sf=S0S_f=S_0 with Manning's equation gives the unique relation

A=αQβ,α=(nP2/3S01/2)0.6,β=0.6A=\alpha Q^{\beta},\qquad \alpha=\left(\frac{nP^{2/3}}{S_0^{1/2}}\right)^{0.6},\quad \beta=0.6

so that the non-linear kinematic wave equation is

∂(αQβ)∂t+∂Q∂x=q\frac{\partial(\alpha Q^\beta)}{\partial t}+\frac{\partial Q}{\partial x}=q

Grid and differences

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

The equation is written at the point (i+1, n+1)(i+1,\ n+1), using

  • a backward difference in time: ∂A∂t≈Ai+1n+1−Ai+1nΔt\dfrac{\partial A}{\partial t}\approx\dfrac{A_{i+1}^{n+1}-A_{i+1}^n}{\Delta t}
  • a backward difference in space, evaluated at the new time level n+1n+1: ∂Q∂x≈Qi+1n+1−Qin+1Δx\dfrac{\partial Q}{\partial x}\approx\dfrac{Q_{i+1}^{n+1}-Q_i^{n+1}}{\Delta x}
  • q≈qˉq\approx\bar q (average lateral inflow per unit length over the step).

Both differences have errors O(Δt)O(\Delta t) and O(Δx)O(\Delta x), so the scheme is first-order accurate. Because the spatial difference uses new-time values it is implicit and unconditionally stable.

Finite difference equation

α(Qi+1n+1)β−α(Qi+1n)βΔt+Qi+1n+1−Qin+1Δx=qˉ\frac{\alpha\left(Q_{i+1}^{n+1}\right)^{\beta}-\alpha\left(Q_{i+1}^{n}\right)^{\beta}}{\Delta t}+\frac{Q_{i+1}^{n+1}-Q_i^{n+1}}{\Delta x}=\bar q

Multiplying by Δt\Delta t and putting the unknown Qi+1n+1Q_{i+1}^{n+1} on the left:

ΔtΔx Qi+1n+1+α(Qi+1n+1)β=ΔtΔx Qin+1+α(Qi+1n)β+Δt qˉ\frac{\Delta t}{\Delta x}\,Q_{i+1}^{n+1}+\alpha\left(Q_{i+1}^{n+1}\right)^{\beta}=\frac{\Delta t}{\Delta x}\,Q_i^{n+1}+\alpha\left(Q_{i+1}^{n}\right)^{\beta}+\Delta t\,\bar q

The right side contains only known values (Qin+1Q_i^{n+1} from the upstream point at the new time, Qi+1nQ_{i+1}^n from the previous time).

Solution (Newton-Raphson)

Let x=Qi+1n+1x=Q_{i+1}^{n+1} and define

f(x)=ΔtΔxx+αxβ−[ΔtΔxQin+1+α(Qi+1n)β+Δt qˉ]=0f(x)=\frac{\Delta t}{\Delta x}x+\alpha x^\beta-\left[\frac{\Delta t}{\Delta x}Q_i^{n+1}+\alpha\left(Q_{i+1}^n\right)^\beta+\Delta t\,\bar q\right]=0 xk+1=xk−f(xk)f′(xk),f′(x)=ΔtΔx+αβxβ−1x_{k+1}=x_k-\frac{f(x_k)}{f'(x_k)},\qquad f'(x)=\frac{\Delta t}{\Delta x}+\alpha\beta x^{\beta-1}

Start with x0=Qi+1nx_0=Q_{i+1}^n and iterate until the change is negligible. The calculation proceeds from the upstream boundary (i=1i=1) down the channel for each time step.

  • 2071 Bhadra · 6 marks

Using the finite difference equation developed in the previous part (first order accurate implicit non-linear kinematic wave), compute the discharge at 1 km downstream of location X at time 14:00 hrs, for the following data: rectangular channel, width = 20 m, bed slope = 0.001, Manning's n=0.03n = 0.03. Discharge at location X at time 14:00 hrs = 14 m3^3/s; discharge at location X at time 13:45 hrs = 12 m3^3/s; discharge at 1 km downstream of location X at time 13:45 hrs = 11 m3^3/s. No lateral flow, wetted perimeter approximately equal to width of channel.

Answer

Use the first-order implicit scheme

ΔtΔxQi+1n+1+α(Qi+1n+1)β=ΔtΔxQin+1+α(Qi+1n)β\frac{\Delta t}{\Delta x}Q_{i+1}^{n+1}+\alpha\left(Q_{i+1}^{n+1}\right)^{\beta}=\frac{\Delta t}{\Delta x}Q_i^{n+1}+\alpha\left(Q_{i+1}^n\right)^\beta

with q=0q=0. Here ii is location X and i+1i+1 is the point 1 km downstream; nn is 13:45 and n+1n+1 is 14:00.

Data

Δx=1000\Delta x=1000 m, Δt=15×60=900\Delta t=15\times60=900 s, ΔtΔx=0.90\dfrac{\Delta t}{\Delta x}=0.90, Qin+1=14Q_i^{n+1}=14, Qin=12Q_i^n=12, Qi+1n=11Q_{i+1}^n=11 m3^3/s.

Step 1: Kinematic coefficients (P≈B=20P\approx B=20 m)

α=(nP2/3S01/2)0.6=(0.03×202/30.001)0.6=3.2113,β=0.6\alpha=\left(\frac{nP^{2/3}}{S_0^{1/2}}\right)^{0.6}=\left(\frac{0.03\times20^{2/3}}{\sqrt{0.001}}\right)^{0.6}=3.2113,\qquad \beta=0.6

Step 2: Equation to solve

Right side: 0.90(14)+3.2113(11)0.6=26.13690.90(14)+3.2113(11)^{0.6}=26.1369

f(x)=0.90 x+3.2113 x0.6−26.1369=0,f′(x)=0.90+1.9268 x−0.4f(x)=0.90\,x+3.2113\,x^{0.6}-26.1369=0,\qquad f'(x)=0.90+1.9268\,x^{-0.4}

Step 3: Newton iteration from x0=Qi+1n=11x_0=Q_{i+1}^n=11

Iterationxkx_kf(xk)f(x_k)xk+1x_{k+1}
111.0000-2.700012.6480
212.6480-0.034112.6693
312.6693-0.000012.6693
412.6693-0.000012.6693

Answer: the discharge 1 km downstream of X at 14:00 hrs is Qi+1n+1≈12.67Q_{i+1}^{n+1}\approx12.67 m3^3/s.

  • 2070 Bhadra · 2 marks

Write down the complete governing equations describing the movement of fluid.

Answer

The movement of water in an open channel (1D unsteady flow) is described by the Saint-Venant equations, a pair of equations from conservation of mass and momentum.

Continuity (conservation of mass):

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

Momentum (conservation of momentum):

∂Q∂t⏟local acc.+∂∂x ⁣(Q2A)⏟convective acc.+gA∂y∂x⏟pressure force−gAS0⏟gravity+gASf⏟friction=0\underbrace{\frac{\partial Q}{\partial t}}_{\text{local acc.}}+\underbrace{\frac{\partial}{\partial x}\!\left(\frac{Q^2}{A}\right)}_{\text{convective acc.}}+\underbrace{gA\frac{\partial y}{\partial x}}_{\text{pressure force}}-\underbrace{gAS_0}_{\text{gravity}}+\underbrace{gAS_f}_{\text{friction}}=0

where AA = flow area, QQ = discharge, yy = flow depth, qq = lateral inflow per unit length, S0S_0 = bed slope, Sf=n2Q∣Q∣A2R4/3S_f=\dfrac{n^2Q|Q|}{A^2R^{4/3}} = friction slope (Manning), gg = gravity. These are the Saint-Venant equations (1D unsteady open-channel flow).

In terms of velocity VV and depth yy for a wide rectangular channel:

∂y∂t+V∂y∂x+y∂V∂x=0,∂V∂t+V∂V∂x+g∂y∂x=g(S0−Sf)\frac{\partial y}{\partial t}+V\frac{\partial y}{\partial x}+y\frac{\partial V}{\partial x}=0,\qquad \frac{\partial V}{\partial t}+V\frac{\partial V}{\partial x}+g\frac{\partial y}{\partial x}=g(S_0-S_f)

Assumptions: one-dimensional flow, hydrostatic pressure, small bed slope, uniform velocity over the section, and friction given by the steady-flow (Manning) formula. The two equations have two unknowns, QQ (or VV) and yy (or AA), as functions of xx and tt.

  • 2070 Bhadra · 4 marks

Derive the kinematic wave approximation for the movement of fluid.

Answer

Starting point

The momentum equation of the Saint-Venant system is

∂Q∂t⏟1+∂∂x(Q2A)⏟2+gA∂y∂x⏟3−gA(S0−Sf)=0\underbrace{\frac{\partial Q}{\partial t}}_{1}+\underbrace{\frac{\partial}{\partial x}\left(\frac{Q^2}{A}\right)}_{2}+\underbrace{gA\frac{\partial y}{\partial x}}_{3}-gA(S_0-S_f)=0

Dividing by gAgA gives the form with slopes: Sf=S0−∂y∂x−Vg∂V∂x−1g∂V∂tS_f=S_0-\dfrac{\partial y}{\partial x}-\dfrac{V}{g}\dfrac{\partial V}{\partial x}-\dfrac1g\dfrac{\partial V}{\partial t}, in which terms 1, 2 and 3 are the local acceleration, convective acceleration and pressure terms.

Approximation

For flood waves on steep channels these three terms are very small compared with S0S_0 and SfS_f. Neglecting them:

S0−Sf=0 ⇒ Sf=S0S_0-S_f=0\ \Rightarrow\ S_f=S_0

The flow is then locally uniform: the discharge depends only on the area at the same section. Using Manning's equation Q=1nA5/3P2/3S01/2Q=\dfrac{1}{n}\dfrac{A^{5/3}}{P^{2/3}}S_0^{1/2},

Q=αkAβ,β=53,  αk=S01/2nP2/3Q=\alpha_kA^{\beta},\qquad \beta=\frac53,\ \ \alpha_k=\frac{S_0^{1/2}}{nP^{2/3}}

Kinematic wave equation

Continuity: ∂A∂t+∂Q∂x=q\dfrac{\partial A}{\partial t}+\dfrac{\partial Q}{\partial x}=q. From the relation above, ∂Q∂x=dQdA∂A∂x\dfrac{\partial Q}{\partial x}=\dfrac{dQ}{dA}\dfrac{\partial A}{\partial x}, hence

∂A∂t+c∂A∂x=q,or∂Q∂t+c∂Q∂x=c q,c=dQdA=αkβAβ−1=βV\frac{\partial A}{\partial t}+c\frac{\partial A}{\partial x}=q,\qquad\text{or}\qquad \frac{\partial Q}{\partial t}+c\frac{\partial Q}{\partial x}=c\,q,\qquad c=\frac{dQ}{dA}=\alpha_k\beta A^{\beta-1}=\beta V

A flood wave therefore moves downstream at the kinematic celerity c≈53Vc\approx\frac53V without changing shape (no attenuation or backwater effects).

  • 2070 Bhadra · 8 marks

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

Answer

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).
  • 2070 Magh · 6 marks

The value of flow rate QQ at four points in the space-time grid are shown in the figure below. Δt=1\Delta t = 1 h, Δx=1000\Delta x = 1000 m and θ=0.55\theta = 0.55. Calculate the values of ∂Q/∂t\partial Q/\partial t and ∂Q/∂x\partial Q/\partial x by the four-point implicit method. (θ\theta = weighting factor.)
[Figure: space-time grid with time levels j and j+1 and distance points i and i+1 (Δx=1000\Delta x = 1000 m, Δt=1\Delta t = 1 h); QQ at (i, j+1) =3580= 3580 cms, at (i+1, j+1) =3470= 3470 cms, at (i, j) =3500= 3500 cms, at (i+1, j) =3350= 3350 cms]

Answer

Four-point implicit method

∂Q∂t≈(Qij+1−Qij)+(Qi+1j+1−Qi+1j)2Δt\frac{\partial Q}{\partial t}\approx\frac{(Q_i^{j+1}-Q_i^j)+(Q_{i+1}^{j+1}-Q_{i+1}^j)}{2\Delta t} ∂Q∂x≈θ Qi+1j+1−Qij+1Δx+(1−θ) Qi+1j−QijΔx\frac{\partial Q}{\partial x}\approx\theta\,\frac{Q_{i+1}^{j+1}-Q_i^{j+1}}{\Delta x}+(1-\theta)\,\frac{Q_{i+1}^j-Q_i^j}{\Delta x}

Data: Qij+1=3580Q_i^{j+1}=3580, Qi+1j+1=3470Q_{i+1}^{j+1}=3470, Qij=3500Q_i^j=3500, Qi+1j=3350Q_{i+1}^j=3350; Δt=3600\Delta t=3600 s, Δx=1000\Delta x=1000 m, θ=0.55\theta=0.55.

Time derivative

∂Q∂t=(3580−3500)+(3470−3350)2×3600=2007200=2.7778×10−2 m3/s2\frac{\partial Q}{\partial t}=\frac{(3580-3500)+(3470-3350)}{2\times3600}=\frac{200}{7200}=2.7778\times10^{-2}\ \text{m}^3/\text{s}^2

Space derivative

∂Q∂x=0.55 3470−35801000+0.45 3350−35001000=−0.06050+(−0.06750)=−0.1280 m3/s per m\frac{\partial Q}{\partial x}=0.55\,\frac{3470-3580}{1000}+0.45\,\frac{3350-3500}{1000}=-0.06050+(-0.06750)=-0.1280\ \text{m}^3/\text{s per m}

Answer: ∂Q/∂t=2.7778×10−2\partial Q/\partial t=2.7778\times10^{-2} m3^3/s2^2 and ∂Q/∂x=−0.1280\partial Q/\partial x=-0.1280 m2^2/s.

  • 2070 Magh · 6 marks

A flood of 150 m3^3/s peak discharge passed a gauging station at 12:00 noon on a river. There is a community adjacent to the river 7.2 km downstream. What will be the value of peak discharge at that community at 12:00 noon if the velocity of flow is 1.2 m/s2^2 [as printed] and the peak discharge at that community at 9:00 A.M. is 100 m3^3/s? Assume width of river as [?] and use the first order accurate numerical scheme of the kinematic wave equation. Take Δx=7.2\Delta x = 7.2 km and Δt=1\Delta t = 1 hr.

Answer

The first-order accurate (implicit) scheme of the linear kinematic wave equation ∂Q/∂t+c ∂Q/∂x=0\partial Q/\partial t+c\,\partial Q/\partial x=0 is

Qi+1n+1−Qi+1nΔt+c Qi+1n+1−Qin+1Δx=0 ⇒ Qi+1n+1=Qi+1n+C Qin+11+C,C=cΔtΔx\frac{Q_{i+1}^{n+1}-Q_{i+1}^n}{\Delta t}+c\,\frac{Q_{i+1}^{n+1}-Q_i^{n+1}}{\Delta x}=0 \ \Rightarrow\ Q_{i+1}^{n+1}=\frac{Q_{i+1}^n+C\,Q_i^{n+1}}{1+C},\qquad C=\frac{c\Delta t}{\Delta x}

Interpretation of the data

  • The gauging station is point ii; the community (Δx=7.2\Delta x=7.2 km downstream) is i+1i+1.
  • Qin+1=150Q_i^{n+1}=150 m3^3/s (peak at the station at 12:00 noon).
  • Qi+1n=100Q_{i+1}^n=100 m3^3/s is the flow already at the community at the earlier level (taken as the 9:00 A.M. value, with Δt=1\Delta t=1 h per step).
  • The velocity given as 1.2 (m/s) is used as the wave celerity cc; the channel width is then not needed, because the equation is written in terms of QQ.

Calculation

C=c ΔtΔx=1.2×36007200=0.6C=\frac{c\,\Delta t}{\Delta x}=\frac{1.2\times3600}{7200}=0.6 Qi+1n+1=100+0.6×1501+0.6=1901.6=118.75 m3/sQ_{i+1}^{n+1}=\frac{100+0.6\times150}{1+0.6}=\frac{190}{1.6}=118.75\ \text{m}^3/\text{s}

Answer: the discharge at the community at 12:00 noon is about 118.75 m3^3/s (the peak is delayed and attenuated numerically). The data are incomplete in the question (width missing, unit of velocity printed as m/s2^2), so this reading is assumed.

Questions from Old Question Collection (CE 751) (IOE BCE CE 751 exam papers from 2070 to 2079). Answers are written for this site; check them against your class notes.

Chapter titles and hours from the IOE syllabus ↗