Problems in Hydraulics - Scilab Code

Download as pdf or txt
Download as pdf or txt
You are on page 1of 92

Scilab Textbook Companion for

Problems In Hydraulics
by R. S. Paradise1
Created by
Devika Raj Rachavelula
Fluid Mechanics
Electrical Engineering
R. V. R Engineering College
College Teacher
Ramesh
Cross-Checked by
Chaitanya Potti
May 8, 2014

1 Funded

by a grant from the National Mission on Education through ICT,


http://spoken-tutorial.org/NMEICT-Intro. This Textbook Companion and Scilab
codes written in it can be downloaded from the Textbook Companion Project
section at the website http://scilab.in

Book Description
Title: Problems In Hydraulics
Author: R. S. Paradise
Publisher: Blcakie & Son Ltd, London
Edition: 3
Year: 1953
ISBN: 978-1577664550

Scilab numbering policy used in this document and the relation to the
above book.
Exa Example (Solved example)
Eqn Equation (Particular equation of the above book)
AP Appendix to Example(Scilab Code that is an Appednix to a particular
Example of the above book)
For example, Exa 3.51 means solved example 3.51 of this book. Sec 2.3 means
a scilab code whose theory is explained in Section 2.3 of the book.

Contents
List of Scilab Codes

1 HydroStatistics

2 EQUILIBRIUM OF FLOATING BODIES

15

3 Flow in Channels

18

4 Orifices and Notches

22

5 Orifices and Notches

26

6 Flow in pipes

32

7 Flow Under Varying Head

43

8 Viscosity and Viscous Flow

49

9 Impact Of Jets

53

10 Hydraulic Prime Movers

58

11 Pumping Machinery

67

12 Dimensional and Model Analysis

79

13 Miscellaneous Problems

83

List of Scilab Codes


Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
1.10
2.1
2.3
2.4
2.5
3.1
3.2
3.3
3.4
4.1
4.2
4.3
4.4
4.5
4.6
5.1
5.2
5.3
5.6
5.7

example 2 .
example 3 .
example 4 .
example 5 .
example 6 .
example 7 .
example 8 .
example 9 .
example 10
example 1 .
example 3 .
example 4 .
example 5 .
example 1 .
Example 2
example 3 .
example 4 .
example 1 .
example 2 .
example 3 .
example 4 .
example 5 .
example 6 .
example 1 .
example 2 .
example 3 .
example 6 .
example 7 .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

8
9
9
10
11
11
12
13
13
15
16
16
17
18
19
19
20
22
22
23
24
24
24
26
27
27
28
29

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

5.8
5.9
5.11
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
6.10
6.11
6.12
6.14
6.15
6.17
7.1
7.2
7.3
7.4
7.5
7.6
7.7
7.8
7.9
8.1
8.2
8.4
8.5
8.6
8.7
9.1
9.2
9.3
9.4
9.5

example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example
ex 7 . .
ex 8 . .
ex 9 . .
example
example
example
example
example
example
example
example
example
example
example

8.
9.
11
1.
2.
3.
4.
5.
6.
7.
8.
9.
10
11
12
14
15
17
1.
2.
3.
4.
5.
6.
. .
. .
. .
1.
2.
4.
5.
6.
7.
1.
9.
3.
4.
5.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

29
30
31
32
33
33
34
35
35
36
37
38
38
39
40
40
41
41
43
43
44
45
45
46
47
47
48
49
49
50
51
51
52
53
54
55
55
56

Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa
Exa

9.6
10.1
10.2
10.4
10.5
10.6
10.7
10.8
10.9
10.10
10.12
11.1
11.3
11.4
11.6
11.8
11.9
11.10
11.11
11.12
11.13
11.14
11.15
11.16
12.1
12.3
12.4
12.5
12.6
12.7
13.1
13.2
13.3
13.4
13.5
13.6
13.7
13.8

example
example
example
example
example
example
ex 7 . .
example
example
example
example
example
example
ex 4 . .
example
example
ex 9 . .
example
ex 11 .
example
example
example
ex 15 .
example
example
example
example
example
example
example
example
example
example
example
example
example
example
example

6.
1.
2.
4.
5.
6.
. .
8.
9.
10
12
1.
3.
. .
6.
8.
. .
10
. .
12
13
14
. .
16
1.
3.
4.
5.
6.
7.
1.
2.
3.
4.
5.
6.
7.
8.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

56
58
59
59
60
61
62
63
64
65
66
67
68
69
70
70
71
72
73
73
74
75
76
77
79
79
80
81
81
82
83
84
85
85
86
86
87
88

Exa
Exa
Exa
Exa

13.10
13.11
13.12
13.13

example
example
example
example

10
11
12
13

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

88
89
89
90

Chapter 1
HydroStatistics

Scilab code Exa 1.2 example 2


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
w = 62.4 // l b / f t 3
A = 18 // f t 2
x = 6 // f t
kg = 6
y = 2 // f t
y1 = 5 // f t
//CALCULATIONS
F= w*A*x
F1 = F /2
Ft = ( F *y - F1 *( y1 /2) ) / y1
Fb = F1 - Ft
//RESULTS
printf ( F o r c e e x e r t e d on t h e b o l t = %. f l b , F1 )
printf ( \n F o r c e e x e r t e d on t h e h i n g e = %. f l b , Ft )
printf ( \n F o r c e e x e r t e d on t h e b o l t = %. f l b , Fb )

Scilab code Exa 1.3 example 3


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h1 = 11.54 // f t
h2 = 16.33 // f t
w = 62.4 // l b / f t 3
x1 = 7.69 // f t
x2 = 14.09 // f t
x3 = 18.23 // f t
//CALCULATIONS
Ft = w * h1 ^2/2
//RESULTS
printf ( h1 = %. 2 f f t , h1 )
printf ( \n h2 = %. 2 f f t , h2 )
printf ( \n h1+ = %. 2 f f t , x1 )
printf ( \n h2+ = %. 2 f f t , x2 )
printf ( \n h3+ = %. 2 f f t , x3 )
printf ( \n T h r u s t f o r c e = %. f l b / f t run , Ft )

Scilab code Exa 1.4 example 4


1
2
3
4
5
6
7
8
9
10
11
12

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
spo = 0.9
h = 3 // f t
d = 2 // f t
w = 62.4 // l b / f t 3
H = 0.71 // f t
//CALCULATIONS
9

13
14
15
16
17
18
19
20

do = spo * w
de = w * d
bc = do * h
Pt = ( bc *( h /2) + bc * d + de *( d /2) ) *( h + d )
y = ( bc *( h /2) + bc * d + de *( d /2) *( d /3) ) *( h + d ) / Pt + H
//RESULTS
printf ( T o t a l p r e s s u r e = %d l b , Pt )
printf ( \n p o s i t i o n o f c e n t r e o f r e s s u r e a b o v e t h e
b a s e = %. 2 f f t p o s i t i o n o f c e n t r e o f p r e s s u r e
a b o v e t h e a x i s ,y )

Scilab code Exa 1.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
a = 30 // d e g r e e s
b = 30 // d e g r e e s
h = 20 // f t
h1 = 10 // f t
h2 = 15 // f t
h3 = 16 // f t
w = 62.4 // l b / f t 3
h4 = 10/3 // f t
//CALCULATIONS
Rt = (1/ h3 ) *(( w *( h * h2 ^2*( h2 /3) /(2* sqrt (3) ) ) ) -( w *( h * h1
^2* h4 /(2* sqrt (3) ) ) ) )
R = (( w *( h * h2 ^2/(2* sqrt (3) ) ) ) -( w *( h * h1 ^2/(2* sqrt (3) ) )
))
Rb = R - Rt
//RESULTS
printf ( F o r c e a t t h e h i n g e = %. f l b , Rt )
printf ( \n F o r c e a t t h e h i n g e = %. f l b , Rb )
10

21
22

// Round o f f e r r o r i n t e x t b o o k

Scilab code Exa 1.6 example 6


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
x = 32 // f t
h = 60 // f t
w = 62.4 // l b / f t 3
AE = 20 // f t
//CALCULATIONS
Vabc = 2* x * h /3
vc = Vabc * w
Tab = w * h ^2/2
Rt = sqrt ( vc ^2+ Tab ^2) /2240
A = atand ( vc / Tab )
AD = x - AE + AE * cotd ( A )
//RESULTS
printf ( r e s u l t a n t t h r u s t = %. 1 f t o n s , Rt )
printf ( \n A n g l e = %. 2 f d e g r e e s ,A )
printf ( \n AD = %. 1 f f t , AD )

Scilab code Exa 1.7 example 7


1
2
3 clc
4 // i n i t i a l i s a t i o n

of variables
11

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

clear
wdc = 3* sqrt (3) // f t
wdo = sqrt (3)
ac = 30 // d e g r e e s
ao = 60 // d e g r e e s
hob = 3 // f t
haf = 2.6 // f t
hfc = 3 // f t
w = 62.4 // l b / f t 3
V = 5.63 // f t 3
h = 4.3 // f t
y = 3.6 // f t
//CALCULATIONS
W1 = wdc * hfc * w /2
Hbc = w * hob *( hob /2)
W2 = V * w
W3 = w * haf * h
Vt = W1 + W2
Vht = Hbc + W3
Rt = sqrt ( Vt ^2+ Vht ^2)
A = atand ( Vht / Vt )
x = ( W1 *( wdo -( hob /2) ) + Hbc * y ) / Rt
OP = x / sind ( A )
AP = hob + OP
//RESULTS
printf ( R e s u l t a n t t h r u s t = %d l b , Rt )
printf ( \n A n g l e = %. 2 f d e g r e e s ,A )
printf ( \n D i s t a n c e from A t i l l h o r i z o n t a l t h r u s t =
%. 3 f f t , AP )

Scilab code Exa 1.8 example 8


1
2 clc
3 // i n i t i a l i s a t i o n

of variables
12

4
5
6
7
8
9
10
11
12
13
14
15

clear
r = 96
T = 10.5 //C
K1 = 288 //C
K2 = 0.0015 //C1
h = 3000 // f t
P1 = 14.69
//CALCULATIONS
P2 = P1 *10^(((1/( r * K2 ) ) * log10 (( K1 - K2 * h ) / K1 ) ) )
w = P2 *144/( r *(273+ T ) )
//RESULTS
printf ( D e n s i t y = %. 4 f l b / f t 3 ,w )

Scilab code Exa 1.9 example 9


1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
Hb = 20 // i n
Ha = 1 // i n
a = 20 // d e g r e e s
//CALCULATIONS
hb = Hb * sind ( a )
dh = hb + Ha
dP = dh /(12*2.309)
//RESULTS
printf ( P r e s s u r e d i f f e r e n c e b e t w e e n t a p p i n g p o i n t s
= %. 3 f l b / i n 2 , dP )

Scilab code Exa 1.10 example 10


1

13

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
P = 180 // l n / i n 2
r = 53
T = 60 //F
w = 62.4 // l b / f t 3
h = 12 // i n
//CALCULATIONS
R = P *144/( r *(460+ T ) )
dP = 12*(1 -( R / w ) )
Pab = dP /(12*2.309)
//RESULTS
printf ( D i f f e r e n c e i n w a t e r l e v e l = %. 2 f i n o f
w a t e r , dP )
17 printf ( \n P r e s s u r e d i f f e r e n c e = %. 3 f l b / i n 2 , Pab )

