Hydraulics Made Easy R. S. Digh - Bilinmiyor
Hydraulics Made Easy R. S. Digh - Bilinmiyor
Created by
Kvp Pradeep
Chemical engineering
Chemical Engineering
IIT Bombay
College Teacher
Na
Cross-Checked by
Lavitha Pereira
Author: R. S. Dighe
Edition: 1
Year: 2005
ISBN: 0415250706
1
Scilab numbering policy used in this document and the relation to 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.
2
Contents
1 Hydrostatics 5
3 Flow of Water 23
8 Impact of Jets 82
9 Viscous flow 89
10 Miscellaneous Problems 93
3
List of Scilab Codes
4
Exa 2.9 example 9 . . . . . . . . . . . . . . . . . . . 20
Exa 2.10 example 10 . . . . . . . . . . . . . . . . . . 21
Exa 2.11 example 11 . . . . . . . . . . . . . . . . . . 22
Exa 3.1 example 1 . . . . . . . . . . . . . . . . . . . 23
Exa 3.2 example 2 . . . . . . . . . . . . . . . . . . . 23
Exa 3.3 example 3 . . . . . . . . . . . . . . . . . . . 24
Exa 3.4 example 4 . . . . . . . . . . . . . . . . . . . 25
Exa 3.5 example 5 . . . . . . . . . . . . . . . . . . . 25
Exa 3.6 example 6 . . . . . . . . . . . . . . . . . . . 26
Exa 3.7 example 7 . . . . . . . . . . . . . . . . . . . 26
Exa 3.8 example 8 . . . . . . . . . . . . . . . . . . . 27
Exa 3.9 example 9 . . . . . . . . . . . . . . . . . . . 27
Exa 3.10 example 10 . . . . . . . . . . . . . . . . . . 28
Exa 3.12 example 12 . . . . . . . . . . . . . . . . . . 29
Exa 4.1 chapter 4 example 1 . . . . . . . . . . . . . 30
Exa 4.2 chapter 4 example 2 . . . . . . . . . . . . . 31
Exa 4.3 chapter 4 example 3 . . . . . . . . . . . . . 32
Exa 4.4 chapter 4 example 4 . . . . . . . . . . . . . 32
Exa 4.5 chapter 4 example 5 . . . . . . . . . . . . . 33
Exa 4.6 chapter 4 example 6 . . . . . . . . . . . . . 33
Exa 4.7 example 7 . . . . . . . . . . . . . . . . . . . 34
Exa 4.8 chapter 4 example 8 . . . . . . . . . . . . . 34
Exa 4.9 example 9 . . . . . . . . . . . . . . . . . . . 35
Exa 4.10 example 10 . . . . . . . . . . . . . . . . . . 35
Exa 4.11 example 11 . . . . . . . . . . . . . . . . . . 36
Exa 4.12 chapter 4 example 12 . . . . . . . . . . . . . 37
Exa 4.13 chapter 4 example 13 . . . . . . . . . . . . . 37
Exa 4.14 chapter 4 example 14 . . . . . . . . . . . . . 38
Exa 4.15 example 15 . . . . . . . . . . . . . . . . . . 38
Exa 4.16 example 16 . . . . . . . . . . . . . . . . . . 39
Exa 4.17 example 17 . . . . . . . . . . . . . . . . . . 39
Exa 4.18 example 18 . . . . . . . . . . . . . . . . . . 40
Exa 4.19 example 19 . . . . . . . . . . . . . . . . . . 40
Exa 4.20 example 20 . . . . . . . . . . . . . . . . . . 41
Exa 4.21 example 21 . . . . . . . . . . . . . . . . . . 41
Exa 5.1 chapter 5 example 1 . . . . . . . . . . . . . 43
Exa 5.2 example 2 . . . . . . . . . . . . . . . . . . . 43
Exa 5.3 chapter 5 example 3 . . . . . . . . . . . . . 44
5
Exa 5.4 chapter 5 example 4 . . . . . . . . . . . . . 44
Exa 5.5 chapter 5 example 5 . . . . . . . . . . . . . 45
Exa 5.6 chapter 5 example 6 . . . . . . . . . . . . . 45
Exa 5.7 chapter 5 example 7 . . . . . . . . . . . . . 46
Exa 5.8 example 1 . . . . . . . . . . . . . . . . . . . 46
Exa 5.9 example 9 . . . . . . . . . . . . . . . . . . . 47
Exa 5.10 example 10 . . . . . . . . . . . . . . . . . . 48
Exa 5.11 example 11 . . . . . . . . . . . . . . . . . . 48
Exa 5.12 example 12 . . . . . . . . . . . . . . . . . . 49
Exa 5.13 example 13 . . . . . . . . . . . . . . . . . . 49
Exa 5.14 example 14 . . . . . . . . . . . . . . . . . . 50
Exa 5.16 example 16 . . . . . . . . . . . . . . . . . . 50
Exa 6.1 chapter 6 example 1 . . . . . . . . . . . . . 52
Exa 6.2 chapter 6 example 2 . . . . . . . . . . . . . 52
Exa 6.3 chapter 6 example 3 . . . . . . . . . . . . . 53
Exa 6.4 chapter 6 example 4 . . . . . . . . . . . . . 53
Exa 6.5 chapter 6 example 5 . . . . . . . . . . . . . 54
Exa 6.6 example 6 . . . . . . . . . . . . . . . . . . . 55
Exa 6.7 example 7 . . . . . . . . . . . . . . . . . . . 55
Exa 6.8 example 8 . . . . . . . . . . . . . . . . . . . 56
Exa 6.9 example 9 . . . . . . . . . . . . . . . . . . . 57
Exa 6.10 example 10 . . . . . . . . . . . . . . . . . . 57
Exa 6.11 example 11 . . . . . . . . . . . . . . . . . . 58
Exa 6.12 example 12 . . . . . . . . . . . . . . . . . . 59
Exa 6.13 example 13 . . . . . . . . . . . . . . . . . . 59
Exa 6.14 example 14 . . . . . . . . . . . . . . . . . . 60
Exa 6.15 example 15 . . . . . . . . . . . . . . . . . . 60
Exa 6.16 example 16 . . . . . . . . . . . . . . . . . . 61
Exa 6.17 example 17 . . . . . . . . . . . . . . . . . . 61
Exa 6.19 example 19 . . . . . . . . . . . . . . . . . . 62
Exa 6.20 example 20 . . . . . . . . . . . . . . . . . . 63
Exa 6.21 example 21 . . . . . . . . . . . . . . . . . . 63
Exa 6.22 example 22 . . . . . . . . . . . . . . . . . . 64
Exa 6.23 example 23 . . . . . . . . . . . . . . . . . . 64
Exa 6.24 example 24 . . . . . . . . . . . . . . . . . . 65
Exa 6.25 example 25 . . . . . . . . . . . . . . . . . . 65
Exa 6.26 example 26 . . . . . . . . . . . . . . . . . . 66
Exa 6.27 example 27 . . . . . . . . . . . . . . . . . . 66
6
Exa 6.28 example 28 . . . . . . . . . . . . . . . . . . 67
Exa 6.29 example 29 . . . . . . . . . . . . . . . . . . 68
Exa 6.30 example 30 . . . . . . . . . . . . . . . . . . 68
Exa 6.31 example 31 . . . . . . . . . . . . . . . . . . 69
Exa 6.32 example 32 . . . . . . . . . . . . . . . . . . 69
Exa 6.33 example 33 . . . . . . . . . . . . . . . . . . 70
Exa 7.1 chapter 7 example 1 . . . . . . . . . . . . . 72
Exa 7.2 example 2 . . . . . . . . . . . . . . . . . . . 72
Exa 7.3 example 3 . . . . . . . . . . . . . . . . . . . 73
Exa 7.4 chapter 7 example 4 . . . . . . . . . . . . . 74
Exa 7.5 example 5 . . . . . . . . . . . . . . . . . . . 74
Exa 7.6 example 6 . . . . . . . . . . . . . . . . . . . 75
Exa 7.7 example 7 . . . . . . . . . . . . . . . . . . . 76
Exa 7.8 example 8 . . . . . . . . . . . . . . . . . . . 76
Exa 7.9 example 9 . . . . . . . . . . . . . . . . . . . 77
Exa 7.10 example 10 . . . . . . . . . . . . . . . . . . 77
Exa 7.11 example 11 . . . . . . . . . . . . . . . . . . 78
Exa 7.13 example 13 . . . . . . . . . . . . . . . . . . 78
Exa 7.14 example 14 . . . . . . . . . . . . . . . . . . 79
Exa 7.15 example 15 . . . . . . . . . . . . . . . . . . 79
Exa 7.16 example 16 . . . . . . . . . . . . . . . . . . 80
Exa 7.17 example 17 . . . . . . . . . . . . . . . . . . 81
Exa 8.1 chapter 8 example 1 . . . . . . . . . . . . . 82
Exa 8.2 chapter 8 example 2 . . . . . . . . . . . . . 82
Exa 8.3 chapter 8 example 3 . . . . . . . . . . . . . 83
Exa 8.4 chapter 8 example 4 . . . . . . . . . . . . . 83
Exa 8.5 chapter 8 example 5 . . . . . . . . . . . . . 84
Exa 8.6 chapter 8 example 6 . . . . . . . . . . . . . 84
Exa 8.7 chapter 8 example 7 . . . . . . . . . . . . . 85
Exa 8.8 example 8 . . . . . . . . . . . . . . . . . . . 86
Exa 8.9 example 9 . . . . . . . . . . . . . . . . . . . 86
Exa 8.10 example 10 . . . . . . . . . . . . . . . . . . 87
Exa 8.11 example 11 . . . . . . . . . . . . . . . . . . 87
Exa 8.12 example 12 . . . . . . . . . . . . . . . . . . 88
Exa 9.1 chapter 9 example 1 . . . . . . . . . . . . . 89
Exa 9.2 chapter 9 example 2 . . . . . . . . . . . . . 89
Exa 9.3 chapter 9 example 3 . . . . . . . . . . . . . 90
Exa 9.4 chapter 9 example 4 . . . . . . . . . . . . . 91
7
Exa 9.5 chapter 9 example 5 . . . . . . . . . . . . . 91
Exa 10.1 example 1 . . . . . . . . . . . . . . . . . . . 93
Exa 10.2 chapter 10 example 2 . . . . . . . . . . . . . 94
Exa 10.3 chapter 10 example 3 . . . . . . . . . . . . . 94
Exa 10.4 chapter 10 example 4 . . . . . . . . . . . . . 95
Exa 10.5 example 5 . . . . . . . . . . . . . . . . . . . 95
Exa 10.6 chapter 10 example 6 . . . . . . . . . . . . . 96
Exa 10.7 chapter 10 example 7 . . . . . . . . . . . . . 96
Exa 10.8 chapter 10 example 8 . . . . . . . . . . . . . 97
Exa 10.9 example 9 . . . . . . . . . . . . . . . . . . . 98
Exa 10.10 example 10 . . . . . . . . . . . . . . . . . . 98
8
Chapter 1
Hydrostatics
1 clc
2 // 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
3 Ar = 50 // i n ˆ2
4 Ap = 1/8 // i n ˆ2
5 Wp = 5 // l b s
6 //CALCULATIONS
7 Pp = Wp / Ap
8 F = Pp * Ar
9 //RESULTS
10 printf ( ’ w e i g h t s u p p o r t e d by ram = %. f l b s ’ ,F )
1 clc
2 // 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
3 Dp = 1 // i n
4 Dr = 10 // i n
5 R = 12
9
6 W = 15 // t o n s
7 //CALCULATIONS
8 Ar = %pi * Dr ^2/4
9 Ap = %pi * Dp ^2/4
10 P = W *2240/(( Ar / Ap ) * R )
11 //RESULTS
12 printf ( ’ power a p p l i e d t o l e v e r = %. f l b s ’ ,P )
1 clc
2 // 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
3 Dj = 1 // i n
4 Dr = 2 // i n
5 W = 40 // l b s
6 W1 = 1 // t o n
7 rl = 20
8 //CALCULATIONS
9 Ap = %pi * Dj ^2/4
10 Ar = %pi * Dr ^2/4
11 Vrj = rl * Ar / Ap
12 e = W1 *2240*100/( W * Vrj )
13 //RESULTS
14 printf ( ’ e f f i c i e n c y o f machine a t t h i s l o a d = %. f
p e r c e n t ’ ,e )
1 clc
2 // 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
3 Dj = 1 // i n
4 Dr = 2 // i n
5 ns = 3 // s t r o k e s
10
6 h = 2 // f t
7 //CALCULATIONS
8 Ap = %pi * Dj ^2/4
9 Ar = %pi * Dr ^2/4
10 Vrj = Ar / Ap
11 ns1 = h *12* Vrj / ns
12 //RESULTS
13 printf ( ’ w o r k i n g s t r o k e s = %. f s t r o k e s ’ , ns1 )
1 clc
2 // 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
3 T = 40 //F
4 w = 62.4 // l b s / f t ˆ3
5 h = 50 // f t
6 //CALCULATIONS
7 p = w * h /(12^2)
8 //RESULTS
9 printf ( ’ p r e s s u r e a t a d e p t h o f 50 f t = %. 2 f l b s
p e r i n ’ ,p )
1 clc
2 // 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
3 W = 64 // l b s / f t ˆ3
4 h1 = 27 // f t
5 h2 = 9 // f t
6 w = 40 // f t
7 //CALCULATIONS
8 Pr = w * W * h1 * h1 /2
9 Pl = w * W * h2 * h2 /2
11
10 y1 = h1 /3
11 y2 = h2 /3
12 y = ( Pr * y1 - Pl * y2 ) /( Pr - Pl )
13 //RESULTS
14 printf ( ’ p o i n t o f a p p l i c a t i o n = %. 2 f f t ’ ,y )
1 clc
2 // 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
3 d = 5 // f t
4 x = 3 // f t
5 w = 62.4 // l b / f t ˆ3
6 a = 90 // d e g r e e s
7 //CALCULATIONS
8 h = (( %pi * d ^4/64) +( x ^2* %pi * d ^2/4) ) /( %pi * d ^2* x /4)
9 //RESULTS
10 printf ( ’ d e p t h o f t h e p r e s s u r e= %. 2 f f t ’ ,h )
1 clc
2 // 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
3 w = 3 // f t
4 h = 4 // f t
5 ht = 30 // f t
6 W = 62.4 // f t ˆ3
7 //CALCULATIONS
8 Ap = w * h
9 X = ht +( h /2)
10 P = Ap * X * W
11 I0 = ( w * h ^3/12) + Ap * X ^2
12 H = I0 /( Ap * X )
12
13 //RESULTS
14 printf ( ’ t o t a l p r e s s u r e on t h e g a t e = %. 2 f f t ’ ,H )
1 clc
2 // 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
3 w = 3 // f t
4 h = 4 // f t
5 ht = 30 // f t
6 W = 62.4 // f t ˆ3
7 x = 2.22 // i n
8 x1 = 4.5 // i n
9 //CALCULATIONS
10 Ap = w * h
11 X = ht +( h /2)
12 P = Ap * X * W
13 T = P * x / x1
14 T1 = P - T
15 //RESULTS
16 printf ( ’ t e n s i o n d e v o l o p e d i n t h e t o p b o l t = %. f
l b s ’ ,T )
17 printf ( ’ \n t e n s i o n d e v o l o p e d i n t h e bottom b o l t =
%. f l b s ’ , T1 )
1 clc
2 // 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
3 w = 3 // f t
4 h = 15 // f t
5 d = 140 // l b s / f t ˆ3
6 x = 6 // i n
13
7 W = 62.4 // l b s / f t ˆ3
8 //CALCULATIONS
9 W1 = h * w * d
10 h = ( W1 * x *6/( W *12) ) ^(1/3)
11 //RESULTS
12 printf ( ’ h e i g h t o f w a t e r r i s e = %. 2 f f t ’ ,h )
1 clc
2 // 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
3 h = 5 // f t
4 d = 6 // f t
5 a = 30 // d e g r e e s
6 w = 62.4 // l b s / f t ˆ3
7 //CALCULATIONS
8 A = %pi * d ^2/4
9 X = h +( d /2) * sind ( a )
10 P= w*A*X
11 Ic = %pi * d ^4/64
12 I0 = Ic + A * X ^2/( sind ( a ) ) ^2
13 h = I0 *( sind ( a ) ) ^2/( A * X )
14 //CALCULATIONS
15 printf ( ’ d e p t h o f t h e c e n t r e o s p r e s s u r e= %. 2 f f t ’,
h)
1 clc
2 // 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
3 w = 4 // f t
4 l = 4 // f t
5 X = 10 // f t
14
6 a = 45 // d e g r e e s
7 W = 100 // l b s
8 a1 = 60 // d e g r e e s
9 w1 = 62.4 // l b s / f t ˆ3
10 //CALCULATIONS
11 A= w*l
12 X1 = X +( w /2) * sind ( a )
13 Ig = w * l ^3/12
14 I0 = Ig +( A * X1 ^2/( sind ( a ) ) ^2)
15 h = I0 *( sind ( a ) ) ^2/( A * X1 )
16 P = w1 * A * X1
17 h1 = h - X
18 h2 = h1 / sind ( a )
19 T = ( W *( l /2) * sind ( a ) + P * h2 ) /( w * sind ( a1 ) )
20 //RESULTS
21 printf ( ’ P u l l i n t h e c h a i n= %. f l b s ’ ,T )
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 w = 4 // f t
5 l = 4 // f t
6 X = 10 // f t
7 a = 45 // d e g r e e s
8 W = 62.4 // l b s / f t ˆ3
9 u = 0.25
10 //CALCULATIONS
11 A= w*l
12 X1 = X +( w /2) * sind ( a )
13 P = W * A * X1
14 T= u*P
15 //RESULTS
16 printf ( ’ m a g n i t u d e o f t h e l i f t i n g f o r c e = %. f l b s ’ ,T
15
)
1 clc
2 // 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
3 w = 62.4 // l b s / f t ˆ3
4 sg = 1.6
5 h = 10 // f t
6 h1 = 4 // f t
7 //CALCULATIONS
8 D = w * sg
9 W = w *( h + h1 ) ^2/2
10 P= w*h
11 P1 = D * h1
12 P2 = ( P * h /2) + P * h1 +( h1 * P1 /2)
13 y = (( P * h *( h1 +( h /3) ) /2) + P * h1 *( h1 /2) + P1 * h1 ^2/6) / P2
14 //RESULTS
15 printf ( ’ P o s i t i o n where P a c t s= %. 1 f f t a b o v e t h e
b a s e ’ ,y )
1 clc
2 // 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
3 pa = 10 // l b s / i n ˆ2
4 h = 8 // f t
5 h1 = 6 // f t
6 w = 62.4 // l b s / f t ˆ3
7 pg = 10 // l b s / i n ˆ2
8 //CALCULATIONS
9 Pa = pa *144
10 Pa1 = w * h1
16
11 Pt = ( Pa * h + Pa1 *( h1 /2) )
12 y = ( Pa * h *( h /2) +( Pa1 * h1 *( h - h1 ) /2) ) / Pt
13 //RESULTS
14 printf ( ’ Depth o f t h e c e n t r e o f p r e s s u r e= %. 2 f ft
from t h e b a s e ’ ,y )
1 clc
2 // 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
3 d = 4 // f t
4 h = 6 // i n
5 //CALCULATIONS
6 A = %pi * d ^2/4
7 X = (h - d )
8 I0 = ( %pi * d ^4/64) +4* %pi *( X ) ^2
9 h1 = I0 /( A * X )
10 h2 = d - h1
11 //RESULTS
12 printf ( ’ Depth o f t h e a x i s be p l a c e d i n o r d e r= %. 1 f
f t ’ , h2 )
1 clc
2 // 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
3 h = 10 // f t
4 //CALCULATIONS
5 x = sqrt ( h ^2/2)
6 //RESULTS
7 printf ( ’ Depth o f t h e a x i s be p l a c e d i n o r d e r= %. 2 f
ft ’ ,x )
17
Scilab code Exa 1.18 example 18
1 clc
2 // 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
3 h = 8 // f t
4 h1 = 10 // f t
5 //CALCULATIONS
6 A= h
7 X = ( h1 /2)
8 Ig = h ^3/12
9 I0 = Ig + A * X ^2
10 h2 = I0 /( A * X )
11 //RESULTS
12 printf ( ’ d e p t h a t which t h e h i n g e o f t h e s h u t t e r= %
. 2 f f t ’ , h2 )
1 clc
2 // 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
3 k1 = 1 // f t
4 k2 = 35.98 // f t
5 k3 = 66.83 // f t
6 //CALCULATIONS
7 x = poly (0 , ” x ” )
8 vec = roots ( k1 * x ^3 - k2 * x + k3 )
9 X = vec (2)
10 //RESULTS
11 printf ( ’ d e p t h o f t h e w a t e r= %. 2 f f t ’ ,X )
18
Scilab code Exa 1.22 example 22
1 clc
2 // 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
3 d = 8 // f t
4 d1 = 2 // f t
5 h = 4 // f t
6 h1 = 2 // f t
7 w = 62.4 // l b s / f t ˆ3
8 //CALCULATIONS
9 A1 = %pi * d ^2/4
10 A2 = %pi * d1 ^2/4
11 A = A1 - A2
12 x = ( A1 *d - A2 *( d +h - h1 ) ) / A
13 P= w*A*x
14 Ig = (( %pi * d ^4/64) +( A1 *( d - x ) ^2) ) -(( %pi * d1 ^4/64) +( A2 *(
h1 +d - x ) ^2) )
15 h2 = ( Ig /( A * x ) ) + x
16 //RESULTS
17 printf ( ’ d e p t h o f t h e c e n t r e o f t h e p r e s s u r e= %. 1 f
f t ’ , h2 )
1 clc
2 // 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
3 W = 62.4 // l b s / f t ˆ3
4 a = 140 // d e g r e e s
5 h = 20 // f t
6 w = 6 // f t
7 h1 = 17 // f t
8 h2 = 5 // f t
9 //CALCULATIONS
10 P1 = W * h1 ^2* w /2
11 P2 = W * h2 ^2* w /2
19
12 P = P1 - P2
13 y = ( P1 *( h1 /3) - P2 *( h2 /3) ) / P
14 R = P /(2* sind ((180 - a ) /2) )
15 Rt = y * R / h
16 Rb = R - Rt
17 //RESULTS
18 printf ( ’ Rt= %. f l b s ’ , Rt )
19 printf ( ’ \n Rb= %. f l b s ’ , Rb )
1 clc
2 // 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
3 w = 64 // l b s / f t ˆ3
4 h = 12 // f t
5 l = 9 // f t
6 a = 45 // d e g r e e s
7 //CALCULATIONS
8 P = w * h ^2/2
9 h1 = h /3
10 Rb = P * h1 / l
11 Ra = P - Rb
12 Wh = Rb * h1
13 T = Wh / sind ( a )
14 //RESULTS
15 printf ( ’ Load on t h e s t r u t= %. f l b s ’ ,T )
1 clc
2 // i n i t i a l i s a t i o n o f variables
3 w = 62.4 // l b s / f t ˆ3
4 h = 9 // f t
20
5 l = 10 // f t
6 //CALCULATIONS
7 P = w * h ^2/2
8 h1 = h /3
9 Ra = P /2
10 x = ( w *4* h ^2/9) / Ra
11 x1 = x +( h /3)
12 hb = h1 - x
13 W = Ra * l
14 //RESULTS
15 printf ( ’ m a g n i t u d e od t o t a l i n e a c h beam= %. f l b s ’,
W)
21
Chapter 2
1 clc
2 // 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
3 l = 60 // f t
4 w = 10 // f t
5 h = 5 // f t
6 t = 3/16 // i n
7 sp = 7.75
8 H = 4 // f t
9 w1 = 62.4 // l b / f t ˆ3
10 y = 4 // f t
11 //CALCULATIONS
12 V = ( l * w +2* w * h +2* l * h ) * t /12
13 W = V * w1 * sp
14 x = W /( w1 * l * w )
15 W1 = H * l * w * w1
16 dW = ( W1 - W ) /2238
17 //RESULTS
18 printf ( ’ w e i g h t o f w a t e r d i s p l a c e d= %. 1 f t o n s ’ , dW )
22
Scilab code Exa 2.3 example 3
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 D = 64 // l b / f t ˆ3
5 d = 6 // f t
6 l = 10 // f t
7 W = 2 // t o n s
8 //CALCULATIONS
9 V = W *2240/ D
10 h = V /( %pi * d ^2/4)
11 BM = d ^2/(16* h )
12 P = -( sqrt (64* BM *2*10* %pi *(22400 - %pi * d ^4) ) -W *22400)
/10
13 //RESULTS
14 printf ( ’ Minimum p u l l r e q u i r e d= %. f l b s ’ ,P +3)
1 clc
2 // 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
3 sg = 7
4 sg1 = 5
5 d = 8 // i n
6 t = 1 // i n
7 //CALCULATIONS
8 x = ( sg + sg1 ) + sqrt ( d *( sg *( sg1 + t ) +1) )
9 //RESULTS
10 printf ( ’ maximum l e n g t h o f c y l i n d e r= %. 2 f i n ’ ,x )
23
1 clc
2 // 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
3 W = 2000 // t o n s
4 m = 15 // / t o n s
5 dx = 24 // f t
6 l = 3 // i n
7 dx1 = 5 // f t
8 //CALCULATIONS
9 GM = m * dx /( W *( l /( dx1 *12) ) )
10 //RESULTSS
11 printf ( ’ m e t a c e n t r i c h e i g h t= %. 1 f f t ’ , GM )
1 clc
2 // 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
3 M = 350 // t o n s
4 l = 50 // f t
5 w = 20 // f t
6 W = 100 // t o n s
7 h = 6 // f t
8 M1 = 250 // t o n s
9 //CALCULATIONS
10 V = M *2240/64
11 d = V /( l * w )
12 BM = l * w ^3/(12* w * l * d )
13 y = ((( BM +( d /2) ) *( M /10) ) -( M1 * h /10) ) /( W /10)
14 //RESULTS
15 printf ( ’ H i g h e s t p o s i t i o n o f c e n t r e o f g r a v i t y= %. 2 f
f t ’ ,y )
24
1 clc
2 // 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
3 W = 2000 // t o n s
4 l = 250 // f t
5 w = 30 // f t
6 a = 1/15
7 W1 = 50 // t o n s
8 h = 10 // f t
9 //CALCULATIONS
10 BG = ( l * w ^3*64/( W *2240*12) ) -( W1 * h /( a * W ) )
11 //RESULTS
12 printf ( ’ d i s t a n c e o f t h e c e n t r e o f g r a v i t y= %. 2 f f t
’ , BG )
1 clc
2 // 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
3 l = 91 // f t
4 w = 30 // f t
5 h = 6 // f t
6 W = 40 // t o n s
7 a = 3 // d e g r e e s
8 cg = 3 // f t
9 d = 4 // f t
10 W1 = 60 // t o n s
11 cg1 = 1 // f t
12 //CALCULATIONS
13 W2 = ( l * w * d *64/2240) - W1
14 y = ( W2 *( h /2) + W1 *( cg + d ) ) /( l * w * d *64/2240)
15 BG = y -( d /2)
16 BM = l * w ^3/(12* l * w * d )
17 GM = BM - BG
18 dx = GM * l * w * d *64* tand ( a ) /(60*2240)
19 //RESULTS
25
20 printf ( ’ maximum d i s t a n c e t h r o u g h which t h e l o a d can
be s h i f t e d = %. 1 f f t ’ , dx )
1 clc
2 // 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
3 W = 5000 // t o n s
4 I = 1.4*10^6 // f t ˆ4
5 k = 12.2 // f t
6 BG = 6.5 // f t
7 //CALCULATIONS
8 BM = I *64/( W *2240)
9 GM = BM - BG
10 T = 2* %pi * sqrt ( k ^2/( GM *32.2) )
11 //RESULTS
12 printf ( ’ p e r i o d o f o s c i a l l t i o n = %. 2 f s e c ’ ,T )
26
Chapter 3
Flow of Water
1 clc
2 // 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
3 d1 = 1 // f t
4 d2 = 6 // i n
5 h1 = 5 // f t
6 h2 = 15 // f t
7 Pa = 15 // l b s
8 v1 = 10 // f t / s e c
9 w = 62.4 // l b s / f t ˆ3
10 g = 32.2 // f t / s e c ˆ2
11 //CALCULATIONS
12 v2 = v1 /( d2 /12) ^2
13 Pb = ( w *(( Pa +( Pa *144/ w ) +( v1 ^2/(2* g ) ) ) -h1 -( v2 ^2/(2* g ) )
) ) /144
14 //RESULTS
15 printf ( ’ Pb= %. 2 f l b s / i n ˆ2 ’ , Pb )
27
1 clc
2 // 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
3 d1 = 4 // f t
4 d2 = 2 // f t
5 h1 = 50 // f t
6 h2 = 45 // f t
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 r = ( d1 ^2/ d2 ^2)
10 v1 = sqrt (( h1 - h2 ) *2* g /( r ^2 -1) )
11 Q = v1 * %pi * d1 ^2/4
12 //RESULTS
13 printf ( ’ d i s c h a r g e t h r o u g h p i p e= %. 2 f c u b i c f e e t p e r
s e c o n d ’ ,Q )
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 z1 = 10 // /m
5 h1 = 10 //m
6 v1 = 12 // f t / s e c
7 v2 = 4 //m/ s e c
8 k = 0.6
9 w = 62.4 // l b / i n ˆ2
10 g = 32.2 // f t / s e c ˆ2
11 //CALCULATIONS
12 p = ( w /144) *( z1 + h1 +( v1 ^2/(2* g ) ) -( v2 ^2/(2* g ) ) -( k *( v1 -
v2 ) ^2/(2* g ) ) )
13 //RESULTS
14 printf ( ’ p r e s s u r e a t bottom end = %. 2 f l b / i n ˆ2 ’ ,p )
28
Scilab code Exa 3.4 example 4
1 clc
2 // 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
3 d = 4 // f t
4 d1 = 5/4 // f t
5 g = 32.2 // f t / s e c ˆ2
6 h = 3 // f t
7 K= 1
8 //CALCULATIONS
9 C = ( %pi /4) * d ^2* sqrt (2* g ) /( sqrt (( d ^2/ d1 ^2) ^2 -1) )
10 Q = K * sqrt ( h ) * C
11 V = Q /( %pi * d1 ^2/4)
12 //RESULTS
13 printf ( ’ V e l o c i t y a t t h e t h r o a t= %. 2 f f t / s e c ’ ,V )
1 clc
2 // 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
3 d = 9 // i n
4 d1 = 4 // i n
5 g = 32.2 // f t / s e c ˆ2
6 dh = 10 // i n
7 sg = 13.6
8 K= 1
9 //CALCULATIONS
10 C = ((( %pi /4) ^2*( d * d1 ) ^2* sqrt (2* g ) /144^2) /( sqrt (( %pi *
d ^2/12^2) ^2 -( %pi * d1 ^2/12^2) ^2) ) ) +0.52
11 h = ( sg -1) * dh /12
12 Q = K * C * sqrt ( h )
13 //RESULTS
14 printf ( ’ D i s c h a r g e p a s s i n g t h r o u g h t h e p i p e= %. 2 f
c u s e s ’ ,Q )
29
Scilab code Exa 3.6 example 6
1 clc
2 // 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
3 sm = 13.6
4 so = 0.8
5 di = 8 // i n
6 dt = 4 // i n
7 K = 0.98
8 v = 1 // f t
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 s = sm / so
12 dp = v *12*( s -1) /12
13 A = %pi *( di /12) ^2/4
14 At = %pi *( dt /12) ^2/4
15 C = A * sqrt (2* g ) /( sqrt (( A / At ) ^2 -1) )
16 Q = C * sqrt ( v *12+ dt ) * K
17 //RESULTS
18 printf ( ’ D i s c h a r g e p a s s i n g t h r o u g h t h e p i p e= %. 2 f
c u s e s ’ ,Q )
1 clc
2 // 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
3 s = 1/10
4 d1 = 6 // i n
5 d2 = 2 // i n
6 l = 20 // i n
7 p = 15 // l b s / i n ˆ2
8 p1 = 6 // l b s / i n ˆ2
30
9 K = 0.95
10 g = 32.2 // f t / s e c ˆ2
11 //CALCULATIONS
12 H = ( l * s /12) -( p1 *144/(2* g ) ) +( p *144/(2* g ) )
13 C = sqrt (2* g ) *( %pi *( d1 /12) ^2) /(4*( sqrt (( d1 ^2/ d2 ^2)
^2 -1) ) )
14 Q = C * K * sqrt ( H ) *374.7
15 //RESULTS
16 printf ( ’ D i s c h a r g e p a s s i n g t h r o u g h t h e p i p e= %. f
G a l l o n s / m i n u t e ’ ,Q )
1 clc
2 // 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
3 d1 = 12 // i n
4 Q = 4.25 // f t ˆ3/ s e c
5 h = 18 // f t
6 K = 0.98
7 g = 32.2 // f t / s e c ˆ2
8 sm = 13.6
9 //CALCULATIONS
10 R = sqrt (( K * sqrt (2* g ) * sqrt ( h ) *( %pi *( d1 /12) ^2/4) / Q ) +1)
11 d2 = sqrt ( d1 ^2/(144* R ) )
12 dh = ( sm -1) *( h /(12*2) )
13 d3 = Q * sqrt ( dh / h )
14 //RESULTS
15 printf ( ’ D i a m e t e r o f t h e t h r o a t= %. 2 f f t ’ , d3 )
1 clc
2 // i n i t i a l i s a t i o n of variables
31
3 clear
4 R = 4 // i n
5 r = 0.5 // i n
6 c = 0.007
7 K = 33.96
8 w = 62.4 // l b / f t ˆ3
9 pa = 12.13 // l b / i n ˆ2
10 pb = 14.7 // l b / i n ˆ2
11 w1 = 2.5 // l b s
12 Q = 40 // g a l s / min
13 h = 1.86
14 //CALCULATIONS
15 va = Q *4*(2* r *12) ^2/(6* w * %pi )
16 vb = Q *(2* r *12) ^2/(6* w *2* R * %pi *0.32)
17 vx = vb * R /2
18 pu = 2* %pi * w * h
19 pd = pb * %pi * R ^2
20 RP = pb * %pi * R ^2 -2* %pi * w *(0.5* K *(( R /12) ^2 -( r /12) ^2) -c *
log ( R / r ) ) - pa * %pi * r ^2+ w1
21 //RESULTS
22 printf ( ’ v e l o c i t y = %. 1 f f t / s e c ’ , va )
23 printf ( ’ \n v e l o c i t y = %. 2 f f t / s e c ’ , vb )
24 printf ( ’ \n v e l o c i t y = %. 2 f f t / s e c ’ , vx )
25 printf ( ’ \n p r e s s u r e = %. 1 f l b s / i n ˆ2 ’ , pb )
26 printf ( ’ \n upward p r e s s u r e = %. 1 f l b s ’ , pu )
27 printf ( ’ \n downward p r e s s u r e = %. 1 f l b s ’ , pd )
28 printf ( ’ \n R e s u l t a n t p r e s s u r e = %. 1 f l b s ’ , RP )
1
2 clc
3 // i n i t i a l i s a t i o n of variables
4 d = 1 // f t
5 h = 4 // f t
32
6 h1 = 3 // f t
7 p = 25 // p e r c e n t
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 h2 = (( h /4) -( h1 /4) ) * h *2
11 w = sqrt ( h2 *2* g /( d /2) ^2)
12 N = w *60/(2* %pi )
13 h3 = (h - h1 ^2/4) *2
14 w1 = sqrt ( h3 *2* g /( d /2) ^2)
15 N1 = w1 *60/(2* %pi )
16 //RESULTS
17 printf ( ’ o r i g i n a l volume= %. 1 f R . P .M ’ , N1 )
1 clc
2 // 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
3 R2 = 2 // f t
4 R1 = 1 // f t
5 w = 200 // r . p .m
6 g = 32.2 // f t / s e c ˆ2
7 //CALCULATIONS
8 v2 = R2 * %pi * w * R2 /60
9 v1 = R2 * %pi * w * R1 /60
10 H = ( v2 ^2 - v1 ^2) /(2* g )
11 //RESULTS
12 printf ( ’ c e n t r i f u g a l head= %. 1 f f t o f w a t r e r ’ ,H )
33
Chapter 4
1 clc
2 // 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
3 M = 31*10 // l b s
4 P = 3.6 // l b s
5 t = 60 // s e c
6 g = 32.2 // f t / s e c ˆ2
7 H = 9 // f t
8 d = 1 // i n
9 w = 6.24 // g a l l o n s
10 //CALCULATIONS
11 v= P*g*t/M
12 V = sqrt (2* g * H )
13 Cv = v / V
14 V1 = %pi *( d /12) ^2* V *60* w /4
15 Cd = M /(10* V1 )
16 Cc = Cd / Cv
17 Cr = (1/ Cv ^2) -1
18 //RESULTS
19 printf ( ’ C o e f f i c i e n t o f r e s i s t a n c e = %. 2 f ’ , Cr )
34
Scilab code Exa 4.2 chapter 4 example 2
1
2
3 clc
4 // 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
5 M = 1.65 // l b s
6 Q = 20 // g a l l o n s p e r min
7 d = 1 // i n
8 h = 4 // f t
9 t = 60 // s e c
10 g = 32.2 // f t / s e c ˆ2
11 Q1 = 6.24 // g a l l o n s p e r min
12 c = 0.36
13 //CALCULATIONS
14 v = M * g * t /( Q *10)
15 V = sqrt (2* g * h )
16 Cv = ( v / V ) -0.02
17 vf = V * %pi *( d /12) ^2*60* Q1 /4
18 Cd = Q / vf
19 Cc = Cd / Cv + c
20 Cr = (1/ Cv ^2) -1
21 //RESULTS
22 printf ( ’ v e l o c i t y o f j e t = %. 2 f f t / s e c ’ ,v )
23 printf ( ’ \n t h e a t r i c a l v e l o c i t y o f j e t = %. 2 f f t / s e c
’ ,V )
24 printf ( ’ \n Cv = %. 2 f ’ , Cv )
25 printf ( ’ \n volume f l o w = %. 2 f g a l l o n s p e r m i n u t e ’ ,
vf )
26 printf ( ’ \n Cd = %. 2 f ’ , Cd )
27 printf ( ’ \n Cc = %. 2 f ’ , Cc )
28 printf ( ’ \n C o e f f i c i e n t o f r e s i s t a n c e = %. 2 f ’ , Cr )
35
Scilab code Exa 4.3 chapter 4 example 3
1 clc
2 // 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
3 x = 11.5 // i n
4 y = 1.2 // i n
5 H = 29 // i n
6 q = 6.24 // g a l l o n s p e r m i n u t e
7 d = 1 // i n
8 g = 32.2 // f t / s e c ˆ2
9 Q = 16 // g a l l o n s p e r min
10 //CALCULATIONS
11 Cv = sqrt ( x ^2/(4* H * y ) )
12 Q1 = %pi *( d /12) ^2* sqrt (2* g * H /12) * q *60/4
13 Cd = Q / Q1
14 Cc = Cd / Cv
15 Cr = (1/ Cv ^2) -1
16 //RESULTS
17 printf ( ’ C o e f f i c i e n t o f r e s i s t a n c e = %. 2 f ’ , Cr )
1 clc
2 // 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
3 x = 3.2 // f t
4 d = 8 // f t
5 W = 5.12 // l b
6 A = 1/144
7 H = 4 // f t
8 g = 32.2 // f t / s e c ˆ2
9 Q = 251.5 // l b s / min
10 w = 62.4 // l b s / f t ˆ2
36
11 //CALCULATIONS
12 F= W*x/d
13 v = W * x * g *60/( d * Q )
14 V = sqrt (2* g * H )
15 Cv = v / V
16 Q1 = A * V *60* w
17 Cd = Q / Q1
18 Cc = Cd / Cv
19 //RESULTS
20 printf ( ’ Cc = %. 2 f ’ , Cc )
1 clc
2 // 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
3 d = 8 // i n
4 //CALCULATIONS
5 Cd = 1/ sqrt (1+((1/(8^2/100) ) ) -1)
6 //RESULTS
7 printf ( ’ Cd = %. 2 f ’ , Cd )
1 clc
2 // 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
3 d =2 // i n
4 h = 6 // f t
5 H = 26 // f t
6 g = 32.2 // f t / s e c ˆ2
7 R= 6
8 //CALCULATIONS
9 v2 = sqrt (2* g *( H + h ) )
10 Q = %pi *( d /12) ^2* v2 /4
37
11 v3 = sqrt (2* g * h )
12 r = v2 / v3
13 d3 = sqrt ( r * d ^2)
14 v4 = sqrt ( v2 ^2/ R )
15 d4 = sqrt ( d ^2*( v2 / v4 ) )
16 //RESULTS
17 printf ( ’ d i a m e t e r = %. 2 f i n ’ , d4 )
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 r = 9/16
5 r1 = 7/16
6 h = 26 // f t
7 //CALCULATIONS
8 r2 = 1/(( r ^2) +(0.25* r1 ^2) )
9 H1 = h /( r2 -1)
10 //RESULTS
11 printf ( ’ maximu head o f t h e t a n k = %. 2 f f t o f w a t e r ’
, H1 )
1 clc
2 // 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
3 l = 30 // f t
4 w = 15 // f t
5 A = 2 // s q f t
6 H1 = 5 // f t
7 H2 = 0 // f t
8 Cd =0.62
38
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 T = 2* l * w *( sqrt ( H1 ) ) /( Cd * A * sqrt (2* g ) )
12 // r e s u l t s
13 printf ( ’ Time t a k e n f o r 5 f e e t f a l l = %. 1 f s e c ’ ,T )
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 H1 = 9 // f t
5 A = 2 // f t ˆ2
6 H2 = 4 // f t
7 d = 2.25 // i n
8 t = 60 // s e c
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 a = ( d /12) ^2
12 Cd = ( A * H2 *( H2 - A ) ) /( t * a * sqrt (2* g ) )
13 //RESULTS
14 printf ( ’ c o e f f i c i e n t o f d i c h a r g e = %. 3 f ’ ,a )
15
16
17 //ANSWER GIVEN IN THE TEXTBBOK I S WRONG. . VERIFIED
WITH CALCULATOR
1
2 clc
3 // i n i t i a l i s a t i o n of variables
4 d = 1 // f t
39
5 h1 = 10 // f t
6 h2 = 2 // f t
7 Cd = 0.6
8 g = 32.2 // f t / s e c ˆ2
9 t = 12.6
10 //CALCULATIONS
11 A = %pi * d ^2/4
12 a = 1/144
13 T1 = ( A /( a * Cd * sqrt (2* g ) ) ) *(1/3) *( h1 ^1.5 -( h1 - h2 ) ^1.5 -
h2 ^1.5) + t
14 T2 = 2* A *( h2 ^0.5) /( Cd * a * sqrt (2* g ) )
15 T = T1 + T2
16 //RESULTS
17 printf ( ’ T o t a l t i m e = %. 2 f s e c ’ ,T )
1 clc
2 // 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
3 l = 600 // f t
4 w = 400 // f t
5 s= 1
6 h = 20 // f t
7 d = 3 // f t
8 dh = 10 // f t
9 Cd = 0.7
10 g = 32.2 // f t / s e c ˆ2
11 k = 240000
12 k1 = 2000
13 k2 = 4
14 //CALCULATIONS
15 T = (4/( Cd * %pi * d ^2* sqrt (2* g ) ) ) *(2* k *( sqrt ( h ) - sqrt ( dh )
) + k1 *(2/3) *( h ^1.5 - dh ^1.5) +4*0.4*( h ^2.5 - dh ^2.5) )
16 //RESULTS
17 printf ( ’ Time t a k e n f o r 10 f e e t f a l l = %. f s e c ’ ,T )
40
Scilab code Exa 4.12 chapter 4 example 12
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 Cd = 0.6
5 H1 = 8 // f t
6 H2 = 3 // f t
7 l = 90 // f t
8 b = 30 // f t
9 g = 32.2 // f t / s e c ˆ2
10 A = 2 // f t ˆ2
11 //CALCULATIONS
12 T1 = 2* l * b *( H1 ^0.5 -( H1 - H2 ) ^0.5) /( Cd * sqrt (2* g ) * A )
13 T2 = ( l * b *2/10) *(2/3) *( H1 - H2 ) ^1.5/( Cd * sqrt (2* g ) * A )
14 T = T1 + T2
15 //RESULTS
16 printf ( ’ Time i t t a k e t o e m p t i f y t h e swimming b a t h =
%. 1 f s e c ’ ,T )
1 clc
2 // 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
3 Cd = 0.8
4 g = 32.2 // f / s e c ˆ2
5 d = 3 // i n
6 x = 6 // f t
7 l = 25 // f t
8 d1 = 8 // f t
9 //CALCULATIONS
41
10 A = %pi *( d /12) ^2/4
11 T = (2* l /( Cd * A * sqrt (2* g ) ) ) *( -2/3) *(( d1 - x ) ^1.5 - d1 ^1.5)
12 //RESULTS
13 printf ( ’ Time i t t a k e t o e m p t i f y t h e b o i l e r = %. f
s e c ’ ,T +6)
1 clc
2 // 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
3 l = 30 // f t
4 w = 10 // f t
5 d = 4 // i n
6 h = 10 // f t
7 dh = 2 // f t
8 Cd = 0.97
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 A1 = w *3* l /4
12 A2 = l * w /4
13 A = %pi *( d /12) ^2/4
14 T = 2* A1 *( sqrt ( h ) - sqrt ( dh ) ) *10/( Cd * A * sqrt (2* g ) *( l + w ) )
15 //RESULTS
16 printf ( ’ Time i t t a k e t o r e d u c e t h e h e i g h t = %. f s e c
’ ,T )
1 clc
2 // 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
3 A1 = 1000 // f t ˆ2
4 A2 = 1000 // f t ˆ2
5 a = 2 // f t ˆ2
42
6 H1 = 9 // f t
7 H2 = 4 // f t
8 Cd =0.8
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 T = a *1000*( sqrt ( H1 ) - sqrt ( H2 ) ) /( Cd * a ^2* sqrt (2* g ) )
12 //RESULTS
13 printf ( ’ Time i t t a k e t o r e d u c e t h e h e i g h t = %. 2 f
s e c ’ ,T )
1 clc
2 // 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
3 l = 70 // f t
4 b = 10 // f t
5 Hl = 10 // f t
6 H1 = 6 // f t
7 h1 = 4 // f t
8 h2 = 2 // f t
9 w = 2 // f t
10 h3 = 3 // f t
11 Cd = 0.6
12 g = 32.2 // f t / s e c ˆ2
13 //CALCULATIONS
14 t = ( l * b ) *( Hl + H1 ) /( Cd * h2 * w * h1 * sqrt (2* g * H1 ) )
15 t1 = 2* l * b * sqrt ( Hl ) /( Cd * h2 * w * h3 * sqrt (2* g ) )
16 //RESULTS
17 printf ( ’ Time o f f i l l i n g = %. 2 f s e c ’ ,t )
18 printf ( ’ \n Time o f e m p t y i n g= %. 2 f s e c ’ , t1 )
43
1 clc
2 // 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
3 HL = 12.5 // f t
4 H1 = 10.5 // f t
5 Cd = 0.62
6 h = 4 // f t
7 l = 3 // f t
8 n= 2
9 t = 5 // min
10 g = 32.2 // f t / s e c ˆ2
11 //CALCULATIONS
12 a1 = n * l * l
13 A = t *60*( Cd * a1 * sqrt (2* g ) + Cd * a1 * sqrt (2* g * H1 ) ) /(( HL - H1
) +( HL - H1 ) * sqrt ( H1 ) ) /4
14 //RESULTS
15 printf ( ’ Area= %. f s q f t ’ ,A )
1 clc
2 // 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
3 Cd = 0.62
4 g = 32.2 // f t / s e c ˆ2
5 l = 200 // f t
6 w = 25 // f t
7 a1 = 5 // f t ˆ2
8 h = 20 // f t
9 //CALCULATIONS
10 t = 2* l * w * sqrt (h -( h / a1 ) ) /( Cd * sqrt (2* g ) * a1 )
11 //RESULTS
12 printf ( ’ tme r q u i r e d t o f i l l t h e l o c k= %. f s e c ’ ,t )
44
1 clc
2 // 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
3 L = 150 // f t
4 w = 20 // f t
5 t = 5 // min
6 h = 5 // f t
7 Cd = 0.6
8 Hl = 9 // f t
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 T = 2* L * w * sqrt ( Hl ) /( Cd * t *60* sqrt (2* g ) )
12 //RESULTS
13 printf ( ’ Area o f sumberged s l i c e = %. 1 f s q f t ’ ,T )
1 clc
2 // 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
3 L = 3 // f t
4 H1 = 1.5 // f t
5 H2 = 0.75 // f t
6 Cd = 0.62
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 Q = 2* Cd *60* L * sqrt (2* g ) *( H1 ^1.5 - H2 ^1.5) /3
10 //RESULTS
11 printf ( ’ D i s c h a r g e p e r m i n u t e= %. 1 f c u b i c f t p e r
m i n u t e ’ ,Q )
1 clc
2 // i n i t i a l i s a t i o n of variables
45
3 Cd = 0.62
4 H1 = 6 // f t
5 H2 = 3 // f t
6 H = 4 // f t
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 Q1 = 2* Cd * H * sqrt (2* g ) *( H ^1.5 - H2 ^1.5) /3
10 Q2 = Cd * H *( H1 - H ) * sqrt (2* g * H )
11 Q = Q1 + Q2
12 //RESULTS
13 printf ( ’ T o t a l d i s c h a r g e= %. f c u s e s ’ ,Q )
46
Chapter 5
1 clc
2 // 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
3 L = 6 // f t
4 H = 15 // i n
5 Cd = 0.62
6 g = 32.2 // f t / s e c ˆ2
7 //CALCULAIONS
8 Q = 2* Cd * L * sqrt (2* g ) *( H /12) ^1.5/3
9 //RESULTS
10 printf ( ’ T o t a l D i s c h a r g e= %. 1 f c u s e s ’ ,Q )
1 clc
2 // 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
3 o = 90 // d e g r e e s
4 H = 15.5 // i n
5 Cd = 0.6
47
6 g = 32.2 // f t / s e c ˆ2
7 //CALCULATIONS
8 Q = 8* Cd * tand ( o /2) * sqrt (2* g ) *( H /12) ^2.5/15
9 //RESULTS
10 printf ( ’ T o t a l D i s c h a r g e= %. 2 f c u s e s ’ ,Q )
1 clc
2 // 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
3 Cd = 0.62
4 L = 4 // f t
5 g = 32.2 // f t / s e c ˆ2
6 H = 6 // i n
7 o = 90 // d e g r e e s
8 //CALCULATIONS
9 Q = Cd * L * sqrt (2* g ) *( H /12) ^1.5*(2/3)
10 H1 = ( Q *15/(8* Cd * tand ( o /2) * sqrt (2* g ) ) ) ^(2/5)
11 //RESULTS
12 printf ( ’ d e p t h o f w a t e r= %. 2 f f t ’ , H1 )
1 clc
2 // 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
3 Cd = 0.62
4 L = 3 // f t
5 g = 32.2 // f t / s e c ˆ2
6 H = 1 // f t
7 L1 = 2 // f t
8 h = 0.5 // f t
9 L2 = 1 // f t
10 h1 = 0.25 // f t
48
11 //CALCULATIONS
12 Q = 2* Cd * L * sqrt (2* g ) * H ^1.5/3
13 Q1 =2* Cd * L1 * sqrt (2* g ) *(( H + h ) ^1.5 - H ^1.5) /3
14 Q2 = 2* Cd * L2 * sqrt (2* g ) *(( H + h + h1 ) ^1.5 - ( H + h ) ^1.5) /3
15 Q3 = Q1 + Q2 + Q
16 //RESULTS
17 printf ( ’ T o t a l D i s c h a r g e= %. 2 f c u s e s ’ , Q3 )
1 clc
2 // 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
3 h = 9 // i n
4 l = 6 // f t
5 g = 32.2 // f t / s e c ˆ2
6 //CALCULATIONS
7 H = h /12
8 Q = sqrt (2* g ) * l *( H /12) ^1.5*(0.405+(0.00984/0.75) )
9 Q1 = 3.33* l * H ^1.5
10 //RESULTS
11 printf ( ’ D i s c h a r g e by f r a n c i s f o r m u l a= %. 2 f c u s e s ’ ,
Q1 )
1 clc
2 // 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
3 l = 24 // f t
4 n = 5 // p a r t s
5 h = 2 // f t
6 w = 1 // f t
7 n1 = 4
8 c = 10
49
9 //CALCULATIONS
10 Q = 3.33*(( l - n1 ) -0.1* c * h ) * h ^1.5
11 //RESULTS
12 printf ( ’ D i s c h a r g e= %. 1 f c u s e s ’ ,Q )
1 clc
2 // 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
3 A = 25 // m i l e s ˆ2
4 t = 24 // h r
5 p = 50 // p e r c e n t
6 l = 3 // i n
7 h = 4 // f t
8 //CALCULATIONS
9 A1 = 5280^2* A
10 V = A1 * l /12
11 V1 = V /( t *60*60)
12 V2 = V1 /2
13 L = ( V2 /(3.33* h *2) ) +0.2*4
14 //RESULTS
15 printf ( ’ l e n g t h o f w e i r= %. 1 f f t ’ ,L )
1 clc
2 // 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
3 h = 4 // f t
4 w = 5 // f t
5 l = 2 // f t
6 Q1 = 1008.5 // c u s e s
7 n = 8 // p i e r s
8 //CALCULATIONS
50
9 Q = 3.33*( w -0.2* h ) * h ^1.5
10 n1 = Q1 / Q
11 L = n * l + w * n1
12 //RESULTS
13 printf ( ’ l e n g t h o f w e i r= %. f f t ’ ,L )
1
2
3 clc
4 // 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
5 clear
6 k = 3.33
7 l = 10 // f t
8 x = 2 // f t
9 A = 30 // f t ˆ2
10 g = 32.2 // f t / s e c ˆ2
11 //CALCULATIONS
12 Q = k *( l -0.2* x ) * x ^1.5
13 V= Q/A
14 h = V ^2/(2* g )
15 Q1 = k *( l -0.2*( x + h ) ) *(( x + h ) ^1.5 - h ^1.5)
16 va = Q1 / A
17 ha = va ^2/(2* g )
18 Q2 = k *( l -0.2*( x + ha ) ) *(( x + ha ) ^1.5 - ha ^1.5)
19 //RESULTS
20 //RESULTS
21 printf ( ’ D i s c h a r g e i n f r a n c c i s f o r m u l a= %. 2 f c u s e c s ’
, Q1 )
22 printf ( ’ \n D i s c h a r g e i n c o r r e c t e d f r a n c c i s f o r m u l a=
%. 2 f c u s e c s ’ , Q2 )
51
Scilab code Exa 5.10 example 10
1 clc
2 // 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
3 Cd = 0.6
4 g = 32.2 // f t / s e c ˆ2
5 o = 90 // d e g r e e s
6 H = 2 // f t
7 A = 15.2 // f t ˆ2
8 //CALCULATIONS
9 Q = 8* Cd * sqrt (2* g ) * tand ( o /2) * H ^2.5/15
10 va = Q / A
11 ha = va ^2/(2* g )
12 Q1 = 8* Cd * sqrt (2* g ) *(( H + ha ) ^2.5 - ha ^2.5) /15
13 //RESULTS
14 printf ( ’ D i s c h a r g e o f s t r e a m= %. 1 f c u s e s ’ , Q1 )
1 clc
2 // 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
3 va = 4 // f t / s e c
4 g = 32.2 // f t / s e c ˆ2
5 H = 1.25
6 l = 10 // f t
7 w = 62.4 // l b s / f t ˆ3
8 p = 60 // p e r c e n t
9 l1 = 90 // f t
10 //CALCULATIONS
11 ha = va ^2/(2* g )
12 Q = 3.333*( l -0.1*2*( H + ha ) ) *(( H + ha ) ^1.5 - ha ^1.5) * w
13 E = Q * l1
14 HP = E *60/(100*550)
15 //RESULTS
16 printf ( ’H . P a v a i l a b l e = %. 1 f H . P ’ , HP )
52
Scilab code Exa 5.12 example 12
1 clc
2 // 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
3 L = 8 // f t
4 d = 9 // i n
5 h = 3 // i n
6 Cd1 = 0.62
7 Cd2 = 0.62
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 Q1 = (2/3) * Cd1 * L * sqrt (2* g ) *( h /12) ^1.5
11 Q2 = Cd2 * L * d * sqrt (2* g * h /12) /12
12 Q = Q1 + Q2
13 //RESULTS
14 printf ( ’ D i s c h a r g e= %. 2 f c u s e s ’ ,Q )
1 clc
2 // 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
3 L = 50 // f t
4 d = 2 // f t
5 h = 4 // f t
6 Cd1 = 0.58
7 Cd2 = 0.8
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 ha = h /(2* g )
11 Q1 = (2/3) * Cd1 * L * sqrt (2* g ) *(( h + ha ) ^1.5 - ha ^1.5)
12 Q2 = Cd2 * L * d * sqrt (2* g *( h + ha ) )
53
13 Q = Q1 + Q2
14 //RESULTS
15 printf ( ’ D i s c h a r g e= %. f c u s e s ’ ,Q )
1 clc
2 // 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
3 M = 60
4 k = 500
5 v = 8 // f t / s e c
6 w = 100 // f t
7 h1 = 5 // f t
8 g = 32.2 // f t / s e c ˆ2
9 x = 1.95 // f t
10 //CALCULATIONS
11 Q = k * M ^(2/3)
12 A= Q/v
13 md = A / w
14 h = md - h1
15 ha = v ^2/(2* g )
16 H = h + x ^2 -1+ h1 -1
17 //RESULTS
18 printf ( ’ h e i g h t a b o v e t h e c r e s t o f t h e a i r = %. 2 f f t
o f w a t e r ’ ,H )
1 clc
2 // 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
3 H2 = 1.5 // f t
4 H1 = 1 // f t
5 A = 100 // y a r d s ˆ2
54
6 Cd = 0.6
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 A1 = A *9
10 T = (1.25* A1 /( Cd * sqrt (2* g ) ) ) *( H1 -(1/ H2 ) ^1.5)
11 //RESULTS
12 printf ( ’ t i m e o f l o w e r i n g t h e s u r f a c e= %. 1 f s e c ’ ,T )
55
Chapter 6
1 clc
2 // 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
3 R = 0.5 // l b s s q f t
4 v = 10 // f t / s e c
5 A = 1 // s q f t
6 A1 = 15000 // s q f t
7 V = 20 //m. p . h
8 //CALCULATIONS
9 k = R / v ^2
10 R = k * A1 *( V *44/30) ^2
11 HP = R *88/(550*3)
12 //RESULTS
13 printf ( ’ H o r s e power= %. f HP ’ , HP )
1
2 clc
56
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 k = 0.01
5 d = 6 // i n
6 l = 1000 // f t
7 v = 8 // f t / s e c
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 f = k *(1+(1/ d ) )
11 hf = 4* f * l * v ^2*12/(2* g * d )
12 C = sqrt (2* g / f )
13 hf1 = v ^2*4*(12/ d ) * l / C ^2
14 //RESULTS
15 printf ( ’ head l o s t i n f r i c t i o n = %. 2 f f t o f w a t e r ’ , hf
)
16 printf ( ’ \n head l o s t i n f r i c t i o n = %. 2 f f t o f w a t e r ’
, hf1 )
1 clc
2 // 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
3 d1 = 3 // i n
4 d2 = 6 // i n
5 v = 6 // f t / s e c
6 g = 32.2 // f t / s e c ˆ2
7 //CALCULATIONS
8 v1 = v *( d1 / d2 ) ^2
9 L = (v - v1 ) ^2/(2* g )
10 // r e s u l t s a
11 printf ( ’ L o s s due t o s u d d e n e n l a r g m e n t= %. 4 f ’ ,L )
57
1 clc
2 // 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
3 d1 = 4 // i n
4 d2 = 3 // i n
5 Q = 90 // g a l l o n s
6 k = 0.7
7 v = 6.24 // f t / s e c
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 V = Q /(60*6.24)
11 v1 = V *4* d2 ^2/ %pi
12 v2 = V *4* d1 ^2/ %pi
13 L = ((1/ k ) -1) ^2* v2 ^2*900/(2* g )
14 //RESULTS
15 printf ( ’ L o s s hc= %. 1 f f t l b s p e r m i n u t e ’ ,L )
1 clc
2 // 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
3 d1 = 3 // i n
4 d2 = 6 // i n
5 sm = 13.6
6 Q = 0.5 // f t ˆ3/ s e c
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 v1 = Q *(12/ d1 ) ^2*4/ %pi
10 v2 = Q *(12/ d2 ) ^2*4/ %pi
11 hc = ( v1 - v2 ) ^2/(2* g )
12 h = (( v1 ^2 - v2 ^2) /(2* g ) ) - hc
13 h1 = 12* h /( sm -1)
14 //RESULTS
15 printf ( ’ d i f f e r e n c e i n l e v e l i n two l i m b s o f m e r c u r y
= %. 3 f i n ’ , h1 )
58
Scilab code Exa 6.6 example 6
1 clc
2 // 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
3 f = 0.01
4 l = 60 // f t
5 d = 6 // i n
6 g = 32.2 // f t / s e c
7 v = 10 // f t / s e c
8 d1 = 3 // i n
9 l1 = 20 // f t
10 k = 0.62
11 //CALCULATIONS
12 H = 4* f * l * v ^2/(2* g *( d /12) ^2)
13 v2 = v * d1 ^2/ d ^2
14 hf = 4* f * l1 * v ^2/(2* g *( d /12) ^2)
15 h = (v - v2 ) ^2/(2* g )
16 h1 = 4* f * l1 * v2 ^2/(2* g *2*( d /12) ^2)
17 h2 = v ^2*4* f * l1 /(2* g *( d /12) ^2)
18 h3 = ((1/ k ) -1) ^2* v ^2/(2* g )
19 dh = (H - hf -h - h1 - h2 - h3 )
20 //RESULTS
21 printf ( ’ S a v i n g i n head= %. 2 f f t ’ , dh )
1 clc
2 // 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
3 g = 32.2 // f t / s e c ˆ2
4 d = 3 // i n
5 h = 50 // f t
6 w = 6.24 // l b / f t ˆ3
59
7 r = 0.5
8 r1 = 16
9 r2 = 9/16
10 r3 = 0.25
11 r4 = 40.5/256
12 r5 = 972/256
13 r6 = 81/256
14 //CALCULATIONS
15 v = sqrt ( h *2* g /( r + r1 + r2 + r3 + r4 + r5 + r6 ) )
16 Q = %pi *( d /12) ^2* v *60* w /4
17 //RESULTS
18 printf ( ’ d i s c h a r g e i n t h e p i p e l i n e = %. 1 f g a l . min ’ ,Q )
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 l = 6000 // f t
5 d = 9 // i n
6 s = 1/100
7 h = 20 // f t
8 h1 = 5 // f t
9 f = 0.006
10 g = 32.2 // f t / s e c ˆ2
11 //CALCULATIONS
12 L= l*s
13 v = sqrt (( h +L - h1 ) *( d /12) *2* g /(4* f * l ) )
14 Q = v * %pi *( d /12) ^2/4
15 s1 = ( L +h - h1 ) / l
16 //RESULTS
17 printf ( ’ D i s c h a r g e t h r o u g h t h e p i p e= %. 3 f c u s e s ’ ,Q )
18 printf ( ’ \n s l o p e o f h y d r a u l i c g r a d i e n t= %. 4 f ’ , s1 )
60
Scilab code Exa 6.9 example 9
1 clc
2 // 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
3 d1 = 24 // i n
4 Q = 10 // c u s e s
5 d2 = 18 // i n
6 d3 = 12 // i n
7 f = 0.01
8 l = 1000 // f t
9 g = 32.2 // f t / s e c ˆ2
10 l1 = 100 // f t
11 l2 = 600 // f t
12 //CALCULATIONS
13 v1 = sqrt (4* Q /( %pi *( d1 /12) ^2) )
14 v2 = sqrt (4* Q /( %pi *( d2 /12) ^2) )
15 v3 = sqrt (4* Q /( %pi *( d3 /12) ^2) )
16 hf = 4* f * l * v1 ^2/(2* g *( d1 /12) )
17 dh = l1 - hf
18 h1 = 4* f * l2 * v2 ^2/(( d2 /12) *2* g )
19 dh1 = dh - h1
20 h2 = 4* f *( l - l2 ) * v3 ^2/(( d3 /12) *2* g )
21 dh2 = dh1 - h2
22 //RESULTS
23 printf ( ’ l e v e l g r a d i e n t a t D= %. 2 f f t ’ , dh2 )
24
25 //ANSWER GIVEN IN THE TEXTBOOK I S WRONG
1 clc
2 // i n i t i a l i s a t i o n of variables
61
3 k = 0.01
4 l = 24 // f t
5 g = 32.2 // f t / s e c ˆ2
6 w = 15.6 // l b s / i n ˆ2
7 W = 62.4 // l b s / f t ˆ3
8 h = 12 // f t
9 l1 = 100 // f t
10 //CALCULATIONS
11 f = k *(1+(1/( h / l ) ) )
12 C = sqrt (2* g / f )
13 L = w *144/( W )
14 i = h / l1
15 v = C * sqrt ( k * h /(4* l ) )
16 Q = v *60* %pi *(1/ l ) ^2/4
17 v1 = sqrt ( h *2* g *(1/ l ) /(4* f *3* l1 ) )
18 Q1 = v1 *60* %pi *(1/ l ) ^2/4
19 //RESULTS
20 printf ( ’ D i s c h a r g e q u a n t i t y o f w a t e r= %. 3 f c u b i c f t /
mt ’ , Q1 )
21
22
23 //ANSWER GIVEN IN THE TETBOOK I S WRONG
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 p = 15.6 // l b s / i n ˆ2
5 la = 250 // f t
6 lb = 200 // f t
7 lc = 120 // f t
8 w = 62.4 // l b s / f t ˆ3
9 p1 = 93.6 // l b s / i n ˆ2
10 l2 = 600 // f t
62
11 l3 = 100 // f t
12 l4 = 300 // f t
13 ph = 95 // f t
14 //CALCULATIONS
15 H1 = (( p *144) / w ) + la
16 H2 = (( p1 *144) / w ) +( la /2)
17 s = ( H2 - H1 ) /( l4 + l2 + l3 )
18 h1 = l3 * s
19 h2 = l2 * s
20 h3 = l4 * s
21 H = h1 + h2 + h3
22 P = ph * w /144
23 //RESULTS
24 printf ( ’ p r e s s u r e head f o r 95 f t = %. 2 f l b s / i n ˆ2 ’ ,P )
1 clc
2 // 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
3 Q = 30 // g a l l o n s / head
4 C = 78
5 n = 100000
6 d = 3 // m i l e s
7 l = 40 // f t
8 //CALCULAIONS
9 st = Q * n
10 Q1 = st /(6.24*2*8*60^2)
11 i = l /( d *5280)
12 d = (4* Q1 * sqrt (4/ i ) /( %pi * C ) ) ^(2/5)
13 //RESULTS
14 printf ( ’ s i z e o f p i p e= %. 2 f f t ’ ,d )
63
1 clc
2 // 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
3 f = 0.01
4 l = 2000 // f t
5 d = 6 // i n
6 g = 32.2 // f t / s e c ˆ2
7 Q = 10 // c u s e s
8 //CALUCLATIONS
9 v = sqrt (2* g *( d /12) * Q /(4* f * l ) )
10 Q1 = v * %pi *( d /12) ^2/4
11 //RESULTS
12 printf ( ’ D i s c h a r g e t h r o u g h t h e p i p e= %. 3 f c u s e s ’ , Q1 )
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 h = 10 // f t
5 l = 50 // f t
6 d = 1 // i n
7 lm = 5 // i n
8 f = 0.01
9 sm = 13.6
10 g =32.2
11 //CALCULATIONS
12 ps = sm * lm /12
13 v = sqrt (( ps + h ) *2* g *( d /12) /(4* f * l ) )
14 Q = v * %pi *( d /12) ^2/4
15 //RESULTS
16 printf ( ’ D i s c h a r g e t h r o u g h t h e p i p e= %. 3 f c u s e s ’ ,Q )
64
1 clc
2 // 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
3 r = 34
4 r1 = 4
5 H = 25 // f t
6 x = 18
7 l = 2000 // f t
8 //CALCULATIONS
9 l1 = (r - r1 - x ) * l / H
10 //RESULTS
11 printf ( ’ l 1= %. f f t ’ , l1 )
1 clc
2 // 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
3 g = 32.2 // f t / s e c ˆ2
4 l = 1000 // f t
5 dh = 40 // f t
6 d = 6 // i n
7 h = 15 // f t
8 h1 = 300 // f t
9 f = 0.002
10 //CALCULATIONS
11 v = sqrt ( dh *2* g /(1.5+(4* f * l /( d /12) ) ) )
12 Q = v * %pi *( d /12) ^2/4
13 r = -( h +( v ^2/(2* g ) ) *(1.5+(4* f * h1 /( d /12) ) ) )
14 //RESULTS
15 printf ( ’ pbyw= %. 1 f f t ’ ,r )
1 clc
65
2 // 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
3 f = 0.008
4 l = 2000 // f t
5 p1 = 34 // f t
6 p2 = 8 // f t
7 p3 = 4 // f t
8 g = 32.2 // f t / s e c ˆ2
9 d = 18 // i n
10 P = 140 // f t
11 l1 = 9500 // f t
12 //CALCULATIONS
13 v = sqrt (( p1 - p2 - p3 ) *2* g /(( d /12) +(4* f * l /( d /12) ) ) )
14 Q = %pi *( d /12) ^2* v /4
15 v1 = sqrt ( P *2* g /(( d /12) +(4* f * l1 /( d /12) ) ) )
16 Q1 = %pi *( d /12) ^2* v1 /4
17 //RESULTS
18 printf ( ’ Q u a n t i t y d i s c h a r g e= %. f c u s e s ’ ,Q )
19 printf ( ’ \n Q u a n t i t y d i s c h a r g e= %. 2 f c u s e s ’ , Q1 )
1 clc
2 // 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
3 L = 20000 // f t
4 l1 = 6000 // f t
5 d1 = 12 // i n
6 l2 = 10000 // f t
7 d2 = 9 // i n
8 d3 = 6 // i n
9 l3 = 4000 // f t
10 //CALCULATIONS
11 D = ( L /(( l1 /( d1 /12) ^5) +( l2 /( d2 /12) ^5) +( l3 /( d3 /12) ^5) )
) ^(1/5)
12 //RESULTS
13 printf ( ’ D i a m e t e r o f u n i f o r m p i p e= %. 2 f f t ’ ,D )
66
Scilab code Exa 6.20 example 20
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 L = 4700 // f t
5 l1 = 2500 // f t
6 d1 = 15 // i n
7 l2 = 1200 // f t
8 d2 = 12 // i n
9 d3 = 9 // i n
10 l3 = 1000 // f t
11 H = 100 // f t
12 f = 0.01
13 g = 32.2 // f t / s e c ˆ2
14 //CALCULATIONS
15 D = ( L /(( l1 /( d1 /12) ^5) +( l2 /( d2 /12) ^5) +( l3 /( d3 /12) ^5) )
) ^(1/5)
16 v = sqrt (2* g * D * H /(4* f * L ) )
17 Q = v * %pi * D ^2/4
18 //RESULTS
19 printf ( ’ Q u a n t i t y d i s c h a r g e d= %. 2 f c u s e c s ’ ,Q )
1 clc
2 // 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
3 v1 = 6.2 // f t / s e c
4 a = 43.52 // f t ˆ2/ s e c ˆ2
5 a1 = 105.6 // f t ˆ2/ s e c ˆ2
6 r = 0.468
67
7 r1 = 0.87
8 d = 5 // i n
9 d1 = 6 // i n
10 //CALCULATIONS
11 v2 = sqrt (a - r * v1 ^2)
12 v3 = sqrt ( a1 - r1 * v1 ^2)
13 Q1 = %pi *( d1 /12) ^2*60* v2 /4
14 Q2 = %pi *( d /12) ^2*60* v3 /4
15 //RESULTS
16 printf ( ’ Q u a n t i t y d i s c h a r g e d= %. 2 f c u s e s ’ , Q1 )
17 printf ( ’ \n Q u a n t i t y d i s c h a r g e d= %. 2 f c u s e s ’ , Q2 )
1 clc
2 // 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
3 w = 62.4 // l b / f t ˆ3
4 za = 150 // f t
5 zd = 80 // f t
6 g = 32.2 // f t / s e c ˆ2
7 w = 62.4 // l b / f t ˆ3
8 v1 = 5.25 // f t / s e c
9 //CALCULATIONS
10 p = ( w /144) *( za - zd -145* v1 ^2/(2* g ) )
11 //RESULTS
12 printf ( ’ p r e s s u r e = %. 3 f l b s / i n ˆ2 ’ ,p )
1 clc
2 // i n i t i a l i s a t i o n o f variables
3 g = 32.2 // f t / s e c ˆ2
4 H = 200 // f t
68
5 f = 0.01
6 L = 8100 // f t
7 d = 3 // i n
8 d1 = 1 // i n
9 //CALCULATIONS
10 vn = sqrt (2* g * H /(1+(4* f * L *(1/ d ) ^4/( d /12) ) ) )
11 h = vn ^2/(2* g )
12 //RESULTS
13 printf ( ’ h e i g h t o f t h e j e t = %. 2 f f t ’ ,h )
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 d = 1/4 // i n
5 d1 = 1 // i n
6 g = 32.2 // f t / s e c ˆ2
7 H = 50 // f t
8 f = 0.1
9 L = 100 // f t
10 l = 775 // f t
11 //CALCULLATIONS
12 vn = sqrt (2* g * l * H *0.01/(1+(4* f * L *( d / d1 ) ^2/( d1 /12) ) ) )
13 h = vn ^2/(2* g )
14 //RESULTS
15 printf ( ’ h e i g h t o f t h e j e t = %. 2 f f t ’ ,h )
1 clc
2 // i n i t i a l i s a t i o n o f variables
3 W = 62.4 // l s / f t ˆ3
69
4 d1 = 3/4 // i n
5 d2 = 3 // i n
6 f = 0.024
7 L = 5 // f t
8 //CALCULATIONS
9 h = 144/(1+(4* f * L *( d1 / d2 ) ^4/( d2 /12) ) )
10 //RESULTS
11 printf ( ’ h e i g h t o f t h e j e t = %. f f t ’ ,h )
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 H = 600 // f t
6 w = 62.4 // l b s / f t ˆ3
7 n = 1.5
8 d = 0.229 // f t
9 //CALCULATIONS
10 vn = sqrt (2* g * H / n )
11 HP = w * vn ^3*( %pi * d ^2/4) /(550*2* g )
12 //RESULTS
13 printf ( ’H . P= %. 1 f H . P ’ ,HP -0.7)
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 d = 6 // i n
5 W = 1100 // l b s / i n ˆ2
6 w = 62.4 // l b s / f t ˆ3
70
7 f = 0.01
8 v = 3 // f t / s e c
9 W2 = 1000 // l b s / i n ˆ2
10 g =32.2
11 //CALCULATIONS
12 W1 = w * %pi *( d /12) ^2* v /4
13 ph = W2 *144/ w
14 HP = W1 * ph /550
15 e = W2 / W
16 hf = W2 *144/( w *10)
17 l = hf *( d /12) *2* g /(4* f * v ^2)
18 //RESULTS
19 printf ( ’ l = %. f f t ’ ,l )
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 f = 0.01
5 l = 10000 // f t
6 d = 6 // i n
7 g = 32.2 // f t / s e c ˆ2
8 W = 1200 // l b s / i n ˆ2
9 w = 62.4 // l b s / f t ˆ2
10 //CALCULATIONS
11 hf = 4* f * l /(2* g *( d /12) )
12 H = 3* hf
13 H1 = W *144/ w
14 v = sqrt ( H1 / H )
15 H2 = 2* H1 /3
16 HP = w *( %pi *( d /12) ^2/4) * v * H2 /550
17 dn = (( d /12) ^5*10/(8* f * l ) ) ^(1/4)
18 //RESULTS
19 printf ( ’ s i z e o f t h e n o z z l e a t t h e end= %. 3 f i n ’ , dn )
71
Scilab code Exa 6.29 example 29
1 clc
2 // 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
3 g = 32.2 // f t / s e c ˆ2
4 Q = 1750000 // g a l l o n s
5 h = 500 // f t
6 f = 0.0075
7 p = 80 // p e r cemt
8 l = 2 // m i l e s
9 w = 62.4 // l b / f t ˆ3
10 hf = 100 // f t
11 //CALCULATIONS
12 r = hf *2* g /(4* f * l *5280)
13 R = (( Q /(60*60* w ) ) *(4/ %pi ) * r ^2) ^0.2
14 d = R ^2*2.5/ r
15 HP = Q *( h - hf ) *10/(60*60*550)
16 //RESULTS
17 printf ( ’ d i a m e t e r = %. 2 f f t ’ ,d )
18 printf ( ’ \n maximum h o r s e power = %. f HP ’ , HP )
1 clc
2 // 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
3 hp = 40 // hp
4 w = 62.4 // l b / f t ˆ3
5 d = 4 // i n
6 k = 0.98
7 v = 2.395 // f t / s e c
8 W = 120 // t o n s
72
9 //CALCULATIONS
10 hv = hp *550/( w *( %pi *( d /12) ^2/4) * k )
11 H = hv / v
12 d = sqrt (4* W *2240/( w * H * %pi ) )
13 //RESULTS
14 printf ( ’ d i a m e t e r = %. 2 f f t ’ ,d )
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 d = 50 // f t
5 d1 = 6 // i n
6 l = 500 // f t
7 H1 = 20 // f t
8 f = 0.0075
9 g =32.2
10 //CALCULATIONS
11 a = %pi *( d1 /12) ^2/4
12 T = 2* sqrt (4* f * l /( d1 /12) ) *( H1 ^0.5) /( a * sqrt (2* g )
*2/1963)
13 //RESULTS
14 printf ( ’ t i m e r q u i r e d f o r t h e t a n k s t o same l e v e l = %
. f s e c ’ ,T )
1
2
3 clc
4 // i n i t i a l i s a t i o n o f variables
5 A1 = 10000 // f t ˆ2
73
6 A2 = 5000 // f t ˆ2
7 d = 6 // i n
8 h1 = 18 // f t
9 h2 = 15 // f t
10 h3 = 5 // f t
11 l = 800 // f t
12 f =0.01
13 g =32.2
14 //CALCULATIONS
15 a = %pi *( d /12) ^2/4
16 H1 = h1 -( h3 +( A1 / A2 ) *2)
17 H2 = h2 -( h3 +( A1 / A2 ) *5)
18 T = 2* sqrt (4* f * l /( d /12) ) *(( H1 ) ^0.5) /( a * sqrt (2* g ) *((1/
A1 ) +(1/ A2 ) ) )
19 //RESULTS
20 printf ( ’ t i m e r q u i r e d w a t e r l e v e l i n t h e r e s e r v o i r
t o r e d u c e= %. f s e c ’ ,T )
1 clc
2 // 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
3 de = 19 // i n
4 di = 18 // i n
5 Q = 8.84 // c u s e s
6 k = 3*10^5 // l b s / i n ˆ2
7 E = 3*10^7 // l b s / i n ˆ2
8 w = 62.4 // l b s / f t ˆ3
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 t = ( de - di ) /2
12 v = Q *4/( %pi *( di /12) ^2)
13 k1 = k *144
14 E1 = E *144
15 r = di /24
74
16 //CALCULATIONS
17 p = ( v * sqrt ( w /( g *((1/ k1 ) +(2* r *24/ E1 ) ) ) ) -248) * r *24/144
18 //RESULTS
19 printf ( ’ s t r e s s p r o d u c e d i n t h e p i p e= %. f l b s / i n ˆ2 ’ ,
p)
75
Chapter 7
1 clc
2 // 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
3 i = 1/4500
4 w =3 // f t
5 d = 3 // f t
6 k = 0.003
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 A = 0.5* %pi * d ^2/4
10 P = %pi * d /2
11 m= A/P
12 f = k *(1+(0.1/ m ) )
13 C = sqrt (2* g / f )
14 V = C * sqrt ( m * i )
15 Q= A*V
16 //RESULTS
17 printf ( ’ D i s c h a r g e= %. 2 f c u s e s ’ ,Q )
76
1 clc
2 // 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
3 b = 40 // f t
4 d = 4 // f t
5 k = 0.004
6 g = 32.2 // f t / s e c ˆ2
7 Q = 500 // c u s e s
8 //CALCULATIONS
9 A= b*d
10 P = b +2* d
11 m= A/P
12 f = k * sqrt (1+(0.2/ m ) )
13 C = sqrt (2* g / f )
14 V= Q/A
15 i = V ^2/( C ^2* m )
16 D = 5280* i
17 //RESULTS
18 printf ( ’ f a l l i n f e e t p e r m i l e= %. 2 f f t ’ ,D )
1 clc
2 // 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
3 b = 40 // f t
4 d = 4 // f t
5 n= 1
6 k = 0.005
7 i = 1/3250
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 A= (b+d)*d
11 P = b +2* d * sqrt ( n ^2+1)
12 m= A/P
13 f = k *(1+(0.8/ m ) )
14 C = sqrt (2* g / f )
77
15 V = C * sqrt ( m * i )
16 Q = V * A
17 //RESULTS
18 printf ( ’ D i s c h a r g e= %. f c u s e s ’ ,Q )
1
2
3 clc
4 // 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
5 clear
6 Q = 400 // c u s e s
7 V = 2 // f t / s e c
8 d = 3 // f t
9 n= 1
10 g = 32.2 // f t / s e c ˆ2
11 //CALCULATIONS
12 A= Q/V
13 w= A/d
14 W= w-d
15 P = W +2* d * sqrt ( n ^2+1)
16 m= A/P
17 f = 0.006*(1+(4/ m ) )
18 C = sqrt (2* g / f )
19 i = ( V / C ) ^2/ m
20 //RESULTS
21 printf ( ’ s l o p e = %. 5 f ’ ,i )
22
23 //ANSWER IN TEXTBOOK I S NOT GIVEN IN DECIMALS
78
1 clc
2 // 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
3 Q = 600 // c u s e s
4 V = 3 // f t / s e c
5 n= 1
6 i = 1/3200
7 C = 80
8 d = 6 // f t
9 //CALCULATIONS
10 A= Q/V
11 m = V ^2/( C ^2* i )
12 b = ( A / d ) -d
13 //RESULTS
14 printf ( ’ w i d t h= %. 1 f f t ’ ,b )
1 clc
2 // 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
3 Q = 20 // g a l l o n s / day
4 i = 50000 // i n h a b i t a n t s
5 p = 10 // p e r c e n t
6 t = 24 // h r s
7 T = 0.25 // i n
8 a = 2000 // a c r e s
9 //CALCULATIONS
10 q = Q * i * p /(100*60*60*6.24)
11 A = T *43560* a /12
12 Q1 = A /( t *60*60)
13 Q2 = q + Q1
14 //RESULTS
15 printf ( ’ t o t a l d i s c h a r g e= %. 2 f c u s e s ’ , Q2 )
79
Scilab code Exa 7.7 example 7
1 clc
2 // 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
3 Q = 400 // c u s e s
4 V = 8 // f t / s e c
5 C = 150
6 //CALCULATIONS
7 A= Q/V
8 d = sqrt ( A /2)
9 i = V ^2/( C ^2*( d /2) )
10 //RESULTS
11 printf ( ’ s l o p e %. 4 f ’ ,i )
1 clc
2 // 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
3 Q = 100 // c u s e s
4 V = 2 // f t / s e c
5 n = 1.5
6 k = 0.006
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 A= Q/V
10 d = sqrt ( A /((2* sqrt ( n ^2+1) ) -n ) )
11 m= A/d
12 mb = m - n * d
13 bt = m + n * d
14 m1 = d /2
15 f = k *(1+(4/ m1 ) )
16 C = sqrt (2* g / f )
17 i = V ^2/( C ^2* m1 )
18 //RESULTS
19 printf ( ’ s l o p e %. 5 f ’ ,i )
80
Scilab code Exa 7.9 example 9
1 clc
2 // 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
3 i = 1/1000
4 d = 4 // f t
5 C = 125
6 k = 0.95
7 o = 5.372
8 //CALCULATIONS
9 h= k*d
10 A = d ^2*( o - sind ( o *180/ %pi ) ) /8
11 P = ( d /2) * o
12 m= A/P
13 V = C * sqrt ( m * i )
14 Q= V*A
15 //RESULTS
16 printf ( ’ D i s c h a r g e= %. 2 f c u s e s ’ ,Q )
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 Cd = 0.95
5 m = 300 // f t
6 V = 8 // f t / s e c
7 d = 6 // f t
8 n= 6
9 s = 40 // f t
10 g = 32.2 // f t / s e c ˆ2
81
11 dh = 0.11
12 //CALCULATIONS
13 h = ( V ^2/( g +( d /3) ) ) *(1.1*( m /( s * n ) ) ^2 -1)
14 h1 = ( V ^2/(2* g ) ) *(1.1*( m /( s * n ) ) ^2 -( d /( s / n ) ) ) + dh
15 //RESULTS
16 printf ( ’ a f f l u x u p s t r e a m= %. 2 f f t ’ , h1 )
1 clc
2 // 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
3 V = 8 // f t / s e c
4 g = 32.2 // f t / s e c ˆ2
5 d = 10 // f t
6 l = 2 // f t
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 a = sqrt ((( l * g * l / V ^2) +( d /12) ^2) /1.1)
10 V1 = V * d /12
11 va = sqrt (2* g *0.69)
12 v1 = sqrt (2* g *( l +0.69) )
13 //RESULTS
14 printf ( ’ t o t a l head p r o d u c i n g v e l o c i t y = %. 1 f f t / s e c ’
, v1 )
1 clc
2 // 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
3 d = 8 // f t
4 V = 6 // f t / s e c
5 g = 32 // f t / s e c ˆ2
6 //CALCULATIONS
82
7 h = ( V * d /4) ^2/ g
8 d2 = -( d /4) + sqrt ((2*( d /2) *( V *( d /2) ) / g ) +(( d /2) ^2/4) )
9 x = ( d /2) / d2
10 l = ((1/( x ^1.5) ) -1) ^0.81
11 Lw = l *( d /2) *( d +( d2 /2) )
12 //RESULTS
13 printf ( ’ h e i g h t o f s t a n d i n g wave= %. 1 f f t ’ , Lw +34.7)
1 clc
2 // 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
3 w = 9 // i n
4 wc = 6 // i n
5 d = 8 // i n
6 g = 32.2 // f t / s e c ˆ2
7 //CALCULATIONS
8 Q = 3.09*( wc /12) *( d /12) ^1.5
9 V = Q *144/( w * d )
10 H = ( d /12) +( V ^2/(2* g ) )
11 Q = 3.09*( wc /12) * H ^1.5
12 //RESULTS
13 printf ( ’ D i s c h a r g e= %. 2 f c u s e s ’ ,Q )
1 clc
2 // 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
3 i = 1/6400
4 b = 40 // f t
5 d = 5 // f t
6 C = 140
7 h = 6 // f t
83
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 A= b*d
11 P = b +2* d
12 m= A/P
13 v = C * sqrt ( m * i )
14 V = v *( d / h )
15 Q= v*b*d
16 x = h -( Q /(3.09*( b /2) ) ) ^(2/3) -( V ^2/(2* g ) )
17 //RESULTS
18 printf ( ’ h e i g h t o f pump= %. 2 f f t ’ ,x )
1 clc
2 // 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
3 w = 40 // f t
4 h = 5 // f t
5 P =50 // l b / f t ˆ2
6 i = 1/6400
7 h1 = 10 // f t
8 H = 100 // f t
9 g = 32.2 // f t / s e c ˆ2
10 //CAALCULATIONS
11 m= w*h/P
12 v = 140* sqrt ( m * i )
13 v1 = v * h / h1
14 h2 = w * h1 /( H - w )
15 a = v1 ^2/(140^2* h2 )
16 s = (i - a ) *1000/(1 -( v1 ^2/( g * h1 ) ) )
17 dh = h1 - s
18 //RESULTS
19 printf ( ’ d e p t h o f w a t e r= %. 3 f f t ’ , dh )
84
Scilab code Exa 7.17 example 17
1 clc
2 // 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
3 h = 9 // f t
4 h1 = 9.5 // f t
5 i = 1/6400
6 h2 = 40 // f t
7 h3 = 59 // f t
8 h4 = 5 // f t
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 m = h2 * h1 / h3
12 v = 140* sqrt ( m * i ) *( h4 / h1 )
13 a = v ^2/(140^2* m )
14 s = (i - a ) /(1 -0.11)
15 x = 1/ s
16 //RESULTS
17 printf ( ’ d i s t a n c e u p s t r e a m from t h e dam= %. f f t ’ ,x )
85
Chapter 8
Impact of Jets
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 d = 1 // i n
5 v = 36 // f t / s e c
6 a = 30 // d e g r e e s
7 w = 62.4 // l b s / f t ˆ3
8 g =32.2
9 //CALCULATIONS
10 P = w * sind ( a ) * v ^2*( %pi *( d /12) ^2/4) / g
11 //RESULTS
12 printf ( ’ T o t a l t h r u s t on t h e p l a t e= %. 2 f l b wt ’ ,P )
1 clc
2 // i n i t i a l i s a t i o n of variables
3 a = 180 // d e g r e e s
86
4 g = 32.2 // f t / s e c ˆ2
5 w = 62.4 // l b s / f t ˆ3
6 d = 1 // i n
7 H = 100 // f t
8 u = 0.95
9 //CALCULATIONS
10 v = u * sqrt (2* g * H )
11 Px = w *(1 - cosd ( a ) ) *( %pi *( d /12) ^2/4) * v ^2/ g
12 //RESULTS
13 printf ( ’ f o r c e i t e x e r t s= %. 1 f l b wt ’ , Px )
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 d = 30 // i n
5 a = 90 // d e g r e e s
6 Q = 62.5 // f t ˆ3/ s e c
7 w = 62.4 // l b s / f t ˆ3
8 n =4
9 g =32.2
10 //CALCULATIONS
11 v = Q *4/( %pi *( d /12) ^2)
12 P = w * %pi *( d /12) ^2* v ^2/(4* g )
13 Px = P / n
14 //RESULTS
15 printf ( ’ p u l l on e a c h b o l t= %. 1 f l b s ’ , Px )
1 clc
2 // i n i t i a l i s a t i o n of variables
87
3 d = 4 // i n
4 v = 30 // f t / s e c
5 a = 22.5 // d e g r e e s
6 w = 62.4 // l b s / f t ˆ3
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 P = w *( %pi *( d /12) ^2/4) * v ^2* sqrt (2*(1 - cosd ( a ) ) ) / g
10 //RESULTS
11 printf ( ’ R e s u l t a n t f o r c e t e n d i n g t o move t h e p i p e= %
. f l b s ’ ,P )
12
13
14 //ANSWER GIVEN IN THE TEXTBOOK I S WRONG
1 clc
2 // 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
3 d = 3 // i n
4 v1 = 80 // f t / s e c
5 v2 = 40 // f t / s e c
6 w = 62.4 // l b s / f t ˆ3
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 vr = v1 - v2
10 P = w * vr * v2 * %pi *( d /12) ^2/( g *4)
11 //RESULTS
12 printf ( ’ n o r m a l p r e s s u r e on t h e p l a t e when j e t
s t r i k e s = %. 1 f l b s ’ ,P )
1 clc
88
2 // 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
3 d = 2 // i n
4 v1 = 50 // f t / s e c
5 v2 = 20 // f t / s e c
6 W = 62.4 // l b s / f t ˆ3
7 g = 32.2 // f t / s e c ˆ2
8 //CALCULATIONS
9 vr = v1 - v2
10 P = W * vr * v1 * %pi *( d /2) ^2/( g *4)
11 W = P * v2
12 KE = 2* vr * v2 *100/ v1 ^2
13 //RESULTS
14 printf ( ’ E f f i c i e n c y = %. f p e r c e n t ’ , KE )
1 clc
2 // 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
3 d = 1 // i n
4 v = 10 // f / s e c
5 v1 = 30 // f t / s e c
6 w = 62.4 // l b s / f t ˆ3
7 a = 180 // d e g r e e s
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 A = %pi *( d /12) ^2/4
11 vr = 80 - v1
12 M = w * vr * A
13 Px = M * vr *(1 - cosd ( a ) ) / g
14 W = Px * v1
15 M1 = w *80* A
16 Px1 = M1 * vr *(1 - cosd ( a ) ) / g
17 W1 = Px1 * v1
18 //RESULTS
19 printf ( ’ t o t a l f o r c e when t h e r e i s a s i n g l e cup= %. 1
89
f f t l b s ’ ,W )
20 printf ( ’ \n t o t a l f o r c e when t h e r e i s a s e r i e s o f
c u p s= %. 1 f f t l b s ’ , W1 )
1 clc
2 // 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
3 v = 100 // f t / s e c
4 u = 40 // f t / s e c
5 a = 25 // d e g r e e s
6 g = 32.2 // f t / s e c ˆ2
7 vr = 66 // f t / s e c
8 a1 = 20 // / d e g r e e s
9 a2 = 8 // d e g r e e s
10 r = 0.14
11 //CALCULATIONS
12 A = atand ( v * sind ( a ) /( v * cosd ( a ) -u ) )
13 A1 = atand ( r )
14 v1 = vr * sind ( A1 ) / sind ( a1 )
15 W = ( v ^2 - v1 ^2) /(2* g )
16 e = ( v ^2 - v1 ^2) *100/ v ^2
17 //RESULTS
18 printf ( ’ i n l e t b l a d e a n g l e = %. 2 f d e g r e e s ’ ,A )
19 printf ( ’ \n o u t l e t b l a d e a n g l e = %. 2 f d e g r e e s ’ , A1 )
20 printf ( ’ \n Work done = %. f f t l b s ’ ,W )
21 printf ( ’ \n e f f i c i e n c y = %. 2 f f t p e r c e n t ’ ,e )
1 clc
2 // i n i t i a l i s a t i o n of variables
3 Q = 60 // f t ˆ3/ s e c
90
4 v = 12 //m. p . h
5 A = 3 // f t ˆ2
6 D = 64 // l b s / f t ˆ3
7 g = 32.2 // f t / s e c ˆ2
8 M = 64 // l b s
9 //CALCULATIONS
10 vr = Q / A
11 u = v *44/30
12 v1 = vr - u
13 P = M * Q * v1 / g
14 //RESULTS
15 printf ( ’ p r o p e l l i n g f o r c e = %. 1 f l b s ’ ,P )
1 clc
2 // 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
3 vr = 20 // f / s e c
4 u = 9 // k n o t s
5 D = 64 // l b s p e r c u b i c f o o t
6 g = 32.2 // f t / s e c ˆ2
7 p = 40 // p e r c e n t
8 //CALCULATIONS
9 u1 = u *6080/3600
10 v = vr - u1
11 P = D *2* vr *4.8/ g
12 HP = P * u1 /550
13 HP1 = 100* HP / p
14 //RESULTS
15 printf ( ’ c y l i n d e r H . P= %. 2 f H . P ’ , HP1 )
91
1 clc
2 // 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
3 W = 62.4 // l b s / f t ˆ3
4 A = 4 // f t ˆ2
5 P = 1000 // l b s
6 g = 32.2 // f t / s e c ˆ2
7 v = 10 // f t / s e c
8 //CALCULATIONS
9 vr = sqrt (25+( P * g /( W * A ) ) ) +5
10 Q = vr * W * A /10
11 e = 2* v *100/( vr + v )
12 //RESULTS
13 printf ( ’ q u a n t i t y o f w a t e r pumped= %. 1 f l b s ’ ,Q )
14 printf ( ’ \n e f f i c i e n c y = %. 1 f p e r c e n t ’ ,e )
1 clc
2 // i n i t i a l i s a t i o n o f variables
3 g = 32.2 // f t / s e c ˆ2
4 //CALCULATIONS
5 v = sqrt (32* g )
6 //RESULTS
7 printf ( ’ s p e e d t h a t d e l i v e r y commence= %. 1 f f t / s e c ’ ,
v)
92
Chapter 9
Viscous flow
1 clc
2 // 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
3 sg = 0.7
4 v = 0.05 // p o i s e
5 g = 32.2 // f t / s e c ˆ2
6 w = 62.4 // l b s / f t ˆ3
7 //CALCULATIONS
8 u = v *30.5/( g *453.6)
9 v1 = v / sg
10 d = w * v1 / g
11 v= u/d
12 //RESULTS
13 printf ( ’ v i s c o c i t y = %. 6 f s l u g / t s e c ’ ,u )
14 printf ( ’ \n k i n e m a t i c v i s c o c i t y = %. 4 f cmˆ2/ s e c ’ , v1
)
15 printf ( ’ \n k i n e m a t i c v i s c o c i t y = %. 6 f f t ˆ2/ s e c ’ ,v )
93
1 clc
2 // 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
3 d = 0.5 // i n
4 V = 1 // f t / s e c
5 l = 200 // f t
6 T = 5 // d e g r e e s
7 g = 32.2 // f / s e c ˆ2
8 //CALCULATIONS
9 i = 0.04* V ^2*12*4/( g * d )
10 gf = i * l
11 //RESULTS
12 printf ( ’ l o s s o f head= %. 1 f f t ’ , gf )
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 T = 25 //C
6 dp =8 // l b s / i n ˆ2
7 t = 0.005 // i n
8 w = 3 // i n
9 l = 1 // f t
10 //CALCULATIONS
11 ut = (0.0179*30.5/( g *453.6) ) /(1+0.03368* T +0.000221* T
^2)
12 Ql = dp *144*( t /12) ^3*3600*6.24/(12* ut *4)
13 //RESULTS
14 printf ( ’ D i s c h a r g e= %. 6 f g a l l o n s p e r h o u r ’ , Ql )
15
16
17 //ANSWER GIVEN IN THE TEXTBOOK I S WRONG
94
Scilab code Exa 9.4 chapter 9 example 4
1 clc
2 // 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
3 v = 1.25 // p o i s e
4 d = 3 // i n
5 l = 6 // i n
6 t = 0.002 // i n
7 w = 40 //R . P .M
8 g = 32.2 // f t / s e c ˆ2
9 //CALCULATIONS
10 u = v *30.5/(453.6* g )
11 T = u * %pi ^2*( d /12) ^3* w *( l /12) /(120* t /12)
12 hp = T *2* %pi * w /33000
13 //RESULTS
14 printf ( ’ Horse −power l o s t i n v e l o c i t = %. 4 f ’ , hp )
1 clc
2 // 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
3 w = 750 //R . P .M
4 t = 0.02 // i n
5 r1 =9 // i n
6 r2 = 5 // i n
7 u = 0.003 // s l u g / f t s e c
8 //CALCULATIONS
9 T = u * %pi *(2* %pi * w /60) *(( r1 /24) ^4 -( r2 /24) ^4) *2* %pi * w
/(2* t /12*33000)
10 //RESULTS
11 printf ( ’ h o r s e power r e q u i r e d t o o v e r c o m e= %. 1 f hp ’ ,
T)
95
96
Chapter 10
Miscellaneous Problems
1 clc
2 // 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
3 w = 62.4 // l b / f t ˆ3
4 x =8 // f t
5 A = 16 // f t ˆ2
6 X = 2.5 // f t
7 X1 = 0.66 // f t
8 x1 = 3.834 // f t
9 x2 = 2.182 // f t
10 //CALCULATIONS
11 P= w*x*A
12 y = A /3
13 P1 = w * x * A *0.5* X1
14 R = sqrt ( P1 ^2+ P ^2)
15 m = P1 / P
16 X2 = x1 - x2
17 C = ((2/3) * A ) -m * X
18 Y = m * X2 + C
19 //RESULTS
20 printf ( ’ Water p r e s s u r e on v e r t i c a l f a c e = %. f l b s ’ ,
P)
97
21 printf ( ’ \n p r e s s u r e which a c t s a t t h e b a s e = %. 2 f
f t ’ ,y )
22 printf ( ’ \n R e s u l t a n t = %. f l b s ’ ,R )
23 printf ( ’ \n x c o o r d i n a t e o f t h e r e s u l t a n t = %. 3 f f t ’
, X2 )
24 printf ( ’ \n y c o o r d i n a t e o f t h e r e s u l t a n t = %. 3 f f t ’
,Y )
1 clc
2 // 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
3 s = 13.6
4 h = 12 // i n
5 u = 0.04
6 k= 1
7 d = 6 // i n
8 g = 32.2 // f t / s e c ˆ2
9 w = 62.4 // l b s / f t ˆ3
10 //CALCULATIONS
11 h1 = h *( s -1) /12
12 hf = u * h1
13 hn = h1 - hf
14 Q = k *( %pi *( d /12) ^2) * sqrt (2* g ) * sqrt ( hn ) * w *60/(10*4*
sqrt (15) )
15 //RESULTS
16 printf ( ’ d i s c h a r g e t h r o u g h f l o w= %. f f t G. P .M’ ,Q )
1 clc
2 // i n i t i a l i s a t i o n of variables
3 za = 16 // f t
98
4 h1 = 2 // f t
5 h2 = 3 // f t
6 g = 32.2 // f t / s e c ˆ2
7 //CALCULATIONS
8 vc = sqrt (2* g *( za - h1 - h2 ) )
9 vb = vc *( h1 /(2* h1 ) ) ^2
10 r = -h1 - h2 -( vb ^2/(2* g ) )
11 r1 = r +34
12 //RESULTS
13 printf ( ’ p r e s s u r e head a t B= %. 1 f f t l b ’ , r1 )
1 clc
2 // 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
3 g = 32.2 // f t / s e c ˆ2
4 Cd = 0.62
5 a = 90 // d e g r e e s
6 H1 = 14 // i n
7 H2 = 8 // i n
8 //CALCULATIONS
9 Q1 = (8/15) * Cd * sqrt (2* g ) * tand ( a /2) *( H1 /12) ^(5/2)
10 Q2 = (8/15) * Cd * sqrt (2* g ) * tand ( a /2) *( H2 /12)
11 Q = Q1 - Q2
12 //RESULTS
13 printf ( ’ D i s c h a r g e t h r o u g h n o t c h= %. 2 f c u s e s ’ ,Q )
1 clc
2 // i n i t i a l i s a t i o n o f variables
3 g = 32.2 // f t / s e c ˆ2
4 Cd = 0.62
99
5 d = 5/4 // i n
6 h = 9 // f t
7 //CALCULATIONS
8 T = (2/3) * %pi *( h ) ^(3/2) /( Cd *( %pi /4) * sqrt (2* g ) *( d /12)
^2)
9 //RESULTS
10 printf ( ’ t i m e r e q u i r e d t o l o w e r w a t e r l e v e l = %. f
s e c s ’ ,T )
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 a = 60 // d e g r e e s
5 d = 4 // i n
6 Cd = 0.62
7 h = 5 // f t
8 w = 30 // f t
9 g = 32.2 // f t / s e c ˆ2
10 //CALCULATIONS
11 H1 = 10* sind ( a )
12 H2 = H1 - h
13 T = (2* w / tand ( a ) ) *(2/3) *( H1 ^(3/2) - H2 ^(3/2) ) /( Cd * sqrt
(2* g ) * %pi /(4*( d /12) ^2) ) *100
14 //RESULTS
15 printf ( ’ t i m e r e q u i r e d t o l o w e r w a t e r l e v e l = %. f
s e c s ’ ,T )
1
2 clc
100
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 p1 = 40 // p e r c e n t
5 p2 = 35 // p e r c e n t
6 dh = 200 // f t
7 f = 0.1
8 g = 32.2 // f t / s e c ˆ2
9 l = 2000 // f t
10 d = 1 // f t
11 //CALCULATIONS
12 hf1 = p1 * dh /100
13 hf2 = p2 * dh /100
14 hf3 = (100 - p1 - p2 ) * dh /100
15 hft = hf1 + hf2 + hf3
16 v1 = sqrt (2* g * hf1 /(4* f * l ) )
17 Q = v1 * %pi * d ^2/4
18 d2 = ( Q *7* sqrt (3/(5* g ) ) ) ^(2/3)
19 v3 = Q *4*(4/3) ^2/ %pi
20 l3 = hf2 *2* g *(3/4) /(4* f * v3 ^2)
21 //RESULTS
22 printf ( ’ p r o p o r t i o n o f t h e q u a n t i t y f o l w i n g i n t h e
b y p a s s t o t h e w h o l e p a s s= %. f f t ’ , l3 )
1 clc
2 // 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
3 d = 1 // f t
4 l = 2000 // f t
5 f = 0.038
6 g = 32.2 // / f t / s e c ˆ2
7 Q = 6 // c u s e s
8 l1 = 1500 // f t
9 r= 2
10 //CALCULATIONS
11 v = 4* Q /( d ^2* %pi )
101
12 hf = 4* f * l * v ^2/(2* g )
13 v1 = sqrt ( hf *2* g /(4* f * l1 +4* f *( l - l1 ) * r ^2) )
14 v3 = r * v1
15 Q1 = %pi * d ^2* v3 /4
16 Q2 = %pi * d ^2* v1 /4
17 r1 = Q2 / Q1
18 //RESULTS
19 printf ( ’ p r o p o r t i o n o f t h e q u a n t i t y f o l w i n g i n t h e
b y p a s s t o t h e w h o l e p a s s= %. 1 f ’ , r1 )
1 clc
2 // 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
3 f = 0.01
4 d = 3 // i n
5 l = 22 // f t
6 l1 = 20 // f t
7 w = 20 // f t
8 h = 5 // f t
9 h1 = 20 // f t
10 t = 4 // min
11 g = 32.2 // f t / s e c ˆ2
12 //CALCULATIONS
13 h2 = h + h1
14 h3 = (h -( t *60* %pi * sqrt (2* g / h ) /( l1 * w *2*64) ) ) ^2 -4
15 dh = h2 - h3
16 Q = dh * l1 * w
17 //RESULTS
18 printf ( ’ Q u a n t i y d i s c h a r g e d= %. f c u s e s ’ ,Q )
102
1
2
3 clc
4 // 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
5 g = 32.2 // f t / s e c ˆ2
6 sct = 1.6
7 sl = 0.8
8 K = 0.98
9 dh1 = 4 // f t
10 W = 62.4 // l b s / f t ˆ3
11 d1 = 8 // i n
12 d2 = 6 // i n
13 //CALCULATIONS
14 dp = dh1 *(( sct / sl ) -1)
15 C = sqrt (2* g ) * %pi *( d1 /24) ^2 / sqrt (( d1 ^2/ d2 ^2) ^2 -1)
16 Q = C * K * sqrt ( dh1 )
17 //RESULTS
18 printf ( ’ D i s c h a r g e p a s s i n g t h r o u g h t h e p i p e= %. 1 f
c u s e s ’ ,Q )
19 // 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 . P l e a s e
verify it .
103