HP Forums

Full Version: MANPIP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I just recently lost a program titled "MANPIP" when my batteries went dead and I did not get the new ones installed in time. The program was an open channel flow calculator for circular pipe using Manning's equation. The program was loaded into my HP-41CX in the late 1980's via a wand from barcode. I do not have the barcode to re-install it. I had it on magnetic cards, but the first of 5 cards was ruined by the drive wheel (became gooey) of my card reader that no longer works. Therefore, I am reaching out to see if anyone has this program written down or in barcode??? The first screen would show: Qf D S y Qp after XEQ MANPIP. The program would prompt you for "n=", "D=", "S=", "y=" and you would enter the knowns and R/S through the unknowns. Solution would then go through the same (allowing you to also check your input) and also give you V (velocity).

The program I am describing above is not the Pipe Slide Rule, although it is possible the programmer started with it.

If anyone could help me out that would be great.

I am a Civil Engineer and although I can use the computer to solve these problems, my 41CX was portable into the field. I would like to regain that ability.
(04-07-2014 06:00 PM)Jerussi Wrote: [ -> ]If anyone could help me out that would be great.
Is the Gauckler–Manning formula used?
[Image: 115da70eda4f9716ac53d8803fb84fe9.png]
Then it shouldn't be too difficult to recreate your program. Even providing the bar-code should be easy.
Without knowledge of hydraulics I assume D = 2Rh and y = k. But then what are Qf and Qp?

Kind regards
Thomas
Qf is full flow in Cubic feet/sec
Qp is partial flow also in CFS

Also see attachment for more info
Also, the program was in English units only
Rh is the hydrauolic radius not the radius of the pipe. D or d is the diameter of the pipe.
(04-07-2014 07:35 PM)Jerussi Wrote: [ -> ]Qf is full flow in Cubic feet/sec
Qp is partial flow also in CFS
How are these related to Q?

Quote:Also see attachment for more info
That certainly helped a lot!

Quote:The first screen would show: Qf D S y Qp after XEQ MANPIP.
Are they related to the top-row (LBL A-E)?

Quote:The program would prompt you for "n=", "D=", "S=", "y=" and you would enter the knowns and R/S through the unknowns.
As far as I understand all these parameters are needed to calculate Q = Q(n, d, y, S).
Is this what should be calculated?
Or can you specify Q as well and just omit one of the others?

Kind regards
Thomas
Yes they are shown in that order accross the screen and then the A-E buttons are assigned to them accordingly.

Also yes you can just input what you know of the variables and it solves for the unknowns - You can specify the Diameter (D or d) and the flow Q and solve for slope S. or.. input the slope and flow and solve for diameter. The N factor is always input.
Qp and Qf are both Q (flow in cubic feet/sec)
Qp is partial flow and is derived from the Manning's equation.
Qf is full flow where the equation changes to Q=VA, where V is velocity in Ft/sec and A is the cross sectional Area of the inside of the pipe in Feet.
I left the Q= out of "The program would prompt you for "n=", "D=", "S=", "y=" and you would enter the knowns and R/S through the unknowns." it should have read: The program would prompt you for "n=", "Q=", "D=", "S=", "y=" and you would enter the knowns and R/S through the unknowns.
(04-08-2014 09:29 PM)Jerussi Wrote: [ -> ]I left the Q= out of "The program would prompt you for "n=", "D=", "S=", "y=" and you would enter the knowns and R/S through the unknowns." it should have read: The program would prompt you for "n=", "Q=", "D=", "S=", "y=" and you would enter the knowns and R/S through the unknowns.
That makes more sense. Was it possible to solve for D or y? Because that appears to be a little more difficult.

Quote:Qp and Qf are both Q (flow in cubic feet/sec)
Qp is partial flow and is derived from the Manning's equation.
Would you enter Qp in the program when prompted for "Q="?

Quote:Qf is full flow where the equation changes to Q=VA, where V is velocity in Ft/sec and A is the cross sectional Area of the inside of the pipe in Feet.
Does that mean: \(Qf=V\cdot\frac{\pi D^2}{4}\)?

Could you provide some examples for the calculations?