14

Chapter 2
EQUILIBRIUM OF
FLOATING BODIES

Scilab code Exa 2.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 40 // l b / f t 2
w = 4 // f t
h = 6 // f t
l = 12 // f t
//CALCULATIONS
W= w*h*d*l
V = W /64
D = V /( w * l )
//RESULTS
printf ( Volume o f w a t e r d i s p l a c e d = %. f f t 3 ,V )
printf ( \n Depth o f i m m e r s i o n = %. 2 f f t ,D )
printf ( \n C e n t r e o f buoyancy = %. 2 f f t from b a s e ,
D)

15

Scilab code Exa 2.3 example 3


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
d = 4 // f t
h = 7 // f t
W = 2500 // l b
OG = 3.5
OB = 1.55 // f t
//CALCULATIONS
V = W / d ^3
D = V /( %pi *( d /2) ^2)
I = %pi * d ^4/64
BM = I / V
BG = OG - OB
T = sqrt (( W * OG - %pi * d ^4) * d ^4*2* %pi ) -W
//RESULTS
printf ( Minimum t e n s i o n i n c h a i n = %. f l b ,T )

Scilab code Exa 2.4 example 4


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
W1 = 1000 // l b
W2 = 100 // l b
h = 4 // f t
d = 5 // f t
//CALCULATIONS
V = ( W1 + W2 ) / h ^3
D = V * h /( d ^2* %pi )
16

12
13
14
15
16
17
18

I = d ^4* %pi / h ^3
BM = I / V
x = ( BM +( D /2) -( W1 *( h /2) /( W1 + W2 ) ) ) /( W2 /( W1 + W2 ) ) -0.02
C= x-h
//RESULTS
printf ( c e n t r e o f g r a v i t y = %. 2 f f t ,x )
printf ( \n Hence t h e g r a v i t y o f t h e w e i g h t must n o t
be more t h a n a b o v e t h e t o p o f buoy = %. 2 f f t ,C )

Scilab code Exa 2.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
b = 12 // f t
h1 = 3 // f t
h2 = 1.5 // f t
h3 = 5+(2/3) // f t
//CALCULATIONS
I = b ^3/12
V = b * h1
bm = I / V
BG = bm +( h1 *2/(3* b ) )
O = atand ( sqrt (( h3 *2 - h1 - bm *2) /( bm *2+ bm ) ) )
//RESULTS
printf ( Volume o f body immersed = %. f f t 3 ,V )
printf ( \n BM = %. f f t , bm )
printf ( \n BG = %. 2 f f t , BG )
printf ( \n a n g l e o f h e e l = %. 2 f d e g r e e s ,O )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

17

Chapter 3
Flow in Channels

Scilab code Exa 3.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
hob = 34 // f t
hoc = 5 // f t
hoa = 50 // f t
hod = 80 // f t
g = 32.2 // f t / s e c 2
A = 2.1 // i n 2
A1 = 4.8 // i n 2
A2 = 9.6 // i n 2
//CALCULATIONS
v = sqrt (2* g *( hod - hoc ) )
Q = v * A /144
va = v * A / A1
vb = v * A / A2
Va = va ^2/(2* g )
Vb = vb ^2/(2* g )
r = hob + hod - hoa -( va ^2/(2* g ) )
r1 = hob + hod - hob -( vb ^2/(2* g ) )
18

22
23
24
25
26
27

//RESULTS
printf ( D i s c h a r g e =
printf ( \n V e l o c i t y
printf ( \n V e l o c i t y
printf ( \n P r e s s u r e
printf ( \n P r e s s u r e

%. 2 f
head
head
head
head

c u s e s ,Q )
a t A = %. 2
a t B = %. 2
a t A = %. 2
a t B = %. 2

f
f
f
f

f t l b / l b
f t l b / l b
f t l b / l b
f t l b / l b

Scilab code Exa 3.2 Example 2


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
w = 62.4 // l b / f t 3
P = 1.7 // l b / i n 2
d1 = 6 // i n
d2 = 3 // i n
hab = 8 // f t
Q = 0.75 // c u s e s
sm = 13.6
g = 32.2 // f t / s e c 2
//CALCULATIONS
dP = P *144/ w
va = Q *( d1 / d2 ) ^4/ %pi
k = -((( d1 / d2 ) ^4 -1) -(( - dP + hab ) *2* g / va ^2) )
h = ( - dP + hab ) *12/( sm -1)
//RESULTS
printf ( k = %. f ,k )
printf ( \n h e i g h t d i f f e r e n c e = %. 2 f i n ,h )

Scilab code Exa 3.3 example 3


1
2 clc

19

, Va )
, Vb )
,r )
, r1 )

// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
h = 20 // f t
Q = 4.81 // c u s e s
C= 1
g = 32.2 // f t / s e c 2
d = 10 // i n
//CALCULATIONS
d = (( Q *4*144/( d ^2* %pi ) ) ^2*100^2/(( Q *4*144/( d ^2* %pi ) )
^2+2* g * h ) ) ^0.25
12 //RESULTS
13 printf ( S m a l l e s t D i a m e t e r = %. 1 f i n ,d )
3
4
5
6
7
8
9
10
11

Scilab code Exa 3.4 example 4


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 1/3 // f t
g = 32.2 // f t / s e c 2
d1 = 4 // i n
d2 = 1.6 // i n
h1 = 5.7 // f t
h2 = -1.9 // f t
Q = 0.3 // c u s e s
H1 = 34 // f t
H2 = 19 // f t
H3 = 7 // f t
H4 = 9.2 // f t
h3 = 2.9 // f t
h4 = 3.9 // f t
Et = 54 // f t l b / l b
//CALCULATIONS
v1 = sqrt (2* g *( h1 - h2 ) /(( d1 / d2 ) ^4 -1) )
20

21
22
23
24
25
26
27
28
29
30
31

Q1 = %pi * v1 * d ^2/4
k = Q / Q1
P = ( H1 + H2 ) * H3 / H4
P1 = P - h3
r = P + h1 - h2 - h4
V = v1 ^2/(2* g )
E= r+V
dE = Et - E
//RESULTS
printf ( C o e f f i c i e n c t o f v e n t u r i m e t e r = %. 4 f ,k )
printf ( \n P r e s s u r e o f v e n t u r i t h r o a t = %. 2 f f t o f
w a t e r , P1 )
32 printf ( \n L o s s i n e n e r g y = %. 1 f f t l b / l b , dE )
33
34

// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

21

Chapter 4
Orifices and Notches

Scilab code Exa 4.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
Cd = 0.98
g = 32.2 // f t / s e c 2
H = 2 // f t
//CALCULATIONS
v = sqrt (2* g * H )
t= H/v
h = 0.5* g * t ^2
//RESULTS
printf ( V e r t i c a l d i s t a n c e f a l l e n i n t h i s t t i m e = %.
f f t ,h )
14 // The a n s w e r g i v e n i n t e x t b o o k i s wrong .

Scilab code Exa 4.2 example 2

22

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
r = 53.4
T = 60 //F
h = 29.7 // i n o f m e r c u r y
sm = 13.6
w = 62.4 // l b / f t 3
d = 1.5 // i n
Qin = 2 // c u s e s
g =32.2 // f t / s 2
//CALCULATIONS
W = h * sm * w /( r *(460+ T ) *12)
dP = 0.75* w /(12* W )
Q = sqrt (2* g * dP ) * %pi * d ^2/(4*144)
W = Q * W *60
Cd = Qin / W
//RESULTS
printf ( c o e f f i c i e n t o f d i s c h a r g e = %. 2 f

, Cd )

Scilab code Exa 4.3 example 3


1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
H1 = 34 // f t
H2 = 8 // f t
H3 = 7 // f t
g = 32.2 // f t / s e c 2
d = 1.5 // i n
//CALCULATIONS
v2 = sqrt (2* g *( H1 + H2 - H3 ) )
Q = v2 * %pi * d ^2/(4*144)
v3 = (2* v2 + sqrt (4* v2 ^2 -4*6*( v2 ^2 - H2 *2*5* g ) ) ) /12
dr = sqrt ( v2 / v3 )
23

14
15
16

//RESULTS
printf ( r a t i o o f d i a m e t e r e s = %. 1 f , dr )
printf ( \n Flow r a t e = %. 3 f c u s e c ,Q )

Scilab code Exa 4.4 example 4


1
2
3
4
5
6
7
8
9

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
Q1 = 8/15 // c u s e s
Q2 = 2/15 // c u s e s
//CALCULATIONS
A = atand ( Q2 / Q1 )
//RESULTS
printf ( A n g l e o f i n c l i n a t i o n = %. 2 f d e g r e e s ,A )

Scilab code Exa 4.5 example 5


1
2 clc
3 // i n i t i a l i s a t i o n o f v a r i a b l e s
4 g = 32.2 // f t / s e c 2
5 //CALCULATIONS
6 r = g ^2/(( sqrt (2) ) ^2* g ^2)
7 //RESULTS
8 printf ( c o e f f i c i e n t o f c o n t r a c t i o n = %. 1 f

Scilab code Exa 4.6 example 6


1

24

,r )

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
B = 3 // f t
H = 2 // f t
H1 = 3.75 // f t
w = 4 // f t
g = 32.2 // f t / s e c 2
//CALCULATIONS
Q = 3.33*( B -( H1 /5) ) * H ^1.5
v = Q /( H * w )
kh = v ^2/(2* g )
Q1 = 3.33*( B -( H1 /5) - kh ) *((( H1 /5) + kh ) ^1.5 - kh ^1.5)
//RESULTS
printf ( D i s c h a r g e = %. 2 f c u s e s , Q1 )

//ANSWER IN THE TEXTBOOK I S WRONG

25

Chapter 5
Orifices and Notches

Scilab code Exa 5.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h = 2.5 // f t
a = 45 // d e g r e e s
x = 5 // f t
Q = 45 // c u s e s
v = 2.6 // f t / s e c
w = 6.92 // f t
C = 120
//CALCULATIONS
b = ( Q /( v * h ) ) -h
p = b +2*( h + sqrt (2) )
A= h*w
m= A/p
i = ( v /( C * sqrt ( m ) ) ) ^2
//RESULTS
printf ( Width = %. 2 f f t ,b )
printf ( \n S l o p e = %. 6 f ,i )

26

Scilab code Exa 5.2 example 2


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
a = 60 // d e g r e e s
i = 1/1600
Q = 8*10^6 // g a l / h r
M = 110
w = 6.24 // l b / f t 3
//CALCULATIOS
d = (( Q *2^(2/3) * sqrt (1/ i ) ) /( w *3600* sqrt (3) * M ) ) ^(3/8)
b =6.93 // f t
//RESULTS
printf ( D i a m e t e r = %. f f t ,d )
printf ( \n b r e a d t h = %. 2 f f t ,b )

Scilab code Exa 5.3 example 3


