You are on page 1of 21

187

IWA Publishing 2004

Journal of Hydroinformatics

06.3

2004

Analytical solutions for unsteady pipe flow


Rodney J. Sobey

ABSTRACT
A sequence of analytical solutions explore the spectrum of response patterns expected for unsteady elastic-compressible flow in pipes. Complete analytical details of the solutions are provided, together with specific suggestions for an associated set of analytical benchmark tests. Illustrations of predicted response patterns provide the basis for a discussion of many significant physical aspects and their representation in discrete numerical codes. An evaluation of the incompressible flow approximation completes the discussion.
Key words
Rodney J. Sobey Department of Civil and Environmental Engineering Imperial College London, London SW7 2AZ, UK E-mail: r.j.sobey@imperial.ac.uk

| analytical solution, benchmark problems, pipe flow, unsteady flow, water hammer,
wave equation

INTRODUCTION
Numerical modeling is the tool of choice in studies of unsteady ow in pipes. Yet there remains a useful role for analytical solutions to schematic problems. Analytical solutions have value in both classroom instruction on unsteady pipe ow and in the conrmation of numerical codes. In classroom instruction, unsteady pipe ow is often an engineering students rst signicant exposure to unsteady ow. The mathematical sophistication and physical complexity introduce a leap in conceptual challenges. Analytical solutions can provide a rapid and convenient introduction to the spectrum of response patterns. In numerical model evaluation, analytical solutions can provide a rapid measure of physical and code credibility that approaches the value of extensive eld or laboratory experiments. In rational model evaluation, experimental measurements and analytical solutions have a genuinely complementary role. Measurements have certain reality, but analytical solutions can provide rapid and detailed response patterns across the complete space and time spectrum. A sequence of well-dened analytical benchmark problems is proposed. These benchmark problems are analytical in the sense that each problem has an exact analytical solution. Analytical solutions alone have absolute credibility. A numerical code must be modied to exactly match the context of an analytical solution. But then the numerical and analytical solutions should match exactly. Any differences can be attributed to the code. The attention to benchmark problems directly addresses numerical model evaluation, but each of the four problems has intrinsic value in classroom instruction. In fact, three of the solutions were initially established as instructional illustrations. This paper will introduce a sequence of analytical benchmark problems that are appropriate for numerical codes for unsteady pipe ow. It will begin by adapting a general analytical solution (Sobey 2002a) for unsteady channel ow. It will then dene a sequence of application problems that explore both the underlying physical process and the interaction with the operational context of a numerical model. Numerical models of unsteady pipe ow are boundary driven, and detailed attention is given to response patterns associated with a wide range of common boundary conditions. For each problem, the complete analytical solution is given for both head H(x,t) and ow V(x,t), in a manner immediately suitable for coding. The problems include the response to sudden valve closure, the impact of valve closure over a nite time, start-up transients and the evolution to steady state and

188

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

nally the response to periodic forcing. This nal problem provides an opportunity for a comparative evaluation of the rigid water column or incompressible ow approximation.

V t

H x

lV

(3)

in which the small advective acceleration terms are neglected, and the DarcyWeisbach or Manning approximation for the boundary resistance is replaced by a linear approximation lV, in which l is a constant friction factor. These equations continue to represent the major processes inuencing unsteady ow in pipes, though in a less complete manner. Except for the advective accelerations, these linearized equations retain all the complicated hyperbolic physics of unsteady compressible pipe ow. In addition, the linearization does not invalidate a numerical algorithm choice that was based on the complete Equations (1). 0 A numerical solution to Equations (3) imposes almost identical challenges. rA (1) While linear friction is certainly a compromise, it must be recalled that quadratic friction also is not entirely satisfactory. The utility of the linear approximation will be enhanced by realistic estimates of l. Equating the linear and DarcyWeisbach estimates gives fzVz 2D

FIELD EQUATIONS FOR UNSTEADY PIPE FLOW


The immediate response to rapid changes in pipe ow is taken up by the elastic compressibility of both the uid and the pipe walls. Unsteady and compressible ow follows the cross-section-integrated mass and momentum conservation equations (Li 1983): H t V t V H a2 V x V x g x g

H t0P x

in which x is local position, t is local time, H(x,t) is the local elevation of the hydraulic grade line to a xed horizontal datum, V(x,t) is the local cross-sectionaveraged ow velocity, a = [(( A)/p)/A] 1/2 is the speed of an elastic wave in the composite uid pipe system, g is the gravitational acceleration, A(x,t) is the local pipe cross-section area and P(x,t) is the local pipe perimeter. The boundary shear t0(x,t) is estimated from a friction model, typically DarcyWeisbach or Manning. These conservation equations are readily established by imposing unsteady mass and momentum conservation to a nite control volume of length x along the pipe and taking the calculus limit as x goes to zero. Adopting an equation of state for the uidpipe composite in the form 1 D rA Dt rA 1 Dr ra Dt
2

(4)

in which f is the DarcyWeisbach friction factor. In the linearized Equation (3b), l must be constant. A suitable predictive equation for l would be f 2D

KV L

(5)