Though I'm sure this isn't yet what you had here's a first approach:
Code:
LBL "MANNING"
"N = ?"
PROMPT
FS?C 22
STO 00
"D = ?"
PROMPT
FS?C 22
STO 01
"S = ?"
PROMPT
FS?C 22
STO 02
"Y = ?"
PROMPT
FS?C 22
STO 03
1
RCL 03      ; y
2
*
RCL 01      ; d
/
-
ACOS
2
*
STO 04      ; theta = 2 arccos(1 - 2 y / d)
ENTER
SIN
-
RCL 01      ; d
X^2
*
8
/
STO 05      ; A = (theta - sin(theta)) d^2 / 8
RCL 04      ; theta
/
RCL 01      ; d
/
2
*           ; R = A / P
LASTX       ; 2
3
/
Y^X         ; R^(2/3)
RCL 02      ; S
SQRT
*
RCL 00      ; n
/
1.49        ; k
*
STO 06      ; V = k R^(2/3) S^(1/2) / n
RCL 05      ; A
*
STO 07      ; Q = V A
"N = "
ARCL 00
PROMPT
"D = "
ARCL 01
PROMPT
"S = "
ARCL 02
PROMPT
"Y = "
ARCL 03
PROMPT
"A = "
ARCL 05
PROMPT
"V = "
ARCL 06
PROMPT
"Q = "
ARCL 07
PROMPT
END

You are only asked for n, D, S and y. But you don't have to re-enter them when they aren't different from the last calculation. Only A, V and Q are calculated.

Cheers
Thomas
Wow thanks.
I hand keyed it into a 41CV that I use at my desk since my 41CX is at home today. I still have to find my wand. It is at home somewhere. But thank you for the barcode.
When I tried to run the program I am getting a "DATA ERROR". I then hit PRGM and it stopped on line 23 / (divide).
Question: when I key in FS?C 22 do I include the space between the C and the 22? I tried it both ways and didn't have any luck.
Do I need a space between the letters and the = sign?
There is no need to show the results for "A"
Not important but the order I remember was N, Q, D, S, y, V

I will see if I can get it to work at lunch today.
Again, thank you very much for the effort you have put in.

last question: How do you create the barcode?

I will find some examples of the calculations today.

Regards,
Mark
I believe it needs to ask for Q= also. You are correct that if the variable was input it would display in the results and nothing would need to be entered.

For example: I would enter N=0.013, Q=12 (CFS), D= no input, S=.01 (for 1%), Y= no input and it would calculate the size pipe in diameter (inches) required to flow 12 CFS at 1% in a concrete pipe with a N=0.013.

or I could enter N=0.013, Q= no input, D=15 (inches), S=.01, Y= no input and it would calculate the flow "Q" in CFS that a 15 inch concrete pipe can carry at 1%.
(04-09-2014 02:13 PM)Jerussi Wrote: [ -> ]When I tried to run the program I am getting a "DATA ERROR". I then hit PRGM and it stopped on line 23 / (divide).
Code:
22  RCL 01      ; d
23  /
That's because d wasn't specified or was set to 0.

Quote:Question: when I key in FS?C 22 do I include the space between the C and the 22?
[XEQ] [ALPHA] FS?C [ALPHA]
Now it should display:
FS?C __
Then you can enter 22:
FS?C 22

Quote:I tried it both ways and didn't have any luck.
I hope it works now.

Quote:Do I need a space between the letters and the = sign?
No. You can do as you like. It's just how the text is prompted. I can remove these.

Quote:There is no need to show the results for "A"
Not important but the order I remember was N, Q, D, S, y, V
I can change that easily.

Quote:I will see if I can get it to work at lunch today.
Again, thank you very much for the effort you have put in.

last question: How do you create the barcode?
I used: nutstudio. But there are other tools as well. IIRC even online.

Quote:I will find some examples of the calculations today.
That will help.

Cheers
Thomas
(04-09-2014 02:28 PM)Jerussi Wrote: [ -> ]For example: I would enter N=0.013, Q=12 (CFS), D= no input, S=.01 (for 1%), Y= no input and it would calculate the size pipe in diameter (inches) required to flow 12 CFS at 1% in a concrete pipe with a N=0.013.

or I could enter N=0.013, Q= no input, D=15 (inches), S=.01, Y= no input and it would calculate the flow "Q" in CFS that a 15 inch concrete pipe can carry at 1%.
Does it mean that "Y= no input" implies y=d?
In this case the formulas are much simpler:
  • \(A=\frac{\pi}{4}d^2\)
  • \(P=\pi d\)
  • \(R=\frac{d}{4}\).

Could it be that you specified: N, Q, D, S and then y was calculated?

Cheers
Thomas
Yes Y would be calculated and the corresponding V too. In the specific example I gave you to solve for the Q, yes Y is also calculated and in that example y is equal to D as it is solving for full flow.