1
2
3
4
5
6
7
8
9
10
11
12

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g = 32.2 // f t / swc 2
Q = 40 // c u s e s
w = 5.5 // f t
h = 9 // i n
d = 0.75 // f t
V = 3 // f t / s e c
//CALCULATIONS
D = (( Q *2) ^2/( g *( w *2) ^2) ) ^(1/3)
v= Q*d/w
27

13
14
15
16
17
18
19
20
21
22

D1 = sqrt ((2* v ^2* d / g ) + h /64) -( d /2)


dD = D1 - d
El = - dD +(( v ^2*(1 -( V / v ) ^2) ) /(2* g ) )
Els = Q * El *62.4/550
//RESULTS
printf ( C r i t i c a l d e p t h = %. 2 f f t ,D )
printf ( \n R i s e i n l e v e l = %. f f t , D1 )
printf ( \n Horse power l o s t = %. 3 f hp , Els )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 5.6 example 6


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
b = 3.5 // f t
H = 2.5 // f t
w = 3 // f t
h = 6 // f t
g = 32.2 // f t / s e c 2
//CALCULATIONS
Q = 3.09* b * H ^1.5
v = Q /( w * h )
H1 = H +( v ^2/(2* g ) )
Q1 = 3.09* b * H1 ^1.5
hc = ( Q1 ^2/( b ^2* g ) ) ^(1/3)
h2 = 0.5*( sqrt ( hc ^2+8* hc ^2) - hc )
dh = h2 +b - w
//RESULTS
printf ( Flow r a t e = %. 1 f c u s e c s ,Q )
printf ( \n Flow r a t e = %d c u s e c s , Q1 )
printf ( \n maximum d e p t h o f w a t e r downstream = %. 3 f
f t , dh )
28

21

printf ( \n S h o o t i n g f l o w d e p t h a t hump = %. 3 f f t ,
h2 )

Scilab code Exa 5.7 example 7


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
m = 60/26
i = 1/2000
h1 = 3 // f t
h2 = 5 // f t
m1 = 10/3
C = 90
l = 500 // f t
H = 20 // f t
H1 = 29.62 // f t
g = 32.2 // f t / s 2
//CALCULATIONS
v = 90* sqrt ( m * i )
v1 = v * h1 / h2
dh = (i -( v1 ^2/( C ^2* m1 ) ) ) * l /(1 - v1 ^2/( g * h2 ) )
h3 = h2 - dh
V = h1 * v / h3
//RESULTS
printf ( H e i g h t o f w a t e r 1 0 0 0 f t u p s t r e a m = %. 3 f f t
, h3 )
22 printf ( \n H e i g h t o f w a t e r u p s t r e a m = %. 3 f f t , h3 )
23
24

// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 5.8 example 8


29

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v = 5 // f t / s e c
m = 60/26
i = 1/2000
h = 5.5 // f t
m1 = 110/31
d = 3 // f t
g = 32.2 // f t / s e c 2
//CALCULATIONS
C = v /( sqrt ( m * i ) )
v1 = v * d / h
r = (i -( v1 ^2/( C ^2* m1 ) ) ) /(1 -( v1 ^2/( g * h ) ) )
x = 1/ r
//RESULTS
printf ( D i s t a n c e u p s t r e a m = %. f f t ,x )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 5.9 example 9


1
2
3
4
5
6
7
8
9
10
11
12

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g = 32.2 // f t / s e c 2
Q = 12 // c u s e s
//CALCULATIONS
hc = ( Q /(3* sqrt ( g ) ) ) ^(2/3)
Hc = poly (0 , Hc )
vec = roots ( Hc ^6+6* Hc ^5+12* Hc ^4+8* Hc ^3 -8.95* Hc -8.95)
H = vec (3)
//RESULTS
printf ( C r i t i c a l d e p t h = %. 2 f f t , hc )
30

13

printf ( \n C r i t i c a l d e p t h = %. 2 f f t ,H )

Scilab code Exa 5.11 example 11


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
Cd = 0.64
g = 32.2 // f t / s e c 2
A = 12.5 // f t 2
H = 24.8 // f t
Q = 3200 // c u s e s
b = 150 // f t
A1 = 5*10^6
h = 9 // f t
h1 = 6 // i n
//CALCULATIONS
N = Q /( Cd * A * sqrt (2* g * H ) )
H1 = ( Q /(3.2* b ) ) ^(2/3)
ES = ( H1 -( h1 /12) ) * A1 * h
//RESULTS
printf ( number o f s i p h o n s = %. f ,N )
printf ( \n E x t r a S t o r a g e = %. 2 e f t 3 , ES )

31

Chapter 6
Flow in pipes

Scilab code Exa 6.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
l = 5000 // f t
l1 = 2000 // f t
d = 12 // i n
f = 0.005
d1 = 24 // i n
f1 = 0.0045
l2 = 3000 // f t
Q = 1800 // g a l / min
w = 6.24 // l b / f t 3
g =32.2 // f t / s 2
//CALCULATIONS
F = Q /(60* w )
v1 = F *4/( %pi *( d /12) ^2)
v2 = v1 /( d1 / d ) ^2
H = ( f * l1 * F ^2/(10*( d /12) ^5) ) +( f1 * l2 * F ^2/(10*( d1 /12)
^5) ) +( v1 ^2/(4* g ) ) +(( v1 - v2 ) ^2/(2* g ) ) +( v2 ^2/(2* g ) )
19 //RESULTS
20 printf ( A v a i l a b l e Head = %. 2 f f t ,H )
32

Scilab code Exa 6.2 example 2


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g = 32.2 // f t / s e c 2
f = 0.01
h = 42 // f t
l = 3200 // f t
d = 14 // i n
h1 = 8 // f t
l1 = 1800 // f t
w = 6.24 // l b / f t 3
//CALCULATIONS
v = sqrt (2* g * h /(1+0.5+(4* f * l /( d /12) ) ) )
h2 = h - h1 -( v ^2/(2* g ) ) -h1 -(0.5* v ^2/(2* g ) ) -(4* f * l1 * v
^2/(2* g *( d /12) ) )
Q = %pi *( d /12) ^2* v * w *60/4
//RESULTS
printf ( H e i g h t o f s i p h o n a b o v e A = %. 2 f f t , h2 )
printf ( \n T o t a l D i s c h a r g e = %. f g a l / min ,Q )

Scilab code Exa 6.3 example 3


1
2
3
4
5
6
7

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
H = 950 // l b / i n 2
l = 5 // m i l e s
d = 4 // i n
33

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

f = 0.0075
p = 92 // p e r c e n t
hp = 200 // h . p
g = 32.2 // f t / s e c 6 2
w = 62.4 // l b / f t 3
//CALCULATIONS
H1 = H *2.3
H2 = H1 *100/ p
Hf = H2 - H1
v = sqrt (2* g *( d /12) * Hf /(4* f * l *5280) )
n = hp /( w * v *( H1 /550) * %pi *( d /12) ^2/4)
//RESULTS
printf ( number o f p i p e s r e q u i r e d = %. f ,n )
//ANSWER i n t e x t b o o k i s wrong

Scilab code Exa 6.4 example 4


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
l = 1.5 // m i l e s
d = 18 // i n
Q = 12.4 // / c u s e c s
h = 130 // f t
r = 169
r1 = 338
w = 62.4 // l b / f t 3
g = 32.2 // f t / s e c 2
//CALCULATIONS
f = h *10* l ^5/( l *5280* Q ^2)
R = sqrt (1.5* r1 - r )
d = sqrt ( l ^2/ R *144)
v = sqrt ( h * g *2/( r / R ^2+1) )
34

17 HP = w *0.25* %pi *( d /12) ^2* v ^3/(550*2* g )


18 //RESULTS
19 printf ( f = %. 3 f ,f )
20 printf ( \n D i a m e t e r o f j e t d = %. 2 f i n ,d )
21 printf ( \n Water h . p = %. 1 f h . p , HP )
22
23
24 // The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g

error in textbook

Scilab code Exa 6.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
l = 5000 // f t
d = 24 // i n
Q = 18 // c u s e s
t = 10 // s e c
P = 275000 // l b / i n 2
g = 32.2 // f t / s e c 2
w =62.4
//CALCULATIONS
v = Q /( %pi *( d /24) ^2)
C = v /( t ^2/2)
Pr = (( l * C * t / g ) +( v ^2/(2* g ) ) ) /2.3
Pr1 = v *12* sqrt ( w * P /(386.4*1728) )
//RESULTS
printf ( P r e s s u r e R i s e = %. 1 f l b / i n 2 , Pr )
printf ( \n P r e s s u r e R i s e = %. f l b / i n 2 , Pr1 )

Scilab code Exa 6.6 example 6


35

off

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g = 32.2 // f t / s e c 2
v = 4 // f t / s e c
K = 300000 // l b / i n 2
d = 6 // i n
t = 0.25 // i n
E = 30*10^6 // l b / i n 2
w = 62.4 // l b / f t 3
//CALCULATIONS
P = sqrt (( w * v ^2/ g ) /(( d /( E *144* t ) ) +(1/( K *144) ) ) ) /144
Sm = P * d /(2* t )
//RESULTS
printf ( Hoop s t r e s s = %. f l b / i n 2 , Sm )

Scilab code Exa 6.7 example 7


1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
l1 = 19 // f t
l2 = 1 // f t
r1 = 0.298
r2 = 0.238
r3 = 0.359
r4 = 0.242
r5 = 0.121
d = 6 // i n
//CALCULATIONS
m = -( - r4 - sqrt ( r4 ^2 -4*(3* r1 - r5 ) *( -( d /2) * r2 - r3 ) ) )
/(2*(3* r1 - r5 ) )
14 v2 = sqrt (( l1 + l2 ) /( r1 * m ^2 - r2 ) )
15 v3 = m * v2
16 Q2 = %pi * v2 / d ^2
36

17 Q3 = %pi * v3 / d ^2
18 Q = Q2 + Q3
19 //RESULTS
20 printf ( Q2 = %. 3 f c u s e c , Q2 )
21 printf ( \n Q3 = %. 2 f c u s e c , Q3 )
22 printf ( \n T o t a l Q u a n t i t y = %. 3 f

c u s e c s ,Q )

Scilab code Exa 6.8 example 8


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h = 80 // f t
f = 0.008
l = 3000 // f t
r1 = 6.07
r2 = 377.5
r3 = 4733
r4 = 0.0466
r5 = 3220
r6 = 51.5
//CALCULATIONS
Q = sqrt ( h *10/( f * l ) )
Q1 = sqrt ( r2 + sqrt ( r2 ^2 -4* r1 * r3 ) /(2* r1 ) ) /3
Q2 = Q1 - r4 * sqrt ( r5 - r6 * Q1 ^2)
//RESULTS
printf ( r a t e d i s c h a r g e when v a l v e B i s c l o s e d= %. 2 f
c u s e c s ,Q )
19 printf ( \n Flow i n r e s e r v o i r = %. 2 f c u s e c s , Q2 )
20
21

// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

37

