DESIGN OF PIPE NETWORKS
5.1 INTRODUCTION
5.2.3. STANDARD LINEAR ALGEBRA
In this method the junction continuity equations are written as a coefficient matrix that multiplies the vector of unknown discharges (of length NP pipes) in the system. This product equals the known vector which consists of the demands at NP = NJ - 1 nodes of the network. This method requires the coefficient matrix to be a square matrix with NP rows and columns. The coefficient matrix elements will have the values 0, 1, or - 1.
The row numbers correspond to the junction numbers for which the NP junction continuity equations are written, and the column numbers correspond to the pipe numbers.
Upon properly defining the coefficient matrix and the known vector, a standard linear algebra subroutine (function) is called to solve the linear system of equations. One implementation of such a solution is given below in program SOLBRAN3. In this program the junction continuity equation is not written at the last junction of the network.
Since the linear algebra solver SOLVEQ (see Appendix A) returns the solution in the same array that originally contained the known vector, the demands are now placed in the array Q at the outset, and the array QJ has been removed. In studying this listing you should strive to understand how the coefficient matrix is stored as 0's, 1's, or - 1's in the two-dimensional array C.
This method can be implemented easily by using spread sheets and general-purpose mathematics application software such as MathCAD, MATLAB, or TK-Solver. While the use of such software will result in computationally inefficient solutions, as is the case with SOLBRAN3, especially for large branched networks, the near-zero cost associated with such computations and the large PC RAMS makes it a viable approach. The CD contains a TK-Solver model and a brief description of it as files SOLBRAN3.TK2 and SOLBRAN3.DOC. A variation of the C program SOLBRAN.C is also on the CD under the name SOLBRAN4.C. This C program calls special pointer functions to allocate arrays beginning with 1, rather than 0, as is standard in C. (See Appendix A and the file SOLVEQC.DOC on the CD for more information.)
Example Problem 5.3
Water from a reservoir with a water surface elevation of 3020 ft passes through a pump to a pipeline that supplies twelve center-pivot irrigation sprinklers, each receiving a discharge of 1.5 ft3/s at elevation 3020 ft and having a 1-mile spacing, as shown in the diagram. A pressure of 60 lb/in2 or more is needed at each pivot location. Design the system to minimize costs. The capital cost of the pump is $100,000. Electrical energy costs $0.0935/kWh (actually $0.11/kWh, accounting for the 85% pump efficiency).
[1] (1) [2] [3] [4]
(6) (5)
(4)
(2) (3)
(7) (8)
(9)
[5]
[7]
(10) (11)
[13]
(12) [9]
[8]
P1
[6]
1 mile 1 mile 1 mile
1 mile
1 mile
1 mile
1 mile 1 mile1 mile1 mile
1 mile
2 miles Flat elev. = 3020' WS1 = 3020'
[12]
[10] [11]
e = 0.005"
all pipes
The cost per unit length for different pipe sizes is as follows (The NETWK program uses these default values.):
Diameter, in 10 12 15 18 20 24 30 36
Cost, cents/ft 10.67 16.67 24.00 43.33 56.67 80.00 100.00 120.00 The life expectancy of all components is 50 years, and the interest rate for acquiring capital for the project is 11 percent.
The cost of a system with pipes that are too small will be excessive, owing to the large energy cost of pumping the water. On the other hand the capital recovery cost for the pipes will be excessive if they are too large. The minimum total cost will be somewhere between these two extremes and will be determined by solving this branched system for several slopes of the HGL along the main line from node 1 though node 6 so that the pressure at node 6 is 60 lb/in2. Likewise the pressures at nodes 7 through 13 will be specified as 60 lb/in2. Thus a number of tentative designs will be required, and for each of these the costs will be determined. Since standard pipe sizes will be used, the nearest standard pipe size will be used in computing these costs.
The solution procedure will consist of the following steps:
1. Select a slope for the HGL along the main branch.
2. With a pressure of 60 lb/in2 at node 6, or HGL6 = 3020 + 60(144)/62.4 = 3158.46 ft, and the slope chosen in step 1, find the HGL slopes of pipes 6 through 12.
3. Compute all of the pipe diameters based on these HGL slopes.
4. Select standard pipe sizes that are nearest to the computed diameters.
5. Analyze the system that is composed of these standard pipe sizes, and compute the head and power that the pump must supply; then compute the electrical energy cost.
6. Determine the cost of the pipes, and convert this cost to an equivalent uniform annual cost by applying the capital recovery factor.
7. Repeat steps 1 through 6 until the least total cost is found.
SOLBRAN can not be used to seek this solution in a single run because the slope of the HGL is not the same for all pipes. The code would require modification to allow different slopes for different pipes. In its present form it could use the following input data to size pipes 1 through 6, but separate runs would be needed for the pipe pairs 6 and 9, 7 and 10, and 8 and 11 owing to the different HGL slopes. It is an instructive exercise to use the following input with SOLBRAN to compute the diameters of the pipes; those results can then be compared with those from NETWK.
Input to SOLBRAN 32.2 1.41E-5 0.001
10560 5280 5280 5280 5280/
0.005/
-18. 1/
4.5 -1 2/
4.5 -2 3/
4.5 -3 4/
3.0 -4 5/
1.5 -5/
The program NETWK will accomplish steps 1 through 6 with the input file below.
In this input file the option IHGL = - 2 allows the main branch to be described by 2 lines of input, and the regular input is added to describe the lateral pipes. This input file has a HGL slope of 0.001 (and this slope results in the least cost). To obtain a solution for a different slope, this value (0.001) is changed; additional required changes are the HGL elevation at the beginning node (3190.14) and, on the line after the RUN command, a beginning HGL elevation for the analysis that is requested with the option NOMSOL=1.
To pursue this solution process further, you should now obtain a solution from NETWK.
The input file is on the CD under the name EXP5_3.IN. In obtaining the solution you should note that NETWK first computes a design solution in which the pipe diameters are
Example Problem 5.3 / *
$SPECIF IHGL=-2,NOMSOL=1,DESIGN=1,ICOST=1 $END 3190.14 -18. 3020. 1.5 .005
1 6 0.001 10560. 5280./
END
PIPES 9 1.5
6 2 7 5280. 0. .005 10 1.5
7 3 8/ 11 1.5
8 4 9/ 12 1.5
9 2 10/ 13 1.5
10 3 11/ RUN
11 4 12/ 1 3190.14
12 5 13 PUMPS
NODES UNIT=0.11
7 1.5 3020. 3158.46 CAPI=100000
8 1.5 END
determined. Then the nearest standard pipe sizes are used to "analyze" the network. The final cost is based on this analysis and should agree with the data in this table:
COSTS ASSOCIATED WITH THIS NETWORK ITEM TYPE PRESENT WORTH ANNUAL COST 1 PIPE $ 2,749,243 $ 277,286 2 ELEC. ENERGY 2,575,937 259,857 TOTAL $ 5,325,180 $ 537,143
The least cost is $537,143 per year with the energy costing $259,857 per year and the amortized cost of the pipes being $277,256 per year. Pipes 1 and 2 should be 30 inches in diameter, pipe 3 should be 24 inches in diameter, pipe 12 should be 12 inches in diameter, and the other pipes should be 10 inches in diameter.
* * *