Skip to main content

Chapter 6 · 4 hours

Method of Characteristics

IOE past exam questions

Past questions and answers

12 questions set from this chapter, 2 of them more than once; 1 is most repeated (set, or a close variant set, in 3 or more exams). Most repeated first.

  • Most repeated · 4 of 12 exams
  • Asked 4 times
  • 2078 Chaitra · 2+6 marks
  • 2078 Kartik · 1+1+3 marks
  • 2075 Bhadra · 2+6 marks
  • 2071 Bhadra · 2+6 marks

What do you understand by the method of characteristics (MOC) and why is it necessary? Derive the finite difference form of the characteristic equations of the unsteady pipe flow equations to obtain the solution in terms of head and discharge.

Answer

Method of characteristics (MOC)

The method of characteristics converts the two partial differential equations of unsteady flow (a hyperbolic system) into ordinary differential equations that hold only along special lines in the xx-tt plane, called characteristic lines. These ordinary equations are then integrated by finite differences.

Why it is necessary:

  • The PDEs (continuity and momentum) are non-linear because of the friction term Q∣Q∣Q|Q| and cannot be solved analytically for real boundary conditions.
  • Disturbances (pressure waves, water hammer) travel at finite speed aa; the characteristics follow exactly these waves, so the numerical solution keeps the physical wave behaviour and sharp fronts are captured.
  • It handles boundary conditions (reservoir, valve, pump) conveniently, and gives accurate results for water hammer.

For unsteady flow in a closed pipe (area ApA_p, diameter DD, wave speed aa, Darcy-Weisbach factor ff), with head HH and discharge QQ:

Momentum:

L1=∂Q∂t+gAp∂H∂x+f Q∣Q∣2DAp=0L_1=\frac{\partial Q}{\partial t}+gA_p\frac{\partial H}{\partial x}+\frac{f\,Q|Q|}{2DA_p}=0

Continuity:

L2=∂H∂t+a2gAp∂Q∂x=0L_2=\frac{\partial H}{\partial t}+\frac{a^2}{gA_p}\frac{\partial Q}{\partial x}=0

Conversion to characteristic (ordinary differential) equations

Combine the two equations linearly with an unknown multiplier λ\lambda: L1+λL2=0L_1+\lambda L_2=0.

[∂Q∂t+λa2gAp∂Q∂x]+λ[∂H∂t+gApλ∂H∂x]+fQ∣Q∣2DAp=0\left[\frac{\partial Q}{\partial t}+\lambda\frac{a^2}{gA_p}\frac{\partial Q}{\partial x}\right]+\lambda\left[\frac{\partial H}{\partial t}+\frac{gA_p}{\lambda}\frac{\partial H}{\partial x}\right]+\frac{fQ|Q|}{2DA_p}=0

If the two brackets are total derivatives dQdt\dfrac{dQ}{dt} and dHdt\dfrac{dH}{dt} along a line dx/dtdx/dt, then

dxdt=λa2gAp=gApλ ⇒ λ=±gApa,dxdt=±a\frac{dx}{dt}=\lambda\frac{a^2}{gA_p}=\frac{gA_p}{\lambda}\ \Rightarrow\ \lambda=\pm\frac{gA_p}{a},\qquad \frac{dx}{dt}=\pm a

This gives two pairs of equations:

C+C^+C−C^-
Linedxdt=+a\dfrac{dx}{dt}=+adxdt=−a\dfrac{dx}{dt}=-a
ODE$\dfrac{gA_p}{a}\dfrac{dH}{dt}+\dfrac{dQ}{dt}+\dfrac{fQQ

Multiplying by a/(gAp)a/(gA_p):

C+: dHdt+agApdQdt+af2gDAp2Q∣Q∣=0,C−: dHdt−agApdQdt−af2gDAp2Q∣Q∣=0C^+:\ \frac{dH}{dt}+\frac{a}{gA_p}\frac{dQ}{dt}+\frac{af}{2gDA_p^2}Q|Q|=0,\qquad C^-:\ \frac{dH}{dt}-\frac{a}{gA_p}\frac{dQ}{dt}-\frac{af}{2gDA_p^2}Q|Q|=0

Finite difference form (rectangular grid, Δx=aΔt\Delta x=a\Delta t)

 t
 t+dt :          P            unknown H_P, Q_P
                / \
          C+  /   \  C-
 t    :     A --C-- B         known
         (x-dx)  (x)  (x+dx)        --> x

Integrate C+C^+ from A to P and C−C^- from B to P, taking the friction term at the known point (first-order) and using aΔt=Δxa\Delta t=\Delta x:

HP=HA−Bp(QP−QA)−RpQA∣QA∣(C+)H_P=H_A-B_p\left(Q_P-Q_A\right)-R_pQ_A|Q_A|\qquad(C^+) HP=HB+Bp(QP−QB)+RpQB∣QB∣(C−)H_P=H_B+B_p\left(Q_P-Q_B\right)+R_pQ_B|Q_B|\qquad(C^-) Bp=agAp,Rp=f Δx2gDAp2B_p=\frac{a}{gA_p},\qquad R_p=\frac{f\,\Delta x}{2gDA_p^2}

Define the known quantities

K1=HA+BpQA−RpQA∣QA∣,K2=HB−BpQB+RpQB∣QB∣K_1=H_A+B_pQ_A-R_pQ_A|Q_A|,\qquad K_2=H_B-B_pQ_B+R_pQ_B|Q_B|

Then HP=K1−BpQPH_P=K_1-B_pQ_P and HP=K2+BpQPH_P=K_2+B_pQ_P, so

QP=K1−K22Bp,HP=K1+K22Q_P=\frac{K_1-K_2}{2B_p},\qquad H_P=\frac{K_1+K_2}{2}

With HPH_P and QPQ_P known for all interior points, the boundary points are found from one characteristic plus the boundary condition (e.g. a reservoir: HP=HresH_P=H_{res}; closed valve: QP=0Q_P=0), and the procedure is repeated for the next time step.

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

Develop a characteristic form of a finite-difference solution of the unsteady flow equations to get the solution in terms of velocity and pressure.

Answer

Governing equations (velocity VV, pressure pp)

For a pipe of diameter DD inclined at angle θ\theta to the horizontal (water density ρ\rho, wave speed aa, friction factor ff), neglecting the small convective terms:

Momentum:

L1=∂V∂t+1ρ∂p∂x+gsin⁡θ+f2DV∣V∣=0L_1=\frac{\partial V}{\partial t}+\frac1\rho\frac{\partial p}{\partial x}+g\sin\theta+\frac{f}{2D}V|V|=0

Continuity:

L2=∂p∂t+ρa2∂V∂x=0L_2=\frac{\partial p}{\partial t}+\rho a^2\frac{\partial V}{\partial x}=0

Characteristic equations

Form L1+λL2=0L_1+\lambda L_2=0:

[∂V∂t+λρa2∂V∂x]+λ[∂p∂t+1λρ∂p∂x]+gsin⁡θ+f2DV∣V∣=0\left[\frac{\partial V}{\partial t}+\lambda\rho a^2\frac{\partial V}{\partial x}\right]+\lambda\left[\frac{\partial p}{\partial t}+\frac{1}{\lambda\rho}\frac{\partial p}{\partial x}\right]+g\sin\theta+\frac{f}{2D}V|V|=0

For both brackets to be total derivatives, dxdt=λρa2=1λρ\dfrac{dx}{dt}=\lambda\rho a^2=\dfrac{1}{\lambda\rho}, so λ=±1ρa\lambda=\pm\dfrac{1}{\rho a} and dxdt=±a\dfrac{dx}{dt}=\pm a:

C+ (dxdt=+a):dVdt+1ρadpdt+gsin⁡θ+f2DV∣V∣=0C^+\ \left(\frac{dx}{dt}=+a\right):\quad \frac{dV}{dt}+\frac{1}{\rho a}\frac{dp}{dt}+g\sin\theta+\frac{f}{2D}V|V|=0 C− (dxdt=−a):dVdt−1ρadpdt+gsin⁡θ+f2DV∣V∣=0C^-\ \left(\frac{dx}{dt}=-a\right):\quad \frac{dV}{dt}-\frac{1}{\rho a}\frac{dp}{dt}+g\sin\theta+\frac{f}{2D}V|V|=0

Finite difference form

Use the rectangular grid with A, C, B at time tt and P at t+Δtt+\Delta t, with Δx=aΔt\Delta x=a\Delta t. Multiply by ρa\rho a, integrate along each characteristic (friction at the known point), and put Δxsin⁡θ=Δz\Delta x\sin\theta=\Delta z (rise of the pipe over Δx\Delta x):

 t+dt :         P
               / \
         C+  /     \  C-
 t    :    A----C----B
C+:pP=pA−ρa(VP−VA)−ρg(zP−zA)−ρfΔx2DVA∣VA∣C^+:\quad p_P=p_A-\rho a\left(V_P-V_A\right)-\rho g\left(z_P-z_A\right)-\frac{\rho f\Delta x}{2D}V_A|V_A| C−:pP=pB+ρa(VP−VB)+ρg(zB−zP)+ρfΔx2DVB∣VB∣C^-:\quad p_P=p_B+\rho a\left(V_P-V_B\right)+\rho g\left(z_B-z_P\right)+\frac{\rho f\Delta x}{2D}V_B|V_B|

Solution

Equating the two expressions for pPp_P:

VP=(pA−pB)+ρa(VA+VB)−ρg(zB−zA)−ρfΔx2D[VA∣VA∣+VB∣VB∣]2ρaV_P=\frac{(p_A-p_B)+\rho a(V_A+V_B)-\rho g(z_B-z_A)-\dfrac{\rho f\Delta x}{2D}\left[V_A|V_A|+V_B|V_B|\right]}{2\rho a}

and pPp_P is then obtained from either equation. At each time step, the interior points are found this way; boundary points use one characteristic plus the boundary condition (e.g. p=p= reservoir pressure, or V=0V=0 at a closed valve).

  • 2079 Jestha · 4 marks

If the MOC is applied for t1=1t_1 = 1 s and t2=2t_2 = 2 s, time levels for a pipe with diameter 25 cm carrying water. If QA=0.6Q_A = 0.6 m3^3/s, QB=0.65Q_B = 0.65 m3^3/s, QC=0.64Q_C = 0.64 m3^3/s, HA=20H_A = 20 m, HB=20.6H_B = 20.6 m, and HC=20.4H_C = 20.4 m are the values at grid points. Find the values of QQ and HH at t1=1t_1 = 1 s that will be required for finding QQ and HH at P when characteristics do not lie on diagonal. Here, Δx=1000\Delta x = 1000 m, Δt=1\Delta t = 1 s, f=0.02f = 0.02 and c=850c = 850 m/s.

Similar questions: MOC numerical, characteristics not on diagonal (30 cm) (2072 Asoj)

Answer

Idea

When the characteristics do not lie on the diagonal of the grid, aΔt<Δxa\Delta t<\Delta x: the C+C^+ and C−C^- lines through P (at t2t_2) meet the line t1t_1 at points R and S that lie between the grid points, not at A and B. QQ and HH at R and S are found by linear interpolation along the time line t1t_1.

 t2 :              P
                  /|\
            C+  /  |  \  C-
 t1 :   A-----R----C----S-----B
        (x-dx)         (x+dx)
        |<-a dt->|   |<-a dt->|

Here R lies on the C+C^+ line between A and C, and S on the C−C^- line between C and B, each at a distance aΔta\Delta t from C.

Interpolation factor

θ=a ΔtΔx=850×11000=0.85\theta=\frac{a\,\Delta t}{\Delta x}=\frac{850\times1}{1000}=0.85

Point R (between A and C, C+C^+ foot):

QR=QC−θ (QC−QA),HR=HC−θ (HC−HA)Q_R=Q_C-\theta\,(Q_C-Q_A),\qquad H_R=H_C-\theta\,(H_C-H_A) QR=0.64−0.85(0.64−0.6)=0.606 m3/s,HR=20.4−0.85(20.4−20)=20.06 mQ_R=0.64-0.85(0.64-0.6)=0.606\ \text{m}^3/\text{s},\qquad H_R=20.4-0.85(20.4-20)=20.06\ \text{m}

Point S (between C and B, C−C^- foot):

QS=QC−θ (QC−QB),HS=HC−θ (HC−HB)Q_S=Q_C-\theta\,(Q_C-Q_B),\qquad H_S=H_C-\theta\,(H_C-H_B) QS=0.64−0.85(0.64−0.65)=0.6485 m3/s,HS=20.4−0.85(20.4−20.6)=20.57 mQ_S=0.64-0.85(0.64-0.65)=0.6485\ \text{m}^3/\text{s},\qquad H_S=20.4-0.85(20.4-20.6)=20.57\ \text{m}

Answer: at t1=1t_1=1 s, QR=0.606Q_R=0.606 m3^3/s, HR=20.06H_R=20.06 m on the C+C^+ line, and QS=0.6485Q_S=0.6485 m3^3/s, HS=20.57H_S=20.57 m on the C−C^- line. These replace QA,HAQ_A,H_A and QB,HBQ_B,H_B in the C+C^+ and C−C^- equations

HP=HR−Bp(QP−QR)−RpQR∣QR∣,HP=HS+Bp(QP−QS)+RpQS∣QS∣H_P=H_R-B_p(Q_P-Q_R)-R_pQ_R|Q_R|,\qquad H_P=H_S+B_p(Q_P-Q_S)+R_pQ_S|Q_S|

with Bp=a/(gAp)B_p=a/(gA_p) and Rp=f aΔt/(2gDAp2)R_p=f\,a\Delta t/(2gDA_p^2) (the friction length is aΔt=850a\Delta t=850 m).

  • 2072 Asoj · 4 marks

If the MOC is applied for t1=1t_1 = 1 sec and t2=2t_2 = 2 sec, time levels for a pipe with diameter 30 cm carrying water. If QA=0.7Q_A = 0.7 m3^3/s, QB=0.76Q_B = 0.76 m3^3/s and QC=0.74Q_C = 0.74 m3^3/s, HA=20H_A = 20 m, HB=20.6H_B = 20.6 m and HC=20.4H_C = 20.4 m are the values at grid points. Find the values of QQ and HH at t1=1t_1 = 1 sec that will be required for finding QQ and HH at P when characteristics do not lie on diagonal. Here, Δx=1000\Delta x = 1000 m, Δt=1\Delta t = 1 sec, f=0.02f = 0.02 and c=800c = 800 m/s.

Similar questions: MOC numerical, characteristics not on diagonal (25 cm) (2079 Jestha)

Answer

Idea

When the characteristics do not lie on the diagonal of the grid, aΔt<Δxa\Delta t<\Delta x: the C+C^+ and C−C^- lines through P (at t2t_2) meet the line t1t_1 at points R and S that lie between the grid points, not at A and B. QQ and HH at R and S are found by linear interpolation along the time line t1t_1.

 t2 :              P
                  /|\
            C+  /  |  \  C-
 t1 :   A-----R----C----S-----B
        (x-dx)         (x+dx)
        |<-a dt->|   |<-a dt->|

Here R lies on the C+C^+ line between A and C, and S on the C−C^- line between C and B, each at a distance aΔta\Delta t from C.

Interpolation factor

θ=a ΔtΔx=800×11000=0.80\theta=\frac{a\,\Delta t}{\Delta x}=\frac{800\times1}{1000}=0.80

Point R (between A and C, C+C^+ foot):

QR=QC−θ (QC−QA),HR=HC−θ (HC−HA)Q_R=Q_C-\theta\,(Q_C-Q_A),\qquad H_R=H_C-\theta\,(H_C-H_A) QR=0.74−0.80(0.74−0.7)=0.708 m3/s,HR=20.4−0.80(20.4−20)=20.08 mQ_R=0.74-0.80(0.74-0.7)=0.708\ \text{m}^3/\text{s},\qquad H_R=20.4-0.80(20.4-20)=20.08\ \text{m}

Point S (between C and B, C−C^- foot):

QS=QC−θ (QC−QB),HS=HC−θ (HC−HB)Q_S=Q_C-\theta\,(Q_C-Q_B),\qquad H_S=H_C-\theta\,(H_C-H_B) QS=0.74−0.80(0.74−0.76)=0.756 m3/s,HS=20.4−0.80(20.4−20.6)=20.56 mQ_S=0.74-0.80(0.74-0.76)=0.756\ \text{m}^3/\text{s},\qquad H_S=20.4-0.80(20.4-20.6)=20.56\ \text{m}

Answer: at t1=1t_1=1 s, QR=0.708Q_R=0.708 m3^3/s, HR=20.08H_R=20.08 m on the C+C^+ line, and QS=0.756Q_S=0.756 m3^3/s, HS=20.56H_S=20.56 m on the C−C^- line. These replace QA,HAQ_A,H_A and QB,HBQ_B,H_B in the C+C^+ and C−C^- equations

HP=HR−Bp(QP−QR)−RpQR∣QR∣,HP=HS+Bp(QP−QS)+RpQS∣QS∣H_P=H_R-B_p(Q_P-Q_R)-R_pQ_R|Q_R|,\qquad H_P=H_S+B_p(Q_P-Q_S)+R_pQ_S|Q_S|

with Bp=a/(gAp)B_p=a/(gA_p) and Rp=f aΔt/(2gDAp2)R_p=f\,a\Delta t/(2gDA_p^2) (the friction length is aΔt=800a\Delta t=800 m).

  • 2079 Shrawan · 4+4 marks

Derive a numerical solution for evaluating the water hammer problem. (a) Using a rectangular grid, characteristics passing through the diagonal. (b) Using specified time intervals (characteristics not on the diagonal).

Answer

Water hammer is the pressure surge produced by a rapid change of velocity (valve closure, pump trip). It is solved with the characteristic equations of unsteady pipe flow.

For unsteady flow in a closed pipe (area ApA_p, diameter DD, wave speed aa, Darcy-Weisbach factor ff), with head HH and discharge QQ:

Momentum:

L1=∂Q∂t+gAp∂H∂x+f Q∣Q∣2DAp=0L_1=\frac{\partial Q}{\partial t}+gA_p\frac{\partial H}{\partial x}+\frac{f\,Q|Q|}{2DA_p}=0

Continuity:

L2=∂H∂t+a2gAp∂Q∂x=0L_2=\frac{\partial H}{\partial t}+\frac{a^2}{gA_p}\frac{\partial Q}{\partial x}=0

Along C+C^+ (dx/dt=+adx/dt=+a) and C−C^- (dx/dt=−adx/dt=-a):

C+: dHdt+agApdQdt+af2gDAp2Q∣Q∣=0,C−: dHdt−agApdQdt−af2gDAp2Q∣Q∣=0C^+:\ \frac{dH}{dt}+\frac{a}{gA_p}\frac{dQ}{dt}+\frac{af}{2gDA_p^2}Q|Q|=0,\qquad C^-:\ \frac{dH}{dt}-\frac{a}{gA_p}\frac{dQ}{dt}-\frac{af}{2gDA_p^2}Q|Q|=0

Let Bp=agApB_p=\dfrac{a}{gA_p}.

(a) Rectangular grid: characteristics through the diagonal

Divide the pipe into NN reaches of length Δx=L/N\Delta x=L/N and choose Δt=Δx/a\Delta t=\Delta x/a. The C+C^+ and C−C^- lines through P then pass exactly through the grid points A and B of the previous time level.

 t+dt :         P
               /|\
         C+  /  |  \  C-
 t    :    A----C----B

Integrating C+C^+ from A to P and C−C^- from B to P (friction at the known end), with Rp=fΔx2gDAp2R_p=\dfrac{f\Delta x}{2gDA_p^2}:

HP=HA−Bp(QP−QA)−RpQA∣QA∣,HP=HB+Bp(QP−QB)+RpQB∣QB∣H_P=H_A-B_p(Q_P-Q_A)-R_pQ_A|Q_A|,\qquad H_P=H_B+B_p(Q_P-Q_B)+R_pQ_B|Q_B|

With K1=HA+BpQA−RpQA∣QA∣K_1=H_A+B_pQ_A-R_pQ_A|Q_A| and K2=HB−BpQB+RpQB∣QB∣K_2=H_B-B_pQ_B+R_pQ_B|Q_B|:

QP=K1−K22Bp,HP=K1+K22Q_P=\frac{K_1-K_2}{2B_p},\qquad H_P=\frac{K_1+K_2}{2}

No interpolation is needed. Boundaries: upstream reservoir, HP=HresH_P=H_{res} and QP=(Hres−K2)/BpQ_P=(H_{res}-K_2)/B_p; closed downstream valve, QP=0Q_P=0 and HP=K1H_P=K_1.

(b) Specified time intervals: characteristics not on the diagonal

When Δt\Delta t and Δx\Delta x are chosen independently (for example to get the same Δt\Delta t in pipes of different length), the Courant condition aΔt≤Δxa\Delta t\le\Delta x must hold. The characteristics through P cut the time line at points R and S between grid points.

 t+dt :              P
                    /|\
              C+  /  |  \  C-
 t    :   A-----R----C----S-----B

With θ=aΔtΔx≤1\theta=\dfrac{a\Delta t}{\Delta x}\le1, linear interpolation gives

QR=QC−θ(QC−QA),HR=HC−θ(HC−HA)Q_R=Q_C-\theta(Q_C-Q_A),\quad H_R=H_C-\theta(H_C-H_A) QS=QC−θ(QC−QB),HS=HC−θ(HC−HB)Q_S=Q_C-\theta(Q_C-Q_B),\quad H_S=H_C-\theta(H_C-H_B)

The characteristic equations from R and S to P (friction length aΔta\Delta t, so Rp′=f aΔt2gDAp2R_p'=\dfrac{f\,a\Delta t}{2gDA_p^2}) are

HP=HR−Bp(QP−QR)−Rp′QR∣QR∣,HP=HS+Bp(QP−QS)+Rp′QS∣QS∣H_P=H_R-B_p(Q_P-Q_R)-R_p'Q_R|Q_R|,\qquad H_P=H_S+B_p(Q_P-Q_S)+R_p'Q_S|Q_S| QP=K1′−K2′2Bp,HP=K1′+K2′2,K1′=HR+BpQR−Rp′QR∣QR∣,  K2′=HS−BpQS+Rp′QS∣QS∣Q_P=\frac{K_1'-K_2'}{2B_p},\quad H_P=\frac{K_1'+K_2'}{2},\qquad K_1'=H_R+B_pQ_R-R_p'Q_R|Q_R|,\ \ K_2'=H_S-B_pQ_S+R_p'Q_S|Q_S|

The interpolation introduces numerical damping (diffusion), which grows as θ\theta departs from 1, so the diagonal grid of part (a) is preferred when possible.

  • 2078 Kartik · 6 marks

The following data are given at two points A and B along a pipe of diameter 30 cm carrying water as shown in the figure: QA=0.4Q_A = 0.4 m3^3/s, QB=0.45Q_B = 0.45 m3^3/s, HA=26.5H_A = 26.5 m, HB=27.5H_B = 27.5 m, Δx=500\Delta x = 500 m, Δt=0.4\Delta t = 0.4 sec, f=0.02f = 0.02, aa (or cc) =1200= 1200 m/s, elevation difference between A and P =1= 1 m. Using the finite difference form of the characteristics equations, compute discharge and head at point P.
[Figure: x-t grid with points A, C, B at time tt spaced Δx\Delta x apart and P at time t+Δtt + \Delta t above C, with C+C^+ from A and C−C^- from B]

Answer

Use the finite difference form of the characteristic equations on the rectangular grid (A and B at time tt, P at t+Δtt+\Delta t):

C+: HP=HA−Bp(QP−QA)−RpQA∣QA∣,C−: HP=HB+Bp(QP−QB)+RpQB∣QB∣C^+:\ H_P=H_A-B_p(Q_P-Q_A)-R_pQ_A|Q_A|,\qquad C^-:\ H_P=H_B+B_p(Q_P-Q_B)+R_pQ_B|Q_B| Bp=agAp,Rp=f Δx2gDAp2B_p=\frac{a}{gA_p},\qquad R_p=\frac{f\,\Delta x}{2gDA_p^2}

HH is the piezometric head (it already contains the elevation), so the 1 m elevation difference between A and P is not needed to find HPH_P and QPQ_P.

Step 1: Constants

Ap=π4(0.3)2=0.07069 m2A_p=\frac{\pi}{4}(0.3)^2=0.07069\ \text{m}^2 Bp=12009.81×0.07069=1730.53 s/m2,Rp=0.02×5002×9.81×0.3×0.070692=340.03 s2/m5B_p=\frac{1200}{9.81\times0.07069}=1730.53\ \text{s/m}^2,\qquad R_p=\frac{0.02\times500}{2\times9.81\times0.3\times0.07069^2}=340.03\ \text{s}^2/\text{m}^5

(Here aΔt=1200×0.4=480a\Delta t=1200\times0.4=480 m is close to Δx=500\Delta x=500 m, so the characteristics are taken through A and B as in the figure.)

Step 2: Known quantities

K1=HA+BpQA−RpQA∣QA∣=26.5+1730.53(0.4)−340.03(0.16)=664.31K_1=H_A+B_pQ_A-R_pQ_A|Q_A|=26.5+1730.53(0.4)-340.03(0.16)=664.31 K2=HB−BpQB+RpQB∣QB∣=27.5−1730.53(0.45)+340.03(0.2025)=−682.38K_2=H_B-B_pQ_B+R_pQ_B|Q_B|=27.5-1730.53(0.45)+340.03(0.2025)=-682.38

Step 3: Solve for P

QP=K1−K22Bp=664.31−(−682.38)2×1730.53=0.3891 m3/sQ_P=\frac{K_1-K_2}{2B_p}=\frac{664.31-(-682.38)}{2\times1730.53}=0.3891\ \text{m}^3/\text{s} HP=K1+K22=−9.038 mH_P=\frac{K_1+K_2}{2}=-9.038\ \text{m}

Answer: QP≈0.3891Q_P\approx0.3891 m3^3/s and HP≈−9.038H_P\approx-9.038 m. The negative head means the data give a pressure below the vapour pressure at P (column separation would occur), because the large impedance BpB_p makes the QQ difference between A and B produce a big head change.

  • 2077 Chaitra · 4 marks

What is the method of characteristics? Define diffusion, dispersion and stability.

Answer

Method of characteristics

The method of characteristics replaces the two partial differential equations of unsteady flow by ordinary differential equations along the characteristic lines dx/dt=±adx/dt=\pm a in the xx-tt plane (the C+C^+ and C−C^- lines). These are integrated by finite differences from the known time level to the next. It is widely used for water hammer.

Numerical diffusion

Smoothing of the solution (loss of amplitude) caused by the truncation error of the scheme. In the MOC it arises when the characteristic foot falls between grid points and Q,HQ,H are found by linear interpolation: sharp pressure peaks are averaged and flattened.

Numerical dispersion

Spreading of waves caused by phase errors: different frequency components travel at different speeds, so a steep wave front becomes distorted and may show spurious oscillations. It is a property of the discretisation, not of the physical pipe.

Stability

A scheme is stable if errors made at one step do not grow in later steps. For the MOC with interpolation, the Courant condition must hold:

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

so that the characteristic foot lies within the grid interval used for interpolation. C=1C=1 (characteristics along the grid diagonal) gives no interpolation error, no numerical diffusion and the most accurate result.

  • 2077 Chaitra · 6 marks

The figure below shows a pipe conveying water from a reservoir. The HGL at the reservoir is given as HPA=100+2sin⁡(πt)H_{PA} = 100 + 2\sin(\pi t). The discharge at the downstream end is zero at all times. By using only one reach, compute the discharge from A and elevation of HGL at B at 2 seconds using the discretized equation of the MOC in the form of head and discharge. Take f=0.02f = 0.02 and c=1250c = 1250 m/s.
[Figure: reservoir with water level 100 m above the pipe centreline at A; pipe AB of length L=500L = 500 m and diameter D=450D = 450 mm]

Answer

Set-up

One reach means two nodes: A at the reservoir (x=0x=0) and B at the dead end (x=Lx=L). The time step follows from Δx=L\Delta x=L and Δt=L/a\Delta t=L/a:

Δt=5001250=0.40 s\Delta t=\frac{500}{1250}=0.40\ \text{s} Ap=π4(0.45)2=0.15904 m2,Bp=agAp=801.17 s/m2,Rp=f L2gDAp2=44.78 s2/m5A_p=\frac{\pi}{4}(0.45)^2=0.15904\ \text{m}^2,\quad B_p=\frac{a}{gA_p}=801.17\ \text{s/m}^2,\quad R_p=\frac{f\,L}{2gDA_p^2}=44.78\ \text{s}^2/\text{m}^5

Equations

C+C^+ (from A at the old time to B) and C−C^- (from B at the old time to A):

HP=HA−Bp(QP−QA)−RpQA∣QA∣,HP=HB+Bp(QP−QB)+RpQB∣QB∣H_{P}=H_A-B_p(Q_{P}-Q_A)-R_pQ_A|Q_A|,\qquad H_{P}=H_B+B_p(Q_{P}-Q_B)+R_pQ_B|Q_B|
  • Node A (reservoir): HPA=100+2sin⁡(πt)H_{PA}=100+2\sin(\pi t) is known; use C−C^- from B:
QPA=HPA−K2Bp,K2=HB−BpQB+RpQB∣QB∣Q_{PA}=\frac{H_{PA}-K_2}{B_p},\qquad K_2=H_B-B_pQ_B+R_pQ_B|Q_B|
  • Node B (closed end): QPB=0Q_{PB}=0; use C+C^+ from A:
HPB=K1=HA+BpQA−RpQA∣QA∣H_{PB}=K_1=H_A+B_pQ_A-R_pQ_A|Q_A|

Initial condition (t=0t=0)

No flow and static head: QA=QB=0Q_A=Q_B=0, HA=HB=100H_A=H_B=100 m.

First step (t=0.40t=0.40 s)

HPA=100+2sin⁡(0.40π)=101.9021H_{PA}=100+2\sin(0.40\pi)=101.9021 m; K2=100−0+0=100K_2=100-0+0=100; QPA=(101.9021−100)/801.17=0.00237Q_{PA}=(101.9021-100)/801.17=0.00237 m3^3/s; K1=100K_1=100, so HPB=100H_{PB}=100 m.

Marching in time

Repeating the two boundary calculations at every step (each uses the values of the previous step):

t (s)QAQ_A (m3^3/s)HAH_A (m)HBH_B (m)
0.400.00237101.902100.000
0.800.00147101.176103.804
1.20-0.0062298.824102.351
1.60-0.0053198.09893.847
2.000.00768100.00093.846

(QB=0Q_B=0 at all times.)

Answer: at t=2t=2 s, the discharge from A is QA=0.00768Q_A=0.00768 m3^3/s and the HGL elevation at B is HB=93.846H_B=93.846 m.

  • 2074 Bhadra · 2+6 marks

What do you understand by characteristic curve? Explain. A pipe of diameter 35 cm carrying water has the following data at two points A and B: VA=6V_A = 6 m/s, VB=6.25V_B = 6.25 m/s, pA=102p_A = 102 kN/m2^2, pB=124p_B = 124 kN/m2^2, Δx=500\Delta x = 500 m, Δt=0.5\Delta t = 0.5 s, f=0.02f = 0.02, a=1000a = 1000 m/s (dx/dt=±adx/dt = \pm a), elevation difference between A to P =2.50= 2.50 m. By the use of the finite difference form of the characteristics equations, compute the velocity and pressure at point P.
[Figure: x-t grid with A and B at time t separated by Δx\Delta x on either side of C, and P at time t+Δtt+\Delta t above C, reached along the C+C^+ characteristic from A and the C−C^- characteristic from B]

Answer

Characteristic curve

In the xx-tt plane, a characteristic curve is a line dx/dt=±adx/dt=\pm a along which the partial differential equations of unsteady pipe flow reduce to ordinary differential equations. It is the path of a small pressure disturbance: the C+C^+ curve (dx/dt=+adx/dt=+a) carries information downstream and the C−C^- curve (dx/dt=−adx/dt=-a) upstream. The solution at a point PP is found from the values at the two points A and B where the C+C^+ and C−C^- curves through PP meet the previous time line.

 t+dt :         P
               / \
         C+  /     \  C-
 t    :    A----C----B

Numerical part

Equations used (velocity and pressure form, ρ=1000\rho=1000 kg/m3^3, Δx=500\Delta x=500 m so aΔt=1000×0.5=500a\Delta t=1000\times0.5=500 m):

C+: pP=pA−ρa(VP−VA)−ρg(zP−zA)−ρfΔx2DVA∣VA∣C^+:\ p_P=p_A-\rho a(V_P-V_A)-\rho g(z_P-z_A)-\frac{\rho f\Delta x}{2D}V_A|V_A| C−: pP=pB+ρa(VP−VB)+ρg(zB−zP)+ρfΔx2DVB∣VB∣C^-:\ p_P=p_B+\rho a(V_P-V_B)+\rho g(z_B-z_P)+\frac{\rho f\Delta x}{2D}V_B|V_B|

Assumption: the pipe has a uniform slope, so P is 2.50 m above A and 2.50 m below B (zB−zA=5.0z_B-z_A=5.0 m, zP−zA=2.5z_P-z_A=2.5 m, zB−zP=2.5z_B-z_P=2.5 m).

Constants

  • ρa=1000×1000=1.0×106\rho a=1000\times1000=1.0\times10^{6} kg/(m2^2s)
  • ρfΔx2D=1000×0.02×5002×0.35=14285.71\dfrac{\rho f\Delta x}{2D}=\dfrac{1000\times0.02\times500}{2\times0.35}=14285.71 kg/m3^3 (friction coefficient)
  • ρg(zB−zA)=9810×5.0=49050\rho g(z_B-z_A)=9810\times5.0=49050 N/m2^2

Velocity at P

VP=(pA−pB)+ρa(VA+VB)−ρg(zB−zA)−ρfΔx2D[VA∣VA∣+VB∣VB∣]2ρaV_P=\frac{(p_A-p_B)+\rho a(V_A+V_B)-\rho g(z_B-z_A)-\frac{\rho f\Delta x}{2D}\left[V_A|V_A|+V_B|V_B|\right]}{2\rho a} VP=(102000−124000)+106(12.25)−49050−14285.71(36+39.0625)2×106=111066292×106=5.5533 m/sV_P=\frac{(102000-124000)+10^6(12.25)-49050-14285.71(36+39.0625)}{2\times10^6} =\frac{11106629}{2\times10^6}=5.5533\ \text{m/s}

Pressure at P (from C+C^+)

pP=102000−106(5.5533−6)−9810(2.5)−14285.71(36)=9875 N/m2=9.88 kN/m2p_P=102000-10^6(5.5533-6)-9810(2.5)-14285.71(36)=9875\ \text{N/m}^2=9.88\ \text{kN/m}^2

Check with C−C^-: pP=124000+106(5.5533−6.25)+9810(2.5)+14285.71(39.0625)=9875p_P=124000+10^6(5.5533-6.25)+9810(2.5)+14285.71(39.0625)=9875 N/m2^2 (same).

(The same result follows from the head form: Bp=a/g=101.94B_p=a/g=101.94 s, HA=10.398H_A=10.398 m, HB=17.640H_B=17.640 m, giving HP=3.507H_P=3.507 m and pP=γ(HP−zP)p_P=\gamma(H_P-z_P).)

Answer: VP≈5.5533V_P\approx5.5533 m/s and pP≈9.88p_P\approx9.88 kN/m2^2.

  • 2072 Asoj · 4 marks

Write an algorithm for simulation of the water hammer process using the method of characteristics.

Answer

Problem: a reservoir at the upstream end, a pipe of length LL with a valve at the downstream end that closes in a given time.

Algorithm

  1. Input data: LL, DD, wave speed aa, friction factor ff, reservoir head HresH_{res}, initial steady discharge Q0Q_0, valve closure law τ(t)\tau(t) (relative opening), total simulation time TT.
  2. Grid: choose the number of reaches NN; set Δx=L/N\Delta x=L/N and Δt=Δx/a\Delta t=\Delta x/a (characteristics along the diagonal).
  3. Constants: Ap=πD2/4A_p=\pi D^2/4, Bp=a/(gAp)B_p=a/(gA_p), Rp=fΔx/(2gDAp2)R_p=f\Delta x/(2gDA_p^2).
  4. Initial conditions (t=0t=0): Qi=Q0Q_i=Q_0 at all nodes i=1,…,N+1i=1,\dots,N+1; Hi=Hres−RpQ02(i−1)H_i=H_{res}-R_pQ_0^2(i-1) (steady friction loss along the pipe).
  5. Time loop: set t=t+Δtt=t+\Delta t.
  6. Interior nodes i=2,…,Ni=2,\dots,N:
    • K1=Hi−1+BpQi−1−RpQi−1∣Qi−1∣K_1=H_{i-1}+B_pQ_{i-1}-R_pQ_{i-1}|Q_{i-1}|
    • K2=Hi+1−BpQi+1+RpQi+1∣Qi+1∣K_2=H_{i+1}-B_pQ_{i+1}+R_pQ_{i+1}|Q_{i+1}|
    • QPi=(K1−K2)/(2Bp)Q_{P_i}=(K_1-K_2)/(2B_p), HPi=(K1+K2)/2H_{P_i}=(K_1+K_2)/2
  7. Upstream node (i=1i=1, reservoir): HP1=HresH_{P_1}=H_{res}; K2=H2−BpQ2+RpQ2∣Q2∣K_2=H_2-B_pQ_2+R_pQ_2|Q_2|; QP1=(HP1−K2)/BpQ_{P_1}=(H_{P_1}-K_2)/B_p.
  8. Downstream node (i=N+1i=N+1, valve): K1=HN+BpQN−RpQN∣QN∣K_1=H_N+B_pQ_N-R_pQ_N|Q_N|. With the valve law QP=Q0τHP/H0Q_P=Q_0\tau\sqrt{H_P/H_0} the solution is QP=−BpCv+(BpCv)2+2CvK1,Cv=(Q0τ)22H0,HP=K1−BpQPQ_P=-B_pC_v+\sqrt{(B_pC_v)^2+2C_vK_1},\qquad C_v=\frac{(Q_0\tau)^2}{2H_0},\qquad H_P=K_1-B_pQ_P For complete closure (τ=0\tau=0): QP=0Q_P=0, HP=K1H_P=K_1.
  9. Update: replace old values by the new ones, Qi←QPiQ_i\leftarrow Q_{P_i}, Hi←HPiH_i\leftarrow H_{P_i}.
  10. Store/print HiH_i and QiQ_i (especially the maximum HH at the valve and mid-pipe).
  11. If t<Tt<T go to step 5; otherwise stop. Plot HH against tt to read the maximum pressure rise.
 Start -> read data -> grid, B, R -> initial Q, H
   -> t = t + dt
   -> interior nodes (C+ and C-)
   -> reservoir node (C-) , valve node (C+ and valve law)
   -> update Q, H -> output
   -> t < T ?  yes: back to "t = t + dt"   no: stop
  • 2070 Bhadra · 8 marks

Prepare an algorithm to compute discharge and head based on the following form of finite difference equations for unsteady pipe flow problem using a rectangular grid.
HPi=Hi−1−B(QPi−Qi−1)−RQi−1∣Qi−1∣H_{P_i} = H_{i-1} - B(Q_{P_i} - Q_{i-1}) - R Q_{i-1}|Q_{i-1}|
HPi=Hi+1+B(QPi−Qi+1)+RQi+1∣Qi+1∣H_{P_i} = H_{i+1} + B(Q_{P_i} - Q_{i+1}) + R Q_{i+1}|Q_{i+1}|
where HH = head, QQ = discharge, HPiH_{P_i} and QPiQ_{P_i} = head and discharge at the point of intersection of two characteristics, BB and RR = coefficients.

Answer

Given: the two finite difference (characteristic) equations on a rectangular grid, with Δt=Δx/a\Delta t=\Delta x/a:

HPi=Hi−1−B(QPi−Qi−1)−R Qi−1∣Qi−1∣(C+)H_{P_i}=H_{i-1}-B\left(Q_{P_i}-Q_{i-1}\right)-R\,Q_{i-1}|Q_{i-1}|\qquad(C^+) HPi=Hi+1+B(QPi−Qi+1)+R Qi+1∣Qi+1∣(C−)H_{P_i}=H_{i+1}+B\left(Q_{P_i}-Q_{i+1}\right)+R\,Q_{i+1}|Q_{i+1}|\qquad(C^-)

with B=agApB=\dfrac{a}{gA_p} and R=fΔx2gDAp2R=\dfrac{f\Delta x}{2gDA_p^2}.

Solution of the two equations at an interior node

Equate the two expressions for HPiH_{P_i} and solve for QPiQ_{P_i}:

QPi=Hi−1−Hi+1+B(Qi−1+Qi+1)−R(Qi−1∣Qi−1∣+Qi+1∣Qi+1∣)2BQ_{P_i}=\frac{H_{i-1}-H_{i+1}+B\left(Q_{i-1}+Q_{i+1}\right)-R\left(Q_{i-1}|Q_{i-1}|+Q_{i+1}|Q_{i+1}|\right)}{2B}

Then HPiH_{P_i} follows by substituting QPiQ_{P_i} in either equation. Equivalent: HPi=12(K1+K2)H_{P_i}=\tfrac12\left(K_1+K_2\right), with K1=Hi−1+BQi−1−RQi−1∣Qi−1∣K_1=H_{i-1}+BQ_{i-1}-RQ_{i-1}|Q_{i-1}| and K2=Hi+1−BQi+1+RQi+1∣Qi+1∣K_2=H_{i+1}-BQ_{i+1}+RQ_{i+1}|Q_{i+1}|.

Algorithm

  1. Read LL, DD, aa, ff, number of reaches NN, total time TT, initial Qi0Q_i^0 and Hi0H_i^0 for i=1,…,N+1i=1,\dots,N+1, and the boundary conditions (upstream and downstream).
  2. Compute Δx=L/N\Delta x=L/N, Δt=Δx/a\Delta t=\Delta x/a, Ap=πD2/4A_p=\pi D^2/4, BB and RR.
  3. Set t=0t=0 and store the initial values.
  4. Repeat while t<Tt<T:
    1. t=t+Δtt=t+\Delta t.
    2. For i=2,…,Ni=2,\dots,N (interior nodes):
      • QPi=(Hi−1−Hi+1)+B(Qi−1+Qi+1)−R(Qi−1∣Qi−1∣+Qi+1∣Qi+1∣)2BQ_{P_i}=\dfrac{(H_{i-1}-H_{i+1})+B(Q_{i-1}+Q_{i+1})-R(Q_{i-1}|Q_{i-1}|+Q_{i+1}|Q_{i+1}|)}{2B}
      • HPi=Hi−1−B(QPi−Qi−1)−RQi−1∣Qi−1∣H_{P_i}=H_{i-1}-B(Q_{P_i}-Q_{i-1})-RQ_{i-1}|Q_{i-1}|
    3. Upstream boundary (i=1i=1): only the C−C^- equation is available. Use the boundary condition (e.g. reservoir HP1=HresH_{P_1}=H_{res}):
      • QP1=HP1−H2B+Q2−RBQ2∣Q2∣Q_{P_1}=\dfrac{H_{P_1}-H_2}{B}+Q_2-\dfrac{R}{B}Q_2|Q_2|
    4. Downstream boundary (i=N+1i=N+1): only the C+C^+ equation is available: HP=HN−B(QP−QN)−RQN∣QN∣H_{P}=H_N-B(Q_P-Q_N)-RQ_N|Q_N| together with the boundary condition (closed end QP=0Q_P=0, so HP=HN+BQN−RQN∣QN∣H_P=H_N+BQ_N-RQ_N|Q_N|; or a valve, pump or reservoir relation).
    5. Update: Qi←QPiQ_i\leftarrow Q_{P_i}, Hi←HPiH_i\leftarrow H_{P_i} for all ii.
    6. Output HiH_i and QiQ_i at the required nodes and time.
  5. Stop when t≥Tt\ge T.
 read data; compute dx, dt, B, R; set initial Q, H; t = 0
 while t < T:
     t = t + dt
     for i = 2..N:   Q_P(i) from the C+ / C- pair, then H_P(i)
     upstream node:    C-  + boundary condition
     downstream node:  C+  + boundary condition
     Q(i) = Q_P(i);  H(i) = H_P(i)   for all i
     print / store results
 end while

The time step must satisfy Δt=Δx/a\Delta t=\Delta x/a (Courant number 1) so that the characteristics pass through the grid points and no interpolation is required.

  • 2070 Magh · 8 marks

A pipe conveys water from a reservoir as shown in the figure. Take f=0.02f = 0.02, C=1200C = 1200 m/s. The hydraulic grade line (HGL) at the reservoir is given as HPA=100+3sin⁡(πt)H_{PA} = 100 + 3\sin(\pi t). The discharge at the downstream end is zero at all times. By using only one reach, compute the discharge from A and elevation of the hydraulic grade line at B at 3 sec using the discretized equation of the method of characteristics in the form of HGL and discharge.
[Figure: reservoir with water level 100 m above the pipe centreline at A; pipe AB of length L=600L = 600 m and diameter D=400D = 400 mm; a sketch of the C+C^+ and C−C^- characteristics on the grid]

Answer

Set-up

One reach means two nodes: A at the reservoir (x=0x=0) and B at the dead end (x=Lx=L). The time step follows from Δx=L\Delta x=L and Δt=L/a\Delta t=L/a:

Δt=6001200=0.50 s\Delta t=\frac{600}{1200}=0.50\ \text{s} Ap=π4(0.4)2=0.12566 m2,Bp=agAp=973.42 s/m2,Rp=f L2gDAp2=96.83 s2/m5A_p=\frac{\pi}{4}(0.4)^2=0.12566\ \text{m}^2,\quad B_p=\frac{a}{gA_p}=973.42\ \text{s/m}^2,\quad R_p=\frac{f\,L}{2gDA_p^2}=96.83\ \text{s}^2/\text{m}^5

Equations

C+C^+ (from A at the old time to B) and C−C^- (from B at the old time to A):

HP=HA−Bp(QP−QA)−RpQA∣QA∣,HP=HB+Bp(QP−QB)+RpQB∣QB∣H_{P}=H_A-B_p(Q_{P}-Q_A)-R_pQ_A|Q_A|,\qquad H_{P}=H_B+B_p(Q_{P}-Q_B)+R_pQ_B|Q_B|
  • Node A (reservoir): HPA=100+3sin⁡(πt)H_{PA}=100+3\sin(\pi t) is known; use C−C^- from B:
QPA=HPA−K2Bp,K2=HB−BpQB+RpQB∣QB∣Q_{PA}=\frac{H_{PA}-K_2}{B_p},\qquad K_2=H_B-B_pQ_B+R_pQ_B|Q_B|
  • Node B (closed end): QPB=0Q_{PB}=0; use C+C^+ from A:
HPB=K1=HA+BpQA−RpQA∣QA∣H_{PB}=K_1=H_A+B_pQ_A-R_pQ_A|Q_A|

Initial condition (t=0t=0)

No flow and static head: QA=QB=0Q_A=Q_B=0, HA=HB=100H_A=H_B=100 m.

First step (t=0.50t=0.50 s)

HPA=100+3sin⁡(0.50π)=103.0000H_{PA}=100+3\sin(0.50\pi)=103.0000 m; K2=100−0+0=100K_2=100-0+0=100; QPA=(103.0000−100)/973.42=0.00308Q_{PA}=(103.0000-100)/973.42=0.00308 m3^3/s; K1=100K_1=100, so HPB=100H_{PB}=100 m.

Marching in time

Repeating the two boundary calculations at every step (each uses the values of the previous step):

t (s)QAQ_A (m3^3/s)HAH_A (m)HBH_B (m)
0.500.00308103.000100.000
1.000.00000100.000105.999
1.50-0.0092497.000100.000
2.000.00000100.00088.009
2.500.01540103.000100.000
3.000.00000100.000117.968

(QB=0Q_B=0 at all times.)

Answer: at t=3t=3 s, the discharge from A is QA=0.00000Q_A=0.00000 m3^3/s and the HGL elevation at B is HB=117.968H_B=117.968 m.

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 ↗