THE UNIVNERSITY OF MIECHIGAN INDUSTRY PROGRAM OF THE COLLEGE OF ENGINEERING OIL PIPELINE TRANSIENTS MI'chel.-Kaplan Victor L.. Streeter E. Ben~jamin Wyli'e August., 1966 IP-74t3

Synopsis The equations of waterhammer, as derived by the method of characteristics, are applied to oil pipeline systems. It is shown that oil pipeline transients may be calculated directly by these methods; experimental confirmation is given by comparison with field tests. ii

TABLE OF CONTENTS Page Synopsiso...................................................... ii LIST OF FIGURES................................................ iv Introduction.........................1............................ 1 Waterhammer Equations...............................1........... 1 Cause of Transients............................................... 4 Definitions. Attenuation and Line Packing.......................... 5 Computational Methods.............................................. 12 Experimental Confirmation of Theory................................ 17 Boundary Conditions............................................... 24 Conclusions........................................................ 26 Acknowledgments................................................... 27 iii

LIST OF FIGURES Figure Page 1 Method of Specified Time Intervals......................... 3 2 Potential Surge in Frictionless System..................... 7 3 Hydraulic Gradeline on Long Pipeline....................... 7 4 Attenuation in Long Pipeline............................... 7 5 Results of Computer Solution of Valve Closure on Long Pipeline................................................... 11 6 Series Oil Pipeline System................................. 15 7 Deformation of the Gradeline Calculated by Computer for Rarefaction Simulation Test................................ 18 8 Test Results Compared with Computer Output for Rarefaction Simulation Station 3 to 4. Station 3 one unit shut down. Station 4 complete shutdown. 3600 m3/hr............. 20 9 Test Results Compared with Computer Output, Station 4 to Station 5, 3155 m3/hr. Station 5 shut down at time 0; Station 4 shut down at 113 seconds................. 21 10 Test Results Compared with Computer Output. Station 3 to South Rhone Valve, 3220 m3/hr. South Rhone Valve Closure.. 23 11 Pumping Station Reaction to Transient Pressures, 3340 m3/hr. Valve 4A closed at 278 sec., Pump Station 4 shuts down at 320 sec.................................................... 25 iv

OIL PIPELINE TRANSIENTS by Michel Kaplan,* Victor L. Streeter,** and E. Benjamin Wylie*** Synopsis The equations of ~waterhammer, as derived by the method of characteristics, are applied to oil pipeline systems. It is shown that oil pipeline transients may be calculated directly by these methods; experimental confirmation is given by comparison with field tests. *Chief Applied Computer Technologist, Pipeline Division, Bechtel Corporation, San Francisco, Californiao **Professor of Hydraulics, The University of Michigan, Ann Arbor, Michigan. ***Associate Professor of Civil Engineering, The University of Michigan, Ann Arbor, Michigan.

Introduction Transient conditions arising in long oil pipelines can be adequately analyzed and predicted by use of the characteristic's method; attenuation, line packing, pyramiding, and rarefaction can be completely taken into account. As compared with shorter piping systems, the oil pipelines with several pumping stations, having units in series or in parallel, and with special speed controls or valving action, have somewhat different boundary conditions K so as to avoid excessively high or low heads. Since the pumping heads are almost completely used to overcome fluid friction, careful attention to fluid properties is essential; also the complications arising from various batches of oil traversing the system at any one time must be examined. In this paper, the equations of transient flow are first introduced, then special definitions and properties of the fluids and system are treated. Computational methods are outlined, followed by experimental verification. A discussion of boundary conditions concludes the paper. Waterhammer Equations Since the form of the waterhammer equations suitable for computer solution have been developed in previous studies1,2,3 only a brief summary of the 1. Fluid Mechanics:, 4 ed., by Victor L. Streeter. McGraw-Hill Book Company, Inc., New York, 1966, pp. 577-6535. 2. "Computer Solution of Surge Problems," by Victor L. Streeter. Proc. Institution of Mechanical Engineers, 1965-66, Vol. 180, Part 3E Symposium on Surges in Pipelines. 5. "Waterhammer Analysis Including Fluid Friction," by Victor L. Streeter and Chintu Laio Trans. ASCE, Vol. 128, 1963, Part II, paper No, 3502, pp. 1491-1552. -1 -