Scilab code Exa 6.9 example 9


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
Q = 450 // g a l / min
w = 6.24 // l b / f t 3
f = 0.005
l1 = 1000 // f t
l2 = 2000 // f t
r1 = 1.6
r2 = 4.4
r3 = 0.8
r4 = 12.85
h1 = 59.1 // f t
h2 = 40.19 // f t
v = 1.2 // f t / s e c
f = 0.0056
l = 10 // f t
//CALCULATIONS
Q1 = Q /( w *60)
Q2 = ( r1 + sqrt ( r1 ^2+4* r2 ) ) /2
Q3 = Q2 - Q1
Q4 = ( - r3 + sqrt ( r3 ^2+4* r4 ) ) /2
Q5 = Q4 + Q1
d = ( f *5500* v ^2/( l *( h1 - h2 ) ) ) ^0.2*12
//RESULTS
printf ( f l o w i n t o r e s e r v o i r B= %. 2 f c u s e c s , Q3 )
printf ( \n f l o w i n t o r e s e r v o i r D= %. 1 f c u s e c s , Q5 )
printf ( \n d i a m e t e r o f MN= %. f i n ,d )

Scilab code Exa 6.10 example 10


1
2 clc

38

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 2.5 // f t
a = 45 // d e g r e e s
Q = 69 // c u s e s
l = 30 // f t
w = 62.4 // l b / f t 3
g = 32.2 // f t / s e c 2
//CALCULATIONS
Ps = 0.25* %pi * d ^2* w * l /2240
Rs = Ps * sqrt ((1 - cosd ( a ) ) *2)
W = Q * w /2240
v = Q *4/( %pi * d ^2)
Rd = W * v * sqrt (2*(1 - cosd ( a ) ) ) / g
Rt = Rs + Rd
//RESULTS
printf ( t o t a l r e s u l t a n t t h r u s t = %. 3 f t o n s , Rt )

Scilab code Exa 6.11 example 11


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
r1 = 1/3
r2 = 7/12
l = 5000 // f t
l1 = 10000 // f t
d = 27 // i n
d1 = 18 // i n
Q = 10 // c u s e s
f = 0.006
//CALCULATIONS
Q2 = Q /( sqrt ( r2 / r1 ) +1)
Q1 = Q - Q2
H = ( f * l * Q ^2/(10*( d /12) ^5) ) +( f * l1 * Q1 ^2/(3*10^( d1 /12)
^5) )
39

16
17
18
19
20

//RESULTS
printf ( t o t a l d i f f e r e n c e i n head = %. 2 f f t ,H )

//ANSWER GIVEN IN THE TEXTBOOK I S WRONG

Scilab code Exa 6.12 example 12


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
V = 4 // f t / s e c
L = 1225 // f t
l = 1200 // f t
H = 50 // f t
d = 1/3 // f t
f = 0.008
g = 32.2 // f t / s e c 2
//CALCULATIONS
a = 2* g * H
b = (4* f * L / d ) +1.5
c = sqrt ( a / b )
d = sqrt ( a * b )
T = log ( sqrt (( c + V ) /( c - V ) ) ) * l *2/ d
//RESULTS
printf ( t i m e i n t e r v a l f o r e l a p s e = %. 2 f s e c ,T )

Scilab code Exa 6.14 example 14


1
2 clc
3 // i n i t i a l i s a t i o n
4 L = 8000 // f t

of variables

40

5
6
7
8
9
10
11
12
13
14

d = 5 // f t
g = 32.2 // f t / s e c 2
d = 5 // f t
l = 250 // f t
b = 100
//CALCULATIONS
A = %pi *0.25* d ^2* l -0.5* d ^2* b
V= A*g/L
//RESULTS
printf ( V e l o c i t y = %. 2 f f t / s e c ,V )

Scilab code Exa 6.15 example 15


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
B = 3 // f t
Cd = 0.6
g = 32.2 // f t / s e c 2
d1 = 6 // i n
d2 = 4 // i n
//CALCULATIONS
Q2 = 0.428 // c u s e s
r = sqrt (((( d1 /12) ^5) /(( d2 /12) ^5) ) )
Q1 = r * Q2
Q = Q1 + Q2
//RESULTS
printf ( T o t a l i n f l o w = %. 3 f c u s e s ,Q )

Scilab code Exa 6.17 example 17


1
2 clc

41

3
4
5
6
7
8
9
10
11
12
13
14
15
16

// i n i t i a l i s a t i o n o f v a r i a b l e s
f = 0.007
l = 30 // m i l e s
Q1 = 5*10^6 // g a l / day
w = 6.24 // l b / f t 3
H = 500 // f t
Q2 = 7*10^6 // g a l / day
//CALCULATIONS
Qi = Q1 /( w *24*3600)
d = ( f * l *5280* Qi ^2/(10* H ) ) ^0.2
Qe = Q2 * Qi / Q1
x = (30 -( H *10* d ^5/( f * Qe ^2*5280) ) ) *(4/3)
//RESULTS
printf ( l e n g t h o f new p i p e r e q u i r e d = %. 1 f m i l e s ,x
)

42

Chapter 7
Flow Under Varying Head

Scilab code Exa 7.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g = 32.2 // f t / s e c 2
d = 6 // f t
di = 2 // i n
h = 9 // f t
Cd = 0.6
//CALCULATIONS
function [ y ]= fun ( H )
y = H ^ -0.5*( d /2) ^2* %pi /( Cd * %pi * sqrt (2* g ) /144)
endfunction
vec2 = intg (0 ,h , fun )
T = vec2
//RESULTS
printf ( Time t o e m p t i f y = %. f s e c ,T )

Scilab code Exa 7.2 example 2

43

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d1 = 4 // f t
d2 = 2 // i n
l = 300 // f t
P = 5 // l b / i n 2
h1 = 3 // f t
h2 = 6 // f t
f = 0.01
//CALCULATIONS
X = P *2.31*10*( d2 /12) ^5/( f * l )
A = %pi * d1 ^2/4
function [ y ]= fun ( h )
y = A * sqrt (( P *2.31*10*( d2 /12) ^5/( f * l ) ) -(10*( d2 /12)
^5* h /( f * l ) ) ) /(10*( d2 /12) ^5/( f * l ) ) /7
endfunction
vec2 = intg ( h1 , h2 , fun )
T = vec2
//RESULTS
printf ( t i m e f o r t h e c h a n n e l t o f a l l = %. f s e c ,T )

Scilab code Exa 7.3 example 3


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 10 // i n
l = 15 // f t
di = 3 // i n
Cd = 0.62
g =32.2
//CALCULATIONS
function [ y ]= fun ( H )
y = - l *2* sqrt (( d /2) ^2 -(( d /2) -H ) ^2) /( Cd *( %pi *( di
/12) ^2/4) * H ^0.5* sqrt (2* g ) )
44

12 endfunction
13 vec2 = intg ( d /2 ,0 , fun )
14 T = vec2
15 //RESULTS
16 printf ( t i m e f o r t h e c h a n n e l t o

f a l l = %. f s e c ,T )

Scilab code Exa 7.4 example 4


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h = 4 // f t
w = 6 // f t
l = 100 // yd
a = 60 // d e g r e e s
h1 = 3 // f t
h2 = 2 // f t
Cd = 0.6
g =32.2 // f t / s 2
//CALCULATIONS
A = l *3* w
function [ y ]= fun ( H )
y = - A * H ^ -2.5/( Cd *(8/15) * tand ( a /2) * sqrt (2* g ) )
endfunction
vec2 = intg ( h1 ,( h1 - h2 ) , fun )
T = vec2
//RESULTS
printf ( t i m e f o r t h e c h a n n e l t o f a l l = %. f s e c ,T )

Scilab code Exa 7.5 example 5


1 clc
2 // i n i t i a l i s a t i o n

of variables
45

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clear
A = 1/16 // m i l e 2
d = 2 // f t
h = 18 // f t
h1 = 5 // f t
f = 0.006
l = 200 // f t
h2 = 10 // f t
g = 32.2 // f t / s e c 2
//CALCULATIONS
X = sqrt (1/((1.5+(4* f * l / d ) ) /(2* g ) ) )
function [ y ]= fun ( H )
y = A *5280^2* H ^ -0.5/( %pi * d ^2* X /4)
endfunction
vec2 = intg (h - h1 ,h , fun )
T = vec2
//RESULTS
printf ( t i m e f o r t h e c h a n n e l t o f a l l = %. f s e c ,T )

Scilab code Exa 7.6 example 6


1
2
3
4
5
6
7
8
9
10
11
12
13
14

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
l = 8 // f t
b = 6 // f t
h = 10 // f t
r= 3
Cd = 0.6
A1 = 36 // f t 2
A2 = 12 // f t 2
l1 = 6 // f t
h1 = 1 // f t
d = 2 // i n
g =32.2 // f t / s 2
46

15
16
17
18
19
20
21
22

//CALCULATIONS
function [ y ]= fun ( H )
y = H ^ -0.5/( Cd *( %pi *( d /12) ^2/4) * sqrt (2* g ) *((1/ A1 )
+(1/ A2 ) ) )
endfunction
vec2 = intg (0 ,( b - h1 ) , fun )
T = vec2
//RESULTS
printf ( t i m e f o r t h e l e v e l s t o become e q u a l = %. f
s e c ,T )

Scilab code Exa 7.7 ex 7


1
2
3
4
5
6
7
8
9
10
11
12
13
14

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
h1 = 3 // f t
h2 = 4 // f t
r = 0.95 //m1
k = 27.65 // s e c
Cd = 0.95
//CALCULATIONS
T = k *( log ( r * sqrt ( h2 ) -1) +( r * sqrt ( h2 ) -1) ) -k *( log ( r *
sqrt ( h1 ) -1) +( r * sqrt ( h1 ) -1) )
h = (( h2 - h1 ) / Cd ) ^2
//RESULTS
printf ( Time = %. 2 f s e c ,T )
printf ( \n I n c r e a s e i n w a t e r l e v e l = %. 2 f f t ,h )

Scilab code Exa 7.8 ex 8


1 clc
2 // i n i t i a l i s a t i o n

of variables
47

3
4
5
6
7
8
9
10
11
12

clear
t = 75 // s e c
h = 10.5 // i n
h1 = 13.5 // i n
//CALCULATIONS
r = t * %pi * sqrt (2* h ^2) / log (( sqrt (2* h1 ^2) + h1 ) /( sqrt (2* h
^2) -h ) )
t = -r *((1/ h1 ) -(1/ h ) )
//RESULTS
printf ( A/K = %. f ,r )
printf ( \n Time t a k e n = %. 1 f s e c ,t )

Scilab code Exa 7.9 ex 9


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
g = 9.8 //m/ s e c 2
h1 = 10 // i n
h2 = 12 // i n
r1 = 1.32
r2 = 1.56
r3 = 1.97
r4 = 4.10
r5 = 2.64
//CALCULATIONS
Q = sqrt (32.2) *( h2 /18) ^1.5
T = 10^5*( r1 +2* r3 + r4 +4*( r3 + r5 ) ) /(6* h2 *60*60)
//RESULTS
printf ( A c t u a l d i s c h a r g e = %. 2 f BH 1 . 5 c u s e s ,Q )
printf ( \n Time = %. 1 f h r ,T )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

48

Chapter 8
Viscosity and Viscous Flow