where KVL is a suitable averaged velocity scale over the ow. Eliminating V by cross-differentiation among Equations (3) gives the generalized wave equation 2H t
2

(2)

and writing pressure as p = g(H z) leads directly to Equations (1). A conceptually useful approximation to Equations (1) is the linearized pipe ow equations: H a2 V t g x 0

a2

2H x
2

H t

(6)

in which H(x,t) is the dependent variable. When the coefcients a and l are constant, this PDE is linear and useful analytical solutions are possible.

189

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Similarly eliminating H by cross-differentiation gives the same generalized wave equation in V: 2V t2 a2 2V x2 l V t . (7)

m and the datum level b for the steady-state ow, the forced modes amplitudes a1, a2 and phases
1

, the free mode

eigenfunctions Xn(x) and the denition of the functions jn(t) from the transient boundary conditions, and parameters f n and gn from the initial conditions. Terms 14 are contributed by periodic boundary conditions. Terms 1 and 2 describe the steady pipe ow. Terms 3 and 4 are the forced modes. Modes in the boundary conditions will appear in the response. These forced

The details are very similar.

GENERAL ANALYTICAL SOLUTION


Quite general analytical solutions to a non-homogeneous variation on Equation (6) have been established by Sobey (2002a). Adapting that solution to the context of unsteady pipe ow, the general analytical solution for H(x,t) is H(x,t) mx b a1exp(2mx)cos(kx vt a2exp(mx)cos(kx vt
2) t 1)

modes decay as they evolve in space at the rate m = lv/ (2a2k). The balance of the solution are the free mode responses at the eigenmodes, excited by both the initial conditions and non-periodic transient boundary forcing. Within the summation, terms 8 and 9 are contributed by the initial conditions and term 10 by non-periodic boundary conditions, such as valve closure. These free modes decay as they evolve in time at the rate l/2. The zerothmode contributions, terms 57, may appear only where

|0 f

g0 l

1 exps2lt

1 l

e 12exps2l t
0

j0stddt

there are gradient or Neumann boundary conditions at both ends. Terms 5 and 6 are contributed by the initial conditions and term 7 by non-periodic boundary con ditions. Except for f 0, the free modes decay at the rate l. The dispersion relationship, Equation (9), relates space and time periodicities in both the free and forced modes. Without friction, it has the classical wave form v = ak. The general analytical solution for V(x,t) of Equations (7) is

X0 x

n 1

|nexps lt/2dcosvnt f

| gn lfn/2 vn
t

exps2lt/2dsinvnt

ev
0

1
n

exps2l t t /2dsinvn t t jn t dt Xn(x)

(8)

V x,t vt

b a1exps2mx cosskx vt
2 t

a2expsmx cosskx

This general solution includes the zeroth-order free modes (see the appendix), which are non-zero only for gradient or Neumann boundary conditions at both ends (Type 4 in Sobey (2002a)). The dispersion relationship, relating space and time periodicities, has two forms: v 1 a
1 2

3
t

|0 f

g0 l

1 exps2lt

1 l

e 12exps2l t
0

j0stddt

1
2

lv

X0 x , vn

n 1

b n2a 2

l2

(9)

f nexps lt/2dcosvnt

| gn lfn/2 vn

exps2lt/2dsinvnt

for the forced and free modes, respectively. These forms are special cases of the same generalized dispersion relationship. Sobey (2002a) gives the complete details, including the denition of the solution parameters, the water surface slope

ev
0

1
n

exps2l t t /2dsinvn t t jn tddt X

190

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

in which b, a1,

, a2,

, f n, gn, jn and Xn(x) are re-dened

in relation to V. But they must be carefully coordinated to be exactly consistent with the conditions imposed for the v(x,t) solution. The dispersion relationship remains unchanged, Equation (9). Again, complete details are given in Sobey (2002a), supplemented by the appendix. Equations (3) describe an initial, boundary value problem. The solutions for H and V change with both the initial conditions and the boundary conditions. and many codes have an existing option to exclude them. (ii) Change the friction term from t0P/ A to lV in the momentum equation. Many codes have an optional choice of friction formula, either DarcyWeisbach or Manning. An additional option would not be
Figure 1

Single pipe.

CODE MODIFICATIONS
Analytical solutions can be used for numerical code evaluation in either of two ways. (i) Make no changes to the numerical code. An average value for l would be adopted; a also needs to be constant, but it is usually already in numerical codes. The analytical and numerical solutions should have trend agreement, but they will not be identical. Such a comparison is valuable, but not absolute. (ii) Modify the numerical code to be a solution to the linearized equations. The numerical code would be modied to be a numerical solution of the linearized equations. A comparison of analytical and numerical solutions should then be absolute. The necessary code modications certainly provide the opportunity for coding error, but access to an exact solution should facilitate the identication of any such errors. Both modes have value. The latter is absolute and must be preferred. However, the code modications must be carefully undertaken. Two changes are necessary: (i) Omit the advective acceleration terms VH/x in the mass equation and VV/x in the momentum equation. These terms are nonlinear and are often a problem in numerical codes, like nite difference and nite element, that approximate Equations (1) as simultaneous linear algebraic equations in the nodal H and V. In most situations, these terms are small contributors to the conservation balances