-2 - the working equations are included. For metal pipes the pulse wave speed a is very great compared with the fluid velocity V, permitting the equation of motion and continuity equations to simplify to Vt + gHx + VIV = 0 (1) and a2 Ht + Vx = 0 (2) with t and x the independent variables time and distance along the pipe (measured positively downstream). When t and x are used as subscripts they represent partial differentiations, i.e., Hx = dH/6x. H is the elevation of hydraulic gradeline above an arbitrary datum, g the acceleration due to gravity, D the inside diameter of pipe, and f the Darcy-Weisbach friction factor. The solution of these equations is accomplished by the method of characteristics, yielding, in difference notation C+: Vp - VR + a (Hp - HR) + VRIVRI t = 0 (3) C- Vp - a (Hp - HS) +- VsVs At = 0 (4) The C+ equation is valid only along a C+ characteristic line in the xt-plane, Fig. 1, given by dx/dt = a. The C- equation is valid only along a C- characteristic curve dx/dt = -a. For use by the method of specified time intervals, the xt-grid is selected so that the points R and S of Fig. 1 fall within the line

t+At -- A R C S I -__Ax -_-Ax - Ax soAx o Figure 1. Method of Specified Time Intervals.

-4_ segment AB. By considering that V and H are known at the grid points for time t, and V and H are to be computed at P for time t + At, VR, VS, HR, and HS are calculated by linear interpolation from known values at A, B, and C, yielding VR = VC + Ga (VA - VC) (5) VS - VC + Ga (VB - VC) (6) HR = HC + Ga (HA - HC) (7) HS = HC + Ga (HB - HC) (8) G is the grid mesh ratio At/Ax. With these quantities determined, by use of Eqs. (3) and (4), Vp and Hp may be calculated. Boundary Conditions For boundary condition at the left end, or upstream end of aC pipe, the C characteristic Eq. (4) is valid and provides one equation is two unknowns. Hence, only one external condition is needed, which may be any relation containing one or both of the unknowns. For the right end or downstream boundary condition Eq. (3) is valid. The same value of At is used throughout a piping system, as this permits solution of boundary conditions at common junctions of the various pipes. Cause of Transients When two (or more) pumping stations are on the same pipeline, a slight dif ferential in pumping rates can either cause a rise or a fall in the hydraulic

-5 -gradeline between the stations. This transient is somewhat self-adjusting with centrifugal pumps as the consequence, say, of a greater flow rate at the downstream station is to increase its head and to decrease the head on the upstream station, thereby bringing the flows into balance. An adjustment of the flow causes transient response throughout the system; so does the passage of various batches of oil. In fact, not only the hydraulic gradient shifts, but the wave speeds are altered as the bulk modulus of elasticity changes. Automatic controls, such as a variable-speed pump controlled by suction head, produces transients during normal operation; in emergency situations excessive head may cause the controls to shut down the pumping station. The cutting off of power to a station produces a large negative surge wave downstream from the station and a positive wave upstream from the station. Valves may also be closed, or opened rapidly, under adverse conditions which create unwanted transients. Other severe conditions would include breakage of a pipe or the trapping of air in the system before starting the pumps, Definitions. Attenuation and Line Packing Some of the phenomena which exist in unsteady flow in any real fluid System are described by special terminology in the oil pipeline industry. The most important of these terms are attenuation and line packing. Others include potential surge, pyramiding, and rarefaction. The instantaneous head rise caused by suddenly stopping all flow is referred to as potential surge. Its magnitude is aVo/g in which V0 is the steady state velocity. Since the length between pumping stations may be great

