---
title: "Water hammer, Euler and continuity equations"
subject: "Hydraulics"
chapter: 4
key: "semester_4/hydraulics:water-hammer-euler-continuity-equations"
source: https://www.bctengineer.com/q/semester_4/hydraulics/water-hammer-euler-continuity-equations
site: BCT Engineering
---

# Water hammer, Euler and continuity equations

Hydraulics · Chapter 4: Unsteady flow in pipes

- Asked in: 2073 Bhadra, 8 marks
- Video: [Understanding Velocity Of Sound & Pressure Wave | GATE Fluid Mechanics & Hydraulic Machines](https://www.youtube.com/watch?v=U2xSs_l2xSU) — Ekeeda GATE & ESE
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/hydraulics/water-hammer-euler-continuity-equations
- Whole chapter: https://www.bctengineer.com/md/semester_4/hydraulics/chapter-4

## Question

Discuss Water hammer phenomenon. Develop Euler's equation as well as continuity equation for unsteady flow.

## Short answer

Water hammer is pressure surge from sudden velocity change. Unsteady momentum equation: partial V/partial t + g partial H/partial x + (f V|V|)/(2D) = 0. Continuity: partial H/partial t + (c^2/g) partial V/partial x = 0, with wave speed c = sqrt(K/rho)/(1+KD/(Et)).

## Answer

#### Water hammer phenomenon
When the velocity of water flowing in a pipe is changed quickly (a valve closed or opened suddenly, a pump or turbine started or stopped), the kinetic energy of the water is converted into pressure energy, and a high-intensity pressure wave travels through the pipe at the speed of sound in the water-pipe system ($c$). The wave is reflected at the reservoir and at the valve, and the pressure may rise or fall by many times the normal pressure, with a noise like hammering. This is **water hammer**. It can burst pipes (pressure rise) or collapse them and cause column separation (pressure fall).

For instantaneous closure, the pressure rise is (Joukowsky)
$$
\Delta p = \rho c V_0,\qquad \Delta H = \frac{cV_0}{g},\qquad c = \sqrt{\frac{K/\rho}{1 + \dfrac{KD}{Et}}}
$$

#### Euler (momentum) equation for unsteady pipe flow
Consider a short element of fluid of length $dx$ in a pipe of cross-section $A$ and perimeter $P$, inclined at an angle $\theta$ to the horizontal, with $x$ measured along the pipe. Forces along the pipe:
- Pressure: $pA - \left(p + \dfrac{\partial p}{\partial x}dx\right)A = -\dfrac{\partial p}{\partial x}A\,dx$
- Weight component: $-\rho gA\,dx\sin\theta$
- Wall shear: $-\tau_0P\,dx$

Newton's second law, with mass $\rho A\,dx$ and acceleration $\dfrac{DV}{Dt} = \dfrac{\partial V}{\partial t} + V\dfrac{\partial V}{\partial x}$:
$$
\rho A\,dx\left(\frac{\partial V}{\partial t} + V\frac{\partial V}{\partial x}\right) = -\frac{\partial p}{\partial x}A\,dx - \rho gA\sin\theta\,dx - \tau_0P\,dx
$$
Divide by $\rho A\,dx$. With the piezometric head $H = \dfrac{p}{\gamma} + z$ ($\dfrac{\partial z}{\partial x} = \sin\theta$), the pressure and weight terms combine to $-g\dfrac{\partial H}{\partial x}$. The wall shear $\tau_0 = \dfrac{f\rho V|V|}{8}$ and $\dfrac{P}{A} = \dfrac{4}{D}$ give $\dfrac{\tau_0P}{\rho A} = \dfrac{fV|V|}{2D}$:
$$
\boxed{\frac{\partial V}{\partial t} + V\frac{\partial V}{\partial x} + g\frac{\partial H}{\partial x} + \frac{fV|V|}{2D} = 0}
$$
This is Euler's (momentum) equation for unsteady flow in a pipe. In water hammer problems the convective term $V\,\partial V/\partial x$ is small compared with $\partial V/\partial t$ and is usually dropped.

#### Continuity equation for unsteady flow (elastic water and pipe)
Consider a pipe element of length $dx$. Mass inflow minus outflow equals the rate of change of mass in the element:
$$
\frac{\partial(\rho AV)}{\partial x} + \frac{\partial(\rho A)}{\partial t} = 0 \quad(\text{or, equivalently, } \frac{D(\rho A)}{Dt} + \rho A\frac{\partial V}{\partial x} = 0)
$$
Hence $\dfrac{1}{\rho A}\dfrac{D(\rho A)}{Dt} + \dfrac{\partial V}{\partial x} = 0$. A change of pressure $dp$ changes both the density and the area:

- Water compressibility (bulk modulus $K$): $\dfrac{d\rho}{\rho} = \dfrac{dp}{K}$
- Pipe elasticity (thin wall, hoop stress $\dfrac{pD}{2t}$, strain $\dfrac{dD}{D} = \dfrac{D\,dp}{2tE}$): $\dfrac{dA}{A} = 2\dfrac{dD}{D} = \dfrac{D\,dp}{tE}$

So $\dfrac{d(\rho A)}{\rho A} = dp\left(\dfrac{1}{K} + \dfrac{D}{tE}\right) = \dfrac{dp}{\rho c^2}$, which defines the wave speed
$$
c^2 = \frac{K/\rho}{1 + \dfrac{KD}{tE}}
$$
Therefore $\dfrac{1}{\rho c^2}\dfrac{Dp}{Dt} + \dfrac{\partial V}{\partial x} = 0$. Using $p = \gamma(H - z)$, $\dfrac{Dp}{Dt} = \gamma\left(\dfrac{\partial H}{\partial t} + V\dfrac{\partial H}{\partial x} - V\sin\theta\right)$:
$$
\boxed{\frac{\partial H}{\partial t} + V\frac{\partial H}{\partial x} - V\sin\theta + \frac{c^2}{g}\frac{\partial V}{\partial x} = 0}
$$
The terms $V\,\partial H/\partial x$ and $V\sin\theta$ are small, so the usual form is $\dfrac{\partial H}{\partial t} + \dfrac{c^2}{g}\dfrac{\partial V}{\partial x} = 0$.

Together, the momentum and continuity equations govern water hammer. With friction neglected they combine into the wave equation $\dfrac{\partial^2H}{\partial t^2} = c^2\dfrac{\partial^2H}{\partial x^2}$, whose solutions are waves travelling at $\pm c$; for a sudden change of velocity $\Delta V$ they give $\Delta H = \mp\dfrac{c}{g}\Delta V$.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which forces act on the fluid element in the derivation of the momentum equation?
   A. Pressure gradient force, weight component and wall shear
   B. Only pressure and surface tension
   C. Only weight and viscosity of air
   D. Centrifugal and Coriolis forces
   Answer: A. Along the pipe the net pressure force, the weight component along the slope and the wall shear resist or drive the motion. (Key point: Forces in the Euler equation)

2. What is the final momentum equation?
   A. dV/dt + V dV/dx + g dH/dx + fV|V|/(2D) = 0
   B. dV/dt + g dH/dx = rho
   C. dH/dt + (c^2/g) dV/dx = 0
   D. dV/dx + dH/dt = 0
   Answer: A. Dividing Newton's law by rho A dx and using piezometric head gives this form; the convective term is usually dropped. (Key point: Euler equation result)

3. How does the continuity derivation give the wave speed?
   A. Pressure changes density (via K) and area (via pipe elasticity), giving d(rho A)/(rho A) = dp/(rho c^2) and c^2 = (K/rho)/(1 + KD/tE)
   B. From the velocity of the valve
   C. From the friction factor
   D. From the pipe length
   Answer: A. Water compressibility and wall elasticity together define the effective modulus that sets c. (Key point: Wave speed from continuity)

4. Which is the usual simplified continuity equation for water hammer?
   A. dH/dt + (c^2/g) dV/dx = 0
   B. dH/dt + g dV/dx = 0
   C. dV/dt + c dH/dx = 0
   D. dH/dx = c^2 dV/dt
   Answer: A. Dropping the small terms V dH/dx and V sin(theta) leaves this form, which with the momentum equation gives the wave equation. (Key point: Usual continuity form)

## Related in Hydraulics

- [Define water hammer; continuity and momentum equations](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Awater-hammer-define-continuity-momentum-equations) — Hydraulics, chapter 4
- [Derive continuity equation for unsteady pipe flow](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Acontinuity-equation-unsteady-pipe-flow) — Hydraulics, chapter 4
- [Water hammer causes and momentum equation](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Awater-hammer-causes-momentum-equation) — Hydraulics, chapter 4
- [One cycle of water hammer pressure wave](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Awater-hammer-one-cycle-wave-sketch) — Hydraulics, chapter 4, asked 2×
- [Water hammer pressure and stress, 2300 m pipeline](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Awater-hammer-2300m-pressure-stress-1725m) — Hydraulics, chapter 4
- [Water hammer in 20 m steel pipeline with valve](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Awater-hammer-20m-pipeline-pressure-time-curves) — Hydraulics, chapter 4

## Related in other subjects

- [Algorithm for unsteady pipe flow FD equations](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Aalgorithm-pipe-fd-hp-equations) — Computational Techniques in Civil Engineering, chapter 6
- [Maxwell's equations and continuity equation](https://www.bctengineer.com/question.md?key=semester_1%2Fengineering_physics%3Amaxwell-continuity-equation) — Engineering Physics, chapter 9, asked 2×
- [Derive differential continuity equation](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Acontinuity-equation-differential-form) — Applied Computational Fluid Dynamics, chapter 2
- [Continuity in cylindrical coordinates, radial flow](https://www.bctengineer.com/question.md?key=semester_4%2Ffluid_mechanics_mechanical%3Acontinuity-cylindrical-radial-flow) — Fluid Mechanics, chapter 4