Scilab code Exa 8.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v = 10.01 // p o i s e
g = 32.2 // f t / s e c 2
d = 30.48 //cm
w = 453.6 //gm
//CALCULATIONS
M= v*d/w
F= M/g
//RESULTS
printf ( Pound i n u n i t o f mass = %. 3 f l b / f t s e c
a b s o l u t e u n i t s ,M )
13 printf ( \n Pound i n u n i t o f f o r c e = %. 4 f s l u g s / f t
s e c ,F )

Scilab code Exa 8.2 example 2

49

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
W = 20 // t o n s / h r
l = 1000 // f t
w = 57 // l b / f t 3
kv = 0.0205 // f t 2/ s e c
d = 6 // i n
g = 32.2 // f t / s e c 2
//CALCULATIONS
Q = W *2240/(3600* w )
A = %pi *( d /12) ^2/4
v= Q/A
R = v *( d /12) / kv
n = w * kv / g
P = 32* v * n * l /(( d /12) ^2* w )
HP = P *2240* W /(3600*500)
//RESULTS
printf ( R e y n o l d s number = %. 1 f ,R )
printf ( \n H . P r e q u i r e d = %. 2 f hp , HP )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 8.4 example 4


1
2
3
4
5
6
7
8
9

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
n = 0.0067 // p o i s e
l = 10 // f t
w = 62 // l b / f t 3
d = 1 // i n
Q = 2 // f t 2/ s e c
sm = 13.57
k1 = 0.003
50

10
11
12
13
14
15
16
17
18
19
20
21

k2 = 0.0725
r = 0.3
g = 32.2 // f t / s e c 2
//CALCULATIONS
n1 = n *30.48/453.6
v = Q *4/(60* %pi *( d /12) ^2)
RN = v *( d /12) * w / n1
f = k1 +( k2 / RN ^ r )
hf = 4* f * l * v ^2/(2* g *( d /12) )
hl = hf *12/ sm
//RESULTS
printf ( Head l o s t i n i n c h e s o f m e r c u r y = %. 2 f i n ,
hl )

Scilab code Exa 8.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
n = 0.91 // p o i s e
g = 32.2 // f t / s e c
N = 300 // r . p .m
t = 0.01 // i n
r1 = 0.25 // f t
r2 = 1/6 // f t
//CALCULATIONS
n1 = n *30.48/(454* g )
A = N *2* %pi /60
t1 = t /12
hp = %pi * A ^2* n1 *( r1 ^4 - r2 ^4) /( t1 *1100)
//RESULTS
printf ( H o r s e Power l o s t = %. 2 f , hp )

Scilab code Exa 8.6 example 6


51

1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
vw = 0.3 // f t / s e c
dw = 1 // i n
da = 12 // i n
ww = 62.3 // l b / f t 3
wa = 0.075 // l b / f t 3
nw = 0.01 // p o i s e
na = 0.00018 // p o i s e
//CALCULATIONS
va = vw * dw * ww * na /( nw * da * wa )
//RESULTS
printf ( c r i t i c a l v e l o c i t y o f a i r = %. 3 f f t / s e c , va )

Scilab code Exa 8.7 example 7


1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
dm = 0.75 // i n
dt = 0.25 // i n
dP = 10.4 // l b / i n 2
rd = 0.84
w = 62.4 // l b / f t 3
g = 32.2 // f t / s e c 2
//CALCULATIONS
v1 = sqrt ( dP *144* g /( rd * w *(( dm / dt ) ^4 -1) ) )
Q = %pi * dm ^2* v1 *60* w /(4*144*10)
//RESULTS
printf ( D i s c h a r g e r a t e = %. 1 f g a l . min ,Q )

52

Chapter 9
Impact Of Jets

Scilab code Exa 9.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
clear
d = 2 // i n
V = 210 // f t / s e c
V1 = 50 // f t / s e c
g = 32.2 // f t / s e c 2
w = 62.4 // l b / f t 3
//CALCULATIONS
M = %pi * V * w /(4*36* g )
F= M*V
dV = V - V1
M1 = %pi * dV * w /(4*36* g )
F1 = M1 * dV
W = F1 * V1
F2 = M * dV
W1 = F2 * V1
//RESULTS
printf ( F o r c e on p l a t e = %. f l b ,F +1)
printf ( \n F o r c e on p l a t e = %. f l b , F1 )
printf ( \n Work done / s e c = %. f f t l b / s e c ,W )
53

22
23
24
25

printf ( \n F o r c e on p l a t e = %. f l b , F2 )
printf ( \n Work done / s e c = %. f f t l b / s e c , W1 )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 9.2 example 9


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v1 = 15 // f t / s e c
v2 = 40 // f t / s e c
a = 30 // d e g r e e s
b = 150 // d e g r e e s
v = 15.27 // f t / s e c
g = 32.2 // f t / s e c 2
//CALCULATIONS
a1 = a - asind ( v1 * sind ( b ) / v2 )
w = cosd ( a1 ) * v2
vr = v2 * sind ( a1 ) / sind ( a )
v1 = sqrt ( v1 ^2+ vr ^2 -2* v1 * vr * cosd ( a ) )
r = 180 - asind ( sind ( a ) * vr / v )
w1 = v * cosd ( r )
W = v1 *( w - w1 ) / g
//RESULTS
printf ( a = %. 2 f d e g r e e s , a1 )
printf ( \n w = %. 2 f f t / s e c ,w )
printf ( \n v r = %. 2 f f t / s e c , vr )
printf ( \n v1 = %. 2 f f t / s e c , v1 )
printf ( \n w = %. 2 f f t / s e c ,w )
printf ( \n Work done p e r pound = %. 2 f f t l b / l b ,W )

54

Scilab code Exa 9.3 example 3


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 0.5 // i n
a = 165 // d e g r e e s
W = 7.35 // l b
W1 = 500 // l b
t = 148 // s e c
g = 32.2 // f t / s e c 2
w = 62.3 // l b / f t 3
//CALCULATIONS
Q = W1 /( t * w )
v = Q *16*144/ %pi
dv = v *(1 - cosd ( a ) )
F = dv * W1 /( t * g )
r= W/F
k = (1 -( W * t * g /( W1 * v ) ) ) / cosd ( a )
//RESULTS
printf ( k = %. 3 f ,k )

Scilab code Exa 9.4 example 4


1
2
3
4
5
6
7
8
9
10
11
12

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
t = 0.25 // i n
a = 30 // d e g r e e s
w = 480 // l b / f t 3
h = 2 // i n
d = 0.5 // i n
l = 6 // i n
w1 = 62.4 // l b / f t 3
g = 32.2 // f t / s e c 2
//CALCULATIONS
W = t * l ^2* w /1728
55

13 M = w1 * %pi * d ^2* cosd ( a ) /( g *4*144)


14 v = sqrt ( W *( l /2) * sind ( a ) /( M *2* secd ( a ) ) )
15 //RESULTS
16 printf ( V e l o c i t y o f j e t = %. 1 f f t / s e c ,v )

Scilab code Exa 9.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
V = 90 // f t / s e c
a = 30 // d e g r e e s
u = 45 // f t / s e c
//CALCULATIONS
w = V * cosd ( a )
f = sqrt ( V ^2 - w ^2)
b = atand ( f /( w - u ) )
V1 = sqrt ( f ^2+( u - f * cotd ( b ) ) ^2)
//RESULTS
printf ( a b s o l u t e v e l o c i t y o f w a t e r a t t h e e x i t = %
. 1 f f t / s e c , V1 )

Scilab code Exa 9.6 example 6


1
2
3
4
5
6
7
8
9

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
u = 734 // f t / s e c
v = 2000 // f t / s e c
g = 32.2 // f t / s e c 2
da = 0.019 // kg /m3
//CALCULATIONS
W = g * v /( v - u )
A = W /( u * da )
56

10
11
12

//RESULTS
printf ( Weight o f t h e a i r = %. 1 f l b / s e c ,W )
printf ( \n Area o f i n l e t = %. 2 f f t 2 ,A )

57

Chapter 10
Hydraulic Prime Movers

Scilab code Exa 10.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v = 231 // f t / s e c
g = 32.2 // f t / s e c 2
vc = 0.97
r = 0.47
p = 85 // p e r c e n t
A = 170 // d e g r e e s
p1 = 88 // p e r c e n t
l = 950 // f t
//CALCULATIONS
H = v ^2/( vc ^2*2* g )
u= r*v
vr = v - u
vr1 = p * vr /100
w1 = u - vr1 * cosd (180 - A )
W = u *( v - w1 ) / g
he = W *100/ H
W1 = p1 * W /100
oe = W1 *100/ l
58

22
23
24

//RESULTS
printf ( h y d r a u l i c e f f i c i e n c y = %. f p e r c e n t , he )
printf ( \n o v e r a l l e f f i c i e n c y = %. 1 f p e r c e n t , oe )

Scilab code Exa 10.2 example 2


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 1 // i n
v = 95 // f t / s e c
F = 173.2 // l b
A = 163 // d e g r e e s
H = 500 // f t
Cv = 0.97
d1 = 1.33 // f t
r = 0.47
w = 62.4 // l b / f t 3
g = 32.2 // f t / s e c 2
//CALCULATIONS
Q = w * %pi * v /(144*4)
k = (F - v ) /( v * cosd (180 - A ) )
v1 = Cv * sqrt (2* g * H )
W = v1 * w * d ^2* %pi /(4*144)
N = 60* r * v1 /( %pi * d1 )
whp = ( v1 - v ) *(1+ k * cosd (180 - A ) ) * v1 *2/550
Ns = N * whp ^0.5/ H ^1.25
//RESULTS
printf ( s p e c i f i c s p e e d = %. 2 f r . p .m , Ns )

Scilab code Exa 10.4 example 4


1

clear
59

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
D = 2 // f t
f = 0.005
l = 10000 // f t
g = 32.2 // f t / s e c 2
H = 1000 // f t
w = 62.4 // l b / f t 3
//CALCULATIONS
d = (2* D ^5/( f * l ) ) ^0.25
v = sqrt (8* g * H * D ^5/( f * l * d ^4+4* D ^5) )
HP = w * %pi * d ^2* v ^3/(2* g *550*4)
Q = %pi * d ^2*( HP /67) /4
//RESULTS
printf ( Q u a n t i t y f l o w i n g = %. f c u s e s ,Q )

Scilab code Exa 10.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
pl = 122.5 // f t
Hw = 1225 // f t
g = 32.2 // f t / s e c 2
Cd = 0.98
Cd1 = 0.45
N = 500 // r . p .m
P = 6800 // h . p
n = 0.86
w = 62.4 // l b / f t 2
l = 5450 // f t
f = 0.005
A = 18 // f t 2
//CALCULATIONS
60

18
19
20
21
22
23
24
25
26
27
28
29

Ah = Hw - pl
js = Cd * sqrt (2* g * Ah )
bs = Cd1 * js
D = bs *60*2/( N *2* %pi )
a = P *2* g *550*144/( n * w * js ^3*2)
vp = sqrt ( pl *2* g /(4* f * l ) )
dp = ( js *2*4* A /( %pi *144* vp ) ) ^(2/3)
dp =2.495 // f t
//RESULTS
printf ( d i a m e t e r o f b u c k e t c i r c l e D = %. 1 f f t ,D )
printf ( \n a r e a o f j e t = %. f i n 2 ,a )
printf ( \n d i a m e t e r o f p i p e = %. 1 f f t , dp )