difcult to include.

ANALYTICAL BENCHMARK TESTS


A sequence of analytical benchmark tests has been designed to spotlight the physically and numerically signicant response patterns that are expected to be within the predictive capabilities of cross-section-integrated models for unsteady ow in pipes. These problems are intended as a supplement, not a substitute, for the sequence of numerical test problems. It is anticipated that the analytical problems identied here will be of primary benet in initial model development and in the evaluation of user-specic variations or subsequent versions that introduce new physical, geometrical, numerical or graphical capabilities. They have complementary value in classroom instruction. Each test has a limited objective, seeking to focus on crucial problems in relative isolation. All problems assume a single length of pipe, for which a and l are known. The pipe (Figure 1) extends from xF at F to xL at L. Each of the following problems have been given a WH identier, suggesting their relevance to codes principally intended for water-hammer-related problems. The specic problem descriptions are listed in tables, which also include a recommendation, tOutput, for the time resolution of analytical and numerical solutions. This is the time resolution adopted in all the subsequent response pattern illustrations.

191

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Table 1 xF

WH1: Sudden valve closure from steady flow xL a t0 tF tOutput tL

5000 m

1000 m/s

2s

1s

30 s

IC
Figure 2

H x,0

H0

S D
1 x L

V(x,0)=V0 V(xL,t>t0)=0

Sudden closure.

BC

H(xF,t>t0)=H0

H0=10 m, l=0.02 s1 1, V0=gH0/(lL)

WH1: SUDDEN VALVE CLOSURE FROM STEADY FLOW


Sudden valve closure from steady ow is the classic waterhammer problem. At times t < t0 (Figure 2), steady ow is established at a velocity V0 from the reservoir at x = 0 to the free discharge to the atmosphere at x = L. At time t = t0, the valve at x = L is suddenly closed, leading to a sudden head rise of aV0/g at the valve. This sudden change in the head is propagated throughout the system and is slowly attenuated by friction. At steady ow, Equations (3) become H x,0 H xF,t H t f x H0 1
xL,t

H0 1

S D U
x L , H t lV

g x
x,0

a2 V g x

0
x,0

V t

DU

xL,t

V0 g

d t t0

l 1 H t t0

(13)

V constantV0 and 0

S D
H0 L

lV0

(11)

where d(t) is the Dirac delta function and H(t) is the Heaviside unit step function. The eigenvalues and eigenfunctions are, accordingly,

so that gH0 lL

V0

(12)

bn

n 12 p , L

Xn x

SD
2 L

1 2

sinbnx

n 1,2,3, . (14)

Problem WH1, outlined in Table 1, explores the response to sudden valve closure at t0. The initial conditions are steady ow, with a constant velocity V0 and an hydraulic grade line that falls linearly from H0 at x = 0 to zero at x = L. The solution will evolve toward quiescent conditions in the pipe, but at early times the response is dominated by the sudden large head rise ( H = aV0/g) at time t0 at x = L, by the propagation of this step disturbance upstream at the elastic wave speed a and by sequential reections from the reservoir and the closed valve. In the analytical solution for H, the initial and boundary conditions are jn t 1
n

There is no zeroth-mode contribution. The modal coefcients are


L

f gn 0, |n

e
0

x H0 Xn x dx L

n 1,2,3,

(15)

and the transient boundary conditions at xL lead to the transient internal forcing:

SD
2 L

1 2

a 2V 0 g

d t to

l 1 Hst to (16)

n 1,2,3, .

192

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

The analytical solution is accordingly

The analytical solution is accordingly f |n


n 1 t

H x,t

H0 exp

lt 2

f |n
n 1

l/2 cosvnt sinvnt Xn x vn

V x,t

exp

lt/2

cosvnt

l/2 vn

sinvnt Xn x

n 1

3e
0

vn

exp

l t t 2 sinvn t t jn tddt Xn x . (17)

n 1

ev
0

1
0

exp

l t t 2 sinvn t t jn t dt Xn x . (22)

The nature of the response is clear from Equations (17) and (22). The solution is entirely free-mode transients, each of which is a standing wave mode at the discrete system eigenmodes. The inuence of these transients decays exponentially with time at the rate l/2, dictated by the pipe friction. In Figure 3, sudden valve closure at t0 forces a step change in head from 0 to H = aV0/g and in ow velocity from V0 to 0. These step changes are propagated back along the pipe at speed a. Behind the step change the ow is reduced to zero. The propagation of these initial step changes are seen particularly clearly in Figure 4, which superimposes longitudinal proles along the pipe at times 1 sec, before valve closure at t0, and 3, 4 and 5 sec, all after valve closure at t0. The spatial resolution of the plot is 100 m. The H prole in particular shows that the H step change in head climbs

It is assumed here, and subsequently, that denite integral expressions in both x and t are easily evaluated and need not be pursued. Engineering software platforms often have a computer algebra capability, which will easily accommodate simple analytical integrations of this nature. The same capability could often be used to conrm that each analytical solution for H(x,t) and V(x,t) does indeed satisfy the eld equations, the initial conditions and the boundary conditions. All the application code used in the preparation of illustrations WH1WH4 adopted this conrmation step. For V, the initial and boundary conditions are V x,0 V x f x V 0, g H
xF,t

