HP 20S - Normal Distribution, Direction Cosine, Fire Friction Loss
HP 20S Normal Distribution
Goal: To estimate the area of the normal curve
∫( e^(-x^2 / 2) dx, a, b) / √(2 * π)
Steps:
1. Enter the programming editor: [ <| ] [ R/S ] {PRGM}
2. Load the integration program: [ <| ] [ ← ] {LOAD} [ e^x ] { B }. The screen shows “int”.
3. Go one up one step to get to Step 58: [ <| ] [ 8 ] { ↑ }
4. Enter the program after 58: 61, 41, F (LBL F)
51, 11 |
x^2 |
45 |
÷ |
2 |
2 |
74 |
= |
32 |
± |
12 |
e^x |
45 |
÷ |
33 |
( |
2 |
2 |
55 |
× |
61, 22 |
π |
34 |
) |
11 |
√ |
74 |
= |
5. Store the lower limit in register 5: a [ STO ] [ 5 ]
6. Store the upper limit in register 6: b [ STO ] [ 6 ]
7. Enter the number of intervals, it must be an even integer, and execute label A: n [ XEQ ] [ √ ] { A }
Example
At n = 20 intervals, estimate areas (ALL setting)
a = 0, b = 3; area ≈ 0.498649878
a = -3, b = 3; area ≈ 0.997293118
a = -1, b = 2; area ≈ 0.818595675
HP 20S: Direction Cosines
The direction cosines of 3D vector v = [x, y, z] are:
a = arccos(x / norm(v))
b = arccos(y / norm(v))
c = arccos(z / norm(v))
where norm(v) = √( x^2 + y^2 + z^2 )
The following program sets the angle mode to degrees, however, a change in the second step will allow the user to use radians or grads instead. The program uses the rectangular to polar conversion to obtain the norm.
Math note:
Find the magnitude of (√(x^2 + y^2), z).
magnitude
= √( [√(x^2 + y^2)]^2 + z^2 )
= √( x^2 + y^2 + z^2)
= norm(v)
Executing the →P command gives the angle first. Obtaining the magnitude requires a swap. ( [ <| ] [ INPUT ] {SWAP} ).
61, 41, b |
LBL B |
61, 23 |
DEG (61, 24 for RAD, 61, 25 for GRD) |
22, 1 |
RCL 1 |
31 |
INPUT |
22, 2 |
RCL 2 |
51, 21 |
→ P |
51, 31 |
SWAP |
31 |
INPUT |
22, 3 |
RCL 3 |
51, 21 |
→ P |
51, 31 |
SWAP |
21, 4 |
STO 4 |
22, 1 |
RCL 1 |
41, C |
XEQ C |
26 |
R/S |
22, 2 |
RCL 2 |
41, C |
XEQ C |
26 |
R/S |
22, 3 |
RCL 3 |
41, C |
XEQ C |
61, 26 |
RTN |
61, 41, C |
LBL C (subroutine) |
45 |
÷ |
22, 4 |
RCL 4 |
74 |
= |
51, 24 |
ACOS |
61, 26 |
RTN |
Store x in register 1, y in register 2, and z in register 3. The angles are shown in order
Examples (FIX 4):
x = 4, y = 8, z = 5
Direction Cosines: a ≈ 67.0231°, b ≈ 38.6734°, c ≈ 60.7941°
x = -3, y = 8, z = 6
Direction Cosines: a ≈ 106.6992°, b ≈ 39.9807°, c ≈ 54.9217°
Source:
“Direction Cosine” Wikipedia. Accessed November 5, 2024. https://en.wikipedia.org/wiki/Direction_cosine
HP 20S: Determining the Coefficient for Friction Loss
When fighting fires, the friction loss of a hose lay can be determined by the formula:
FL = C * (flow rate/100)^2 * (hose length/100)
where:
C = coefficient
flow rate = the rate of water in GPM (gallons per minute)
hose length = length of the hose in ft (feet)
FL = friction loss in PSI (pounds per square inch)
This formula assumes a single line is used.
Solving for C:
C = FL / ((flow rate/100)^2 * (hose length/100))
The friction loss was determined by using various flow rates and hose lengths by using the FireCalc Pocket Calculator. You can see my spotlight on the FireCalc Pocket Calculator here: https://edspi31415.blogspot.com/2024/11/spotlight-akron-brass-firecalc-pocket.html
Friction Loss Table:
1” Hose Size
GPM ↓ / Length → |
100 ft |
150 ft |
200 ft |
100 |
150 |
225 |
300 |
150 |
338 |
506 |
675 |
200 |
600 |
900 |
1200 |
1.5” Hose Size
GPM ↓ / Length → |
100 ft |
150 ft |
200 ft |
100 |
24 |
36 |
48 |
150 |
54 |
81 |
108 |
200 |
96 |
144 |
192 |
2” Hose Size
GPM ↓ / Length → |
100 ft |
150 ft |
200 ft |
100 |
8 |
12 |
16 |
150 |
18 |
27 |
36 |
200 |
32 |
48 |
64 |
The coefficient is built in to the FireCalc. I used the HP 20S to extract the coefficient by the following program:
61, 41, A |
LBL A |
33 |
( |
22, 2 |
RCL 2 |
45 |
÷ |
1 |
1 |
0 |
0 |
0 |
0 |
34 |
) |
51, 11 |
x^2 |
55 |
× |
33 |
( |
22, 3 |
RCL 3 |
45 |
÷ |
1 |
1 |
0 |
0 |
0 |
0 |
34 |
) |
74 |
‘= |
15 |
1/x |
55 |
× |
22, 1 |
RCL 1 |
74 |
= |
61, 26 |
RTN |
Values are stored in the following registers:
Register 1 = friction loss (PSI)
Register 2 = flow rate (GPM)
Register 3 = hose length (ft)
Fortunately, running the program with various data points above, I obtain the coefficient as:
1” Hose Size: coefficient = 150
1.5” Hose Size: coefficient = 24
2” Hose Size: coefficient = 8
Source:
Task Force Tips. “Hydraulic Calculations Every Firefighting Needs to Know” Firefighter Trending Report. 2024. Retrieved November 10, 2024. https://tft.com/hydraulic-calculations-every-firefighter-needs-to-know/
Enjoy!
Eddie
All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.