HP Forums
Pipe Flow for partially full pipes (rev. 5/14/19) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: Pipe Flow for partially full pipes (rev. 5/14/19) (/thread-3494.html)



Pipe Flow for partially full pipes (rev. 5/14/19) - Gene222 - 03-27-2015 07:11 PM

5/14/19. A better and more versatile program is shown on the 7th post below.

This program will calculate N, Q, S, Dia, or y/D for partially full pipes using Manning's Equation in English or Metric units. The program also computes the corresponding velocity. The depth of flow ratio, y/D, is solved by numerical analysis using the secant method. Where there are two solutions, only the first solution between 0 < y/D < 0.9381 is reported. When solving for the diameter, the calculated diameter and diameter rounded to a standard size are given. The Manning's n value is constant.

To use this program, run the program "PipeFlow2.2" from the HP Prime catalog menu. In the program options screen for "Units", select English Units or Metric Units. For "Program", select either the n, Q, S, D, y/D calculator or a velocity calculation program. Press OK to run program.

For the "n, Q, S, D, y/D calculator" the input screen shows five variables - N, Q, S, D, and y/D. Enter any four of the five variables. Enter 0 (zero) in the variable that you to want to solve. Press OK. The program then solves for the fifth variable and displayed the results on the terminal screen.

For the three velocity programs, select the desired program in the program options screen, and press OK. Then input all 4 variables including the velocity, and press OK. The diameter, slope, etc. are calculated and displayed on the terminal screen.

To determine the pipe size (diameter) for a specific ground slope, use the "n, Q, S, D, y/D calculator" and solve for D. To determine the pipe size and slope for a minimum velocity, use the "Given V, n, Q, y/D Solve D, S" program. To size pipes for full flow, use a depth of flow or y/D = 1. When solving for the pipe diameter, the program will solve for the diameter for both the calculated diameter and diameter rounded to a standard size. This program was written to replace the Pipe Slide Rule program for the HP 41C, which used Newton's Method to solve for y/D. Use at your own risk. Please let me know of any bugs or errors.

May 30, 2015 revisions. When solving for the rounded diameter, the method for solving the velocity was revised. Revised the secant method calculation to iterate on theta for the function f(theta) instead of y/D. The number and names of the variables used in the PipeFlow2 program were simplified. Changed the way the variables were inputted and printed out for ease and consistency. Added 3 subroutines to solve pipe flow problems where velocity is given. Lastly, the program code was cleaned up.

November 11, 2015 revision. Corrected error in the seconded velocity program "Given V, n, Q, D. Solve y/D, S". When swapping theta and f(theta) variables for next iteration the Theta 2 formula was corrected.


RE: Pipe Flow for partially full pipes - Thomas Klemm - 03-27-2015 08:57 PM

(03-27-2015 07:11 PM)Gene222 Wrote:  If anyone has the Newton's method formula for Manning's equation, I would appreciate a copy of it.

You might find this old thread interesting: MANPIP. I've used a fixed point iteration to solve the equation.

Kind regards
Thomas


RE: Pipe Flow for partially full pipes - Gene222 - 03-28-2015 10:18 PM

Thanks for the information on fixed point iteration. I never heard of fixed point iteration and had to goggle it to see what it was about. I was impressed on how you wrote the HP 41 code for Jerussi. Jerussi's MANPIP program seams to be almost identical to the Pipe Slide Rule program for the HP 41C that I had used. I can understand why he wanted to reconstruct it. He was designing storm drains on excel using an old Virginia Dept. of Transportation worksheet. Not too long ago, storm drains were designed using the velocity for full pipe flow. Today, most everyone designs storm drains using the actual velocity, which requires the use of Manning's equation for partial flow.

I should probably demonstrate to others how to use the program I wrote to design storm lines. Attached is a sample storm drain design from the Virginia Dept. of Transportation Drainage Manual. The same form that Jerussi was using only more current. For line 1-2, the design flow rate is 4.5 cfs and the design slope is 0.010, and you want to determine the size of the pipe to carry this flow, given a minimum flow velocity of 3 fps. In the pipe flow program, you would enter the following information.

n = 0.013
Q cfs = 4.5
S ft/ft = 0.01
Dia in = 0
y/D ft/ft = 1

For most storm lines, pipes are sized based on full pipe flow. So, the depth of flow or depth ratio or y/D is 1. We want to solve for the diameter, so we use 0 for the diameter. Press "OK" to continue the program, and program tells you that the calculated diameter is 13.0983 in at a flow depth of 13.0983 in or full pipe flow. Pipes are not available in this size, so the program rounds the calculated diameter upward to a standard pipe size. The program tell you that a 15 in diameter pipe can carry the flow at a velocity of 5.6896 ft/s and at a depth of 9.2175 in. The velocity of 5.6896 is greater than the minimum velocity of 3 ft/s, so the 15 in diameter pipe is OK. So, you would take the 15 in diameter and the velocity of 5.7 ft/s and plug this into your spreadsheet to allow you to calculate the flow time as is shown in the sample storm drain design.

Now, suppose the department had a minimum pipe size of 18 inches. This is how you would design same line 1-2 as used above. You would enter the same information as before

n = 0.013
Q cfs = 4.5
S ft/ft = 0.01
Dia in = 0
y/D ft/ft = 1