Scilab code Exa 10.6 example 6


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
u = 10* %pi // f t / s e c
u1 = 5* %pi // f t / s e c
a = 20 // d e g r e e s
A = 300 // r . p .m
v = 10 // f t / s e c
g = 32.2 // f t / s e c 2
wi = 2 // f t
d = 6 // i n
w1 = 62.4 // l b / f t 3
//CALCULATIONS
w = v / tand ( a )
a1 = atand ( v /( u - w ) )
b = atand ( v / u1 )
W= u*w/g
A1 = %pi * wi * d /12
Q = A1 * v
WHP = W * Q * w1 /550
61

//RESULTS
printf ( B l a d e a n g l e a t i n l e t i s g i v e n by = %. 2 f
d e g r e e s , a1 )
23 printf ( \n B l a d e a n g l e a t i n l e t i s g i v e n by = %. 2 f
d e g r e e s ,b )
24 printf ( \n Water h o r s e power = %. 1 f h . p , WHP )

21
22

Scilab code Exa 10.7 ex 7


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g = 32.2 // f t / s e c 2
H = 100 // f t
a = 25 // d e g r e e s
a1 = 20 // d e g r e e s
r1 = 9/8
r2 = 0.2
u = 6.63 // f t / s e c
w = 62.4 // l b / f t 3
h1 = 34 // f t
h2 = 100 // f t
r = 0.1
//CALCULATIONS
f = sqrt ( H * g /(( r1 * cotd ( a ) * cotd ( a1 ) ) + r1 *0.5+( r1
*0.5^2*0.2/( sind ( a ) ) ^2) +0.1/( sind ( a1 +10) ) ^2) )
W = u * f ^2/ g
q = a * H *550/(10* W * w )
q1 = q / w
A= q/f
dh = h1 + h2 -((1+ r ) * f ^2/(( sind ( a1 ) ) ^2*2* g ) )
//RESULTS
printf ( f = %. 1 f f t / s e c ,f )
printf ( \n Work Done = %. 1 f f t l b / l b ,W )
printf ( \n Q u a n t i t y f l o w = %. 1 f c u s e c s ,q )
62

26
27
28
29

printf ( \n Area form g u i d e s = %. 3 f f t 2 ,A )


printf ( \n P r e s s u r e a t e n t r y o f l e v e l = %. 1 f f t o f
w a t e r , dh )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 10.8 example 8


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 8 // i n
w = 2 // i n
di = 12 // i n
wi = 3 // i n
a = 24 // d e g r e e s
p = 88 // p e r c e n t
a1 = 85 // d e g r e e s
a2 = 30 // d e g r e e s
p1 = 94 // p e r c e n t
h = 180 // f t
d1 = 18 // i n
Cd = 0.92
g =32.2
n1 = 111 // rpm
//RESULTS
r1 = 1/ tand ( a )
r2 = (1/ tand ( a1 ) ) + r1
r3 = 2* r2 /3
r4 = (1/ tand ( a2 ) ) - r3
a3 = atand (1/ r4 )
r5 = sind ( a3 )
f = sqrt ( g * h *( p /100) /( r1 * r2 + r3 * r4 +( r5 ^2/2) ) )
63

27
28
29
30
31
32
33
34
35

A = r2 * f /( d /12)
N = ( A *60/(2* %pi ) ) - n1
W = ( r1 * r2 + r3 * r4 ) * f ^2/ g
Q = %pi *( d1 /12) *( w /12) * Cd * f *62.08
whp = W * Q /550
bhp = p1 * whp /100
//RESULTS
printf ( Speed = %. f rpm ,N )
printf ( \n o u t p u t h o r s e p o w e r = %. f hp , bhp )

Scilab code Exa 10.9 example 9


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
N = 428.6 // r . p .m
D = 5 // f t
w = 62.4 // l b / f t 3
hp = 16800 // hp
Qw = 435 // c u s e s
g = 32.2 // f t / s e c 2
v = 32 // f t / s e c
v1 = 24 // f / s e c
H = 200 // f t
lh1 = 0.32 // f t l b / l b
//CALCULATIONS
u = %pi * D * N /60
W = hp *550/( Qw * w )
w= W*g/u
a = atand ( v / w )
va = sqrt ( w ^2+ v ^2)
b = atand ( v /( u - w ) )
B = 180 - b
vew = va ^2/(2* g )
ve1w = v1 ^2/(2* g )
64

24 LH = H + vew - ve1w - W + lh1


25 //RESULTS
26 printf ( a n g l e = %. 2 f d e g r e e s ,a )
27 printf ( \n A b s o l u t e v e l o c i t y a t e n t r y t o r u n n e r = %

. 1 f f t / s e c , va )
28 printf ( \n a n g l e = %. 2 f d e g r e e s ,b )
29 printf ( \n L o s s o f head i n r u n n e r = %. 2 f f t l b / l b ,
LH )

Scilab code Exa 10.10 example 10


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
A1 = 25 // d e g r e e s
A2 = 80 // d e g r e e s
H1 = 100 // f t
H2 = 13 // f t
g = 32.2 // f t / s e c 2
v = 8 // f t / s e c
d = 3.5 // i n
de = 15.4 // i n
b = 1.5 // i n
w = 62.4 // l b / f t 3
//CALCULATIONS
W = H1 - H2 -( v ^2/(2* g ) )
f = sqrt ( W * g /( cotd ( A1 ) *( cotd ( A1 ) - cotd ( A2 ) ) ) )
u = f *( cotd ( A1 ) - cotd ( A2 ) )
V = d * u /7.7
r = atand ( f / V )
N = 60* u *12/( %pi * de )
Q = %pi * de * f * b /144
HP = Q * w * W /550
Ns = N * sqrt ( HP ) / H1 ^1.25
di = sqrt ( Q *4*144/( %pi * f ) )
65

25
26
27
28

//RESULTS
printf ( a n g l e = %. f d e g r e e s ,r )
printf ( \n A n g u l a r s p e e d = %. 1 f rpm , Ns )
printf ( \n i n l e t d i a m e t e r t o d r a f t t u b e = %. 2 f i n ,
di )

Scilab code Exa 10.12 example 12


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
H = 82.1 // f t
h = 90 // f t
k = 0.00646
k1 = 0.00454
vd = 11 // f t / s e c
P = 0.53 // hp
//CALCULATIONS
Q = sqrt ((1/ k ) ) * sqrt (h - H )
Qu = Q / sqrt (h - H )
Q1 = sqrt ( vd / k1 )
hf = Q1 ^2* k
Qu1 = Q1 / sqrt (h - hf )
Pu = P *( h - hf ) ^1.5
//RESULTS
printf ( Qu = %. f c u s e s ,Q )
printf ( \n Q = %. 1 f c u s e s , Q1 )
printf ( \n power D e v e l o p e d = %. f hp , Pu )

66

Chapter 11
Pumping Machinery

Scilab code Exa 11.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h = 75 // f t
e = 0.75
k = 0.01
Q = 3000 // g a l / min
k1 = 1.2
N = 1500
g = 32.2 // f t / s e c 2
D = 0.836 // f t
//CALCULATIONS
W= h/e
v1 = sqrt (( W - h ) / k )
Q1 = Q /374.06
f1 = Q1 /( k1 * D ^2)
u1 = %pi * D * N /60
w1 = W * g / u1
B = atand ( f1 /( u1 - w1 ) )
//RESULTS
printf ( D i a m e t e r o f i m p e l l e r = %. 3 f f t
67

,D )

22

printf ( \n B l a d e a n g l e a t o u t l e t e d g e o f i m p e l l e r =
%. f d e g r e e s ,B )

Scilab code Exa 11.3 example 3


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
V = 150 // f t 3/ s e c
A1 = 750 // r . p .m
di = 21 // i n
do = 30 // i n
v = 50 // f t / s e c
A = 70 // d e g r e e s
w = 4 // i n
p = 30 // p e r c e n t
p1 = 25 // p e r c e n t
sv = 12.8 // f t 3/ l b
g = 32.2 // f t / s e c 2
//CALCULATIONS
u = A1 *2* %pi * di /(24*60)
u1 = A1 *2* %pi * do /(24*60)
f1 = V /( %pi *( do /12) *(1/3) )
w1 = u1 - f1 * cotd ( A )
v1 = sqrt ( f1 ^2+ w1 ^2)
P = ( u1 ^2+ v ^2 -( f1 ^2/( sind ( A ) ) ^2) ) /(2* g )
h = 30* v1 ^2/(100*2* g )
Nh = v1 ^2/(20*2* g )
Prt = P + Nh
W = u1 * w1 / g
e = Prt *100/ W
Power = Prt * V /( sv *550)
//RESULTS
printf ( T o t a l p r e s s u r e r i s e = %. 1 f f t o f a i r , Prt )
printf ( \n m a n o m e t r i c e f f i c i e n c y = %. 1 f p e r c e n t ,e )
68

31
32
33

printf ( \n Power = %. 2 f hp , Power )


// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 11.4 ex 4


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g = 32.2 // f t / s e c 2
u1 = 90 // f t / s e c
w1 = 70 // f t
e = 0.8
h1 = 10 // f t
h2 = 16 // f t
h3 = 5 // f t
k = 2/5
f1 = 20 // f t / s e c
f = 18 // f t / s e c
a = 45 // d e g r e e s
x1 = 164.4 // f t
//CALCULATIONS
Hm = u1 * w1 / g
Hm1 = e * Hm
lh = Hm - Hm1 - h1 - h2 - h3
vg = k * sqrt ( f1 ^2+ w1 ^2)
pr = (( f ^2+ u1 ^2 - f1 ^2/( sind ( a ) ) ^2) /(2* g ) ) - h2
pr1 = x1 - pr
ge = pr1 * g *2*100/( vg / k ) ^2
//RESULTS
printf ( manometer Head = %. 1 f f t , Hm1 )
printf ( \n o u t l e t v e l o c i t y from g u i d e s = %. 1 f f t /
s e c , vg )
27 printf ( \n P r e s s u r e r i s e t h r o u g h i m p e l l e r o n l y = %
69

. 1 f f t , pr )
28 printf ( \n Guide b a l d e e f f i c i e n c y = %. f p e r c e n t ,
ge )

Scilab code Exa 11.6 example 6


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
D1 = 7.5 // i n
Q1 = 850 // g a l / min
p1 = 62.4 // l b / f t 3
N1 = 1800
D2 = 15 // i n
Q2 = 12000 // g a l / min
p2 = 64 // l b / f t 3
N1 = 1800 // r . p .m
H1 = 14 // l b / f t 2
//CALCULATIONS
N2 = Q2 * N1 *( D1 ) ^3/( Q1 * D2 ^3)
P1 = p1 * H1 /144
P2 = P1 * N2 ^2* D2 ^2* p2 /( N1 ^2* p1 * D1 ^2)
//RESULTS
printf ( N2 = %. f r . p .m , N2 +4)
printf ( \n P2 = %. f l b / i n 2 , P2 )

