Post Reply 
(33E) Stream Flow Estimate in Culverts
03-09-2019, 06:57 PM (This post was last modified: 03-09-2019 09:15 PM by Dieter.)
Post: #3
RE: (33E) Stream Flow Estimate in Culverts
(03-09-2019 04:32 AM)PedroLeiva Wrote:  Very nice program about Hydrology. It is short enough (49 steps) to work well also for HP-25

But it can be improved. :-)

The original version requires the user to prestore not less than three numeric constansts (180, 0,6666... and 1,49). Which also means that the program occupies all available data registers R0...R7.

Here is a version that also does it in 49 steps, but the user only has to provide the characteristic culvert data. The program also uses only R0...R4. There is even enough space to use the more exact conversion constant 1,486 instead of 1,49 (actually this is 0,3048–1/3 = 1,4859...).

Code:
prestore parameters:

culvert radius r [ft]    STO 1
culvert slope s [1]      STO 2
roughness coefficient n  STO 3

01 RAD
02 STO 0
03 RCL 1
04 X<>Y
05 -
06 RCL 1
07 /
08 COS-1
09 STO 4
10 RCL 1
11 x^2
12 *
13 LastX
14 RCL 1
15 RCL 0
16 *
17 -
18 RCL 4
19 SIN
20 *
21 -
22 PAUSE
23 ENTER
24 ENTER
25 RCL 4
26 2
27 *
28 RCL 1
29 *
30 /
31 x^2
32 3
33 1/x
34 Y^X
35 RCL 3
36 /
37 RCL 2
38 SQRT
39 *
40 1
41 .
42 4
43 8
44 6
45 *
46 PAUSE
47 *
48 DEG
49 GTO 00

Enter flow depth d and [R/S] returns three results:

Area A [ft²]
Velocity V [ft/s]
Stream discharge Q [ft³/s]

Example:
Culvert radius = 3 ft, slope = 2%, roughness coefficient = 0,024.

3 STO 1
0,02 STO 2
0,024 STO 3

2 [R/S]
"8,25"
"9,43"
77,77

3,5 [R/S]
"17,12"
"12,19"
208,67


Notes:

1. On start the program switches to radians mode. The last step reverts to standard degrees mode. Simply change this last step if your preferred angle mode is different.

2. The program can be easily modified for regular metric units, i.e. m², m/s and m³/s: simply remove the "1,486 ×" multiplication in step 40...45. This even frees up six lines which may be used for display formatting or other goodies.

To adjust the original program for m², m/s and m³/s simply store 1 in R2.

3. After the program has been run the previously displayed results can still be recalled. On exit...
– X shows the discharge rate Q
– [X⇄Y] returns the area A
– [LastX] recalls the velocity V again.

If two more steps can be squeezed out (e.g. in the metric version) simply add [LastX] [X⇄Y] as the final steps and all three values are nicely returned on the stack.

Edit: this post has seen more than a dozen edits, finally leading to a better program. If you read this post earlier be sure to use the final program version.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (33E) Stream Flow Estimate in Culverts - Dieter - 03-09-2019 06:57 PM



User(s) browsing this thread: 6 Guest(s)