Now if I would enter N=0.013, Q=12 (CFS), D= 21 (inches), S=.01 (for 1%), Y= no input the program will solve for Y and V. The answers should be something close to Y= 1.14 feet or 13.68 inches and V = 7.26 Ft/sec. In this case Y is not equal to D.

I have attached a storm sewer design spreadsheet we use in our site plans. This should show the formulas in the cells that are computed as examples of the calculations - I hope it helps some. Ignore the elliptical pipe sizes as I am only concerned with circular pipe. This is not as useful as the other attachement described below.

I have also attached a document "080_14320.pdf" with alot of information on the Manning's equation with all the formulas. In this document they call "Y" out as "h". This is a good reference.
BTW, I did fix the FS?C 22 to the correct input method per your info. I checked it line by line too. I am still getting the "DATA ERROR" but now it is stopping at line 52 /
Also, the program is not prompting me for the input at the begining. I do not understand this as I see all the "PROMPT"s in the program listing???
(04-09-2014 09:50 PM)Jerussi Wrote: [ -> ]BTW, I did fix the FS?C 22 to the correct input method per your info. I checked it line by line too. I am still getting the "DATA ERROR" but now it is stopping at line 52 /
Code:
51   RCL 00      ; n
52   /
That means that n is 0. You can just as well use the following to set that value:
0.013
STO 00


Quote:Also, the program is not prompting me for the input at the begining. I do not understand this as I see all the "PROMPT"s in the program listing???
You say that PROMPT doesn't work properly?

From the manual:
Quote:The PROMPT instruction in a program displays the contents of the ALPHA register and stops program execution.

Thanks for the attachments. It will take a while to read them. Thus you have to be a little patient with me. It turned out the problem is a little more difficult than I assumed at first sight.

Cheers
Thomas
OK. I'm not sure what I keyed in incorrectly - but I located my wand last night and was able to get your program to run after loading it from the barcode!

Time is no problem - I really appreciate what you are doing. Also, this event has had me get reacquainted with my 41's.

Just a side bar - I originally had a HP-34C that my Father bought me to go to college (Texas A&M). After two years of Engineering school I basically had to get a 41 to keep up with other students. It was a 41CV. After college I would use the 34C for daily computing tasks at my desk until it was stolen (I would leave it ontop of my desk charging at night). I still have all the books, charger, case, box, etc. for it. So I went full time 41CV. Then one day after I was investigating synthetic programing, I bought and tried to install a Turbo board in the CV. Well that was the last time that calculator worked. Then I bought my CX which I still use. I have also aquired a free CV from a co-worker which I use on a daily basis. I keep the CX for design programs and use the CV to keep the "miles" off of my CX.

Have a good day,
Mark
This is the 2nd version of the MANNING program. It uses the top row of the keys similar to how you can solve TVM problems with the HP-12C. I used the following layout but this could be changed:

[N] [Q] [D] [S] [Y]

You can use [STO] + key to enter the known data and [RCL] + key to read it. This works because registers 01-05 are used for these 5 variables.
So you enter the known values and then press the key to calculate the unknown value. After a while the result is displayed. If you press [R/S] the velocity is displayed as well.

If you want to calculate the full flow you have to set both D and Y to the same value. If you know N, Q and S you can only solve for full flow with the key [D]. It's currently not possible to solve for D when N, Q, S and Y are given. I could be wrong but I assumed that isn't used often.

However you can solve for Y when N, Q, D and S are given. For certain values there might be two solutions but only the smaller is calculated. A fixed point iteration is used to solve the equation numerically. Thus the calculation may take a little longer especially for small values of \(\theta\).

Examples
You have to run this once to initialize the calculator:
[XEQ] "MANNING"

Partial flow:
n = 0.0130 Q = 7.2400 d = 2.7500 S = 0.0020 y = 1.0441

.013 [STO] [N]
7.24 [STO] [Q]
2.75 [STO] [D]
.002 [STO] [S]
[Y]
Y=1.0441
[R/S]
V=3.5000

Full flow: (y = d)
n = 0.0110 Q = 11.9559 d = 2.0000 S = 0.0020 y = 2.0000

.011 [STO] [N]
2 [STO] [D] [STO] [Y]
.002 [STO] [S]
[Q]
Q=11.9559
[R/S]
V=3.8057


Registers
00 k
01 n
02 Q
03 d
04 S
05 y
06 \(\theta\)
07 A
08 V

