The Museum of HP Calculators


Iteration Example - Friction in Pipes for the HP-10C

This program is by Tizedes Csaba and is used here by permission.

This program is supplied without representation or warranty of any kind. Tizedes Csaba and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview

This program is an example for 'Iteration - General Method' program. This program can calculate friction coefficient in pipes.

For the first (estimated) value of coefficient use Blasius formula, and for iteration use Colebrook formula.

The Blasius formula:
lambda=0.32/(Re)(1/4)

The Colebrook formula:
1/(√(lambda))=-2×LOG(2.51/(Re×√(lambda))+k/(3.72×d))
and it's iterable form is:
lambda[i]=1/(4×(LOG(2.51/(Re×√(lambda[i-1]))+k/(3.72×d)))2)
Where lambda[1]: friction coefficient, Re[1]: Reynold's number, k[mm]: roughness of pipe's wall, d[mm]: inner diameter of pipe

The precision is incredible if you use bigger number at step_39 of program.

Registers:

R0: Re-number
R1: k/d, relative roughness
R2: lambda[i]
Important: If you want to use this program in pipe-design, check, what is the limit of usage the used formulas (Re-number intervals). And for safety, check the precision of calculated friction coefficient!

Listing

00-
01- 45  0  RCL 0
02-     4  4
03-    15  1/x
04-    14  yx
05-    15  1/x
06-    48        #
07-     3        # .32
08-     2        #
09-    20  ×
10- 44  2  STO 2
11-    11  √x
12- 45  0  RCL 0
13-    20  ×
14-    15  1/x
15-     2        #
16-    48        # 2.51
17-     5        #
18-     1        #
19-    20  ×
20- 45  1  RCL 1
21-     3        #
22-    48        # 3.72
23-     7        #
24-     2        #
25-    10  ÷
26-    40  +
27- 42 13  LOG
28- 42 11  x2
29-     4  4
30-    20  ×
31-    15  1/x
32-    36  ENTER
33-    36  ENTER
34- 45  2  RCL 2
35-    30  −
36- 42 11  x2
37-    11  √x
38-    26  EEX
39-     4  4
40-    16  CHS
41-    34  x⇔y       
42- 42 10  x≤y?
43- 22 47  GTO 47
44-    33  R↓
45-    33  R↓
46- 22 10  GTO 10
47-    33  R↓
48-    33  R↓
49-    31  R/S
50- 22 00
51- 22 00

(P-51 r-04)

Go back to the software library
Go back to the main exhibit hall