V t

g x
x,0

a2 t

0,
xF,td

VsxL,tdV0f12H t t0 . (18)

up the initial hydraulic grade line which slopes down from the reservoir to the valve, a feature that is somewhat disguised in Figure 3. The step changes reach the reservoir at time t0 + L/a where the head is constant at H0. Both the head and ow velocity steps are reected from the reservoir, the

The eigenvalues do not change, but the eigenfunctions become

Xn x

SD
2 L

1 2

cosbnx

n 1,2,3, .

(19)

head as a continuing

H step and the ow velocity at

V0. Behind the reected step, the ow is now towards the reservoir. There is a further reection from the closed valve at time t0 + 2L/a from the reservoir at time t0 + 3L/
0 n

The modal coefcients are


L

f gn=0, |n

eV X
0

x dx

n 1,2,3,

(20)

a and from the closed valve at time t0 + 4L/a. This cycle is then repeated with a period of 4L/a = 20 sec. These changes are especially clear in Figure 5, which shows the time evolution at distributed x locations along the pipe. A moderately slow decay with friction can be seen in the head and ow magnitudes at time t0 + 4L/a. But it is clear that the dominant dynamic inuence is step disturbance propagation at a speed a. Equations

and the transient boundary conditions at xL lead to the transient internal forcing: jn t bn 1
n

SD
2 L

1 2

a 2V 0 1 H t t 0

n 1,2,3, . (21)

193

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 3

WH1: initial response to sudden valve closure.

Figure 4

WH1: propagation of step changes in head and flow velocity from valve closure.

(17) and (22) show that the time scale for frictional decay is Tf 2 l (23)

which is 100 sec for the present problem. Friction will suppress the sudden changes in head and ow, but not sufciently rapidly to mitigate the full impact throughout the pipe.

194

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 5

WH1: time evolution of step changes in head and flow velocity from valve closure.

At the valve x = xL, the initial step change in head from 0 to H and in ow velocity from V0 to 0 must be represented by numerous eigenmodes. The wavelengths Ln = 2p/bn of the eigenmodes are 20,000, 6,667, 4,000, . . ., m for n = 1,2,3, . . .. Including only a few modes will not capture the step change. For the WH1 problem, the summations were truncated at M = 50 eigenmodes, following the 0.01 convergence criterion adopted elsewhere (Sobey 2002b). The impact of this summation truncation can be seen most clearly in the Gibbs oscillations immediately before and after the steps in Figure 4. These oscillations are expected: they will be mitigated by signicantly increasing M but eliminated only by a summation over an innite number of eigenmodes. The eigenmode amplitudes are shown in Figure 6: numerous higher wavenumbers bn and higher frequencies vn are included. The eigenmodes decay very slowly, for V especially in this problem. In an analytical solution, this is an inconvenience, but not a problem. For a numerical solution, it can be a problem. Numerical codes have a distinct spatial resolution x, and mostly also a distinct temporal resolution t. This nite resolution imposes (Bath 1974) a Nyquist limit of p Dx p Dt

respectively on wavenumbers and frequencies that can be resolved by a numerical model. For the present problem, a typical x might be of the order of 20 m, and a typical t might be of the order of 0.02 sec. These correspond to Nyquist limits of 0.31 m 1 and 314 sec 1, respectively. No wavenumbers or frequencies above these limits can be represented. In problem WH1, the rst 50 free-mode wavenumbers and frequencies are well within these Nyquist limits; in other problems they may not be. Analytical and physical activity above these Nyquist limits would be aliased or folded to wavenumbers and frequencies at or just below the respective Nyquist limits. In numerical models, these are manifested as so-called 2 x

bN

, and vN=

(24)
Figure 6

WH1: eigenmodes in analytical solution.

195

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Table 2 xF xL

WH2: Value closure over finite time

H x,0
a t0 tF tOutput tL

f x 1

x HL , L

H t

5000 m HL x L

1000 m/s

2s

0 1s

30 s

H x

xF,t

g lV0 g

V t

lV

U DU
lV0 2g

g x
x,0

xF,t

IC H x,0

V(x,0)=V0 for t%t0 1 cos p t t0 tC

BC V xF,t

V0 1 2 0
11

for t0 t t0 tC for tRt0 tC

H(xL,t)=HL

5
bn

for t%t0 p t t0 tC

pV0 2gtC 0

sin

1 cos

p t t0 tC

for t0 t t0 tC for tRt0 tC

H xL,t
HL=10 m, l=0.02 s , V 0= gHL/(lL); tC=5, 15, 25 s.

H L.

(25)

The eigenvalues and eigenfunctions are accordingly n 12 n L

, Xn x

SD
2 L

1 2

cosbnx n 1,2,3, .

(26)

There is no zeroth-mode contribution. The modal coefcients are


Figure 7

L
WH2: steady flow prior to start of valve closure.

f gn=0, |n

eH
0

S D
x L

1 Xn x dx

