03-27-2015, 07:11 PM

7/30/19. A revised program is shown on the last 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.

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.