-6 -the potential surge may be small compared with the change in elevation of the hydraulic gradeline between stations. The conditions of line packing and attenuation are more easily explained and visualized if some background information is first presented. When a valve is closed on a pipeline with assumed frictionless flow, the pressure pulse which develops at the valve travels upstream undiminished and reduces the velocity to zero as the wave is propagated. Figure 2 shows such an ideal simple system and shows the shape of the pressure wave and the velocity condition in the pipeline 30 seconds after closure. The location and shape of the pressure pulse at 10 and 20 seconds after closure are also shown. It can be seen that the potential surge, AHo, merely moves to the left superposed upon the initial hydraulic gradeline. In the real fluid system the hydraulic gradeline is not horizontal. When a pressure pulse moves up the hydraulic gradeline a different condition exists in the pipeline which leads to line packing within the pipeline and attenuation of the wave front. These same phenomena exist in all real fluid systems and are taken into account by the characteristic's method. In long pipelines the line packing and attenuation characteristics are particularly noticeable and thus deserve special definition and discussion. To obtain a clear picture of what is happening in a long pipeline following a valve closure, it is best to first visualize an unreal situation wherein the pressure wave climbs up the original hydraulic gradeline. Once the fallacy in this happening is recognized the correct visualization is apparent. If it is first imagined that the initial head rise at the valve merely

-7 - II I 1 30 20 10 Ho - HGL(Stcady State) Ho V=Vo ---, V. '= - Wave Location at t = 30 sec. Figure 2. Potential Surge in Frictionless System. HGL (Steady State) -- Ho I= Vn ' | A Figure 3. Hydraulic Gradeline on Long Pipeline. '- Locus of Pressure Rise at Wave Front HGL (Steady State) 0 A Ho Ho Wave Location at t = 30 Figure 4. Attenuation in Long Pipeline.

-8 -rises up the original hydraulic gradeline as shown in Fig. 3, it can be seen that the same hydraulic gradeline still exists after the passage of the wave. Thus, the flow has been completely stopped at the valve but it cannot remain stationary upstream from the valve because of the identical, but elevated hydraulic gradeline. At 10 seconds after closure at point A in Fig. 5, the velocity will not be zero but will be some value between Vo and zero. Since a forward velocity exists at point A and the valve is closed at the pipe end, the discharge passing point A must be stored within the pipe. This is known as line packing. The flow is stopped at the valve so the head continues to rise at the valve. The increased storage is created by additional expansion of the pipe walls and compressibility of the liquid. Both Figs. 2 and 3 are incorrect for the real fluid flow situation. The actual condition is shown in Fig. 4. The initial head rise at the valve is correctly computed from the relation aVo/g, however, because of packing, the head continues to rise at the valve with increasing time. The potential surge resulting from an abrupt flow stoppage is quite often a small percentage of the final maximum head rise. As the wave moves upstream, the velocity change across the wave front becomes smaller since the velocity is not reduced to zero behind the wave. Thus at 10 seconds the head rise at the wave front is aAV/g where AV is less than Vo. Similarly, at 20 and 30 seconds, AH at the wave front is further reduced as shown in Fig. 4. This reduction of the pressure rise at the wave front is known as attenuation of the wave. The locus of the pressure rise 4. "Prediction of Surge Pressures in Long Oil-Transmission Lines," by Milton Ludwig and S. P. Johnson. A.P.I. Annual Meeting, November 14, 1950.

-9 -at the wave front is shown as a dashed line in Fig. 4 and is seen to approach the original hydraulic gradeline asymptotically in the infinitely long line. In most practical situations a reflection of the attenuated wave occurs at the upstream boundary, although in the relatively long pipeline the reflected wave may be so small as to be undetected. Even after the locus of the.. head rise has become coincident with the orignal hydraulic gradeline the new gradeline continues to rise, gradually reducing the forward velocity to zero in the pipeline. It is of interest to note that the attenuation described above does not directly result from frictional effects but arises out of the fact that momentum conditions must be satisfied at the wave front. Without frictional effects in the system, however, the hydraulic gradeline would be horizontal and the phenomena of line packing and attenuation would not exist. The characteristic's method of solution of the differential equations that describe unsteady flow in a long pipeline automatically includes these newly defined effects since the complete equations are solved. Figure 5 shows the computer results of a sudden valve closure on a long pipeline, as obtained by solution of the transient flow equations for a simple pipe 125 miles long and 30 inches in diameter. The initial steady state velocity was 4.25 ft/sec and the wave speed was 3300 ft/sec. The solid lines show the original hydraulic gradeline and the gradeline at various times after valve closure. At 200 seconds after valve closure the attenuated wave reaches the upstream boundary and is reflected. The dashed lines indicate the extent of the pipeline influenced by the reflected wave as the gradeline continues to rise. At 9 minutes