And, you would get the same information back, that the calculated diameter is 13.0983 in and the rounded diameter is 15 in. Since the minimum pipe size is 18 in, we must manual calculate the velocity and depth of flow for the 18 in pipe. We exit the program and restart it. We enter the following information into the input screen.

n = 0.013
Q cfs = 4.5
S ft/ft = 0.01
Dia in = 18
y/D ft/ft = 0

So, 18 in is entered as the diameter and 0 in entered as the depth of flow or y/D. Zero is entered for y/D, because that is what we want to solve for. Press OK to continue the program. The program then tell you that for an 18 in diameter pipe, the depth of flow (y/D) is 0.4572 and the velocity is 5.7146 ft/s. 5.7146 ft/s is greater than the minimum velocity of 3 ft/s, so the 18 in diameter pipe is OK. We take the 18 in and 5.7 f/s and plug this back into the spreadsheet to calculate the flow time.

Now, suppose we were designing a sanitary sewer instead of a storm drain with the same flow rate of 4.5 cfs but with a design slope of 0.005 ft/ft. Most small sanitary sewer have a maximum depth of flow rate (y/D) of 0.8, Also, suppose the minimum velocity is 2.5 ft/s. We start the program and enter the following information into the input screen.

n = 0.013
Q cfs = 4.5
S ft/ft = 0.005
Dia in = 0
y/D ft/ft = 0.8

Again, the diameter is 0, because that is what we want to solve for. y/D is 0.8 because that the maximum depth of flow allowed. Press OK to run the program. The program tell you that the calculated diameter is 15.0442 in and the rounded diameter is 18 in with a velocity of 4.4033. The velocity for the 18 in exceeds the minimum velocity so we use the 18 in pipe. Actually, there is a more complicated procedure for designing a sewer line, but this illustrates how to use this program.


RE: Pipe Flow for partially full pipes - akmon - 04-06-2015 09:47 PM

Thank you for sharing your interesting program. I have downloaded it, and gonna try some examples.


RE: Pipe Flow for partially full pipes (rev. 11/11/15) - Gene222 - 07-11-2018 07:30 PM

CircularPipe program.

This is a more versatile program than the program in the first post. It can solve Manning's flow and velocity equations.

This program calculates the unknown variable for Manning’s flow equation for a circular pipe. These variables include Manning’s n value, flowrate q, slope s, diameter for flow Dflow, and either depth y or ratio y/d. The diameter for velocity Dvel, and slope for velocity Svel are calculated using the continuity and/or Manning’s velocity equations. When inputting the velocity or ratio y/d, the adjacent checkbox must be checked. Instructions, example problems and formulas used are shown on the enclosed attachment.

This program uses a single input screen to solve Manning’s flow and velocity equations, which made the program a little difficult to use. See the examples on solving for the diameter to see the extra steps that are required to recalculate Manning’s equation with a rounded diameter.

4/7/19 Program was removed by user, because of errors. See last post for newer program.

[Image: no7dp3.png] [Image: 2zghfv5.png]


RE: Pipe Flow for partially full pipes (rev. 4/6/19) - Gene222 - 03-26-2019 07:52 PM

CircularPipe program revised 4/6/2019

4/6/19. The CircularPipe program was revised again to eliminate the checkbox for velocity, as this checkbox is no longer need. The arrangement of the input screen was revised to make it easier to enter the inputs. The program was revised to check for pressure flow and to check for zero input values, so that the input variables would not get corrupted from a division by zero error. Most of the subroutines were changed to functions. Some variables were renamed. The attached program document was revised to correct some errors and add some more examples.

3/26/19. This program calculates the unknown variable for Manning’s flow equation and Manning’s velocity equation for a circular pipe. The program is similar to the Field’s Hydraulic Slide Rule that had several scales to solve Manning’s flow and velocity equations. Instructions, example problems and formulas used are shown on the attachment enclosed with the program.

This program uses a single input screen to solve Manning’s flow and velocity equations, which makes the program a little difficult to use, but it eliminated the need to select the program from the opening choose box that was used on the older pipeflow program. The input variables for both equations are shown on the input screen, and the user must determine which input values are to be entered to solve for the unknown. To aid the user in determining which inputs are required for the variable to be solved, the required inputs are listed next to the solved variable in the “solved” drop box. Also, when the program prints out the results, the inputs that were used and the variable that was solved are flagged with a star. When inputting the depth y, the adjacent checkbox must be checked.

To run the program, press the toolbox key. Then press the User tab. Then select CircularPipe from the menu, and then select 1 CircularPipe from the right submenu. (revised 4/6/19)


RE: Pipe Flow for partially full pipes (rev. 5/14/19) - Gene222 - 05-14-2019 06:45 PM

The CircularPipe program was revise to print the results on the graphic screen instead of the print terminal. This made it easier to rerun the program with the use of screen tabs. The program can also calculate invert elevations. As with the previous program, all inputs are on a single input screen. The user needs to tell the program which inputs are to be used with the solve and input drop boxes. 5/15/19. Corrected spelling errors.

[Image: 2wch6rb.png] [Image: 124wp69.png]

[Image: 2vkgc4k.png] [Image: 286smjb.png]