Scilab code Exa 11.8 example 8


1
2 clc
3 // i n i t i a l i s a t i o n
4 r= 5
5 //CALCULATIONS

of variables

70

6 sr = r ^2
7 sr1 = r ^2/ r
8 //RESULTS
9 printf ( C o r r e s p o n d i n g r a t i o = %. f , sr )
10 printf ( \n C o r r e s p o n d i n g r a t i o = %. f , sr1 )

Scilab code Exa 11.9 ex 9


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
e = 0.88
w = 1.25 // i n
d = 10 // i n
q = 630 // g a l / min
a = 40 // d e g r e e s
g = 32.2 // f t / s e c 2
e1 = 0.83
//CALCULATIONS
Q = q /(6.24*60)
f1 = Q /( e * %pi *( d /12) *( w /12) )
u1 = 1000*( w *4/12) *2* %pi /60
w1 = u1 - f1 * cotd ( a )
W = u1 * w1 / g
lr = ( f1 ^2+ u1 ^2 - f1 ^2/( sind ( a ) ) ^2) /(2* g )
mh = e1 * W
p = mh - lr
v1 = sqrt ( f1 ^2+ w1 ^2)
ke = v1 ^2/(2* g )
pke = p *100/ ke
me = 100* lr / W
//RESULTS
printf ( V e l o c i t y o f f l o w = %. f f t / s e c , f1 )
printf ( \n Work done = %. 1 f f t l b / l b ,W )
printf ( \n m a n o m e t r i c e f f i c i e n c y = %. 1 f f t , mh )
71

printf ( \n
printf ( \n
, ke )
30 printf ( \n
%. 1 f p e r
31 printf ( \n
)
28
29

32
33

P r e s s u r e r e c o v e r e d = %. 1 f f t head ,p )
K i n e t i c e n e r g y d i s c h a r g e = %. f f t l b / l b
Percentage of k i n e t i c energy recovered =
c e n t , pke )
m a n o m e t r i c e f f i c i e n c y = %. f p e r c e n t , me

// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 11.10 example 10


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
W1 = 7640 // g a l / min
W2 = 11400 // g a l / min
Hm = 63 // f t
Hm1 = 80 // f t
ep1 = 72 // p e r c e n t
ep2 = 76 // p e r c e n t
//CALCULATIONS
whp1 = W1 * Hm /(60*550)
whp2 = W2 * Hm1 /(60*550)
bhp1 = whp1 *100/ ep1
bhp2 = whp2 *100/ ep2
w1 = W2 /10
//RESULTS
printf ( For b o t h pumps d i s c h a r g e = %. f g a l / min
a g a i n s t an 80 f t head , W2 )
18 printf ( \n d e l i v e r y from one pump = %. 1 f h . p , bhp1
)
19 printf ( \n d e l i v e r y from two pumps = %. 1 f h . p ,
bhp2 )
72

Scilab code Exa 11.11 ex 11


1
2
3
4
5
6
7
8
9
10
11
12
13

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h = 94 // f t
w = 62.4 // l b / f t 3
e = 0.58
p = 73.5 // p e r c e n t
//CALCULATIONS
WHP = h * e * w /550
BHP = WHP /( p /100)
//RESULTS
printf ( W. H . P= %. 2 f h . p , WHP )
printf ( \n Brake h o r s e power= %. 1 f , BHP )

Scilab code Exa 11.12 example 12


1
2
3
4
5
6
7
8
9
10
11
12
13

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
sl = 12 // f t
l = 20 // f t
d = 4 // i n
dp = 6 // i n
lst = 18 // i n
k = 0.025
H = 32 // f t
g = 32.2 // f t / s e c 2
pf = 6 // f t
a = 33.83
73

14
15
16
17
18
19
20
21
22
23
24
25
26

a1 = 9.53
//CALCULATIONS
A = sqrt (( H - sl - d ) * g / a ) * a1
Q = 2* %pi *( dp /12) ^2* lst /(12*4*60)
v = Q /( %pi *( d /12) ^2/4)
kh = v ^2/(2* g )
fh = k * l * v ^2*12/(2* g * d )
N = sqrt (( H - sl - pf ) /( kh + fh ) )
//RESULTS
printf ( p r e m i s s i b l e s p e e d = %. 1 f r . p .m ,A )
printf ( \n maximum p r e m i s s i b l e s p e e d = %. 1 f r . p .m ,
N)
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 11.13 example 13


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
b = 6 // i n
s = 12 // i n
d = 4 // i n
a1 = 30 // d e g r e e s
a2 = 90 // d e g r e e s
a3 = 120 // d e g r e e s
N = 120 // r . p .m
n= 4
// c a l c u l a t i o n s
A = 2* %pi * N /60
V = %pi *( b /12) ^2* n /4
v = ( b /12) ^2* A *( b /12) /( d /12) ^2
Q1 = v * %pi *( d /12) ^2* sind ( a1 ) /4
Q2 = v * %pi *( d /12) ^2* sind ( a2 ) /4
74

18
19
20
21
22
23
24
25
26
27
28
29
30
31

Q3 = v * %pi *( d /12) ^2* sind ( a3 ) /4


Q4 = V - Q1
Q5 = Q2 - V
Q6 = Q3 - V
a4 = asind ( V /( v * %pi *( d /12) ^2) ) + a1
A = 180 - a4 - a1
//RESULTS
printf ( r a t e o f f l o w a t a1 = %. 3 f c u s e s , Q4 )
printf ( \n r a t e o f f l o w a t a2 = %. 3 f c u s e s , Q5 )
printf ( \n r a t e o f f l o w a t a3 = %. 3 f c u s e s , Q6 )
printf ( \n c r a k a n g l e = %. 1 f d e g r e e s , a4 )
printf ( \n c r a k a n g l e = %. 1 f d e g r e e s ,A )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 11.14 example 14


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
n = 2 // s t r o k e s / s e c
dp = 6 // i n
ds = 18 // i n
ds1 =4 // i n
l = 20 // f t
l1 = 20 // f t
f = 0.008
la = 5 // f t
A = 60 // r . p .m
f = 0.008
w = 62.4 // l b / f t 3
g =32.2
//CALCULATIONS
75

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

V = %pi *( ds /12) * n *( dp /12) ^2/4


vmp = 2* %pi * A *( ds /24) /60
vmp1 = vmp *( dp ^2/ ds1 ^2)
hfmax = 4* f *( l - la ) * vmp1 ^2/(2* g * ds1 /12)
H1 = 2* hfmax /3
H2 = H1 *13
Wls = ( H1 + H2 ) * w *( ds /12) * %pi *( dp /12) ^2* n /4
mv = V /( %pi *( ds1 /12) ^2/4)
lh = 4* f *( l - la ) * mv ^2/(2* g *( ds1 /12) )
lhf = 12* lh
Wls1 = ( lh + lhf ) * w *( ds /12) * %pi *( dp /12) ^2* n /4
WS = Wls - Wls1
//RESULTS
printf ( Work l o s t p e r s e c o n d= %. f f t l b / s e c , Wls )
printf ( \n Work s a v e d p e r s e c o n d = %. f f t l b / s e c ,
WS )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 11.15 ex 15


1
2
3
4
5
6
7
8
9
10
11
12
13

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 7.5 // i n
s = 15 // i n
l = 36 // f t
h1 = 34 // f t
h2 = 12 // f t
L = 10 // f t
g = 32.2 // f t / s e c 2
f = 0.008
l1 = 20 // f t
d1 = 4 // i n
76

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

h3 = 110 // f t
w = 62.4 // l b / f t 3
l2 = 180 // f t
//CALCULATIONS
Q = ( %pi /4) *( d ) ^2*( s /12) *2*( l /60) /144
v = Q /(( %pi /4) *( d1 /12) ^2)
a = ( d /4) ^2*( d /12) *( l *2* %pi /60) ^2
H = h1 - h2 -( L * a / g ) -( v ^2*0.5/ g ) -(4* f * l1 * v ^2/(2* g *( d1
/12) ) )
H1 = h1 + h3 +( L * a / g ) +( v ^2*0.5/ g ) +(4* f * l2 * v ^2/(2* g *( d1
/12) ) )
dh = ( H1 - H ) * w /144
NP = dh *( %pi /4) * d ^2
//RESULTS
printf ( Head a t p i s t o n = %. 2 f f t o f w a t e r a b s o l u t e
,H )
printf ( \n Head a t p i s t o n = %. 2 f f t o f w a t e r
a b s o l u t e , H1 )
printf ( \n D i f f e r e n c e on head o f p i s t o n = %. f l b / i n
2 , dh )
printf ( \n Net l o a d on p i s t o n = %. f l b , NP )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 11.16 example 16


1
2
3
4
5
6
7
8

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
f = 0.009
dc = 3.5 // i n
ds = 6 // i n
r = 0.25
sl = 8 // f t
77

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

d = 2.5 // i n
l = 14 // f t
el = 8 // f t
ed = 22.5 // i n
ph = 4 // f t
g = 32.2 // f t / s e c 2
f = 0.009
//CALCULATIONS
BC = el + l
v = sqrt ( BC * g /( l *( d /2) *( r ) *( dc / d ) ^2) ) *9.55
x = poly (0 , x )
vec = roots (2* x ^2+(1/ r ) *x -1)
H = vec (2)
H1 = acosd (0.225)
MV = sqrt ( BC * g /( l *( d /2) *( r ) *( dc / d ) ^2) ) * r *( sind ( H1 ) +(
sind (2* H1 ) /8) )
mvp = MV * dc ^2/ d ^2
hf = 4* f *( sl + l ) * mvp ^2/(2* g *( d /12) )
//RESULTS
printf ( pump s p e e d = %. 1 f r . p .m ,v )
printf ( \n F r i c t i o n head = %. 3 f f t , hf )

78

Chapter 12
Dimensional and Model
Analysis

Scilab code Exa 12.1 example 1


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 0.0625 // i n
sg = 0.91
vs = 1.62
ss = 7.85
g = 981 //cm/ s e c 2
//CALCULATIONS
v = 4*( d *2.54/2) ^2*( ss - sg ) * g /(3*6*30.45* vs )
//RESULTS
printf ( s t e a d y s p e e d a t t a i n e d = %. 4 f f t / s e c ,v )

Scilab code Exa 12.3 example 3


1 clear
2 clc

79

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

// i n i t i a l i s a t i o n o f v a r i a b l e s
vs = 16 // f t / s e c
lm = 1 // f t
l = 16 // f t
R = 9.6 // l b
ds = 64 // l b / f t 3
dm = 62.4 // / l b / f t 3
A = 40 // f t 2
//CALCULATIONS
vm = vs * sqrt ( lm / l )
rs = 0.0095* vm ^1.9* A
rw = R - rs
Rw = rw * ds *( l / lm ) ^3/ dm
Rs = 0.009* vs ^1.85* A * l ^2
R1 = Rw + Rs
//RESULTS
printf ( s p e e d = %. f b f t / s e c , vm )
printf ( \n T o t a l r e s i s t a n c e = %. f l b , R1 )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 12.4 example 4


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
H2 = 0.75 // f t
v1 = 1 // f t / s e c
v2 = 6 // f t / s e c
k = 1.433
//CALCULATIONS
H1 = H2 *( v1 / v2 ) ^(2/3)
Q1 = k * H1 ^2.47
Q2 = Q1 *( H2 / H1 ) ^2.5
//RESULTS
80