-10 -after valve closure the hydraulic gradeline has reached its maximum level and the forward velocity has been reduced to zero. The adverse gradeline produces flow in the opposite direction. The surging condition continues until friction losses in the system cause the flow to come to rest. In Fig. 5 the line indicated by dots shows the magnitude of the initial wave front as it moves into the undisturbed flow. The attenuation of the wave front is evident. The superposition of one transient pressure upon another is known as the pyramidal effect. For example, if line packing has occurred due to closure of a valve, then the head is increased upstream by starting of a pumping station, one transient is superposed.on another..transient.. Rarefaction control is the opposite of pyramidal effect in that a negative surge wave is generated upstream by shutting down a pump or closing a valve. When this meets a surge wave being transmitted up the hydraulic gradeline they tend to partially cancel the head changes. These latter two effects are easily demonstrated in a computer solution by proper adjustment of the boundary conditions. Properties of Fluids. Wave-Speed Determination. Frictional Effects Viscosity, bulk modulus of elasticity, and density are the important fluid properties needed to design for transient control of long pipelines. Viscosity is a function of temperature primarily, but the bulk modulus of elasticity of oils depends upon both temperature and pressure in some cases. 5. "Transient Pressures in Long Pipelines," by R. R. Burnett. A.P.I. Annual Pipeline Conference, Division of Transportation, April, 1960.

-11 - Distance From Downstream End, Miles Figure 5. Results of Computer Solution of Valve Closure on Long Pipeline.

-12 -The density changes the power requirements for pumping, and is needed for Reynolds number determinations in calculating friction factor. Also density affects the relation of pressure to head, and likewise occurs in the formula for determination of wave speed. The density is primarily a function of temperature only for any given oil. Wave speeds in the pipeline depend upon bulk modulus of elasticity, the density, the modulus of the pipe wall material, the thickness of the pipe wall, and the method of supporting the pipe. Calculations of wave speeds are not precise, but must be used as a basis for design. Wave speeds should be measured as soon as convenient after the system is constructed. The friction factors depend upon pipe wall roughness and upon the Reynolds number. Since a slight error in magnitude of the friction factor can greatly affect the heads needed for pumping stations, great care should be taken in its determination. Computational Methods Depending upon the purpose for studying transients in a pipeline, the computer program may be written for one line between two stations, or it may include several stations. The characteristic method equations are used, but various means of taking into account the changes in piping and fluid properties are available. One simplifying assumption is generally made-the movement of the boundaries between batches is so small during the time the transient propagates that it may be ignored. Two computational methods are briefly outlined: (1) a method of "lump

-13 -ing" properties for each reach, but avoiding interpolations; and (2) an interpolation method. For the first method the time ZL/a for the whole system to be analyzed is calculated and then divided into N equal time increments At for the computation. As both fluid and pipe properties change, it is now necessary to calculate the length of each reach Axi so that the average wave speed, through this reach ai, when multiplied by At yields Axi. Next the steady-state head loss through each reach is calculated and an appropriate ci Vi worked out to match this head loss. Now the pipeline is solved as a series of pipes, having one reach each, but different values of ai and ci. Those reaches containing pumping stations may be treated in a special manner if the pumping speeds are changing or valves are changing. By making N sufficiently large the error in averaging properties over a short reach is minimized. The second method, which includes an indexing procedure, follows. Indexing Method for Complex Systems In this procedure the pipeline is treated as a series system with fluid and geometric properties taken into account as they actually vary along the pipeline in the initial steady condition. For a computer program, sections of the system having different characteristics are identified by separate numbers, and a general boundary condition is written to handle all junctions of these pipe sections. A suitable procedure is presented in the following example. This same method can be extended to three branch connections when a number of such boundary conditions appear in a system. Whenever there is a duplication of any type of boundary condition in a complex system, this pro