n 1,2,3,

(27)

oscillations, oscillations at the Nyquist limit, most notably in the H response.

and the transient boundary conditions at xF lead to the transient internal forcing

jn t

SD
2 L p0 2tC sin

1 2

a 2V 0 g for t%t0

WH2: VALVE CLOSURE OVER FINITE TIME


Sudden valve closure immediately imposes the very signicant head rise aV0/g. Gradual valve closure is a common expedient to mitigate this difculty. Problem WH2, outlined in Table 2, explores the response to valve closure from t0 sinusoidally over a duration tC. At the same time, it switches the orientation of the problem (see Figure 7): for a comparison with numerical code, this will exercise a V boundary condition at xF and a H boundary condition at xL, the reverse of problem WH1. In the analytical solution for H, the initial and boundary conditions are

l p t t0 tC l

1 cos

p t t0 tC

for t0 t t0 tC for tRt0 tC (28)

for n = 1,2,3, . . .. The analytical solution is accordingly

H x,t

H0 exp

lt 2

f |n
n 1

cosvnt

l2 sinvnt Xn x vn

n 1

ev exp
0 0

l t t 2 sinvn t t jn t dt Xn x .

(29)

196

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

For V, the initial and boundary conditions are V x,0 f x V 0, V0 1 2 0 V0 1 cos V t

The nature of the response, Equations (29) and (34), is formally similar to the WH1 solution, as expected. But the algebraic and numerical details differ signicantly. The summations were truncated at M = 50 eigenmodes, to

g x
x,0

0 for t%t0

V xF,t

5
2 L

meet the 0.01 convergence criterion. The response for valve closure over tC = 5 sec, equal to the propagation time L/a of a disturbance over the length of the pipe, is shown in Figure 8. The sudden changes are smoothed by the sinusoidal (30) closure, but the response pattern retains most of the features exhibited by sudden valve closure. Propagation of the disturbance at speed a, multiple reections from the pipe ends, a multiple-reection periodicity of 4L/a and gradual attenuation by friction all remain apparent. In WH1, the duration of the peak head rise was

p t t0 tC

for t0 t t0 tC for tRt0 tC

V t

g H
xF,t

a2 t

0.
xL,t

The eigenvalues do not change, but the eigenfunctions become

Xn x

SD

1 2

sinbnx

n 1,2,3, .

(31)

2L/a = 10 sec at the valve end. For closure over tC = L/a, the peak head rise remains at the valve, the magnitude remains unchanged but the duration is reduced to about 5 sec. The response to longer closure times, tC = 3L/a and 5L/a, are shown in Figures 9 and 10, respectively, where

There are no zeroth-mode contributions. The modal coefcients are


L

f gn 0, |n

eV X
0 0

x dx

n 1,2,3,

(32)

the surface plots have been extended to tL = 60 sec to capture the evolving pattern. All suggestions of a step response are now gone, but the maximum head at the valve is only slowly attenuated. For tC = 0 (problem WH1), the global Hmax is 122.1 m; for tC = 5, 15 and 25 sec, the global Hmax is progressively attenuated to 108.8 m, 87.0 m and 51.4 m, respectively.

but the transient boundary conditions at xL lead to the transient internal forcing jn t

SD
2 L

1 2

a V0

bn 1 2 0 bn 1 cos

for t%t0

The continuing periodicity at 4L/a (20 sec) is seen most clearly in the time histories for H at the valve and for V at the reservoir. Extending the closure time provides the opportunity for friction to be inuential, but inertia remains the dominant process at these relatively short (33) times.

p t t0 tC

for t0 t t0 tC for tRt0 tC

for n = 1,2,3, . . .. The analytical solution is accordingly

V x,t

exp

lt 2

f |n
n 1

l2 cosvnt sinvnt Xn x vn

WH3: START-UP AND EVOLUTION TO STEADY STATE


Problem WH3, outlined in Figure 11 and Table 3, explores

n 1

3e
0

vn

exp

l t t 2 sinvn t t jn t dt Xn x . (34)

start-up transients and the evolution to steady state. The numerical value of this problem somewhat duplicates problem WH1. The start-up problem nonetheless has considerable instructional value, especially in the manner of

197

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 8

WH2: response to valve closure over tC =L/a=5 sec.

Figure 9

WH2: response to valve closure over tC =3L/a=15 sec.

198

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 10

WH2: response to valve closure over tC =5L/a=25 sec.

the approach to the steady-state ow and in the timescale of this transition.

In the analytical solution for H, the initial and boundary conditions are H(x,0) = f(x) = H0, V(x,0) = g(x) = 0 H(xF,t) = H0, H(xL,t) = H0[1 H(t t0)]. The eigenvalues and eigenfunctions are accordingly np L (35)

bn
Figure 11

Xn x

SD
2 L
tOutput

1 2

sinbnx

n 1,2,3, .

(36)

WH3: static conditions prior to start-up.

Table 3 xF

WH3: Start-up and evolution to steady state xL a t0 tF tL

0 IC BC

5000 m H(x, 0) = H0 H(xF, t) = H0

1000 m/s

2 sec