12

printf ( Flow = %. 3 f c u s e s , Q2 )

Scilab code Exa 12.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
nm = 360
d = 1.5 // i n
n = 100
dp = 12 // i n
vm = 4.8 // f t / s e c
Tm = 52 // s e c
T = 16 // l b f t
t = 133 // l b f t
//CALCULATIONS
vp = n * dp * vm /( nm * d )
Tp = Tm * dp ^2* vp ^2/( d ^2* vm ^2)
N = Tm * vm *6080*100/( T *2* %pi * nm *60)
W = Tp * vp *65000/10.67
T1 = W /( N *2* %pi * n *60) -t
//RESULTS
printf ( Speed o f a d v a n c e = %. 2 f k n o t s , vp )
printf ( \n T h r u s t = %. f l b , Tp )
printf ( \n E f f i c i e n c y = %. f p e r c e n t ,N )
printf ( \n Torque = %. f l b f t , T1 )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 12.6 example 6


1 clc

81

2
3
4
5
6
7
8
9
10
11
12
13

// i n i t i a l i s a t i o n o f v a r i a b l e s
w = 62.4 // l b / f t 3
d = 4 // i n
D = 0.0765 // l b / f t 3
Da = 8 // i n
vw = 1/13
nw = 20
va = 13 // f t / s e c
//CALCULATIONS
na = nw * va * d ^2/ Da ^2
//RESULTS
printf ( power = %. f r . p .m , na )

Scilab code Exa 12.7 example 7


1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
dtp = 120 // i n
dpd = 48 // i n
vim = 1.25 // f t / s e c
vip = 5 // f t / s e c
lp = 600 // f t
lm = 40 // f t
//CALCULATIONS
Rm = ( dtp / dpd ) ^2/(( lp / lm ) *( vim / vip ) ^2)
d = sqrt (4* Rm )
//RESULTS
printf ( D i a m e t e r = %. 2 f i n ,d )

82

Chapter 13
Miscellaneous Problems

Scilab code Exa 13.1 example 1


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
W = 5000 // l b
vr = 6
e = 0.95
ep = 0.75
d = 9 // i n
D = 45 // f t
t = 2 // min
v = 4.5 // f t / s e c
//CALCULATIONS
L = W * vr /( e * ep )
Pr = L /( %pi * d ^2/4)
s = D / vr
V = s * %pi * ep ^2/(4* t *60)
T= D/v
V1 = s * %pi * ep ^2/4
V2 = V * T
V3 = V1 - V2
//RESULTS
83

22
23
24

printf ( P r e s s u r e on ram = %. f l n / i n 2 , Pr )
printf ( \n Pump duty = %. 4 f c u s e c ,V )
printf ( \n Minimum c a p a c i t y i f a c c u m u l a t o r = %. 3 f
f t 3 , V3 )

Scilab code Exa 13.2 example 2


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
P1 = 1100 // l b / i n 2
P2 = 85 // l b / i n 2
f = 0.01
g = 32.2 // f t / s e c 2
l = 1600 // f t
r = 1/8
W = 2500 // l b
d = 6 // i n
//CALCULATIONS
L= W*d
P = L *2.31/( %pi *( d /2) ^2)
s1 = P1 *2540/1100
s2 = P2 *196/85
vp = sqrt (( s1 - s2 - P ) /(4* f * l /(2* g * r ) ) )
V = vp /16
Vl = V * d
Vp = sqrt (( s1 /3) /(4* f * l /(2* g * r ) ) )
vl = Vp * d /16
Hr = s1 -( s1 /3) - s2
Lr = Hr * %pi *( d /2) ^2/(2.31* d )
//RESULTS
printf ( I n c a s e 1 , v e l o c i t y o f l o a d = %. 2 f f t / s e c ,
Vl )
26 printf ( \n I n c a s e 2 , v e l o c i t y o f l o a d = %. 2 f f t / s e c
, vl )
84

27

printf ( \n Load t o be l i f t e d = %. f l b , Lr )

Scilab code Exa 13.3 example 3


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
bhp = 1500 // h . p
e = 0.86
h1 = 300 // f t
h2 = 15 // f t
w = 62.4 // l b / f t 3
t = 30 // d a y s
t1 = 10 // h r
t2 = 3 // months
f = 0.005
l = 1000 // f t
//CALCULATIONS
WHP = bhp / e
Ha = h1 - h2
W = WHP *550
Q = W /( Ha * w )
Qt = Q *36009* t1 * t * t2
Qp = Qt /(3600* t *45)
d = ( f * l *( Q /2) ^2/( t1 * h2 ) ) ^(1/5)
//RESULTS
printf ( D i a m e t e r = %. 2 f f t ,d )

Scilab code Exa 13.4 example 4


1 clear
2 clc
3 // i n i t i a l i s a t i o n
4 l = 140 // f t

of variables

85

5
6
7
8
9
10
11
12
13
14
15
16

P = 70 // p e r c e n t
V = 3*10^8 // f t 3
w = 62.4 // l b / f t 3
SBD = 4.9*10^8 // f t 3
Q = 162 // c u s e s
s = 12.2*10^6 // f t 3/ day
//CALCULATIONS
O = Q * w * l *( P /1000) /550
//RESULTS
printf ( S i z e o f r e s e r v o i r = %. 2 e f t 3 , SBD )
printf ( \n o u t p u t = %. f h . p ,O )
printf ( \n o u t p u t = %. f h . p ,Q )

Scilab code Exa 13.5 example 5


1
2
3
4
5
6
7
8
9
10
11
12
13
14

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
Q = 140 // c u s e s
w = 62.4 // l b / f t 3
l = 140 // f t
P = 70 // p e r c e n t
k = 1.6
v = 3*10^8
//CALCULATIONS
rv = k * v
HP = Q * l * w *( P /1000) /550
//RESULTS
printf ( R e q u i r e d s i z e o f r e s e r v o i r = %. 1 e f t 3 , rv
)
15 printf ( \n h o r s e p o w e r = %. f h . p , HP )

Scilab code Exa 13.6 example 6


86

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
P = 10 // l b / i n 2
r1 = 0.5 // f t
r = 0.25 // f t
f = 42.3 // f t / s e c
b = 1/40
Tt = 1400 // l b
//CALCULATIONS
Q = 2* %pi * r * b * f
p1 = 34+ P
Fu = p1 * %pi *( r -( r /4) ) *144/2.3
Fr = Fu - Tt
//RESULTS
printf ( Q u a n t i t y = %. 2 f c u s e c s ,Q )
printf ( \n R e s u l t a n t f o r c e on t h e p l a t e = %. f l b ,
Fr )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 13.7 example 7


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
r = 0.5 // f t
N = 300
w = 62.4 // l b / f t 3
g = 32.2 // f t / s e c 2
//CALCULATIONS
A = N *2* %pi /60
Ft = %pi * A ^2* r ^4* w /(4* g )
//RESULTS
87

12

printf ( t o t a l f o r c e = %. 1 f l b , Ft )

Scilab code Exa 13.8 example 8


1
2
3
4
5
6
7
8
9
10
11
12
13

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d = 4 // i n
h = 12 // i n
h1 = 9 // i n
g = 32 // f t / s e c 2
//CALCULATIONS
H = 2*(1 -( h1 / h ) )
A = sqrt (( H *2* g /(( d /24) ^2) ) )
A1 = sqrt (( H *2* g *2/(( d /24) ^2) ) )
//RESULTS
printf ( s p e e d when t h e a x i a l i s z e r o = %. f r a d n / s e c
,A )
14 printf ( \n s p e e d when t h e a x i a l i s z e r o = %. f r a d n /
s e c , A1 )

Scilab code Exa 13.10 example 10


1
2
3
4
5
6
7
8
9
10

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
P = 14.7 // l b / i n 2
T = 15 //C
v = 350 // f t / s e c
R = 0.714
//CALCULATIONS
P1 = P *144
r = 3091*(273+ T )
88

11
12
13
14
15
16
17
18
19

d1 = P1 / r
r1 = r +( v ^2/7)
P2 = ( r1 * d1 /( P1 ^ R ) ) ^(1/(1 - R ) ) /144
dP = P2 - P
T2 = r1 /3091
dT = T2 -(273+ T )
//RESULTS
printf ( r i s e i n p r e s s u r e = %. f l b / i n 2 , dP )
printf ( \n r i s e i n t e m p e r a t u r e = %. 1 f C , dT )

Scilab code Exa 13.11 example 11


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
T = 27 //C
P =33 // l b / i n 2
p1 = 14.7 // l b / i n 2
w = 250 // l b
g = 32.2 // f t / s e c 2
Cd = 0.99
r = 1.4
//CALCULATIONS
w1 = P *144/(96*(273+ T ) )
d = p1 *144/(96*(273+ T ) )
W = d * w /60
d = sqrt ( W *4/( Cd * %pi * sqrt (2* g * P *144*( r /( r -1) ) * w1
*(0.528^(2/1.4) -0.528^(2.4/1.4) ) ) ) ) *12
16 //RESULTS
17 printf ( D i a m e t e r = %. 3 f i n ,d )

Scilab code Exa 13.12 example 12


89

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
sp = 13.6
hm = 800 //mm
d = 3 // i n
r = 1.4
R = 1385 // f t l b / l b /C
w = 62.4 // l b / f t 3
T = 15 //C
hm1 = 765 //mm
r1 = 9
g = 32.2 // f t / s e c 2
//CALCULATIONS
p1 = hm * sp * w /304.8
r2 = (273+ T ) * R
w1 = p1 / r2
k = hm / hm1
v1 = sqrt ((2* g * r * r2 *(1 - k ^0.286) ) /((1 - r ) *( r1 ^2* k
^1.43 -1) ) )
20 W = v1 * w1 *3600*( %pi /64)
21 //RESULTS
22 printf ( Weight f l o w i n g = %. 1 f l b / h r ,W )
23
24

// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

Scilab code Exa 13.13 example 13


1
2
3
4
5
6

clear
clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p = 160 // l b / i n 2
d = 1/3 // f t
T = 15 //C
90

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

R = 96
V = 120 // f t 3
f = 0.004
a = 60* %pi
l = 10560 // f t
g = 32.2 // f t / s e c 2
//CALCULATIONS
p1 = p *144
w1 = p *144/( R *(273+ T ) )
v1 = V *36/ a
p2 = sqrt ( p1 ^2 -((2*4* f * p1 * w1 * v1 ^2* l ) /(2* g * d ) ) ) /144
v2 = p * v1 / p2
//RESULTS
printf ( p r e s s u r e = %. 1 f l b / i n 2 , p2 )
printf ( \n v e l o c i t y = %. 1 f f t / s e c , v2 )
// The a n s w e r i s a b i t d i f f e r e n t due t o r o u n d i n g o f f
error in textbook

91

You might also like