-14 - cedure is recommended. Example 1. A long pipeline between two pumping stations is shown in Fig. 6. The pipe is carrying different crudes and the pipeline is divided into sections as shown so that the fluid and pipe properties are uniform in each section. Pipe lengths, areas, friction factors, and wave speeds are known and the time increment At has been selected. It is desired to have a program for this system such that another set of conditions (involving different crudes at different locations in the system) can be handled merely by changing the input data. Write the portion of the program to handle the boundary conditions at the section junctions. Since these are all series pipe connections a subscripted indexing method is established in the program wherein the sections adjoining each junction are identified in pairs. The number of identical series junctions should also be identified in the input data. In addition to the subscripted identification of each pipe length, area, and wave speed, the input data for the system should read (MAD notation): INDEX (1) = 1,2,2,3,3,4,45,5,56, JUNCT = 5 where the subscripted name INDEX identifies the pairs of adjacent series connections and the integer JUNCT gives the number of junctions. The boundary condition at a series connection states that the discharge and pressure are the same at each pipe end. Let X and Y identify the inlet and outlet pipe at the boundary, A represent the wave speed and AR represent the pipe area, then the program will take the following form:

Long Oil Pipeline Pumpi: Static -L _r I 2 i 3 -T4~ 1 6 J ng in L Pu Sta imping ation Figure 6. Series Oil Pipeline System.

-16 - INTEGER X,Y-, INDEX, JUNCT THIROUGH AA3, FOR I = 1,2,I.G.2*JUNCT X = INDEX (I) Y = INDEX (I+1) 02 = G/A(Y) Cl = VS - C2*HS - F(Y)*DT*VS*.ABS.VS/(2.*D(Y)) 04 =G/Ak(X) C5 = VR + c04*IfR - F(X)'*DT*VR*.ABS. VIR/(2.*D(X)) HP(XN(X)) = (-Cl*AR(y) + C3*AR(X))/(C2*AR(Y) + C4*AIR(x)) HP(Y,~O) = HP(X,~N(X)) VP(Yjo) = Cl + C2*HP(Y,O) AA3 VP(x,7N(X)) = 05 - C4*HP(X.,N(X)) This singl e through statement will handle all five junctions. It is apparent that simplifications can be realized if the pipe is of constant cross sectional area. The advantage of this type of boundar'y condition becomes evident if a different set of flow conditions are to be analyzed. For example., suppose Sections 2 a nd 5 are replaced by three sections, in Fig. 6. The additional pipe section can be identified as Section 7 (between 2 and 5) and the input data should read (in addition to proper identification of new pipe lengths and wave speeds). INDEX (1) = 1,2,~2,7,7,3,3,4,4,15,,6,9 JUNCT = 6

-17 - The computer program does not change. Experimental Confirmation of Theory The South European Pipeline links the port of Marseilles on the south coast. of France to the industrial areas of Strasbourg in Eastern France and Karlsruhe in Western Germany. This pipeline is unique in its design since its latest phase of expansion includes 15 pumping stations with no surge relief tanks. This pipeline is 465 miles long, 34-inch in outside diameter and its minimum wall thickness is.512 inch. It is designed to operate against a maximum allowable pressure of 750 psig for the maximum wall thickness of.375 inch. The latest phase of expansion should permit transporting close to 700 thousand barrels of crude oil each day which requires precise knowledge of transient conditions in the pipeline. Therefore surge tests were carried out by OTP-Bechtel at the request of and for the benefit of the South European Pipeline administration. The Pipeline Division of Bechtel Corporation of San Francisco provided consulting services and developed the computer program based on the method of characteristics to analyze and extrapolate the test results. The testing program6 consisted of 18 tests conducted during the week of September 28, 1964. The test section included 4 pumping stations, 3 mainline valves and approximately 200 miles of pipeline. 6. "Etude des coups de belier dans un pipe-line," by Mrs. P. Hayward, G. Dreyfuss, and L. Castex. Societe Hydrotechnique de France, IXeme Journees de l'Hydraulique. The writers wish to express their appreciation - -1 to the Societe du Pipe-Line Sud Europeen" for the use of surge test results as confirmation of theory.