Code:
LBL "MANNING"
RAD
SF 27           ; set USER mode
.3048           ; 1 ft in m
1/X
3
1/X
Y^X
STO 00          ; k = 1.485918577
"N Q D S Y"
PROMPT
;==================================================
LBL A           ; calculate n
XEQ 01          ; R^(2/3)
RCL 00          ; k
*
RCL 04          ; S
SQRT
*
XEQ 02          ; V
/
STO 01          ; n = k * R^(2./3.) * sqrt(S) / V
"N="
GTO 03
;==================================================
LBL B           ; calculate Q
XEQ 01          ; R^(2/3)
RCL 00          ; k
*
RCL 04          ; S
SQRT
*
RCL 01          ; n
/
STO 08          ; V = k * R^(2./3.) * sqrt(S) / n
RCL 07          ; A
*
STO 02          ; Q = V * A
"Q="
GTO 03
;==================================================
LBL C           ; calculate d
RCL 01          ; n
RCL 02          ; Q
*
PI
/
RCL 00          ; k
/
RCL 04          ; S
SQRT
/
3
Y^X
4
5
Y^X             ; 4^5
*
8
1/X
Y^X
STO 03          ; d = (4^5 * (n * Q / pi / k / sqrt(S))^3)^(1/8)
STO 05          ; y = d
X^2
PI
*
4
/
STO 07          ; A = pi * d^2 / 4
XEQ 02          ; V
RCL 03
"D="
GTO 03
;==================================================
LBL D           ; calculate S
XEQ 01          ; R^(2/3)
XEQ 02          ; V
RCL 01          ; n
*
RCL 00          ; k
/
X<>Y            ; R^(2/3)
/
X^2
STO 04          ; S = (V * n / k / R^(2/3))^2
"S="
GTO 03
;==================================================
LBL E           ; calculate y
RCL 01          ; n
RCL 02          ; Q
*
RCL 00          ; k
/
RCL 04          ; S
SQRT
/
3
Y^X
2
13
Y^X
*
RCL 03
8
Y^X
/
STO 09          ; L = 2^13 * (n * Q / k / sqrt(S))^3 / d^8
;...............; calculate initial guess
3
1/X
Y^X
6.758860947     ; max q
/
SQRT
2
*
1
X<>Y
-
ACOS
5.278107138     ; max theta
*
PI
/               ; max_t*acos(1-2*sqrt(q/max_q))/pi
STO 06
;...............; fixed point iteration
LBL 00
RCL 06          ; theta
SIN
RCL 06          ; theta
X^2
RCL 09          ; L
*
.2
Y^X
+               ; theta' = sin(theta)+(L*theta^2)^.2
ENTER
X<> 06          ; theta
-
ABS
RND
X>0?
GTO 00
1
RCL 06          ; theta
2
/
COS
-
RCL 03          ; d
*
2
/
STO 05          ; y = d * (1 - cos(theta / 2)) / 2
RCL 06          ; theta
ENTER
SIN
-
RCL 03          ; d
X^2
*
8
/
STO 07          ; A = d^2 * (theta - sin(theta)) / 8
XEQ 02          ; V
RCL 05
"Y="
GTO 03
;==================================================
LBL 01          ; calculate theta, A and R^(2/3)
1
RCL 05          ; y
2
*
RCL 03          ; d
/
-
ACOS
2
*
STO 06          ; theta = 2 arccos(1 - 2 y / d)
ENTER
SIN
-
RCL 03          ; d
X^2
*
8
/
STO 07          ; A = (theta - sin(theta)) d^2 / 8
RCL 06          ; theta
/
RCL 03          ; d
/
2
*               ; R = A / P
LASTX           ; 2
3
/
Y^X             ; R^(2/3)
RTN
;==================================================
LBL 02          ; calculate V
RCL 02          ; Q
RCL 07          ; A
/
STO 08          ; V
RTN
;==================================================
LBL 03          ; prompt result
ARCL X
PROMPT
"V="
ARCL 08         ; V
AVIEW
END

Best regards
Thomas
(04-09-2014 08:20 PM)Jerussi Wrote: [ -> ]Yes Y would be calculated and the corresponding V too. In the specific example I gave you to solve for the Q, yes Y is also calculated and in that example y is equal to D as it is solving for full flow.

Now if I would enter N=0.013, Q=12 (CFS), D= 21 (inches), S=.01 (for 1%), Y= no input the program will solve for Y and V. The answers should be something close to Y= 1.14 feet or 13.68 inches and V = 7.26 Ft/sec. In this case Y is not equal to D.

With the new version of the program you would enter:
.013 [STO] [N]
12 [STO] [Q]
21 [ENTER] 12 / [STO] [D]
.01 [STO] [S]
[Y]
Y=1.1385
[R/S]
V=7.2432

Cheers
Thomas
Pages: 1 2
Reference URL's