0 V(x,0) = 0

1 sec

30 sec

H(xL, t > t0) = 0

H0 =10 m, l=0.02 sec 1.

199

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

There is no zeroth-mode contribution. The modal coefcients are


L

The gn and f n modal coefcients are all zero, except for

gn 0, |n f

eH L X
0 0

L n

x dx

(37)

|o f

eV X
0

x dx

(42)

and the transient boundary conditions at xL lead to the transient internal forcing 1 nb n
1 2

where VN = gH0/lL from domain integration of the momentum equation. The transient boundary conditions at xL lead to the transient internal forcing

jn t

SD
2 L

a 2H 0 1 H t t 0

n 1,2,3, . (38)

The analytical solution is accordingly

jn t

SD
2 L |0 f

1 2

gH0d t t0

n 1,2,3,

(43)

H x,t

H0

exp

lt 2

1 2 3
1 x L f |n
n 1

which includes the zeroth-mode contribution. The analytical solution is accordingly

l2 cosvnt sinvnt Xn x vn

V x,t

3
1
n

1 l

e1
0

exp

l t t

j0 t dt X0 x

n 1

ev exp
n 0

l t t 2 sinvn t t jn t dt Xn x . (39)

n 1

ev exp
0

l t t 2 sinvn t t jn t dt Xn x . (44)

For V, the initial and boundary conditions are V t

The transient response, Equations (39) and (44), is again entirely free modes. The summations were truncated at M = 100 eigenmodes to meet the 0.01 convergence criterion. The evolution of the response is most transparent in the V response, Figure 12. The immediate response to the sudden valve opening at x = L is a sudden velocity of

V x,0 V t

f x

0, g H

g x
x,0

V t

U U

xF,t

a t a2 t

g H
xL,t

U U

0
xF,t

gH0
xL,t

a2

d t t0 .

(40)

V = gH0/a, which propagates up the pipe to the reservoir, initiating a sequence of velocity steps from the reservoir and the valve. At each reection, the ow velocity is augmented by a velocity of the order of toward the steady state ow V0 = gH0/lL. Without friction, the method of characteristics gives the velocity step as exactly gH0/a every reection (i.e. every L/a sec), suggesting a time to steady state of the order of (V0/ V)(L/a) = 1/l = 50 sec. The inuence of friction, Figure 13, is a progressive decline in the magniV, climbing

For Type 4 boundary conditions (gradient boundary conditions at both ends), the free modes are augmented by a zeroth mode. The eigenvalues and eigenfunctions are b0 0, np L X0 x
1

bn

Xn x

SD SD
1
2

1 2

cosbnx

n 1,2,3, .

(41)

tude of this velocity step and a much slower approach to the steady state ow.

200

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 12

WH3: start-up at 0t20 sec.

Figure 13

WH3: start-up at 90t110 sec.

201

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

The H response necessarily mirrors the V response. There is a gradual transition from a horizontal Hydraulic Grade Line to the linearly falling Hydraulic Grade Line at steady state, through a sequence of propagating and reecting step changes in H. At about 100 sec (Figure 13), steady state is clearly approached but not yet reached. b0

For the free modes, the eigenvalues and eigenfunctions are

np L

, Xn(x)

SD
2 L

1 2

sinbnx n 1,2,3, .

(47)

There is no zeroth-mode contribution. The modal coefcients are

WH4: RESPONSE TO SUDDEN PERIODIC FORCING


L

The nal problem, WH4, outlined in Table 4, explores the unsteady response to sudden periodic forcing, such as a seiche in the reservoir at x = 0 in Figure 2. Additionally, this problem provides an opportunity to evaluate the limits of applicability of the incompressible or rigid-column approximation to unsteady ow in pipes. In the analytical solution for H, the initial and boundary conditions are

|n f

e
0 L

[a1exp( mx)cos(kx
2)]Xn(x)dx

1)

a2exp( mx)

cos(kx

gn

ev[
0

a1exp( mx)sin(kx
2)]Xn(x)dx

1)

a2 (48)

exp( mx)sin(kx

H(x,0) f x

H0 1

S D U
x L , H t

g(x)
(x,0)

a2V g x

for n = 1,2,3, . . .. The boundary forcing is periodic and 0


(x,0)

transient internal forcing, jn(t), is zero. The analytical solution is accordingly (45) H(x,t) H0 1

H(xF,t) H0 a0sinvt,

H(xL,t) 0

where a0 is the amplitude and v = 2p/T the frequency of the reservoir seiche. For the forced mode, boundary condition matching gives b = H0, m = H0/L and

S D
x L

a1exp( mx)cos(kx vt

2)

a2

exp( mx)cos(kx vt gn lf n/2

2)

n 1

1 0 C S

0 1 S C

1 0 C S

0 1 S C

43 4 3 4
a1sin
1

a1cos

vn
1

exp( lt/2)sinvnt Xn(x).

F G

|nexp( lt/2)cosvnt f

(49)

a0 0 0

a2cos a2sin

(46)

For V, the initial and boundary conditions are

V(x,0) f(x) V0, in which C + = exp( + mL)cos kL, C = exp( mL)cos kL, S + = exp( + mL)sin kL, S = exp( mL)sin kL and m = lv/ (2a2k). Equation (46) is a linear equation system, which may be solved directly for a1cos and
2 1

V t

g(x) 0
(x,0)

V x

to a2sin

. a1, a2,

V x

are then immediately available.

U U

g H
(xF,t)

a t

g H
(xL,t)

a2 t

U U

ga0v
(xF,t)

a2 0.

cosvt

(50)

(xL,t)

202

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Table 4 xF

WH4: Response to sudden periodic forcing xL a t0 tF tOutput tL

The modal coefcients are


L

5000 m H x,0 H0

1000 m/s

0s

T/20 s

2T s

|n f

e
0 L

[a1exp( mx)cos(kx
2)]Xn(x)dx

1)