-18 - Transient Pressure 0 @ 100 Seconds c * Transient Pressure > ~ 200 - @50 Seconds / /. —..>......... 7$ Transient e Original -" -x N Pressure @ 50 0 D Hydraulic. \ Seconds i^ ( 0SGround Profile FLOW 180 170 160 150 I 140 130 120 MILES I I I 0 I P l I Pipeline 34" O.D. Figure 7. Deformation of the Gradeline Calculated by Computer for Rarefaction Simulation Test.

-19 - The results of the test confirm that the method of characteristics can be used to predict accurately the envelope of transient pressures due to surge conditions even though the pipeline and the crude oils do not present the ideal properties that are attributed to them in theory. Empirical results, especially on wave propagation velocity should be obtained to adjust theoretical computations and reflect conditions unique to a given pipeline system. For the South European 34-inch pipeline system the velocity of wave propagation can be calculated within 2 percent of the value measured during the tests. Pressure rise at the wave front and the envelopes of transient pressures can be determined with an approximation better than 5 percent. The tests have demonstrated how a surge control system can be designed with the use of the information yielded by application of the method of characteristics; this is illustrated for example by the rarefaction simulation test. Figure 7 illustrates the deformation of the gradeline calculated by computer for time 50 seconds and 100 seconds after Station 4 and one unit at Station 3 were shut down. Figure 8 shows how closely test recordings at valve 3A checked with computer output. In this case boundary conditions were input as the recorded pressures at the suction of pumping Station 4 and the discharge of pumping Station 5. Anoth verification of the results predicted by the methods of characteristics is illustrated by Fig. 9 which compares the recordings of Valve 4A and the values obtained by computer when the suction pressure rise at Station 5

450 r 400 350 --— 10 20 30405060709___ _ to _ _t Station 4 Suction Pressure 300 250 0 10 20 30 40 50 60 70 80 90 TIME - SECONDS Figure 8. Test Results Compared with Computer Output for Rarefaction Simulation Station 3 to 4. Station 3 one unit shut down. Station 4 complete shutdown. 3600 m3/hr.

500 400 I — P 300 200) t\) fPO I 100 0 Test Recording COmputer Input Comter puter Output 0 25 50 75 100 125 150 TIME - Sircnwric 200 Figure 9. Test Results Compared with Computer Output, Station 4 to Station 5, 3155 m3/hr Station 5 shut down at time 0; Station 4 shut down at 113 seconds.

-22 -and the discharge pressure at Station 4 were input. On this comparison we observe a -1 percent error coming from the original gradeline calculation at Valve 4A and a maximum error of -1.5 percent on the total pressure or -3.5 percent on the pressure rise. The line packing behind a closed valve is computed by the method of characteristics with the flow held at zero on the upstream side of the valve. This pressure rise and its propagation upstream were checked closely by three valve closure tests. Figure 10 is an example of this affirmation. It shows the closure of the South Rhone river crossing valve. The pressure rise on the upstream side of the South Rhone valve was input until the valve was closed then the line packing was computed for Q = 0 and the pressure rise checks within 2 percent of the recorded pressure rise. The transient pressures computed and recorded at Valve 3A present a 4 percent discrepancy that comes mostly from the original gradeline calculation. Pumping station behavior has been observed during the test at various flow rates. The ability for a station to control when it receives a surge from downstream depends on the amplitude of the attenuated surge it receives and on the depth of control of the station. The surge as it arrives at the station operating on discharge control causes the suction of the station to rise. The discharge pressure stays constant until the reduction in speed of the variable speed pump cannot compensate the effect of the surge. Then both discharge and suction pressure proceed to rise until the variable speed control programs the variable speed unit off. Past that time, if the surge is big enough, the pressure limit switch