a2exp( mx)

IC BC

S D
1 x L

V(x,0)=V0 H(xL,t)=0

cos(kx

H(xF,t>t0)=H0+a0 sin vt

H0=10 m, l=0.02 s1 1, V0=gH0/(lL), a0=1 m, T=2 /v=60 s.

gn

ev[
0

a1exp( mx)sin(kx
2)]Xn(x)dx

1)

a2 (53)

exp( mx)sin(kx

for n = 0,1,2, . . ., which includes the zeroth mode. The For the forced mode, boundary condition matching gives analytical solution for V(x,t) is then

3 3 43 4
m m k m kS mC kC kS mS kS kC mS mC kC a1cos a1sin
1

k m mC mS kC kS mS mC

4
(51)
1

V(x,t) V0 a1exp( mx)cos(kx vt

1)

a2exp( mx)

cos(kx vt

2)

F F

|0 f

g0 l

(1 exp( ll))

G G
(54)

ga0v/a2 0 0 0

exp( lt/2) |ncosvnt f


n 1

| gn lfn/2 vn

sinvnt Xn(x).

a2cos a2sin

The nature of the response, Equations (49) and (54), now includes both a forced mode (the rst three terms of each equation) and free modes. The forced mode responds at the frequency v of the sustained forcing,

As for H, Equation (51) is a linear equation system, which may be solved directly for a1cos and
2 1

Equation (45b). The free modes respond at the eigenmodes, vn in time and bn in space and decay exponentially with time at a rate dictated by the friction coefcient l. The free mode summations were truncated at M = 11 eigenmodes, to meet the 0.01 convergence criterion. The initial response to forcing with period 2p/v = 60 sec is shown in Figure 14. The response is dominated by the initial steady ow eld, which persists as the time-averaged ow, H = H0(1 x/L), V = V0. In Figure 14, this time-averaged ow has been subtracted to show

to a2sin

. a1, a2,

are then immediately available. For gradient or

Neumann boundary conditions at both ends (Type 4 in Sobey 2002a), b cannot be dened by boundary condition matching. A supplementary integral momentum ux condition over the entire domain establishes that b = V0. For Type 4 boundary conditions, the free modes are augmented by a zeroth mode. The eigenvalues and eigenfunctions are

b0 0, np L

X0(x)

bn

X0(x)

SD SD
1
2

the detail of the response much more clearly. The frictional response time Tf is 100 sec (see Equa1 2

tion (23)) and the decay of the free modes is clearly seen in cosbnx n 1,2,3 . (52) the evolving clarity of the forced mode response at period 60 sec.

203

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 14

WH4: initial differential response to 60 sec period forcing.

A common simplifying approximation to unsteady ow in pipes is the incompressible ow or rigid water column approximation. This asserts that the system response time is sufciently slow that elastic changes in the mass density of the uid and in the cross-section area A of the pipe are not signicant. The context of problem WH4 provides an opportunity to explore the value of this approximation. Where pipe-uid compressibility is not signicant, the equation of state for the pipe-uid composite (see Equation (2)) becomes 1 D ADt

or V x V t

0 H x

lV

(57)

in a linear approximation. Under the same initial and boundary conditions as for the complete compressible problem (Equations (45)), Equations (57) are solved to give

(pA)=0

(55) Vrigid(t) V0 Hrigid(x,t)

ga0 L(v2 l2)

and the unsteady pipe ow equations (see Equations 1) become V x V t

(v(e

lt

cosvt) lsinvt)

L x dVrigid g dt

lVrigid .

(58)

0 This incompressible approximation is shown in Figure 15 V V x g H toP x rA (56) for the identical conditions as the complete compressible solution in Figure 14.

204

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 15

WH4: initial differential response to 60 sec period forcing, using incompressible flow approximation.

The differences appear very small. Figures 16 and 17 focus on these differences: H = H(x,t) Hrigid(x,t), V = V(x,t) Vrigid(x,t). (59)

pressible ow approximation. Note in particular the V solutions for compressible ow (Equation (54)) and incompressible ow (Equation (58a)). The forced-mode part of Equation (54) has a spatial structure, through the forced wave motion, cos(kx . . .), and through the frictional attenuation, exp( mx). In the incompressible ow approximation, there is no spatial structure. It is the intrinsic spatial structure in the forced mode that is seen in Figure 17. Some small residual free mode response can be identied in the H trace, but this does decay with time. The response pattern at the forcing frequency persists for all time. There is a difference between the complete compressible ow solution and incompressible ow approximation, but the magnitude is quite small (note the relative magnitudes in Figure 17), and those magnitudes decrease as the period T of the forcing becomes very much longer than the period T1 = 2p/v1 ( = 10 sec here) of the dominant free mode.

Figure 16, for the initial 120 sec, is dominated by the free mode transients. Their magnitude is relatively small, being a response to the H/t but not H discontinuity in the forcing at x = 0. Their contribution to the response is dwarfed by the forced mode, even near t = 0. As seen clearly in the H response, these free modes decay with time at the frictional timescale Tf = 60 sec. The V response suggests a signicant residual component at period 60 sec, corresponding to the forcing frequency v. This residual component at the forcing frequency is quite clear in Figure 17 at a much later time. This persistent residual difference between the compressible ow solution and the incompressible ow approximation results directly from the incom-

205

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

CONCLUSIONS
Analytical solutions have a useful role in the evaluation of numerical codes for unsteady compressible ow in pipes. Analytical solutions alone have absolute credibility. They provide a measure of physical and code credibility that is not otherwise available to numerical codes. The necessary code modications are outlined. Analytical solutions have an equally important complementary role in instruction, by providing focused illustrations of the nature and magnitude of unsteady response patterns in a number of conceptually challenging contexts. A sequence of four analytical benchmark problems are outlined: WH1: sudden valve closure from steady ow WH2: valve closure over nite time

WH3: start-up and evolution to steady state WH4: response to sudden periodic forcing. Each case includes the full details of the analytical solution, an illustration of the predicted response pattern and a discussion of the signicant physical and numerical aspects. Collectively, these analytical solutions provide the framework for a wide-ranging conrmation of numerical codes for ood and tide propagation. The utility of the incompressible ow approximation to unsteady pipe ow is nally considered. A linear analytical solution is established for conditions equivalent to problem WH4. It is shown that the difference from the complete linear compressible solution is small where the period T of the forcing is much longer than the period T1 = 2p/v1 ( = 10 sec here) of the dominant free mode.

Figure 16

WH4: difference between complete compressible flow solution and incompressible flow approximation for 60 sec period forcing for times 0<t<120 sec.

206

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Figure 17

WH4: difference between complete compressible flow solution and incompressible flow approximation for 60 sec period forcing for times 300<t<420 sec.

ACKNOWLEDGEMENTS
This study was initiated and largely completed over a sabbatical leave during 2002 at the Department of Civil and Environmental Engineering, Imperial College London.

with potential non-homogeneous internal forcing

(x,t)

but homogeneous boundary conditions) and H(x,t) is the residual transient solution (Equation (6) with nonhomogeneous and non-periodic boundary conditions and quiescent initial conditions). The solution for H(x,t) in Sobey (2002a) excluded the zeroth-mode contribution to the particular solution
t L n n

APPENDIX
Zeroth-mode Greens function In the terminology of Equation (6), the complete general solution for H in Sobey (2002a) has the generic form

Pn t

eG (t,t) |
0

t dt

where |n t

e
0

x,t Xn x dx. (61)

G0(t) potentially exists only for problems with gradient or Neumann boundary conditions at both ends (Type 4 in Sobey (2002a)). Following again the method of variation of parameters, the zeroth-mode Greens function is

H(x,t) = H(x,t) + H8(x,t) + H9(x,t)

(60)

where H(x,t) is the forced mode solution (Equation (6) with non-homogeneous but periodic boundary conditions), H(x,t) is the free mode solution (Equation (6) G0(t,t) 1 l (1 exp( l(t t))). (62)

207

Rodney J. Sobey

Analytical solutions for unsteady pipe flow

Journal of Hydroinformatics

06.3

2004

Including a possible zeroth mode, the complete solution to the transient problem becomes H (x,t)

While internal forcing (x,t), and hence | n(t), has no role in unsteady pipe ow, transient boundary conditions become equivalent internal forcing jn(t) and transient boundary conditions have a major role in unsteady pipe ow. The complete solution for V(x,t) is formally identical.

[Hn(t)
n 0

Pn(t)]Xn(x)

3
1 l

|0 f
t

g0 l

(1 exp( lt))

e(1
0

exp( l(t t))) | 0(t)dt X0(x)

n 0

|nexp( lt/2)cosvnt f
t

| gn lfn/2 vn

REFERENCES
exp( lt/2)
Bth, M. 1974 Spectral Analysis in Geophysics. Elsevier, Amsterdam. Li, W. H. 1983 Fluid Mechanics in Water Resources Engineering. Allyn and Bacon, Boston, MA. Sobey, R. J. 2002a Analytical solution of non-homogeneous wave equation. Coastal Engng J. 44 (1), 124. Sobey, R. J. 2002b Analytical solutions for ood and tide codes. Coastal Engng J. 44 (1), 2552 (see also errata 44, 281).

sinvnt

ev exp(
n 0

l(t t)/2)sinvn(t t) | n(t)dt Xn(x). (63)

You might also like