800 700 " ' Discharge Pressure 400 Station 3 _ Test Recording Computer Input Computer Output 2500 -- 175 200 225 250 275 300 325 350 375 TIME - SECONDS Figure 10. Test Results Compared with Computer Output. Station 3 to South Rhone 3Val 3 Sot Vlve 3A 400 ----- I / hr.- S uth --- —--- ve C osure Valve, 3220 m3^/hr. South Rhone Valve Closure.

-24 -will shutdown the station. A pyramidal effect is then observed at the suction of the station when it shuts down. Observations made at Station 4 illustrate the conditions described above. Figure 11 reproduces pressure recordings at the suction and discharge of Station 4 and at the suction of the variable speed pump, which is also the discharge of the constant speed unit at Station 4. The valve downstream at Station 4a starts to close at t = 0 and closes completely at t = 278 seconds. The pressure rise on the upstream side of valve 4a is shown in the small graph in Fig. 11. This rise reflects back and,in conjunction with line packing in the reach between Stations 4 and 4a, causes the pressure to increase at the discharge to Station 4. The variable speed pump is on discharge control, and is slowed down by rising pressure (t = 260 seconds to t = 520 seconds) until it is ineffective to control. At t = 320 seconds Station 4 shuts down and check valves permit no backflow through the station. After the initial surge (t = 320 seconds to t = 326 seconds) pyramiding of the surge occurs. After t = 340 seconds the pressure rise observed on the suction and discharge of Station 4 is due to line packing. Boundary Conditions The boundary conditions may be of great variety, depending upon the particular problem. The characteristic's theory always gives a linear relation between the two dependent variables, say flow Q and elevation of hydraulic gradeline H, at the end of a pipe for each time increment. One outside relation is then needed in order to solve for Q and H. The characteristic curve for a pump, for example, might be the outside condition. With a pump

700 600 500 v 400 u) E 300 200 150 Discharge Pressure. Station 4 & Pmp G-1 / o / | -Suction Pressure G-1 0 > | Discharge Pressure G-4 c | - 700 m f Peak Pressure -*/'.. ~ |! Pressure at J, I sFlow 1 4600 t Valve 4A ___Suction Pressure 00 20 300 400 Station 4 & Pump G-T 00-Seconds I U' 200 225 250 275 300 325 350 375 400 TIME - SECONDS Figure 11. Pumping Station Reaction to Transient Pressures, 3340 m3/hr. Valve 4A closed at 278 sec., Pump Station 4 shuts down at 320 sec.

-26 -ing station there may be several additional variables to be determined for each time increment, such as flow through each pump, through bypass check valves, head losses across pumps and valves, as well as conditions on the other side of the pumping station. In all cases as many equations are needed as there are unknowns; some of the equations may be differential equations, as in the case of an accumulator with inertia taken into account. In case differential equations are to be solved, the first-order Runge-Kutta methods are simple to apply. The boundary conditions may be very complicated, as in the case of complete automatic control, but the use of the conditional statements in comnputer programming makes it relatively easy to consider many possible optional boundary relations. Conclusions The special problems arising in the analysis of transients in oil pipelines are readily handled on the digital computer by use of the method of characteristics solution of the basic equations of waterhammer. Since the equations go back to fundamentals, and include fluid friction, such phenomena as line packing, attenuation, pyramiding, and rarefaction are automatically taken into account through proper handling of the boundary conditions. Field test results confirm the theory to within 5 percent.

Acknowledgments The National Science Foundation, through Research Grant GP-340 to The University of Michigan, sponsored much of the work on development of methods and equations. The "Societe du Pipe-Line Sud Europeen" kindly permitted use of their surge test results. -27 -