You are on page 1of 116

Scilab Code for

Introduction to Fluid Mechanics


by Fox and McDonald1
Created by
Eswar Prasad
4th Year Student
B.E. (Mech. Engg.)
National Institute of Technology, Trichy
College Teacher and Reviewer
Shivraj Deshmukh
Ph.D student
IIT Bombay
29 June 2010

1 Funded

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


http://spoken-tutorial.org/NMEICT-Intro

Book Details
Authors: Robert W. Fox and Alan T. McDonald
Title: Introduction to Fluid Mechanics
Publisher: John Wiley & Sons
Edition: 5th
Year: 2001
Place: New Delhi
ISBN: 9971-51-355-2

Contents
List of Scilab Code

1 Introduction
1.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

10
10
10

2 Fundamental Concepts
2.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

12
12
12

3 Fluid Statics
3.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

14
14
14

4 Basic Equations in Integral form for a Control Volume


4.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

23
23
23

5 Introducton to Differential Analysis of Fluid Motion


5.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

38
38
38

6 Incompressible Inviscid Flow


6.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

42
42
42

7 Dimensional Analysis and Simlitude


7.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

49
49
49

8 Internal Incompressible Viscous Flow


8.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

55
55
55

9 External Incompressible Viscous Flow


9.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

66
66
66

10 Fluid Machinery
10.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

75
75
75

11 Introduction to Compressible Flow


11.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . .

95
95
95

12 Steady One-Dimensional Compressible Flow


100
12.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
12.2 Scilab Code . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

List of Scilab Code


1.01
1.01d
1.02
1.02d
2.02
2.02d
3.01
3.01d
3.03
3.03d
3.04
3.04d
3.05
3.05d
3.06
3.06d
3.07
3.07d
4.01
4.01d
4.02
4.02d
4.03
4.03d
4.04
4.04d
4.05
4.05d

1.01.sce . . .
1.01-data.sci
1.02.sce . . .
1.02-data.sci
2.02.sce . . .
2.02-data.sci
3.01.sce . . .
3.01-data.sci
3.03.sce . . .
3.03-data.sci
3.04.sci . . .
3.04-data.sci
3.05.sce . . .
3.05-data.sci
3.06.sci . . .
3.06-data.sci
3.07.sce . . .
3.07-data.sci
4.01.sce . . .
4.01-data.sci
4.02.sce . . .
4.02-data.sci
4.03.sce . . .
4.03-data.sci
4.04.sce . . .
4.04-data.sci
4.05.sce . . .
4.05-data.sci

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4.06
4.06d
4.07
4.07d
4.08
4.08d
4.09
4.09d
4.10
4.10d
4.11
4.11d
4.12
4.12d
4.14
4.14d
4.16
4.16d
4.17
4.17d
5.02
5.02d
5.07
5.07d
5.08
5.08d
5.09
5.09d
6.01
6.01d
6.02
6.02d
6.03
6.03d
6.04
6.04d
6.05
6.05d

4.06.sce . . . . . . . .
4.06-data.sci . . . . .
4.07.sce . . . . . . . .
4.07-data.sci . . . . .
4.08.sce . . . . . . . .
4.08-data.sci . . . . .
4.09.sce . . . . . . . .
4.09-data.sci . . . . .
4.10.sce . . . . . . . .
4.10-data.sci . . . . .
4.11.sce . . . . . . . .
4.11-data.sci . . . . .
4.12.sce . . . . . . . .
4.12-data.sci . . . . .
This is some example
4.14-data.sci . . . . .
4.16.sce . . . . . . . .
4.16-data.sci . . . . .
4.17.sce . . . . . . . .
4.17-data.sci . . . . .
5.02.sce . . . . . . . .
5.02-data.sci . . . . .
5.07.sce . . . . . . . .
5.07d . . . . . . . . .
5.08.sce . . . . . . . .
5.08-data.sci . . . . .
5.09.sce . . . . . . . .
5.09-data.sci . . . . .
6.01.sce . . . . . . . .
6.01-data.sci . . . . .
6.02.sce . . . . . . . .
6.02-data.sci . . . . .
6.03.sce . . . . . . . .
6.03-data.sci . . . . .
6.04.sce . . . . . . . .
6.04-data.sci . . . . .
6.05.sce . . . . . . . .
6.05-data.sci . . . . .

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

28
28
29
29
30
30
30
30
31
31
32
32
34
34
34
35
35
36
36
36
38
38
39
39
39
40
41
41
42
42
43
43
43
44
44
44
45
45

6.06
6.06d
6.08
6.08d
6.09
6.09d
7.04
7.04d
7.05
7.05d
7.06
7.06d
8.01
8.01d
8.02
8.02d
8.04
8.04d
8.05
8.05d
8.06
8.06d
8.07
8.07d
8.08
8.08d
8.09
8.09d
8.10
8.10d
8.11
8.11d
9.01
9.01d
9.04
9.04d
9.05
9.05d

6.06.sce . . .
6.06-data.sci
6.08.sce . . .
6.08-data.sci
6.09.sce . . .
6.09-data.sci
7.04.sce . . .
7.04-data.sci
7.05.sce . . .
7.05-data.sci
7.06.sce . . .
7.06-data.sci
8.01.sce . . .
8.01-data.sci
8.02.sce . . .
8.02-data.sci
8.04.sce . . .
8.04-data.sci
8.05.sce . . .
8.05-data.sci
8.06.sce . . .
8.06-data.sci
8.07.sce . . .
8.07-data.sci
8.08.sce . . .
8.08-data.sci
8.09.sce . . .
8.09-data.sci
8.10.sce . . .
8.10-data.sci
8.11.sce . . .
8.11-data.sci
9.01.sce . . .
9.01-data.sci
9.04.sce . . .
9.04-data.sci
9.05.sce . . .
9.05-data.sci

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

45
46
46
47
47
48
49
50
50
51
52
53
55
56
56
57
57
57
58
58
59
59
60
60
60
61
62
62
63
63
64
64
66
66
67
68
68
69

9.06 9.06.sce . . . .
9.06d 9.06-data.sci .
9.07 9.07.sce . . . .
9.07d 9.07-data.sci .
9.08 9.08.sce . . . .
9.08d 9.08-data.sci .
9.09 9.09.sce . . . .
9.09d 9.09-data.sci .
10.01 10.01.sce . . .
10.01d 10.01-data.sci
10.02 10.02.sce . . .
10.02d 10.02-data.sci
10.03 10.03.sce . . .
10.03d 10.03-data.sci
10.06 10.06.sce . . .
10.06d 10.06-data.sci
10.07 10.07.sce . . .
10.07d 10.07-data.sci
10.08 10.08.sce . . .
10.08d 10.08-data.sci
10.11 10.11.sce . . .
10.11d 10.11-data.sci
10.12 10.12.sce . . .
10.12d 10.12-data.sci
10.14 10.14.sce . . .
10.14d 10.14-data.sci
10.16 10.16.sce . . .
10.16d 10.16-data.sci
11.01 11.01.sce . . .
11.01d 11.01-data.sci
11.03 11.03.sce . . .
11.03d 11.03-data.sci
11.04 11.04.sce . . .
11.04d 11.04-data.sci
12.01 12.01.sce . . .
12.01d 12.01-data.sci
12.02 12.02.sce . . .
12.02d 12.02-data.sci

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

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

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

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

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

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

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

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

69
70
70
70
71
72
72
74
75
76
76
77
77
78
79
80
81
81
82
85
86
88
91
92
92
93
93
94
95
96
96
97
97
99
100
101
102
103

12.03 12.03.sce . . .
12.03d 12.03-data.sci
12.04 12.04.sce . . .
12.04d 12.04-data.sci
12.05 12.05.sce . . .
12.05d 12.05-data.sci
12.06 12.06.sce . . .
12.06d 12.06-data.sci
12.07 12.07.sce . . .
12.07d 12.07-data.sci
12.08 12.08.sce . . .
12.08d 12.08-data.sci
12.09 12.09.sce . . .
12.09d 12.09-data.sci
12.10 12.10.sce . . .
12.10d 12.10-data.sci

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

103
104
104
105
106
106
107
108
108
109
110
111
111
113
113
115

List of Figures
3.1

Output graph of S 3.01 . . . . . . . . . . . . . . . . . . . . .

16

4.1

Output graph of S 4.11 . . . . . . . . . . . . . . . . . . . . .

33

7.1

Output graph of S 7.05 . . . . . . . . . . . . . . . . . . . . .

52

9.1

Output graph of S 9.08 . . . . . . . . . . . . . . . . . . . . .

73

10.1
10.2
10.3
10.4
10.5
10.6
10.7

Output
Output
Output
Output
Output
Output
Output

.
.
.
.
.
.
.

79
83
86
87
89
89
90

11.1 Output graph of S 11.03 . . . . . . . . . . . . . . . . . . . .

98

graph of S 10.03 .
graph of S 10.07 .
graph-1 of S 10.08
graph-2 of S 10.08
graph-1 of S 10.11
graph-2 of S 10.11
graph-3 of S 10.11

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Chapter 1
Introduction
1.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question

1.2

Scilab Code

Example 1.01 1.01.sce


1
2
3
4
5
6
7

pathname=g e t a b s o l u t e f i l e p a t h ( 1 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 1.01 data . s c i
exec ( f i l e n a m e )
// Heat

added

during

the

process ( in

Example 1.01d 1.01-data.sci


1
2

kJ ) :

Q12=m cp (T2T1)
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nHeat added d u r i n g t h e p r o c e s s : %f kJ\n\n ,
Q12 /1000)

// Mass

of

oxygen

present ( in

kg ) :

m= 0 . 9 5 ;
10

// I n i t i a l

T1=300;

// F i n a l

T2=900;

temperatur ( in

temperature

// P r e s s u r e

p=150;

9
10

// S p e c i f i c

of

of

oxygen ( in

heat

at

K) :

oxygen ( in

K) :

kPa ) :

constant

pressure ( in

J / k g K ) :

cp = 9 0 9 . 4 ;
Example 1.02 1.02.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 1.02 data . s c i
exec ( f i l e n a m e )

// Speed

1
2

at

which

// T e r m i n a l

Vt=sqrt (mg/k )

// R a t i o

10
11

12

ball

hits

the

ground ( in

m/ s e c ) :

V=sqrt (mg/k(1%e(2 k/m(y0 ) ) ) )

the

of

speed ( in

actual

m/ s e c ) :

speed

to

the

terminal

speed :

r=V/Vt ;
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nSpeed a t which t he b a l l h i t s he ground : %f
m/ s e c \n\n ,V)
p r i n t f ( \n\ nRatio o f a c t u a l speed t o t he t e r m i n a l speed
: %f\n\n , r )
Example 1.02d 1.02-data.sci

// Mass

m= 0 . 2 ;

of

// H e i g h t

y0 =500;

ball ( in

fom

// Value

k=2104;

of

which

kg ) :

ball

is

dropped ( in

m) :

k :

// A c c l e r a t i o n

g =9.81;

due

to

gravity ( in

11

m/ s e c 2 ) :

Chapter 2
Fundamental Concepts
2.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question

2.2

Scilab Code

Example 2.02 2.02.sce


1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 2 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 2.02 data . s c i
exec ( f i l e n a m e )

4
5

// V i s c o s i t y

in

units

u1=u / 1 0 0 / 4 5 4 / 3 2 . 2 3 0 . 5

// K i n e m a t i c

v=u1/SG/d ( 0 . 3 0 5 ) 2

// Shear

viscosity

stress

10

tu=u1U/D1000

11

// Shear

12
13

stress

of

lbf s / f t 2:

( in

m/ s e c 2 ) :

on

the

upper

plate ( lbf / ft 2) :

on

the

lower

plate ( in

t l=tu 4 . 4 5 / 0 . 3 0 5 2
p r i n t f ( \n\nRESULTS\n\n )
12

Pa )

14

15
16

17

p r i n t f ( \n\ n V i s c o s i t y i n u n i t s o f l b f s / f t 2 : %1. 8 f
$ l b f s / f t 2\n\n , u1 )
p r i n t f ( \n\ nKinematic v i s c o s i t y : %1. 8 f m/ s e c 2\n\n , v )
p r i n t f ( \n\ nShear s t r e s on t h e upeer p l a t e : %f l b f / f t
2\n\n , tu )
p r i n t f ( \n\ nSear s t r e s s on t h e l o w e r p l a t e : %f Pa\n\n ,
tl )
Example 2.02d 2.02-data.sci

1
2
3

// Mass

of

// I n i t i a l

T1=300;

// F i n a l

present ( in

T2=900;

temperatur ( in

temperature

// P r e s s u r e

p=150;

// S p e c i f i c

10

oxygen

kg ) :

m= 0 . 9 5 ;

of

of

oxygen ( in

heat

at

K) :

oxygen ( in

K) :

kPa ) :

constant

pressure ( in

cp = 9 0 9 . 4 ;

13

J / k g K ) :

Chapter 3
Fluid Statics
3.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question
When we execute S 3.01, we get Fig. 3.1.

3.2

Scilab Code

Example 3.01 3.01.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 3 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 3.01 data . s c i
exec ( f i l e n a m e )

// Tube

1
2

5
6
7
8
9
10
11
12

diameter ( in

mm ) :

D= 1 : 2 5 ;
D1=D/1000
[m n]= s i z e (D1)
for i =1:n
// Change

in

liquid

level

for

water ( in

mm ) :

dhw( i ) =4STw cosd ( thetaw ) /dw/g/D1( i ) ;


// Change

in

liquid

level

for

mercury ( in

dhm( i ) =4STm cosd ( thetam ) /dm/g/D1( i ) ;


14

mm ) :

13

end ;

14
15

// P l o t t i n g

16

plot (D11000 ,dhw , o )

17

// P l o t t i n g

18
19
20

tube

tube

daimeter

daimeter

and

water

level :

and

mercury

level :

plot (D11000 ,dhm , )


l e g e n d ( [ Water ; Mercury ] ) ;
x t i t l e ( L i q u i d l e v e l vs Tube d i a m e t e r , L i q u i d l e v e l ( i n
mm) , Tube d i a m e t e r ( i n mm) )
Example 3.01d 3.01-data.sci

1
2
3
4

// S u r f a c e

tension

// S u r f a c e

Tension

// C o n t a c t

thetaw =0;

// COntact

thetam =140;

11
12

water ( in

mN / m ) :

of

mercury ( in

mN / m ) :

STm=37510 3;

10

of

STw=72.810 3;

// D e n s i t y

angle

for

water :

angle

for

mercury :

of

water ( in

kg /m 3 ) :

of

mercury ( in

dw=1;
// D e n s i t y

kg /m 3 ) :

dm= 1 3 . 6 ;

13

// A c c e l e r a t i o n

14

g =9.81;

de

to

gravity ( in

m/ s e c ) :

Example 3.03 3.03.sce


1
2
3
4
5
6
7

pathname=g e t a b s o l u t e f i l e p a t h ( 3 . 0 3 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 3.03 data . s c i
exec ( f i l e n a m e )
// P r e s s u r e

d i f f e r e n c e ( in

lbf / in 2) :

dp=gd(d1+SGmd2SGod3+SGmd4+d5 ) /12/144
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n P r e s s u r e d i f f e r e n c e between A and B : %f l b f
/ i n 2\n\n , dp )
15

Figure 3.1: Output graph of S 3.01

16

Example 3.03d 3.03-data.sci


1

// A c c e l e r a t i o n

g =32.2;

// S p e c i f i c

4
5
6
7
8
9

// S p e c i f i c

// S p e c i f i c

// D e n s i t y

// H e i g h t s

15
16

gravity

of

mercury :

gravity

of

oil :

gravity

of

water :

ft / sec 2) :

SGw=1;
d=1.94;

14

gravity ( in

SGo= 0 . 8 8 ;

11

13

to

SGm= 1 3 . 6 ;

10

12

due

of

water ( in

of

liquid

in

slug / ft 3) :

various

tubes ( in

inches ) :

d1 =10;
d2 =3;
d3 =4;
d4 =5;
d5 =8;
Example 3.04 3.04.sci

pathname=g e t a b s o l u t e f i l e p a t h ( 3 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 3.04 data . s c i
exec ( f i l e n a m e )

// Assuming

1
2

5
6

temperature

// T e m p e r a t u r e

varies

gradient ( in

li ne ar ly

with

F/ ft ) :

m=(T1T2) / ( z2z1 )
of

g / ( mR ) :

// Value

v=g/m/R/ 3 2 . 2

// P r e s s u r e

at

Vail

Pass ( in

inches

of

Hg ) :

10

p12=p1 ( ( T2+460) / (T1+460) ) v

11

// P e r c e n t a g e

12

pc1=(p12 /p1 (T1+460) / (T2+460) 1)100

13

// Assuming

density

is

14

// P r e s s u r e

at

Pass ( in

15

p22=p1 (1 ( g ( z2z1 ) / (R 3 2 . 2 ) / (T1+460) ) )

change

Vail

in

density :

constant :
inches

17

of

Hg ) :

altitude :

16

// P e r c e n t a g e

change

17

pc2 =0;

18

// Assuming

temperature

19

// P r e s s u r e

at

20

p32=p1%e(g ( z2z1 ) / (R 3 2 . 2 ) / (T2+460) )

21

// P e r c e n t a g e

Vail

change

in

density :

is

constant :

Pass ( in

in

inches

of

density :

22

pc3=(p32 /p1 (T1+460) / (T1+460) 1)100

23

// For

24

p42=p1 ((62+460) /(80+460) ) ( k / ( k1) )

25

// P e r c e n t a g e

26
27
28

29

30

31
32

33

34
35

36

37
38

39

an

adiabatic

change

Hg ) :

atmosphere :

in

density :

pc4=(p42 /p1 (T1+460) / (T2+460) 1)100


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\n1 ) I f t e m p e r a t u r e v a r i e s l i n e a r l y with
a l t i t u d e \n\n )
p r i n t f ( \n\n\ tAtmospheric p r e s s u r e a t V a i l Pass : %f
i n c h e s o f Hg\n\n , p12 )
p r i n t f ( \n\n\ t P e r c e n t a g e change i n d e n s i t y wrt Denver :
%f p e r c e n t \n\n , pc1 )
p r i n t f ( \n\n2 ) I f d e n s i t y i s c o n s t a n t \n\n )
p r i n t f ( \n\n\ tAtmospheric p r e s s u r e a t V a i l Pass : %f
i n c h e s o f Hg\n\n , p22 )
p r i n t f ( \n\n\ t P e r c e n t a g e change i n d e n s i t y wrt Denver :
%f p e r c e n t \n\n , pc2 )
p r i n t f ( \n\n3 ) I f t e m p e r a t u r e i s c o n s t a n t \n\n )
p r i n t f ( \n\n\ tAtmospheric p r e s s u r e a t V a i l Pass : %f
i n c h e s o f Hg\n\n , p32 )
p r i n t f ( \n\n\ t P e r c e n t a g e change i n d e n s i t y wrt Denver :
%f p e r c e n t \n\n , pc3 )
p r i n t f ( \n\n4 ) For an a d i a b a t i c atmosphere \n\n )
p r i n t f ( \n\n\ tAtmospheric p r e s s u r e a t V a i l Pass : %f
i n c h e s o f Hg\n\n , p42 )
p r i n t f ( \n\n\ t P e r c e n t a g e change i n d e n s i t y wrt Denver :
%f p e r c e n t \n\n , pc4 )
Example 3.04d 3.04-data.sci

// E l e v a t i o n

z1 =5280;

of

Denver ( in

ft ) :

18

// P r e s s u r e

p1 = 2 4 . 8 ;

// T e m p e r a t u r e

// E l e v a t i o n

z2 =10600;

Denver ( in

at

mm

of

Denver ( in

Hg ) :

F) :

T1=80;

10

at

at

// T e m p e r a t u r e

Vail

at

Pass ( in

Vsil

ft ) :

Pass ( in

F) :

T2=62;

11

// Value

12

R= 5 3 . 3 ;

of

13

// A c c e l e r a t i o n

14

g =32.2;

15

// Value

16

k =1.4;

of

f t l b f / l b m R ) :

in

due

togravity ( in

adiabatic

ft / sec 2) :

constant :

Example 3.05 3.05.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 3 . 0 5 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 3.05 data . s c i
exec ( f i l e n a m e )

// Net

Fr=dgw(DL+L2/2 s i n d ( t h e t a ) )

// C e n t r e

// C a l c u l a t i o n

1
2

force

of

on

the

gate ( in

pressure :
for

coordinate :

yc=D/ s i n d ( t h e t a )+L/2

// Area ( in

10

m2) :

A=Lw

11

// Moment

12

Ixx=wL3/12

of

inertia

13

// y

14

y=yc+Ixx /A/ yc

15
16
17
18
19
20
21

kN ) :

coordinate ( in

// C a l c u l a t i o n

for

of

rectangular

gate ( in

m4) :

m) :

coordinate :

Ixy=0
xc=w/2
// x

coordinate ( in

m) :

x=xc+Ixy /A/ xc
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nNet f o r c e on th e g a t e : %f kN\n\n , Fr /1000)
19

22

p r i n t f ( \n\ nCoordinate o f c e n t r e o f p r e s s u r e : ( %0. 1 f , %0


. 1 f ) \n\n , x , y )
Example 3.05d 3.05-data.sci

1
2
3
4
5
6

// Length

of

gate ( in

// Width

of

gate ( in

of

gate

m) :

w=5;
// Depth

under

water ( in

m) :

D=2;

// D e n s i t y

d=999;

// A c c e l e r a t i o n

10

m) :

L=4;

of

water ( in

due

kg /m 3 :

to

gravity ( in

m/ s e c 2 ) :

g =9.81;

11

// Angle

12

t h e t a =30;

of

gate

with

horizontal :

Example 3.06 3.06.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 3 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 3.06 data . s c i
exec ( f i l e n a m e )

// F o r c e

1
2

5
6
7
8

required

to

keep

the

door

shut ( in

function y=f ( z ) , y=b/Lp0 z+db/L(Lzz 2 ) , endfunction


Ft=intg ( 0 , L , f )
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nForce r e q u i r e d t o kep th e door shut : %. 1 f
l b f \n\n , Ft )
Example 3.06d 3.06-data.sci

// P r e s s u r e

p0 =100;

// Length

4
5

lbf ) :

apllied

of

door ( in

on

the

door ( in

feet ) :

L=3;
// Breadth

of

the

door ( in

feet ) :

20

psfg ) :

b=2;

// D e n s i t y

d=100;

of

l i q i u i d ( in

lbf / ft 3) :

Example 3.07 3.07.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 3 . 0 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 3.07 data . s c i
exec ( f i l e n a m e )

// H o r i z o n t a l

Frh =0.5dgwD2

1
2

// Line

y1 =0.5D+wD 3 / 1 2 / ( 0 . 5 D) / (wD)

10
11

// V e r t i c a l

of

resultant

action

of

of

component

Frh ( in

component

of

force ( in

m) :

resultant

force ( in

kN ) :

function y=q ( x ) , y=dgw(Dsqrt ( ax ) ) , endfunction


Frv=intg ( 0 ,D2/ a , q )
// Line

of

acion

of

Frv ( in

m) :

13

function k=f ( x ) , k=dgw/ Frv x (Dsqrt ( ax ) ) ,


endfunction
xa=intg ( 0 ,D2/ a , f )

14

// F o r c e

12

kN ) :

required

to

keep

the

gate

in

equilibrium ( in

:
15
16
17

Fa=1/ l ( xa Frv+(Dy1 ) Frh )


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nForce r e q u i r e d t o keep t h e g a t e a t
e q u i l i b r i u m : %f kN\n\n , Fa /1000)
Example 3.07d 3.07-data.sci

1
2
3
4

// Width

of

gate ( in

of

water ( in

m) :

w=5;
// Depth

m) :

D=4;

// D e n s i t y

d=999;

// A c c e l r a t i o n

g =9.81;

// Value

of

of

water ( in

deto

( in

kg /m 3 ) ;

gravity ( in

m) :

21

m/ s e c 2 ) :

kN )

10

a =4;

11

// P o i n t

12

l =5;

where

force

acts ( in

m) :

22

Chapter 4
Basic Equations in Integral
form for a Control Volume
4.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question
When we execute S 4.11, we get Fig. 4.1.

4.2

Scilab Code

Example 4.01 4.01.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.01 data . s c i
exec ( f i l e n a m e )

// I f

// For

system :

// For

area

IA1=dV1A1

// For

IA3=m3

1
2

10

// For

I= i n t e g r a l

o f ( pV . dA ) :

I c s =IA1+IA2+IA3+IA4 .

area

3:

I A 2 = d V3 A3 =m3

area

4:

I A 4 = d V 4 A 4 = d Q 4

23

11

IA4=dQ4

12

// For

13

IA2=IA1IA3IA4

14
15
16
17
18

area

2:

// V e l o c i t y

at

section

2( in

ft / sec ) :

V2=IA2/d/A2
/ / V2

is

in

the

negative

direction

p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n V e l o c i t y a t s e c t i o n 2 : %. 0 f j f t / s e c \n\n ,
V2)
Example 4.01d 4.01-data.sci

1
2
3
4
5
6
7
8
9

// Area

// Area

// Area

// Area

16

of

( in

ft 2) :

of

( in

ft 2) :

of

( in

ft 2) :

A4= 0 . 4 ;
// D e n s i t y

// Mass

15

ft 2) :

A3= 0 . 4 ;

d=1.94;

14

( in

A2= 0 . 5 ;

11

13

A1= 0 . 2 ;

10

12

of

of

flow

water

rate

( in

out

of

slug / ft 3) :

section

3( in

slug / sec ) :

m3= 3 . 8 8 ;
// Volme

flow

rate

in

section

( in

f t 3/ sec ) :

Q4=1;
// V e l o c i t y

at

1( in

ft / sec ) :

V1=10;
Example 4.02 4.02.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.02 data . s c i
exec ( f i l e n a m e )

// I f

// For

system :

// But

I C S =0

1
2

I= i n t e g r a l

o f ( pV . dA ) :

ICS= Iab + I b c + I c d + Ida

24

8
9
10

// For

Aab :

function p=f ( y ) , p=dUwy 0 , endfunction


IAab=intg ( 0 , t , f )

11
12
13
14

// For

Acd :

function q=g ( y ) , q=dUw(2 y/ t (y/ t ) 2) , endfunction


IAcd=intg ( 0 , t , g )

15
16
17
18
19

// Mass

flow

rate

across

surface

bc ( in

kg / s e c ) :

mbc=(IAabIAcd ) /1000
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nMass f l o w r a t e a c r o s s s u r f a c e bc : %. 4 f kg /
s e c \n\n ,mbc)
Example 4.02d 4.02-data.sci

1
2

// Flow

velocity

// Boundary

t =5;

// D e n s i t y

d=1.24;

of

the

plate ( in

m/ s e c ) :

U=30;

ahead

// P l a t e

layer

of

wdth

tckness

fluid

at

air ( in

perpendicular

location

d( in

mm ) :

k /m 3 ) :

to

the

plate ( in

m) :

w= 0 . 6 ;
Example 4.03 4.03.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 3 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.03 data . s c i
exec ( f i l e n a m e )

// Rate

1
2

5
6
7

of

change

of

air

density

in

tank ( in

( kg /m 3 ) / s ) :

r=dvA/V/106
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nRate o f change o f a i r d e n s i t y i n tank : %. 3 f
kg /m3\n\n , r )
p r i n t f ( \n\nThe d e n s i t y d e c r e a s e s as i s i n d i c a t e d by
t he n e g a t i v e s i g n \n\n )

25

Example 4.03d 4.03-data.sci


1
2

// Volume

of

// P r e s s u r e

p=800;

of

a i r ( In

// T e m p e r a t u r e

of

kPa ) :

tank ( in

C) :

T=15;

// V e l o c i t y

v =311;

// D e n s i t y

10

d=6.13;

11

// Area

12

m3) :

V= 0 . 0 5 ;

tank ( in

of

of

leavig

air ( in

ofvalve

air ( in

m/ s e c ) :

kg /m 3 ) :

exit ( in

mm 2 ) :

A=65;
Example 4.04 4.04.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.04 data . s c i
exec ( f i l e n a m e )

// 1)

u1 =15;

// F o r c e

1
2

Control

surface

7
8
9
10
11

Volume

is

of

selected

equal

support

to

on

the

so

that

area

control

of

area

the

volum ( in

right

l e f t
surface

kN ) :

function y=f (A) , y=u1dV, endfunction


Rx1=intg ( 0 , 0 . 0 1 , f )
// H o r i z o n t a l

force

on

support ( in

kN ) :

Kx=Rx1
// 2)

Control

the
of

l e f t
the

volumes
and

right

are

selected

surfaces

do

are

that

equial

plate

12

14

function z=g (A) , z=u1dV, endfunction


Fsx=intg ( 0 , 0 . 0 1 , g )

15

// Net

16

//

17

// From

18

Rx2=2.25

13

of

force

on

p l a t e : F x =0= B x p a A p + R x
Rx = p a Ap+ Bx

the

above ,

it

is

obtained

26

that :

the
to

area
the

of

area

19
20
21
22

// H o r i z o n t a l

force

on

support ( in

kN ) :

Kx2=Rx2
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n H o r i z o n t a l f o r c e on s u p p o r t : %. 3 f kN\n\n ,
Kx/1000)
Example 4.04d 4.04-data.sci

1
2
3
4

// V e l o c i t y

of

water

leaving

the

nozle ( in

m/ s e c ) :

V=15;
// Area

of

nozzle ( in

m2) :

A= 0 . 0 1 ;

// D e n s i t y

d=999;

of

water ( in

kg /m 3 ) :

Example 4.05 4.05.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 5 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.05 data . s c i
exec ( f i l e n a m e )

// Weight

1
2

5
6
7
8
9
10
11
12
13
14

of

water

in

the

tank ( in

lbf ) :

d1 = 6 2 . 4 ;
WH2O=d1Ah
v=5;
// T o t a l

body

force

in

negative

direction ( lbf ) :

function y=f (A) , y=vd2V1 , endfunction


F=intg ( 0 , A1 , f )
// F o r c e

of

scale

on

control

volume ( in

kN ) :

Ry=W+WH2OF
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n S c a l e Reading : %. 3 f l b f \n\n ,Ry)
Example 4.05d 4.05-data.sci

// H e i g h t

l =2;

// Area

of

of

the

cross

container ( in

section ( in

ft ) :

ft 2) :

27

4
5
6

A=1;
// Weight

// Water

h=1.9;

// Area

10
11

V1=5;
// Area

16

depth

of

// V e l o c i t y

13

15

container ( in

lbf ) :

( in

ft ) :

opening

1( in

ft 2) :

A1= 0 . 1 ;

12

14

of

W=5;

at

opening

1( in

ft / sec ) :

of

opening

2( in

ft 2) :

of

opening

1( in

ft 2) :

A2= 0 . 1 ;
// Area

A3= 0 . 1 ;

17

// D e n s i t y

18

d2 = 1 . 9 4 ;

of

water ( in

slug / f 3) :

Example 4.06 4.06.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.06 data . s c i
exec ( f i l e n a m e )

/ / X c o m p o n e n t

1
2

gate ( in
5
6

of

reaction

force

per

unit

width

of

the

N/m ) :

Rxw=(d (V22D2V12D1) ) (dg /2(D12D2 2) )


// H o r i z o n t a l

force

exerted

per

unt

width

on

the

gate ( in

N/m ) :
7
8
9

Kxw=Rxw
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n H o r i z o n t a l f o r c e e x e r t e d pe r unt width on
t he g a t e : %. 3 f kN/m\n\n ,Kxw/1000)
Example 4.06d 4.06-data.sci

1
2
3
4
5

// D i a m e t e r

of

channel ( in

m) :

D1= 1 . 5 ;
// V e l c i t y

of

flow

in

channel ( in

V1= 0 . 2 ;
// D i a m e t e r

at

section

2( in

m) :

28

m/ s e c ) :

6
7
8
9

D2= 0 . 0 5 6 3 ;
// V e l o c i t y

section

2( in

m/ s e c ) :

V2= 5 . 3 3 ;
// D e n s i t y

of

water ( in

10

d=999;

11

// A c c e l e r a t i o n

12

g =9.81;

due

kg /m 3 ) :

to

gravity ( in

m/ s e c 2 ) :

Example 4.07 4.07.sce


1
2
3
4
5
6

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.07 data . s c i
exec ( f i l e n a m e )
// V e l o c i t y

at

// Gauge

pressure ( in

p1g=p1patm
u1=V1 ; u2=V2 ;

// R e a c t i o n

10
11
12
13
14

15

section

1( in

m/ s e c ) :

V1=V2A2/A1

force

kPa ) :

component

in

the

d i r e c t i o n ( in

N) :

in

the

d i r e c t i o n ( in

N) :

Rx=p1g A1u1dV1A1
// R e a c t i o n

force

component

Ry=u2dV2A2
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nForce t o hold elbow a c t i n g t o th e l e f t : %. 3
f kN\n\n ,Rx/1000)
p r i n t f ( \n\ nForce t o hold elbow a c t i n g downwards : %. 3 f
N\n\n ,Ry)
Example 4.07d 4.07-data.sci

// P r e s s u r e

p1 = 2 . 2 1 1 0 5 ;

3
4
5

// Area

inlet

tothe

c r o s s s e c t i o n ( in

elbow ( in

N/m 2 ) :

m2) :

A1= 0 . 0 1 ;
// V e l o c i t y

V2=16;

// Area

of

at

of

at

secton

cross

2( in

section

of

m/ s e c ) :

section

A2= 0 . 0 0 2 5 ;
29

2( in

m2) :

9
10

// A t m o s p h e r i c

pressure ( in

kPa ) :

patm = 1 . 0 1 2 1 0 5 ;
Example 4.08 4.08.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 8 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.08 data . s c i
exec ( f i l e n a m e )

// T e n s i o n

1
2

5
6
7

required

to

pull

the

belt ( in

lbf ) :

T=Vbelt m/ 3 2 . 2
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nTension r e q u i r e d t o p u l l th e b e l t : %. 3 f l b f
\n\n ,T)
Example 4.08d 4.08-data.sci

// V e l o c i t y

Vbelt =3;

// V e l o c i t y

Vsand=5;

// Flow

m=500;

of

conveyor

of

sand

rate ( in

belt ( in

alling

onto

ft / sec ) :

belt ( in

ft / sec ) :

lbm / s e c ) :

Example 4.09 4.09.sce


1
2
3
4
5
6
7

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 0 9 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.09 data . s c i
exec ( f i l e n a m e )
// Minimum

gauge

pressure

required ( in

Example 4.09d 4.09-data.sci


1

lbf / in 2) :

pg=8/%pi 2d/D14Q 2 ( (D1/D2) 41) 144


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( Minimum gauge p r e s s u r e r e q u i r e d : %. 3 f l b f / i n 2
, pg )

// N o z z l e

inlet

diameter ( in

inchess ) :

30

2
3
4
5
6

D1=3;
// N o z z l e

exit

diameter ( in

inches ) :

D2=1;
// D e s i r e d

volume

flow

rate ( in

f t 3/ sec ) :

Q= 0 . 7 ;

// D e n s i t y

d=1.94;

of

water ( in

slug / ft 3) :

Example 4.10 4.10.sce


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

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 1 0 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.10 data . s c i
exec ( f i l e n a m e )
u1=VU
u2=(VU) cosd ( t h e t a )
v2=(VU) s i n d ( t h e t a )
V1=VU
V2=V1
//X

component

of

moment

equation ( in

N) :

function y=f (A) , y=u1(dV1) , endfunction


function z=g (A) , z=u2dV2 , endfunction
Rx=intg ( 0 ,A, f )+intg ( 0 ,A, g )

13
14
15
16

//Y

component

18

moment

equation ( in

and

the

// Vane

t h e t a =60;

// Speed

weight

of

water .

p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nNet f o r c e on th e vane : %. 3 f i+%. 2 f j kN\n\n
,Rx/1 0 00 ,Ry/1000)
Example 4.10d 4.10-data.sci

N) :

function a=h (A) , a=v2dV1 , endfunction


Ry=intg ( 0 ,A, h ) / / T h i s i s a f t e r n e g l e c t i n g
vane

17

of

turning

of

angle :

vane ( in

m/ s e c ) :

U=10;
// Area

of

nozzle ( in

m2 ) :

31

6
7
8
9
10

A= 0 . 0 0 3 ;
// Flow

velocity

of

water ( in

m/ s e c ) :

V=30;
// D e n s i t y

of

water ( in

kg /m 3 ) :

d=999;
Example 4.11 4.11.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 1 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.11 data . s c i
exec ( f i l e n a m e )

// E v a l u a t i n g

1
2

5
6
7
8
9
10
11

the

value

of

Vb :

Vb=V(1 cosd ( t h e t a ) ) dA/M


// Value

of

U/V

for

various

values

of

t =0:20;
[m n]= s i z e ( t )
for i =1:n
U V( i )=Vb t ( i ) /(1+Vb t ( i ) ) ;
end

12
13
14
15

// P l o t t i n g

U/V

vs

t :

plot ( t , U V)
x t i t l e ( U/V vs t , t ( i n s e c ) , U/V )
Example 4.11d 4.11-data.sci

1
2

// Mass

of

// Turning

t h e t a =60;

// Speed

6
7
8
9
10

vane

and

cart ( in

kg ) :

M=75;
angle

of

of

water

vane :

leaving

nozzle

V=35;
// E x i t

area

of

nozzle ( in

m) :

A= 0 . 0 0 3 ;
// D e n s i t y

of

water ( in

kg /m 3 ) :

d=999;

32

h o r i z o n t a l l y ( in

m/ s e c ) :

Figure 4.1: Output graph of S 4.11

33

Example 4.12 4.12.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 1 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.12 data . s c i
exec ( f i l e n a m e )

// A c c e l e r a t i o n

1
2

Veme/M0g

// V e l o c i t y

7
8
9
10

of

of

rocket

rocket

at

at

t =0( i n

t =10

( in

m/ s e c 2 ) :

m/ s e c ) :

function y=f ( t ) , y=Veme/ (M0me t )g , endfunction


Vcv=intg ( 0 , t , f )
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n V e l o c i t y o f r o c k e t a t t =10: %. 1 f m/ s e c \n\n
, Vcv )
Example 4.12d 4.12-data.sci

1
2
3
4
5
6

// I n i t i a l

mass

of

th

rocket ( in

fuel

consumption ( in

kg ) :

M0=400;
// Rate

of

kg / s e c ) :

me=5;
// Exhaust

v e l o c i t y ( in

m/ s e c ) :

Ve=3500;

// A c c e l e r a t i o n

g =9.81;

// Time

after

due

which

to

gravity ( in

velocity

is

to

m/ s e c 2 ) :

be

calculated ( in

:
10

t =10;
Example 4.14 4.14.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 1 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.14 data . s c i
exec ( f i l e n a m e )

// Area

1
2

of

jet ( in

mm 2 ) :

A j et=%pi /4D2

// J e t

V r e l=Q/2/ Aje t 106/60/1000

// Value

speed

of

re la ti ve

wR

in

to

the

nozzle ( in

m/ s e c :

34

m/ s e c ) :

sec )

9
10
11
12
13

14

wR=wR2 %pi /60/1000


// F r i c t i o n

torque

at

pivot ( in

Nm ) :

Tf=R( V r e l cosd ( alpha )wR) dQ/1000/60/1000


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nJet speed r e l a t i v e t o each n o z z l e : %. 2 f m/
s e c \n\n , V r e l )
p r i n t f ( \n\ n F r i c t i o n t o r q u e a t p i v o t : %. 5 f Nm\n\n , Tf )
Example 4.14d 4.14-data.sci

// I n l e t

gauge

p=20;

// Volume

pressure ( in

flow

rate

of

kPa ) :

water

through

the

s p r i n k l e r ( in

min ) :
4
5
6
7
8
9
10

Q= 7 . 5 ;
// Speed

of

rotstion

of

s p r i n k l e r ( in

of

spri nkle ( in

rpm ) :

w=30;
// D i a m e t e r

jet

mm ) :

D=4;
// Radius

of

s p r i n k l e r ( in

mm ) :

R=150;

11

// Supply

12

p=20;

pressure

13

// Angle

14

a lpha =30;

15

// D e n s i t y

16

d=999;

at

which

of

to

s p r i n k l e r ( in

jet

is

water ( in

sprayed

kPa ) :

wrt

horizontal :

kg /m ) :

Example 4.16 4.16.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 1 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.16 data . s c i
exec ( f i l e n a m e )

// V e l o c i t y

1
2

exit ( in

ft / sec ) :

V2=mR(T2+460) /A2/p2 /144

// As

// Rate

at

power
of

input
heat

is

to

CV ,

t r a n s f e r ( in

Ws = 6 0 0
Btu / s e c ) :

Q=Ws550/778+m cp (T2T1)+mV2 2 / 2 / 3 2 . 2 / 7 7 8
35

l /

9
10

p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nRate o f hea t t r a n s f e r : %. 3 f Btu/ s e c \n\n ,Q)
Example 4.16d 4.16-data.sci

// P r e s s u r e

p1 = 1 4 . 7 ;

// T e m p e r a t u r e

// P r e s s u r e

p2 =50;

8
9
10
11
12
13
14

entry ( in

at

psia ) :

entry ( in

F) :

T1=70;

at

at

// Temprature

exit ( in

psia ) :

exit ( in

F) :

T2=100;
// C r o s s

sectional

area

of

the

pipe

at

exit ( in

ft 2) :

A2=1;
// Mass

flow

rate ( in

lbf / sec ) :

m=20;
// Power

input

to

the

compressor ( in

hp ) :

Ws=600;

15

// Value

16

cp = 0 . 2 4 ;

17

// Value

18

R= 5 3 . 3 ;

of

cp ( in

of

gas

B t u / l b m R ) :

constant ( in

f t l b f / ( l b m R ) )

Example 4.17 4.17.sce


1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 4 . 1 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 4.17 data . s c i
exec ( f i l e n a m e )

// D e n s i t y

d=(p1+patm ) /R/T

// Mass

7
8
9

of

flow

tank ( in

rate

of

kg /m 3 ) :

air

into

the

tank ( in

kg / s e c ) :

m=dV cv r /R/T1000
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nMass f l o w r a t e o f a i r i n t o t h e tank : %. 3 f g
/ s e c \n\n ,m)
Example 4.17d 4.17-data.sci
36

1
2
3
4

// Volume

of

// T e m p e r a t u r e

of

p1 =1105;

// A b s o l u t e

p =2106;

// Rate

of

tank

gauge

line

rise

valve ( in

and

tank ( in

pressure ( in

pressure ( in

K) :

of

temperature

after

r =0.05;
// A t m o s p h e r i c

12

patm = 1 . 0 1 1 0 5 ;
// Gas

pressure ( in

Constant ( in

N/m 2 ) :

Nm / ( k g K ) ) :

R=287;

15

// Value

16

cv =717;

of

cv ( in

N/m 2 ) :

N/m 2 ) :

C/ s e c ) :

11

14

line

T=293;
// I n i t i a l

13

m3) :

V= 0 . 1 ;

10

tak ( in

Nm / k g K ) :

37

opening

of

the

Chapter 5
Introducton to Differential
Analysis of Fluid Motion
5.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question

5.2

Scilab Code

Example 5.02 5.02.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 5 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 5.02 data . s c i
exec ( f i l e n a m e )

// Rate

1
2

5
6
7

of

change

of

density

with

time ( in

k g /m3 s ) :

r=dV/L
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nRate o f change o f d e n s i t y with time : %. 1 f
kg /m3 s \n\n , r )
Example 5.02d 5.02-data.sci

38

// D i s t a n c e
the

give

piston

from

instant ( in

closed

end

of

the

cylinder

at

m) :

L= 0 . 1 5 ;

// D e n s i t y

d=18;

// V e l o c i t y

of

gas ( in

of

kg /m 3 ) :

piston ( in

m/ s e c ) :

V=12;
Example 5.07 5.07.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 5 . 0 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 5.07 data . s c i
exec ( f i l e n a m e )

// At

u=3;

1
2

point

b ,

// D i s p l a c e m e t

xb=u t

// Rate

d e f=U/h

10
11
12
13

14

// Rate

u =3

of

mm / s e c

b( in

of

angular

of

rotation ( in

mm ) :

deformation ( in

s 1) :

s 1) :

r o t =0.5U/h
p r i n t f ( \n\nRSULTS\n\n )
p r i n t f ( \n\ nRate o f a n g u l a r d e f o r m a t i o n : %. 1 f / s e c \n\n
, def )
p r i n t f ( \n\ nRate o f r o t a t i o n : %. 1 f / s e c \n\n , r o t )
Example 5.07d 5.07d

1
2

// Value

of

( in

of

h( in

mm / s e c ) :

U=4;

// Value

h=4;

/ / Tme

t =1.5;

at

which

mm ) :

to

find

position ( in

Example 5.08 5.08.sce

39

sec ) :

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

pathname=g e t a b s o l u t e f i l e p a t h ( 5 . 0 8 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 5.08 data . s c i
exec ( f i l e n a m e )
// Value

// For

// For

// Rates

Ax= 0 . 3 ;
// Rate

// Rate

22

v=AA

23

// Area

25
26
27
28

29
30

coordinate :

coordinate :

of

of

linear

deformation

linear

deformation

of

volume

d i l a t i o n ( s 1) :

of

abcd :

in

of

a b c d :

the

direction :

direction :

A1=1;
// Area

A2=(33/2) (4/3 2/3)


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nRates o f l i n e a r d e f o r m a t i o n i n X and Y
d i r e c t i o n : %. 1 f / s , %. 1 f / s \n\n ,Ax , Ay)
p r i n t f ( \n\ nRate o f volume d i l a t i o n : %. 0 f / s e c \n\n , v )
p r i n t f ( \n\ nArea o f abcd and a , b , c , d :%. 1 f m 2 , %. 1 f m\
n\n ,A1 , A2)
Example 5.08d 5.08-data.sci

in

Ay= 0.3;

21

24

Y( i ) ( j )=y0 ( j ) %e(AT)
end
end
plot (X,Y)

18

20

T:

X( i ) ( j )=x0 ( i ) %e (AT)

17

19

of

T=log ( 3 / 2 ) /A
x0 = 1 : 2 ;
y0 = 1 : 2 ;
for i =1:2
for j =1:2

// Value

of

A( in

s e c 1) :

A= 0 . 3 ;

40

Example 5.09 5.09.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 5 . 0 9 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 5.09 data . s c i
exec ( f i l e n a m e )

// Volume

1
2

5
6
7

flow

rate ( in

m3/ sec ) :

Q=dg s i n d ( t h e t a ) b ( h /1000) 31000/ u/3


p r i n t f ( RESULTS )
p r i n t f ( \n\nVolume f l o w r a t e : %. 4 f m3/ s e c \n\n ,Q)
Example 5.09d 5.09-data.sci

// T h i c k n e s s

h=1;

// Width

b=1;

// Angle

t h e t a =15;

// D e n s i t y

d=999;

of

water

film ( in

of

surface ( in

of

in cl in at i on

of

water ( in

// A c c e l e r a t i o n

du

to

10

g =9.81;

11

/ / V i s c o s i t y ( k g / m s ) :

12

u=103;

mm ) :

m) :

of

surface :

kg /m 3 ) :

gravity ( in

41

m/ s e c 2 ) :

Chapter 6
Incompressible Inviscid Flow
6.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question

6.2

Scilab Code

Example 6.01 6.01.sce


1
2
3
4
5
6
7
8
9

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.01 data . s c i
exec ( f i l e n a m e )
// V e l o c i t y

of

flow ( in

m/ s e c ) :

V=sqrt (dw/ log ( ( r+w) / r ) g/dap /1000)


// Volume

flow

rate ( in

m3/ sec ) :

Q=V( dw)
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nVolume f l o w r a t e : %. 3 f m3/ s e c \n\n ,Q)
Example 6.01d 6.01-data.sci

// Depth

of

the

duct ( in

m) :

42

2
3
4

d=0.3;
// Width

of

// I n n e r

r =0.25;

// P r e s s u r e

p=40;

// D e n s i t y

10

the

duct ( in

m) :

w= 0 . 1 ;
radius

the

bend ( in

m) :

difference

between

the

of

of

water ( in

taps ( in

mm

of

kg /m 3 ) :

dw=999;

11

// A c c e l e r a t i o n

12

g =9.8;

13

// D e n s i t y

14

da = 1 . 2 3 ;

of

due

to

air ( in

gravity ( in

m/ s e c 2 ) :

kg /m 3 ) :

Example 6.02 6.02.sce


1
2
3
4
5
6
7

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.02 data . s c i
exec ( f i l e n a m e )
// V e l o c i t y

of

flow ( in

m/ s e c ) :

V=sqrt (2dwgp /1000SG/da )


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n V e l o c i t y o f f l o w : %. 3 f m/ s e c \n\n ,V)
Example 6.02d 6.02-data.sci

// P r e s s u r e

p=30;

// D e n s i t y

d i f e r e n c e ( in

of

// A c e l e r a t i o n

g =9.81;

// D e n s i t y

da = 1 . 2 3 ;

of

mecury ) :

kg /m 3 ) :

dw=1000;

10

water ( in

mm

// S p e c i f i c

of

due

to

air ( in

gravity

gravity ( in

kg /m 3 ) :

of

mercury :

SG= 1 3 . 6 ;
Example 6.03 6.03.sce
43

m/ s e c 2 ) :

Hg ) :

1
2
3
4
5
6
7
8
9

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 3 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.03 data . s c i
exec ( f i l e n a m e )
// V e l o c i t y

of

flwat

the

i n l e t ( in

m/ s e c ) :

V1=Ae/ AiV2
// Gauge

pressure

required

at

the

i n l e t ( in

kPa ) :

p=0.5 da (V22V1 2 )
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nGauge p r s s u r e r e q u i r e d a t th e i n l e t : %. 3 f
kPa\n\n , p /1000)
Example 6.03d 6.03-data.sci

// Area

Ai = 0 . 1 ;

3
4
5
6

// Area

of

nozzle

at

input ( in

of

nozzle

at

exit ( in

m2) :

m2) :

Ae = 0 . 0 2 ;
// O u t l e t

velocity

of

flow ( in

m/ s e c ) :

V2=50;

// D e n s i t y

da = 1 . 2 3 ;

of

air ( in

kg /m 3 ) :

Example 6.04 6.04.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.04 data . s c i
exec ( f i l e n a m e )

// Speed

1
2

5
6
7
8
9
10

of

water

at

exit ( in

m/ s e c ) :

V2=sqrt (2 g z )
// P r e s s u r e

at

point

in

the

f l o w ( kPa ) :

pA=p1+dg(0 l ) 0.5dV22
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nSpeed o f water a t e x i t : %. 3 f m/ s e c \n\n ,V2)
p r i n t f ( \n\ n P r e s s u r e a t p o i n t A i n t h e f l o w : %3f kPa\n\
n ,pA/1000)
Example 6.04d 6.04-data.sci
44

// Length

of

tube

l =1;

// Depth

z =7;

// A c c e l e r a t i o n

g =9.81;

of

// D e n s i t y

d=999;

exit

of

// A t m o s p h e r i c

10

p1 = 1 . 0 1 1 0 5 ;

above

surface ( in

below

due

water

to

water ( in

m) :

surface ( in

gravity ( in

m) :

m/ s e c 2 ) :

kg /m 3 ) :

pressure ( in

N/m 2 ) :

Example 6.05 6.05.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 5 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.05 data . s c i
exec ( f i l e n a m e )

// V e l o c i t y

1
2

5
6
7
8
9

10

of

flow

at

the

exit ( in

ft / sec ) :

V2=sqrt (2 g (DuDd/12) )
// Volume

flow

rate / width ( f t 2/ sec ) :

Q=V2Dd/12
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n V e l o c i t y o f f l o w a t t h e e x i t : %. 3 f f t / s e c \n
\n ,V2)
p r i n t f ( \n\nVolume f l o w r a t e / width : %. 3 f f t 2/ s e c \n\n ,
Q)
Example 6.05d 6.05-data.sci

// Depth

Du= 1 . 5 ;

// Depth
the

of

water

at

the

u p s t r e a m ( on

of

water

at

the

vena

gate ( in

feet ) :

contracta

downstream

inches ) :

Dd=2;

// A c c e l e r a t i o n

g =32.2;

due

to

gravity ( in

Example 6.06 6.06.sce


45

ft / sec 2) :

from

1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.06 data . s c i
exec ( f i l e n a m e )

// P r e s s u r e

p=P1pa

// D e n s i t y

d=D1da

// S t a g n a t i o n

9
10
11
12
13

14

of

of

air

air

at

at

1000

m( in

1000m( in

pressure

at

N/m 2 ) :

kg /m 3 ) :

A( in

kPa ) :

p0A=p+0.5d (V1000/3600) 2
// S t a t i c

pressure

at

B( in

kPa ) :

pB=p+d / 2 ( (V1000/3600)2Vb 2)
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n S t a g n a t i o n p r e s s u r e a t A: %. 3 f kPa\n\n , p0A
/1000)
p r i n t f ( \n\ n S t a t i c p r e s s u r e a t B : %. 3 f kPa\n\n ,pB
/1000)
Example 6.06d 6.06-data.sci

1
2
3
4

// Speed

of

plane ( in

at

point

// Speed

r el at i ve

to

the

wing ( in

m/ s e c ) :

Vb=60;

// D e n s i t y

da = 1 . 2 3 ;

// A t m o s p h e r i s

pa = 1 . 0 1 1 0 5 ;

// At

of

air ( in

kg /m 3 ) :

pressure ( in

N/m 2 ) :

1000m,

10

// p / pSL :

11

P1 = 0 . 8 8 7 0 ;

12

// d / dSL :

13

km / h r ) :

V=150;

D1= 0 . 9 0 7 5 ;
Example 6.08 6.08.sce

1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 8 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.08 data . s c i
exec ( f i l e n a m e )
46

4
5
6
7
8
9
10
11

// V e l o c i t y

of

flow

at

exit ( in

ft / sec ) :

V4=sqrt (2 g ( z3 0) )
// Mass

flow

rate

of

water ( in

slug / sec ) :

m=dV4A4/144
// R i s e

in

temperature

between

points

and

2( in

R) :

T=Q3413/3600/m/ 3 2 . 2
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nRise i n t e m p e r a t u r e between p o i n t s 1 and 2 :
%. 3 f R\n\n ,T)
Example 6.08d 6.08-data.sci

1
2
3
4

// Area

of

cross

of

the

nozzle ( in

in 2) :

A4= 0 . 8 6 4 ;
// C a p a c i t y

of

heater ( in

kW ) :

Q=10

// A c c e l e r a t i o n

g =32.2;

// Water

z3 =10;

// D e n s i t y

10

section

level

of

due

in

to

gravity ( in

reservoir

water ( In

above

ft / sec 2) :

datum

line ( in

slug / ft 3) :

d=1.94;
Example 6.09 6.09.sce

1
2
3
4

pathname=g e t a b s o l u t e f i l e p a t h ( 0 6 . 0 9 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 06.09 data . s c i
exec ( f i l e n a m e )
t =0:5

// Value

x=sqrt (2 gh )

of

// Value

of

s q r t (2 gh ) :

1/2 L s q r t (2 gh ) :

10

y=1/2/Lx
[m n]= s i z e ( t )
i =1:n ;

11

// V e l o c i t y ( in

8
9

12
13

m/ s e c ) :

V2=xtanh ( y t ( i ) )
plot ( t , V2) ;
47

ft ) :

14

x t i t l e ( S t r e a m l i n e f l o w from 1 t o 2 , Time ( i n s ) , V2(


i n m/ s e c ) )
Example 6.09d 6.09-data.sci

// Depth

h=3;

3
4
5
6

// Length

to

of

which

water

pipe ( in

is

f i l l e d ( in

m) :

m) :

L=6;
// D i a m e t e r

of

pipe

( in

mm ) :

D=150;

// A c c e l e r a t i o n

g =9.81;

due

to

gravity ( in

48

m/ s e c 2 ) :

Chapter 7
Dimensional Analysis and
Simlitude
7.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
When we execute S 7.05, we get Fig. 7.1.
The .sci files of the respective problems contain the input parameters of
the question

7.2

Scilab Code

Example 7.04 7.04.sce


1
2
3
4
5

pathname=g e t a b s o l u t e f i l e p a t h ( 7 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 7.04 data . s c i
exec ( f i l e n a m e )
// V e l o c i t y

of

// R e y n o l d s

Rep=Vp1Dp/vp

/ / R e p =Rem

// T h e r e f o r e :

10

prototype

in

ft / sec

Vp1=Vp6080/3600
number

of

prototype :

Rem=Rep ;
49

11
12
13
14
15
16
17

// V e l o c i t y

of

air

for

wind

tunnel ( in

ft / sec ) :

Vm=Remvm/ (Dm/12)
// Drag

force

on

prototype ( in

lbf ) :

Fp=Fm( dp/dm) (Vp1/Vm) 2(Dp/ (Dm/12) ) 2


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nTest speed i n a i r : %. 3 f f t / s e c \n\n ,Vm)
p r i n t f ( \n\nDrag f o r c e on p r o t o t y p e : %. 3 f l b f \n\n , Fp)
Example 7.04d 7.04-data.sci

1
2
3
4
5
6
7
8
9

// D i a m e t e r

of

the

prototype ( in

ft ) :

Dp=1;
// Speed

of

towing

of

prototype ( in

knots ) :

Vp=5;
// D i a m e t e r

of

model ( in

inches ) :

Dm=6;
// Drag

for

model

at

test

condition ( in

lbf ) :

Fm= 5 . 5 8 ;
// D e n s i t y

of

seawater

at

viscosity

at

for

prototype ( in

slug / ft

3) :
10

dp = 1 . 9 9 ;

11

// K i n e m a t i c

for

prototype ( in

f t 2/ sec )

:
12
13

vp =1.6910 5;
// D e n s i t y

of

14

dm= 0 . 0 0 2 3 8 ;

15

// K i n e m a t i c

air

at

STP

viscosity

for

of

model ( in

air

at

STP

slug / ft 3) :

for

model ( in

sec ) :
16

vm=1.5710 4;
Example 7.05 7.05.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 7 . 0 5 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 7.05 data . s c i
exec ( f i l e n a m e )

// Width

1
2

5
6

of

the

model ( in

m) :

wm=Swp 0 . 3 0 4 8
// Area

of

model

( in

m2) :

50

f t 2/

7
8
9
10
11
12
13
14
15
16
17

18

Am=S2Ap 0 . 3 0 5 2
[m n]= s i z e (V)
i =1:n
// Aerodynamic

drag

c o e f f i c i e n t () :

Cd=2.Fd ( i ) /d . / (V( i ) ) 2 / 0 . 0 3 0 5
// R e y n o l d s

number :

Re=V( i ) wm/v
plot ( Re , Cd) ;
a=gca ( )
a . data bounds = [ 1 0 0 0 0 0 , 0 . 4 ; 5 0 0 0 0 0 , 0 . 6 ]
x t i t l e ( Aerodynamic drag c o e f f i c i e n t vs drag f o r c e ,
Reynolds number , Model Drag C o e f f . )
// I t

is

seen

that

drag

c o e f f i c i e n t

Re = 4 1 0 5

CD = 0 . 4 6 a b o v e

at

which

becomes
speed

constant

of

air

is

at
4 0 m/

s
19
20
21
22
23
24
25
26

27
28

CDc= 0 . 4 6 ;
Va=40;
// Drag

force

( in

N) :

FDp=CDc/2d (Vp5/18) 2Ap 0 . 3 0 5 2


// Power

required

to

pull

prototype

at

100

Example 7.05d 7.05-data.sci


1
2
3
4

kmph ( i n

W)

Pp=FDpVp5/18
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nSpeed above which Cd i s c o n s t a n t : %. 3 f m/
s e c \n\n ,Va)
p r i n t f ( \n\nDrag Force : %. 3 f kN\n\n ,FDp/1000)
p r i n t f ( \n\nPower r e q u i r e d t o p u l l p r o t o t y p e a t 100
kmph : %. 3 f kW\n\n ,Pp/1000)

// Width

of

the

prototype ( in

ft ) :

wp=8;
// F r o n t a l

area

of

the

prototype ( in

Ap=84;

// Model

S=1/16;

Scale :

// D e n s i t y

d=1.23;

of

air ( in

kg /m 3 ) :

51

ft 2) :

Figure 7.1: Output graph of S 7.05


9
10
11
12

// Air

speed

in

wind

tunnel ( in

m/ s e c ) :

V=[18 2 1 . 8 26 3 0 . 1 35 3 8 . 5 4 0 . 9 4 4 . 1 4 6 . 7 ] ;
// Drag

force ( in

N) :

Fd = [ 3 . 1 4 . 4 1 6 . 0 9 7 . 9 7 1 0 . 7 1 2 . 9 1 4 . 7 1 6 . 9 1 8 . 9 ] ;

13

// K i n e m a t i c

14

v =1.4610 5;

15

// D e n s i t y

16

d=1.23;

17

// Speed

18

Vp=100;

of

v i s c o s i t y ( in

of

air ( in

m2/ sec ) :

kg /m 3 ) :

prototype ( in

km / h r ) : \

52

Example 7.06 7.06.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 7 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 7.06 data . s c i
exec ( f i l e n a m e )

// The

1
2

same

pump

is

same

water

used

for

both

the

c o n d i t i o n s . Hence :

D2=D1 ;

// The

d2=d1 ;

// Flow

is

used

for

both

the

conditions .

Hence

9
10
11
12
13

rate

at

condition

2( in

gpm ) :

Q2=Q1N2/N1(D2/D1) 3
// Head

at

condition

1( in

ft ) :

H1=(N1 sqrt (Q1) / Nscu1 ) ( 4 / 3 )


// Head

at

condition

1( in

ft ) :

H2=H1(N2/N1) 2(D2/D1) 2

14

/ / Pump

15

P1=d1gQ1H1/ 7 . 4 8 / 6 0 / 5 5 0

16

/ / Pump

17

P2=P1 ( d2/d1 ) (N2/N1) 3(D2/D1) 5

18

// R e q u i r e d

19

Pin=P2/ E f f p

20

// S p e c i f i c

21
22
23

24
25

26
27

output

output

power

power

at

at

condition

condition

input

power ( in

speed

at

1( in

hp ) :

2( in

hp ) :

hp ) :

condition

2:

Nscu2=N2 sqrt (Q2) /H2 ( 3 / 4 )


p r i n t f ( \n\nRESULTS\n\n\n )
p r i n t f ( \n\nVolume f l o w r a t e a t c o n d i t i o n 2 : %. 3 f gpm\n
\n\n ,Q2)
p r i n t f ( \n\nHead a t c o n d i t i o n : %. 3 f f t \n\n\n ,H2)
p r i n t f ( \n\nPump output power a t c o n d i t i o n : %. 3 f hp\n\n
\n , P2 )
p r i n t f ( \n\ nRequired i n p u t power : %. 3 f hp\n\n\n , Pin )
p r i n t f ( \n\ n S p e c i f i c speed a t c o n d i t i o n 2 : %. 3 f \n\n\n ,
Nscu2 )
Example 7.06d 7.06-data.sci

// E f f i c i n c

Effp =0.8;

of

pump :

53

// D e s i g n

Nscu1 =2000;

// I m p e l l e r

6
7
8
9
10

s p e c i f i c

diameter ( in

rpm ) :

inches ) :

D1=8;
// O p e r t i o n

sped

at

esign

point

flow

condition ( in

rpm ) :

N1=1170;
// Flow

rate

at

design

point

flow

condition ( in

Q1=300;

11

// D e n s i t y

12

d1 = 1 . 9 4 ;

13

// A c c e l e r a t i o n

14

g =32.2;

15

// Working

16

speed ( in

of

water

speed

due

( in

to

2( in

slug / ft 3) :

gravity ( in

rpm ) :

N2=1750;

54

f t 2/ sec ) :

gpm ) :

Chapter 8
Internal Incompressible Viscous
Flow
8.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question

8.2

Scilab Code

Example 8.01 8.01.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.01 data . s c i
exec ( f i l e n a m e )

// Leakage

1
2

5
6
7
8
9

flow

rate

( in

mm 3 / s e c ) :

Q=%pi /12Da 3( p1p2 ) 103/ u/L


// V e l o c i t y

of

flow ( in

m/ s e c ) :

V=Q/%pi/D/a /1000
// S p e c i f i c

gravity

of

SAE

1 0W

SG= 0 . 9 2 ;

10

// R e y n o l d s

Number :

11

Re=SGdwVa/u /1000
55

oil :

12
13
14

// As

Re < 1 4 0 0 ,

flow

is

laminar .

p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nLeakage f l o w r a t e : %. 3 f mm3/ s e c \n\n ,Q)
Example 8.01d 8.01-data.sci

// O p e r a t i o n

p1 =20000;

3
4
5
6

// O p e r a t i o n

pressure

of

temperature

hydraulic

of

system ( in

hydraulic

system ( in

// P i s t o n

diameter ( in

mm ) :

D=25;
// V i s c o s i t y

u=0.018;

// Mean

of

radial

10

a =0.005;

11

// Gauge

SAE

1 0W

at

clearance

pressure

on

of

lower

55C( in

k g / ( m s ) :

cylinder ( in

pressure

side

mm ) :

of

kPa ) :

13
14

p2 =1000;
// Lenth

of

piston ( in

mm ) :

L=15;

15

// D e n i t y

16

dw=1000;

of

water ( in

kg /m 3 ) :

Example 8.02 8.02.sce


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

C) :

T=55;

12

kPa ) :

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.02 data . s c i
exec ( f i l e n a m e )
// Shear

stres

( in

lbf / ft 2) :

Tyx=uN2 %pi /60D/2/( a /2 )


// Torqe ( in

inches lbf ) :

T=%pi /2TyxD2L/144
// Power

dissipated

in

the

bearing ( in

P=TN/602 %pi /12/550


// R e y n o l d s

number :

Re=SGpN2 %pi / 6 0 1 . 5 a /2/u/144


p r i n t f ( \n\nRESULTS\n\n )
56

hp ) :

piston ( in

13
14

p r i n t f ( \n\ nTorque : %. 3 f i n c h e s l b f \n\n ,T)


p r i n t f ( \n\nPower d i s s i p a t e d i n t he b e a r i n g : %. 3 f hp\n\
n ,P)
Example 8.02d 8.02-data.sci

1
2
3
4

// t e m p e r a t u r e

operation ( in

te

bearing ( in

F) :

// D i a m e t e r

of

inches ) :

D=3;

// D i a m e t r a l

a =0.0025;

// Length

L= 1 . 2 5 ;

// Speed

10

N=3600;

clearance ( in

of

of

shaft ( in

rotation

11

// V i s c o s i t y

12

u=2.0110 4;

13

// S p e c i f i c

14

fo

T=210;

of

the

gravity

inches ) :

inhes ) :

of

the

shaft ( in

rpm ) :

o i l ( in

lbf s / f t 2) :

of

1 0W :

SAE

SG= 0 . 9 2 ;

15

// D e n s i t y

16

p=1.94;

of

water

( in

slug / ft 3)

Example 8.04 8.04.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.04 data . s c i
exec ( f i l e n a m e )

// V i s c o s i t y

u=%pi /128 p 1000D4/Q/L/1000

// V e l o c i t y ( in

1
2

7
8
9
10
11

of

the

l i q u i d ( in

N s / m 2 ) :

m/ s e c )

V=Q/ ( %pi /4D2 ) /1000


// R e y n o l d s

number :

Re=dVD/u /1000
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n V i s c o s i t y o f f l u i d %. 3 f Ns /m2\n\n , u )
Example 8.04d 8.04-data.sci
57

// Flow

Q=880;

// Tube

rate

length ( in

// Tube

D= 0 . 5 ;

viscometer ( in

mm 3 / s e c ) :

m) :

diameter ( in

// P r e s s u r e

p=1000;

capilarry

L=1;

10

through

// D e n s i t y

mm ) :

drop ( in

of

kPa ) :

o il ( in

kg /m 3 ) :

d=999;
Example 8.05 8.05.sce

1
2
3
4
5
6
7
8
9

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 5 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.05 data . s c i
exec ( f i l e n a m e )
// R e s e r v o i r

depth

required

to

maintain

// R e y n o l d s

2
3
4
5
6

Re=4dQ/ ( ( %pi ) uD)


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n R e s e r v o i r depth r e q u i r e d t o maintain f l o w :
%. 3 f m\n\n ,D1)

// Volme

flow

// Length

of

of

water ( in

horizontal

pipe ( in

L=100;
// D i a m e t e r

of

pipe ( in

m) :

D= 0 . 0 7 5 ;
// D e n s i t y

d=999;
// F r i c t i o n

10

f =0.017;

11

// Minor

12

rate

m3/ sec ) :

Q= 0 . 0 0 8 4 ;

m) :

number :

Example 8.05d 8.05-data.sci


1

flow ( in

D1=8Q2/( %pi ) 2/D4/ g ( f L/D+K+1)

of

water ( in

kg /m 3 ) :

factor :

losss es

c o e f f i c i e n t :

K= 0 . 5 ;
58

m) :

13

// V i s c o s i t y ( in

14

u=103;

15

// A c c e l e r a t i o n

16

g =9.8;

k g / m s ) :

due

to

gravity ( in

/ sec 2) :

Example 8.06 8.06.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.06 data . s c i
exec ( f i l e n a m e )

// V e l o c i t y

1
2

5
6
7
8
9
10
11
12

of

flow ( in

ft / sec ) :

V=Q/24/3600/( %pi /4(D/12) 2 ) 4 2 / 7 . 4 8


// Maximum

spacing ( in

ft ) :

L=2/ f D/12( p2p1 ) / (SGd ) /V2144


// Power

needed

at

each

pump ( i n

hp ) :

Win=1/ E f f p V%pi /4(D/12) 2( p2p1 ) /550144


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nMaximum s p a c i n g : %. 3 f f e e t \n\n ,L)
p r i n t f ( \n\nPower needed a t each pump : %. 3 f hp\n\n ,Win
)
Example 8.06d 8.06-data.sci

1
2
3
4

// Flow

rate

of

crude

o il ( in

bbl ) :

Q= 1 . 6 1 0 6 ;
// I n s i d e

diamete

of

pipe ( i

inches ) :

D=48;

// Maximum

p2 =1200;

// Minimum

allowable

pressure

pressure ( in

required

to

psi ) :

keep

psi ) :
8
9
10

p1 =50;
// S p e c i f i c

gravity

of

crde

oil :

SG= 0 . 9 3 ;

11

// V i s c o s i t y

12

u=3.510 4;

13

// E f f i c i n c y

14

Effp =0.85;

at

140

F( in

of

pump :

lbf s / f t 2) :

59

gases

d i s s o l v e s ( in

15

// D e n s i t y ( in

16

d=1.94;

17

// V i s c o s i t y

slug / ft 3) :

( in

18

u=3.510 4;

19

// F r i c t i o n

20

f =0.017;

lbf sec ) :

factor :

Example 8.07 8.07.sce


1
2
3
4
5
6
7
8
9

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.07 data . s c i
exec ( f i l e n a m e )
// V e l o c i t y ( in

ft / sec ) :

V2=sqrt (2 g l / ( f ( ( L+l ) /D12+8)+1) )


// Volume

flow

rate ( in

gpm ) :

Q=V2%pi (D/12) 2 / 4 7 . 4 8 6 0
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nVolume low r a t e : %. 3 f \n\n ,Q)
Example 8.07d 8.07-data.sci

// H e i g h t

l =80;

// Length

4
5
6

of

standpipe ( in

of

longest

// D i a m e t e r

ft ) :

of

pipe ( in

inches ) :

D=4;
// F r i c t i o n

f =0.031;

pipe ( in

L=600;

10

ft ) :

factor :

// A c c e l e r a t i o n

due

to

gravityin

ft / sec 2) :

g =32.2;
Example 8.08 8.08.sce

1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 8 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.08 data . s c i
exec ( f i l e n a m e )
60

4
5
6
7
8
9

// Value

of

dPmax ( i n

dPmax=p1p2
//Q

in

cubic

feet / sec :

Q1= 1 5 0 0 / 6 0 / 7 . 4 8 ;
// I n i t i a l l y

assume

// R e y n o l d s

11

Re=4Q1/%pi/v/D12

13
14
15
16
17
18
19
20
21
22
23
24

diameter

to

be

4 inches :

D=4;

10

12

psi ) :

// For

this

number :

value ,

f =0.012;
dP=8 f LpQ12/( %pi ) 2/D 5 1 7 2 8 ;
while (dP>dPmax)
dP=8 f LpQ12/( %pi ) 2/D 5 1 7 2 8 ;
i f (dP<dPmax)
break
else
D=D+1;
end
end
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( Minimum d i a m e t e r t h a t can be used :%. 1 f i n c h e s \n
\n ,D)
Example 8.08d 8.08-data.sci

1
2
3
4

// Length

of

// Volume

flow

// D i s c h a r g e

p1 =65;

// S p r i n k l e r

p2 =30;

tubing

( in

ft ) :

rate

of

pump

output ( in

Q=1500;

10

Al

L=500;

// K i n e m a t i c

pressure ( in

psig ) :

pressure ( in

psig ) :

v i s c o s i t y ( in

f t 2/ sec ) :

v =1.2110 5;

11

// D e n s i t y ( in

12

p=1.94;

slug / ft 3) :

61

gpm ) :

Example 8.09 8.09.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 0 9 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.09 data . s c i
exec ( f i l e n a m e )

// Average

1
2

velocity

( in

ft / s ) :

V2=4/%piQ/D2144

// R e y n o l d s

Re=V2D/v /12

// For

f =0.013;

this

law

number :

value ,

10

// Power

11

n=1.7+1.8 log10 ( Re )

12

// Value

13

v u=2n 2/( n+1) /(2 n+1)

14

// Value

15

a lpha =(1/ v u ) 32n2/(3+n ) /(3+2n )

16

// Loss

17
18
19

of

exponent :

of

V/U :

alpha :

Coefficient

for

square

edged

entrance :

K=2gh/V22 f L/D12 alpha ;


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nLoss C o e f f i c i e n t f o r a s q u a r e edged
e n t r a n c e : %. 3 f \n\n ,K)
Example 8.09d 8.09-data.sci

1
2
3
4
5
6

// Length

// I n n e r

diameer

// D i s c h a r e ( in

wire ( in

ft ) :

of

pipe ( in

inches ) :

f t 3/ sec ) :

Q= 0 . 5 6 6 ;
// L e v e l

h=85.1;

copper

D= 1 . 5 ;

10

of

L=10;

of

// K i n e m a t i c

reservoir

viscosity

above

at

70

pipe

F( in

c e n t r e l i n e ( inn

f t 2/ s ) :

v =1.0510 5;

11

// A c c e l e r a t i o n

12

g =32.2;

due

to

gravity ( in

62

ft / sec 2) :

feet ) :

Example 8.10 8.10.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 1 0 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.10 data . s c i
exec ( f i l e n a m e )

// V e l o c i t y

1
2

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

18

19

V1 ( i n

m/ s ) :

V1=sqrt (2 g z0 / 1 . 0 4 )
// Volume

flow

rate ( in

m3/ sec ) :

Q=V1%piD2/4
K d i f f =11/A R2Cp
// For

2 nd

case :

// V e l o c i t y ( in

m/ s ) :

V1=sqrt (2 g z0 / 0 . 5 9 )
// Volume

flow

rate ( in

m3/ s ) :

Qd=V1%piD2/4
// I n c r e a s e

in

discharge

after

addition

of

d i f f u s e r

dQ=(QdQ) /Q100
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nVolume f l o w r a t e i n c a s e 1 : %. 3 f m3/ s e c \n\n
,Q)
p r i n t f ( \n\nVolume f l o w r a t e i n c a s e 2 : %. 3 f m3/ s e c \n\
n ,Qd)
p r i n t f ( \n\ n I n c r e a s e i n d i s c h a r g e a f t e r a d d i t i o n o f
d i f f u s e r i s : %. 3 f p e r c e n t \n\n ,dQ)
Example 8.10d 8.10-data.sci

1
2

// N o z z l e

/ / N / R1

N R=3;

exit

diameter ( in

mm ) :

D=25;

is :

/ / AR

value

value :

value :

A R=2;

// S t a t i c

z0 = 1 . 5 ;

// A c c e l e r a t i o n

10

g =9.8;

11

// Value

head

of

available

due

to

from

the

gravity ( in

Cp :

63

main ( in

m) :

m/ s e c 2 ) :

12

Cp= 0 . 4 5 ;
Example 8.11 8.11.sce

1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 8 . 1 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 8.11 data . s c i
exec ( f i l e n a m e )

4
5
6
7
8
9

// Value

KB 2 :

of

K B=Q/ ( %pi /4D 2 ) sqrt ( 0 . 5 d1/g/d2/h )


// Reynods

number :

ReD1=4/%piQ/D/v
/ / By

t r i a l

and

error

method ,

the

value

of

beta

is

fixed

at :
10

betta =0.66;

11

//K

12

is

then :

K=K B/ b e t t a 2

13

// D i a m e t e r

14

Dt=b e t t a D

of

o r i f i c e

p3 p 2 ( i n

of

plate ( in

m) :

15

// Value

16

P1=d1Q2/( %pi /4D 2 ) 2 ( 1 / 0 . 6 5 / b e t t a 21)

17

// Value

18

P2=d2gh

19

// Head

20
21

loss

23
24
25

between

N/m 2 ) :

sections

and

3( in

// E x p r e s s i n g

the

permanent

pressure

2
3

as

fractio

of

the

d i f f e r e n t i a l :

C=(P2P1 ) /P2
p r i n t f ( \n\n\nRESULTS\n\n )
p r i n t f ( \n\ nDiameter o f t he o r i f i c e : %. 3 f m\n\n , Dt )
p r i n t f ( \n\nHead l o s s between s e c i o n s 1 and 3 : %. 3 f Nm
/ kg \n\n ,hLT)
Example 8.11d 8.11-data.sci

Nm / k g ) :

hLT=(P2P1 ) /d1
meter

22

p1 p 2 ( i n

of

N/m 2 ) :

// Volume

flw

rate

of

ai ( in

m3/ sec ) :

Q=1;
// D i a m e t e r

of

pipe ( in

m) :

64

D= 0 . 2 5 ;

// D e n s i t y

d1 = 1 . 2 3 ;

of

air

// A c c e l e r a t i o n

g =9.8;

// D e n s i t y

of

( in

due

to

water ( in

10

d2 =999;

11

/ / Maxmum

12

h=0.3;

13

// K i n e m a t i c

14

v =1.4610 5;

range

of

kg /m 3 ) :

gravity ( in

m/ s 2 ) :

kg /m 3 ) :

manometer ( in

v i s c o s i t y ( in

m) :

m2/ s ) :

65

Chapter 9
External Incompressible
Viscous Flow
9.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question
When we execute S 9.08, we get Fig. 9.1.

9.2

Scilab Code

Example 9.01 9.01.sce


1
2
3
4
5
6
7

pathname=g e t a b s o l u t e f i l e p a t h ( 9 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 9.01 data . s c i
exec ( f i l e n a m e )
// Change

in

static

pressure

between

sections

and

C=(((L2d1 ) / (L2d2 ) ) 41) 1 0 0 ;


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nChange i n s t a t i c p r e s s u r e between t he
s e c t i o n s 1 and 2 : %. 3 f p e r c e n t \n\n ,C)
Example 9.01d 9.01-data.sci
66

2:

1
2
3
4

// Lengh

of

side

of

the

test

section ( in

mm ) :

L=305;
// F r e e s t e a m

speed

at

section

1( in

m/ s e c ) :

U1=26;

// D i s p l a c e m e n t

d1 = 1 . 5 ;

// D i s p l a c m e n t

d2 = 2 . 1 ;

thickness

thickness

at

section

at

section

1( in

2( in

mm ) :

mm ) :

Example 9.04 9.04.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 9 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 9.04 data . s c i
exec ( f i l e n a m e )

// R e y n o l d s

1
2

number :

ReL=UL/v

/ / FOR

// D i s t u r b a n c e

dL1 =0.382/ReL 0 . 2 L

TURBULENT

FLOW

thickness ( in

// D i s p l a c e m e n t

m) :

thickness ( in

m) :

12

function y=f ( n ) , y=dL1(1n ( 1 / 7 ) )


endfunction
d l 1=intg ( 0 , 1 , f )

13

// Skin

14

Cf1 =0.0594/ReL 0 . 2

15

// Wall

16

tw1=Cf1 0 . 5 dU2

17

// For

18

// D i s t u r b a n c e

10
11

f r i c t i o n

shear

c o e f f i c i e n t :

s t r e s s ( in

LAMINAR

FLOW :
thickness ( in

19

dL2=5/sqrt ( ReL ) L

20

// D i s p l a c e m e n t

21

d l 2 =0.344 dL2

m)

thickness ( in

22

// Skin

23

Cf2 =0.664/ sqrt ( ReL )

f r i c t i o n

shear

N/m 2 ) :

c o e f f i c i e n t :

24

// Wall

25

tw2=Cf2 0 . 5 dU2

s t r e s s ( in

26

/ / COMPARISON

27

// D i s t u r b a n c e

OF

m) :

VALUES

N/m 2 ) :

WITH

LAMINAR

thickness

67

FLOW

28
29
30
31
32
33
34
35
36
37
38
39
40

D=dL1/dL2
// D i s p l a c e m e n t

thickness

DS=d l 1 / d l 2
// Wall

shear

stress

WSS=tw1/tw2
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n D i s t u r b a c e t h i c k n e s s : %. 3 f m\n\n , dL1 )
p r i n t f ( \n\ nDisplacement t h i c k n e s s : %. 3 f m\n\n , d l 1 )
p r i n t f ( \n\ nWall s h e a r s t r e s s : %f N/m2\n\n , tw1 )
p r i n t f ( \n\nCOMPARISON WIH LAMINAR FLOW\n\n\n )
p r i n t f ( \n\n D i s t u r b a n c e t h i c k n e s : %. 3 f \n\n ,D)
p r i n t f ( \n\ nDisplacement t h i c k n e s s : %. 3 f \n\n ,DS)
p r i n t f ( \n\ nWall s h e a r s t r e s s : %. 3 f \n\n ,WSS)
Example 9.04d 9.04-data.sci

1
2
3
4

// V e o c i t y

of

flow ( in

m/ s e c ) :

U=1;
// Length

of

flat

plate ( in

m) :

L=1;

// D e n s i t y

of

d=999;

// K i n e m a t i c

v=106;

water ( in

viscosity

kg /m 3 ) :

of

water ( in

m2/ sec ) :

Example 9.05 9.05.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 9 . 0 5 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 9.05 data . s c i
exec ( f i l e n a m e )

// Speed

1
2

in

U=s 6 0 7 6 0 . 3 0 5 / 3 6 0 0

// R e y n o l d s

Re=UL/v

8
9

m/ s :

// Drag

number :

c o e f f i c i e n t :

Cd=0.455/ log10 ( Re ) 2.58 1610/Re

10

// Area ( in

11

A=L(W+D)

m2) :

68

12
13
14
15
16
17
18

// Drag

force ( in

N)

Fd=CdA 0 . 5 dU2
// Power

required

to

overcome

skin

f r i c t i o n

2
3
4
5
6

// Length

of

supertanker ( in

m) :

// Width

of

supertanker ( in

of

the

m) :

W=70;
// D r a f t

supertanker ( in

m) :

D=50;
// C r u i s i n g

s =13;

the

L=360;

10

speed

// K i n e m a t i c

in

water ( in

viscosity

at

10

knots ) :

v =1.3710 6;

11

// D e n s i t y

12

d=1020;

of

sea

water ( in

kg /m 3 ) :

Example 9.06 9.06.sce


1
2
3
4
5

pathname=g e t a b s o l u t e f i l e p a t h ( 9 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 9.06 data . s c i
exec ( f i l e n a m e )
// V e l o c i t y

// R e y n o l d s

Re=dVD/u

// Value

11
12

in

m/ s e c :

V=s 5/18

10

W) :

P=FdU
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nDrag f o r c e : %f N\n\n , Fd)
p r i n t f ( \n\nPower r e q u i r e d t o overcome s k i n f r i c t i o n
drag : %. 3 f W\n\n ,P)
Example 9.05d 9.05-data.sci

drag ( in

of

number :

Cd

is

obtained

as :

Cd= 0 . 3 5 ;
// Area ( in

m2) :

A=L 2 ;
// Moment

about

the

chimney

base ( in

69

Nm ) :

13
14
15

M0=CdAD/4dV2
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nBending moment a t t h e bottom o f th e chimney
: %. 3 f Nm\n\n ,M0)
Example 9.06d 9.06-data.sci

1
2
3
4

// D i a m e t e r

// H e i g h t

of

// Speed

s =50;

// D e n s i t y

d=1.23;

chimney ( in

m) :

chimney ( in

m) :

L=25;

10

of

D=1;

of

wind ( in

of

// V i s c o s i t y

air ( in

of

kmph ) :

kg /m 3 ) :

air ( in

k g / ( m s ) ) :

u=1.7910 5;

11

// P r e s s u r e ( in

12

p=101;

kPa ) :

Example 9.07 9.07.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 9 . 0 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 9.07 data . s c i
exec ( f i l e n a m e )

// Time

1
2

5
6
7

required

to

decelerate

to

mph ( i n

seconds ) :

t =(s1s2 ) 2w/ ( s1 s2 ) /Cd/d/A/g 3600/5280


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nTime r e q u i r e d t o d e c e l e r a t e t o 100 mph : %. 3
f s e c o n d s \n\n , t )
Example 9.07d 9.07-data.sci

100

// Weight

w=1600;

// Speed

s 1 =270;

of

of

the

dragster ( in

dragster ( in

lbf ) :

mph ) :

70

5
6

// Area

of

drag

// Speed

s 2 =100;

// A c c e l e r a t i o n

of

// D e n s i t y

12

d=0.00238;

14

dragster

due

after

to

deceleraton ( in

gravity ( in

mph ) :

ft / sec 2) :

g =32.2;

11

13

ft 2) :

A=25;

10

chute ( in

// Value

of

of

air ( in

slug / ft 3) :

c o e f f i c i e n t

of

drag :

Cd= 1 . 4 2 ;
Example 9.08 9.08.sce

1
2
3
4
5

pathname=g e t a b s o l u t e f i l e p a t h ( 9 . 0 8 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 9.08 data . s c i
exec ( f i l e n a m e )
// P l o t t i n g

velocity

with

drag

force

V= 1 7 5 : 2 5 : 4 5 5 ;

6
7
8
9
10
11
12
13
14
15

16

[m n]= s i z e (V) ;
for i =1:n
CL( i ) =2W/p (3600/V( i ) /5280) 2/A;
Cd( i )=Cd0+CL( i ) 2/ %pi/ a r ;
Fd ( i )=Cd( i ) /CL( i ) W;
FD( i )=Fd ( i ) / 1 0 0 0 ;
end
plot (V,FD)
x t i t l e ( F l i g h t speed vs t h r u s t , F l i g h t Speed ( i n mph) ,
Drag Force ( i n 1000 l b f ) )
// Optimum

cuise

320

from

mph

17

Vosl =320;

18

// R a t i o

of

speed
the

speeds

at

at

speed

level

is

obtained

30000

ft

and

at

sea

level

by :
19

r=sqrt ( 1 / 0 . 3 7 5 ) ;

20

// S t a l l

21

Vs3=V s s l r ;

22

// Optimum

speed

at

Cruise

to

be

graph .

30000 ft

speed

at

is ( in

mph ) :

30000 ft ( in

71

mph ) :

is

given

23
24
25

26
27

Vo3=Vosl r ;
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nOptimum c r u i s e speed a t s e a l e v e l : %. 3 f mph
\n\n , Vosl )
p r i n t f ( \n\ n S t a l l speed a t 30000 f t : %. 3 f mph\n\n , Vs3 )
p r i n t f ( \n\nOptimum c r u i s e speed a t 30000 f t : %. 3 f \n\n
, Vo3 )
Example 9.08d 9.08-data.sci

1
2

// Wing

area ( in

// A s p e c t

ar =6.5;

// Groos

6
7
8
9
10

ft 2) :

A=1600;
ratio :

weight

of

a i r c r a f t ( in

lbf ) :

W=150000;
// C o e f f i c i e n t

of

drag

at

sea

at

zero

l i f t

Cd0 = 0 . 0 1 8 2 ;
// S o n i c

speed

l e v e l ( in

mph ) :

c =759;

11

// D e n s i t y

12

p=0.00238;

13

// S r a l l

14

V s s l =175;

of

speed

air ( in

at

slug / ft 3) :

sea

l e v e l ( in

mph ) :

Example 9.09 9.09.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 9 . 0 9 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 9.09 data . s c i
exec ( f i l e n a m e )

// R e y n o l d s

number :

// Value

wD / 2 V :

1
2

6
7
8
9
10

of

W=0.5ND/1000/V2 %pi /60


Red=VD/v ;
// For

this

value ,

CL

is

obtained

CL= 0 . 3 ;
// Aerodynamic

l i f t ( in

N) :

72

as :

Figure 9.1: Output graph of S 9.08

73

11
12

FL=%pi /8CL(D/1000) 2dV 2 ;


// Radius
( in

of

m)

curvature

with

of

13

Rts=V2/( g+FL/ (m/1000) ) ;

14

// Radius

15
16
17

18

19

of

the

path

in

the

ve rt ic a l

curvature

without

topspin ( in

m) :

Rwts=V2/ g ;
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nAerodynamic l i f t a c t i n g on t h e b a l l :%. 3 f N\
n\n ,FL)
p r i n t f ( \n\ nRadius o f c u r v a t u r e o f t he path when b a l l
has t o p s p i n :%. 3 f m\n\n , Rts )
p r i n t f ( \n\ nRadius o f c u r v a t u r e o f t he path when b a l l
has t o p s p i n : %. 3 f m\n\n , Rwts )
Example 9.09d 9.09-data.sci

1
2
3
4
5
6
7
8
9

plane

topspin :

// Mass

of

the

tennis

ball ( in

grams ) :

m=57;
// D i a m e t e r

ofthe

ball

( in

mm ) :

D=64;
// V e l o c i t y

with

which

te

ball

is

hit ( in

V=25;
// Topspin

given

on

the

ball ( in

rpm ) :

N=7500;
// A c c e l e r a t i o n

10

g =9.81;

11

// K i n e m a t i c

12

v=1.4610 5

13

// D e s i t y

14

d=1.23;

of

due

to

gravity ( in

v i s c o s i t y ( in

air ( in

m2/ s ) :

kg /m 3 ) :

74

m/ s 2 ) :

m/ s ) : \

Chapter 10
Fluid Machinery
10.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question
When S 10.03 is executed, we get Fig. 10.1. When S 10.07 is executed,
we get Fig. 10.2. When S 10.08 is executed, we get Fig. 10.3 and Fig. 10.4.
When S 10.11 is executed, we get Fig. 10.5 to Fig. 10.7.

10.2

Scilab Code

Example 10.01 10.01.sce


1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.01 data . s c i
exec ( f i l e n a m e )

// I m p e l l e r

b2=Q12/(2 %piR2Vrb2 7 . 4 8 6 0 )

feet ) :

Tshaft ( in

ft l b f ) :

// Torque

T s h a f t=wR22pQ2 %pi / 3 6 0 0 / 7 . 4 8 / 1 4 4

// Power ,

Wm ( i n

Shaft ,

b2 ( i n

the

width

10

of

exit

hp ) :

Wm=w T s h a f t 2 %pi /60/550


p r i n t f ( \n\nRESULTS\n\n )
75

11
12
13

p r i n t f ( \n\ n I m p e l l e r e x i t width : %. 3 f f e e t \n\n , b2 )


p r i n t f ( \n\ Torque i n p u t : %. 3 f f t l b f \n\n , T s h a f t )
p r i n t f ( \n\nPower : %. 3 f hp\n\n ,Wm)
Example 10.01d 10.01-data.sci

1
2

// Volume

// Value

Vrb2 =10;

// Radius

6
7
8
9
10

flow

rate

in

gpm :

Q= 1 5 0 ;
of

Vrb2

of

in

outter

ft / sec :

impeller

in

inches :

R2=2;
// I m p e l l e r

Speed

in

rpm :

in

s l u g / f t 3

w=3450;
// D e n s i t y

of

air

p=1.94;
Example 10.02 10.02.sce

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

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.02 data . s c i
exec ( f i l e n a m e )
U=0.5(Dh+Dt ) /212002 %pi /60
k=tand ( alpha1 )+co td ( b e t t a 1 )
Vn1=U/k
V1=Vn1/ cosd ( alpha1 )
Vt1=V1 s i n d ( alpha1 )
Vrb1=Vn1/ s i n d ( b e t t a 1 )
// Volume

flow

rate

( in

m3/ sec ) :

Q=%pi /4Vn1( Dt2Dh2 )


k=(UVn1 cotd ( b e t t a 2 ) ) /Vn1
al pha2= atand ( k )
V2=Vn1/ cosd ( alpha2 )
Vt2=V2 s i n d ( alpha2 )

16

// Rotor

17

Tz=pQ(Dh+Dt ) /4( Vt2Vt1 )

18

// Power

19

Torque

( in

required

Nm ) :

( in

W) :

Wm=w2 %pi /60Tz


76

20
21
22
23

p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nVolume f l o w r a t e : %. 3 f m3/ s e c \n\n ,Q)
p r i n t f ( \n\ nRotor Torque : %. 3 f Nm\n\n , Tz )
p r i n t f ( \n\nPower r e q u i r e d : %. 3 f W\n\n ,Wm)
Example 10.02d 10.02-data.sci

// Tip

Dt = 1 . 1 ;

/ / Hub

4
5
6

Diameter

Diameter

in

metres :

in

metres :

Dh= 0 . 8 ;
// O p e r a t i n g

Speed

in

rpm :

w=1200;

// A b s o l u t e

al pha1 =30;

// Blade

inlet

inlet

10

b e t t a 1 =30;

11

// Blade

12

b e t t a 2 =60;

angle

outlet

13

// D e n s i t y

14

p=1.23;

of

angle

in

angle

air

in

in

degrees :

degrees :

in

degrees :

kg /m 3

Example 10.03 10.03.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 0 3 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.03 data . s c i
exec ( f i l e n a m e )
[ nQ mQ]= s i z e (Q) ;
[ nps mps]= s i z e ( ps ) ;
[ npd mpd]= s i z e ( pd ) ;
[ nI mI]= s i z e ( I ) ;

// C o r r e c t

1
2
3
4
5
6

measured

centreline
9
10
11
12
13

p1 ,

static
p2 ( i n

pressures

psig ) :

j =1:mps ;
p1=ps ( j )+pxg z s /144
j =1:mpd ;
p2=pd ( j )+pxg zd /144
// The

value

of

Pump

head ( in

77

feet ) :

to

he

pump

14
15
16
17
18
19

j =1:mps ;
Hp=(p2 ( j )p1 ( j ) ) / ( pxg ) 144
// V a l u e s

of

Hydraulic

Power

delivered ( in

j =1:mps ;
Wh=Q( j ) . ( p2 ( j )p1 ( j ) ) / 7 . 4 8 / 6 0 1 4 4 / 5 5 0
// V a l u e s

of

motor

power

output ( in

21

j =1:mI ;
Pin=Effm sqrt ( 3 ) PFE I ( j ) /746

22

// V a l u e s

20

of

Pump

24
25

// P l o t t i n g

26
27
28
29

30

pump

hp ) :

Effi ciecy :

j =1:mI ;
E f f p= Wh( j ) . / Pin ( j ) 100

23

hp ) :

c h a r a c t e r i s t i c s :

plot (Q, Hp , o )
plot (Q, Pin , + )
plot (Q, Effp , )
x t i t l e ( Pump C h a r a c t e r i s t i c s , Volume f l o w r a t e ( i n
gpm) , [ Pump E f f i c i n c y (%)
,
Pump Head ( i n
feet )
,
Pump Power i n p u t ( i n hp )
])
l e g e n d ( Hp , Pin , E f f p )
Example 10.03d 10.03-data.sci

1
2

// Rate

of

flow

in

gm :

Q=[0 500 800 1000 1100 1200 1400 1 5 0 0 ] ;

// S u c t i o n

ps =[ 0 . 6 5 0 . 2 5 0.35 0.92 1.24 1.62 2.42 2 . 8 9 ] ;

pressure

in

// D i s c h a r g e

pd = [ 5 3 . 3 4 8 . 3 4 2 . 3 3 6 . 9 33 2 7 . 8 1 5 . 3 7 . 3 ] ;

// Motor

I =[18 2 6 . 2 31 3 3 . 9 3 5 . 2 3 6 . 3 38 3 9 ] ;

// A c c e l e r a t i o n

10

pressure

psig :

Current

in

due

in

psig :

amps :

to

gravity

g =32.2;

11

// Value

12

z s =1;

of

13

// D e n s i t y

14

px = 1 . 9 4 ;

15

// Value

16

zd =3;

of

Zs

of

ZD

in

air

in

feet

in

slug / ft 3:

feet :

78

in

ft / s 2:

Figure 10.1: Output graph of S 10.03


17

// D e n s i t y

18

py =1000;

19

// Motor

20

Effm = 0 . 9 ;

21

// Motor

22
23
24

of

fluid

in

slug / ft 3:

Efficiency :

Supply

in

volts :

E=460;
// Power

Factor :

PF= 0 . 8 7 5 ;
Example 10.06 10.06.sce

79

1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.06 data . s c i
exec ( f i l e n a m e )

// S p e c i f i c

Nscu=NQus 0 . 5 / Hus 0 . 7 5

// C o n v e r s i o n

7
8
9

speed

to

in

SI

Us

customary

units :

w=11702%pi / 6 0 ;
Qsi=Qus / 7 . 4 8 / 6 0 0 . 3 0 5 3 ;
Hsi=Hus 0 . 3 0 5 ;

10

// Energy

11

h=g Hsi ;

per

unit

speed

mass

12

// S p e c i f i c

13

N s s i=w Qsi 0 . 5 / h 0 . 7 5

SI

units :

// C o n v e r s i o n

15

whz=N/ 6 0 ;

16

// S p e c i f i c

17

Nseu=whz Qsi 0 . 5 / 6 5 . 5 0 . 7 5

18

// R e l a t i o n
units

to

in

is :

14

speed

hertz :

in

between

and

European

s p e c i f i c

European

C o n v e r s i o n f a c t o r 1=Nscu/Nseu

20

// R e l a t i o n
units

22
23

24

25

26

27

between

and

SI

units :

speeds

in

Us

customary

speeds

in

Us

customary

units :

19

21

units :

s p e c i f i c

units :

C o n v e r s i o n f a c t o r 2=Nscu/ N s s i
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n S p e c i f i c speed i n US customary u n i t s : %. 3 f
\n\n , Nscu )
p r i n t f ( \n\ n S p e c i f i c speed i n SI u n i t s : %. 3 f \n\n , N s s i
)
p r i n t f ( \n\ n S p e c i f i c s p e e d i n European u n i t s : %. 3 f \n\n
, Nseu )
p r i n t f ( \n\ n R e l a t i o n between s p e c i f i c s p e e d s i n Us
customary u n i t s and European u n i t s : %. 3 f \n\n ,
Conversionfactor1 )
p r i n t f ( \n\ n R e l a t i o n between s p e c i f i c s p e e d s i n Us
customary u n i t s and SI u n i t s : %. 3 f \n\n ,
Conversionfactor2 )
Example 10.06d 10.06-data.sci
80

// Head

Hus = 2 1 . 9 ;

// Volume

Qus=300;

// Working

in

Us

customary

flow

rate

in

in

rpm :

seed

units :

US

customary

units :

N=1170;

// A c e l e r a t i o n

g =9.81;

due

to

graviy

in

m/ s 2

Example 10.07 10.07.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 0 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.07 data . s c i
exec ( f i l e n a m e )

// Volume

Q2so=N2/N1Q1so

1
2

flow

rate ( in

gpm )

at

shut

off

condition

rate

at

best

e f f i c i e n c y

for

N2

// Volume

Q2be=N2/N1Q1be

flow ( in

gpm )

// R e l a t i o n

h e a d r e l a t i o n =(N2/N1) 2

between

10

// Head ( in

11

H2so=(N2/N1) 2 H1so

12
13
14
15
16
17
18
19
20

21

// Head ( in

feet )

feet )

at

at

pump

for

N2 :

heads :

shut

off

condition

best

e f f i c i e n c y

for

N2 :

condition

for

N2 :

H2be=(N2/N1) 2 H1be
Q1=[Q1so Q1be ] ;
Q2=[Q2so Q2be ] ;
H1=[H1so H1be ] ;
H2=[H2so H2be ] ;
plot (Q1 , H1 , o )
plot (Q2 , H2 , )
x t i t l e ( Comparison o f head f o r both c o n d i t i o n s , Volume
Flow Rate , Head )
l e g e n d ( 1170 , 1750 )
Example 10.07d 10.07-data.sci

81

// Volume

Q1so =0;

flow

rate ( in

gpm )

at

shut

off

condition

rate

at

best

e f f i c i e n c y

for

// Volume

Q1be=300;

// Head ( in

H1so =25;

// Head ( in

H1be =21.9

// O p e r a t i o n

10
11
12

flow ( in

gpm )

feet )

at

shut

off

feet )

at

best

e f f i c i e n c y

Speed

1:

speed

2:

condition

for

for

N1 :

condition

for

N1=1170;
// O p e r a t i o n

N2=1750;
Example 10.08 10.08.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 0 8 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.08 data . s c i
exec ( f i l e n a m e )

// D i a m e t e r

Df= Di /12

// Area

1
2

7
8
9
10

of

of

of

pipe ( in

ft 2) :

// V e l o c i t y

of

flow ( in

ft / sec ) :

V=Q/ 7 . 4 8 /A/60
// For

water

at

T = 8 0 F , v i s c o s i t y = 0 . 9 2 7 e 5

f t 2/ sec ,

number :

Re=VDf/v
// F r i c t i o n

13

f =0.0237;

14

// For

15

e =0.00085

16

// e /D

17

e /Df

18

// T o t a l

20

feet ) :

A=%pi /4 Df 2

12

19

( in

crossection

Reynolds
11

pipe

cast

loss

iron ,

Coefficient

for

roughness ( in

is :

head

loss ( in

feet ) :

HL=K+f (SE+OGV)+f (L/Df )+1


// The

heads

are ( in

feet ) :

82

this

feet ) :

value

N1 :

of

Re :

N1 :

N1

Figure 10.2: Output graph of S 10.07

83

21
22

H1=patm 144/( pg )
Vh=V2/2/ g

23

// S u c t i o n

24

Hs=H1+hHLVh

25

/ / NPSHA ( i n

26
27

// For

// For

34
35
36
37

of

1000

gpm , NPSHR ( i n

feet )

for

water

NPSHR=10

30

33

rate

/ / PLOTTING

32

feet ) :

flow

80

29

31

feet ) :

NPSHA=Hs+VhHv1
at

28

head ( in

80

NPSHA

AND

NPSHR

VERSUS

VOLUME

FLOW

RATE :

Qp= 0 : 1 0 0 : 1 5 0 0 ;
[ nQp mQp]= s i z e (Qp) ;
for j =1:mQp;
Vp( j )=Qp( j ) / ( 7 . 4 8 A60) ;
Vhp( j ) =(Vp( j ) ) 2/2/ g ;
Hs ( j )=H1+hHLVhp( j ) ;
end

38
39
40
41

for j =1:mQp;
NPSHAp1( j )=Hs ( j ) +(Vhp( j ) )Hv1 ;
end

42
43
44
45

46

47
48
49

plot (Qp, NPSHAp1, + )


plot (Qh, NPSHRp, o )
x t i t l e ( S u c t i o n head vs Flow r a t e , Volume f l o w r a t e (
gpm) , S u c t i o n Head ( f e e t ) ) ;
p r i n t f ( \n\nType ( Resume ) t o c o n t i n u e o r ( a b o r t ) t o end
\n\n )
l e g e n d ( NPSHA , NPSHR )
pause
clf

50
51
52
53
54
55

// For

180

for j =1:mQp;
NPSHAp2( j )=Hs ( j ) +(Vhp( j ) )Hv2 ;
end
plot (Qp, NPSHAp2, + )
84

56
57

58
59
60

61

plot (Qh, NPSHRp, o )


x t i t l e ( S u c t i o n head vs Flow r a t e , Volume f l o w r a t e (
gpm) , S u c t i o n Head ( f e e t ) ) ;
l e g e n d ( NPSHA , NPSHR )
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nNPSHA a t Q=1000 gpm o f water a t 80 F : %. 2 f
f t \n\n ,NPSHA)
p r i n t f ( \n\nNPSHR a t Q=1000 gpm o f water a t 80 F : %. 1 f
f t \n\n ,NPSHR)
Example 10.08d 10.08-data.sci

// For

Di = 5 . 0 4 7 ;

// Length

4
5

// Operatng

N=1750;

// Water

h=3.5;

11
12
13

pipe

p i p e l i n e ( in

line ,

diameter

D:

feet ) :

spped

level

( in

rpm ) :

abovepump

// T e m p e r a t u r e

c e n t r e l i n e ( in

of

water ( in

of

water

feet ) :

Farenheit ) :

T1=80;
// T e m p e r a t u r e

( in

Farenheit ) :

T2=180;
// Volume

14

Q=1000;

15

// Minor

16

of

nominal

L=6;

10

inch

flow

loss

rate

of

water ( in

gpm ) :

C oe f f i cie n t s :

K= 0 . 5 ; SE=30; OGV=8;

17

// A t m o s p h e r i c

18

patm = 1 4 . 7 ;
of

pressure ( in

19

// D e n s i t y

20

p=1.93;

21

// A c c e l e r a t i o n

22

g =32.2;

23

// Head ( in

24

Hv1 = 1 . 1 7 ;

lbf / in 2) :

air ( slug / ft 3) :

feet )

due

due

to

to

gravity ( in

vapor

=80 F :

85

ft / sec 2) :

pressure

of

water

for

Figure 10.3: Output graph-1 of S 10.08


25

// Head ( in

26

Hv2 = 1 7 . 3 ;

feet )

due

to

vapor

pressure

of

water

for

=180 F :

27

// K i n e m a t i c

28

v =0.927 e 5;

29

// Value

30
31
32

of

viscosity

discharges

of

water

for

at

plotting

80 F :

NPSHR ( i n

gpm ) :

Qh=[500 700 900 1100 1 3 0 0 ]


// V a l u e s

of

NPSHR

obtained

from

Fig .

D3

of

appendix

NPSHRp=[7 8 9 . 5 12 1 6 ]
Example 10.11 10.11.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 1 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.11 data . s c i
exec ( f i l e n a m e )
[ nQ mQ]= s i z e (Q1) ;
[ np mp]= s i z e ( p1 ) ;
[ nP mP]= s i z e ( P1 ) ;

// Volume

1
2
3
4
5

flow

rate

for

fan

2( in

86

cfm ) :

D:

Figure 10.4: Output graph-2 of S 10.08


8
9
10

j =1:mQ;
Q2=Q1( j ) (N2/N1) (D2/D1) 3
// P r e s s u r e

values

for

fan

2( in

inches

of

12

j =1:mp;
p2=p1 ( j ) ( d2/d1 ) ( ( N2/N1) 2 ) ( ( D2/D1) 2)

13

// Power

11

14
15
16
17

18

19
20
21
22

23

values

for

fan

2( in

H2O ) :

hp ) :

j =1:mP;
P2=P1 ( j ) ( d2/d1 ) ( ( N2/N1) 3 ) ( ( D2/D1) 5 )
plot (Q2 , p2 )
x t i t l e ( Performance c u r v e s , Volume f l o w
P r e s s u r e head ( i n i n c h e s o f water ) )
p r i n t f ( \n\nType ( resume ) t o c o n t i n u e o r
e x i t \n\n )
pause
clf
plot (Q2 , P2 )
x t i t l e ( Performance c u r v e s , Volume f l o w
Power ( i n hp ) )
p r i n t f ( \n\nType ( resume ) t o c o n t i n u e o r

87

r a t e ( i n cfm ) ,
( abort ) to

r a t e ( i n cfm ) ,
( abort ) to

24
25
26
27

28

e x i t \n\n )
pause
clf
plot (Q2 , E f f )
x t i t l e ( Performance c u r v e s , Volume f l o w r a t e ( i n cfm ) ,
Eficiency ( in percentage ) )
// S p e c i f i c

speed

operating

of

fan ( in

US

customary

units )

at

point :

29

Nscu= 1 1 5 0 1 1 0 0 0 0 0 . 5 0 0 . 0 4 5 0 . 7 5 / 7 . 4 0 . 7 5

30

// S p e c i f i c

speed

of

fan

( in

SI

units )

at

operating

point :
31

N s s i = 1 2 0 3 1 1 0 0 . 5 0 . 7 2 1 0 . 7 5 / 1 . 8 4 e3 0 . 7 5
Example 10.11d 10.11-data.sci

1
2
3
4

// D i a m e t e r

// O p e r a t i n g

// D e n s i t y

d1 = 0 . 0 7 5 ;

// D i a m e t e r

9
10

fan

( in

inches ) :

speed

of

air

used

fan

1( in

rpm ) :

N1=600

of

D1=36;

of

of

fan

in

2( in

fan

1( in

lbm / f t 3 ) :

inches ) :

D2=42;
// O p e r a t i n g

speed

of

fan

2( in

rpm ) :

N2=1150;

11

// D e n s i t y

12

d2= 0 . 0 4 5 ;

of

13

// The

14

// V a l u e s

aif

following

usd

in

values

fan

are

2( in

lbm / f t 3 ) :

obtained

from

the

given

graph

15

of

volume

flow

rate ( in

cfm )

through

Q1= [ 0 10000 20000 30000 40000 50000 6 0 0 0 0 ] ;

16

// V a l u e s

of

17

p1=[ 3 . 6 8 3 . 7 5 3 . 5 0 2 . 9 6 2 . 1 2 1 . 0 2 0 ] ;
of

pressure (

power ( in

in

inches

of

H2O ) :

18

// V a l u e s

19

P1=[ 1 1 . 1 1 5 . 1 1 8 . 6 2 1 . 4 2 3 . 1 2 3 . 1 2 1 . 0 ] ;
( in

hp ) :

20

// E f f i c i e n c y

21

E f f =[0 37 59 65 57 34 0 ] ;

%) :

88

fan

1:

Figure 10.5: Output graph-1 of S 10.11

Figure 10.6: Output graph-2 of S 10.11

89

Figure 10.7: Output graph-3 of S 10.11

90

Example 10.12 10.12.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 1 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.12 data . s c i
exec ( f i l e n a m e )

// From

// Volume

vc=Qe/N231

// V o l u m e t r i c

E f f v=vc / va

// O p e r a t i n g

1
2

given

graph ,

for

maximum

delivery

condition ,

= 4 8 . 5 gpm .
of

oil

per

revolution

delivered

by

the

pump ( i n

in 3/ rev ) :

Effciency

point

of

pump

at

of

the

pump

is

by

the

f l u i d ( in

max

flow :

found

to

be

at

1500

p s i g , Q = 4 6 . 5 gpm
10

// Power

delivered

11

Pf=Qo po1 / 7 . 4 8 / 6 0 1 4 4 / 5 5 0

12

// I n p u t

13

Pi=Pf / E f f p

14

// The

15

Pl=Q( po1 ) / 7 . 4 8 / 6 0 1 4 4 / 5 5 0

16

// Power

17
18

power ( in

power

hp ) :

delivered

dissipated

to

by

the

load ( in

t h r o t t l i n g ( in

// The

dissipation

with

the

variable

Pvd=Q( po2po1 ) / 7 . 4 8 / 6 0 1 4 4 / 5 5 0

20

// Power

required

pressure
in

23

24
25

26

27

hp ) :

displacement

pump (

hp ) :

19

22

hp ) :

Pd=PfPl
in

21

hp ) :

is

for

100 psi

te

load

above

sensing
that

pump

required

if
by

pump
the

load (

hp ) :

P l s=Q 1 0 0 / 7 . 4 8 / 6 0 1 4 4 / 5 5 0
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nVolume o f o i l p er r e v o l u t i o n d e l i v e r e d by
t he pump : %. 3 f i n 3/ r e v \n\n , vc )
p r i n t f ( \n\ nRequired pump power i n p u t : %. 3 f hp\n\n , Pi )
p r i n t f ( \n\nPower d e l i v e r d t o th e l o a d : %. 3 f hp\n\n , Pl
)
p r i n t f ( \n\nPower d i s s i p a t e d by t h r o t t l i n g : %. 3 f hp\n\n
,Pd)
p r i n t f ( \n\nThe d i s s i p a t i o n with th e v a r i a b l e
91

28

d i s p l a c e m e n t pump : %. 3 f hp\n\n , Pvd )


p r i n t f ( \n\nPower r e q u i r e d f o r t e l o a d s e n s i n g pump i f
pump p r e s s u r e i s 100 p s i above t h a t r e q u i r e d by t he
l o a d : %. 3 f hp\n\n , P l s )
Example 10.12d 10.12-data.sci

1
2
3
4

// O p e r a t i o n

speed ( in

rpm ) :

N=2000;
// Volume

flow

rate ( in

gpm ) :

Q=20;

// P r e s s u r e ( in

p=1500;

// A c t u a l

va = 5 . 9 ;

// Volume

10

Qo= 4 6 . 5 ;

11

// Volume

12

Qe = 4 8 . 5 ;

psig ) :

Pump

Displacement ( in 3/ rev ) :

flow

rate

at

operating

flow

rate

at

maximum

13

// P r e s s u r e

14

po1 =1500;

at

15

// E f f i c i e n c y

16

Effp =0.84;

17

// P r e s s u r e

18

po2 =3000;

operation

of

at

pump

condition ( in

delivery ( in

condition ( in

gpm ) :

gpm ) :

psi ) :

at

operating

condition :

operating

condition

case

2( in

psig ) :

Example 10.14 10.14.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 1 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.14 data . s c i
exec ( f i l e n a m e )

// P r o p e l l e r

Ft=P/V

// R e q u i r e d

Pin=P/ E f f

// C a l c u l a t i n g

1
2

9
10

Thrust ( in

power

input

value

of

MN )

to

D( in

the

m) :

nD=V/J
D=(Ft 106/ p / (nD) 2/ Cf ) 0 . 5
92

p r o p e l l e r ( in

MW ) :

11
12
13
14

15

// O p e r a t i n g

speed

( in

rpm )

is

given

by :

n=nD/D60
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nDiameter o f t h e s i n g l e p r o p e l l e r r e q u i r e d
t o pwer t h e s h i p :%. 3 f m\n\n ,D)
p r i n t f ( \n\ nOperating speed o f th e p r o p e l l e r : %. 3 f rpm\
n\n , n )
Example 10.14d 10.14-data.sci

// T o t a l

P= 1 1 . 4 ;

// From

// Speed

J =0.85;

propulsion

the

given

e f f i c i e n c y

// Thrust

Cf = 0 . 1 ;

// Torque

Ct = 0 . 0 2 ;

of

requirement ( in

curves , Value

are

advance

as

of

MW ) :

c o e f f i c i e n t s

atoptimum

follows :

c o e f f i c i e n t :

Coefficient :

Coefficint :

10

// E f f i c i e n c y :

11

Eff =0.66;

12

// V e l o c i t y

13

power

of

ship ( in

m/ s e c ) :

V= 6 . 6 9 ;

14

// D e n s i t y

15

p=1025;

of

water ( in

kg /m 3 ) :

Example 10.16 10.16.sce


1
2
3
4
5

pathname=g e t a b s o l u t e f i l e p a t h ( 1 0 . 1 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 10.16 data . s c i
exec ( f i l e n a m e )
// Tip

speed

// A c c o u n t i n g

Efw = 0 . 5 3 ;

// K i n e t i c

ratio

of

windmill :

X=N2 %pi /60D/2/(V5/18)


for

energy

w h i r l , max

flux ( in

W)

attainable

is

given

KEF=0.5p (V5/18) 3 %pi (D/ 2 ) 2


93

e f f i c i e n c y

by :

is :

10

// A c t u a l

Efficiency :

11

E f f a=Po/KEF

12

// The

13

amax = 0 . 5 ;

14

// Thrust ( in

maximum

possible

interference

15
16
17
18
19

factor

thrust

occurs

for

an

of :

W) :

Kx=p (V5/18) 2 %pi (D/ 2 ) 22amax(1amax )


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nTip speed r a t i o o f w i n d m i l l :%. 3 f \n\n ,X)
p r i n t f ( \n\ nActual E f f i c i e n c y : %. 3 f \n\n , E f f a )
p r i n t f ( \n\ nActual Thrust : %. 3 f W\n\n ,Kx)
Example 10.16d 10.16-data.sci

1
2
3
4
5
6

// D i a m e t e r

of

windmill ( in

m) :

D=26;
// O p e r a t i n g

speed ( in

rpm ) :

N=20;
// Wind

speed ( in

km / h r ) :

V=36;

// Power

Po=41000;

Output ( in

// Maximum

W) :

e f f i c i e n c y

10

// E f f i c i e n c y :

11

Eff =0.593;

12

// I n t e f e r e n c e

13

a =1/3;

14

// D e n s i t y

15

p=1.23;

of

occurs

in

Factor :

air ( in

kg /m 3 ) :

94

following

conditions :

Chapter 11
Introduction to Compressible
Flow
11.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question
When S 11.03 is executed, we get Fig. 11.1.

11.2

Scilab Code

Example 11.01 11.01.sce


1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 1 1 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 11.01 data . s c i
exec ( f i l e n a m e )

// D e n s i t y

d1=p1 103/R/T1

of

air

// Area ( in

A=m/d1/V1
// Change

dh=cp (T2T1)
// Change

entry :

m2) :

10

at

in

in

enthalpy

internal

of

air ( in

energy

of

95

kJ / kg ) :

air ( in

kJ / kg ) :

11
12
13
14
15
16

17

18

du=cv (T2T1)
// Change

in

entropy ( in

k J / ( k g K ) ) :

ds=cp log (T2/T1)R/1000 log ( p2/p1 )


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nDuct Area : %. 3 f m2\n\n ,A)
p r i n t f ( \n\nChange i n e n t h a l p y o f a i r : %. 3 f kJ / kg\n\n ,
dh )
p r i n t f ( \n\nChange i n i n t e r n a l e n e r g y o f a i r :%. 3 f kJ / kg
\n\n , du )
p r i n t f ( \n\nChange i n e n t r o p y : %. 3 f kgK\n\n , ds )
Example 11.01d 11.01-data.sci

1
2

// T e m p e r a t u r e

of

air

entering

the

cold

section ( in

K) :

T1=440;

// A b s o l u t e

p1 =188;

// V e l o c i t y

pressure

of

air

entering

the

cold

section ( in

the

section ( in

kPa ) :

6
7
8
9

// T e m p e r a t u r e

// A b s o l u t e

11

// Rate

12

// Gas

15

entering

cold

of

air

of

pressure

heat

loss

Constant ( in

at

outlet :( in

K)

of

air

at

outlet ( in

in

the

section ( in

kPa ) :

kJ / s e c ) :

Nm ) :

R= 2 8 7 ;
// Mass

flow

rate

of

air ( in

kg / s e c ) :

m= 0 . 1 5 ;

16

// S p e c i f i c

17

cp =1;

18

// S p e c i f i c

19

cv = 0 . 7 1 7 ;

heat

at

energy

constant

at

pressue ( in

constant

volume ( in

k J / ( k g K ) ) :

k J / ( k g K ) ) :

Example 11.03 11.03.sce


1
2

m/ s e c ) :

T2=351;
p2 =213;

14

air

V1=210;

10

13

of

pathname=g e t a b s o l u t e f i l e p a t h ( 1 1 . 0 3 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 11.03 data . s c i
96

3
4

exec ( f i l e n a m e )
// V a l u e s

of

a l t i t u d e ( in

Al = 0 : 1 0 0 0 : 1 5 0 0 0
[ nAl mAl]= s i z e ( Al ) ;

// V a l u e s

9
10

of

m) :

temperature

at

given

a l t i t u d e s ( in

K) :

T= [ 2 8 8 . 2 2 8 1 . 7 2 7 5 . 2 2 6 8 . 7 2 6 2 . 2 2 5 5 . 7 2 4 9 . 2 2 4 2 . 7
236.2 229.7 223.3 216.8 216.7 216.7 216.7 2 1 6 . 7 ] ;
[ nT mT]= s i z e (T) ;
// V a l u e s

of

speed

of

sound

at

these

a l t i t u d e s ( in

m/ s e c )

12

j =1:mT;
c=sqrt ( kRT( j ) )

13

// Speed

11

14
15
16

17
18

of

sound

at

sea

l e v e l ( in

m/ s e c ) :

c1=sqrt ( kRT( 1 ) )
plot ( c , Al )
x t i t l e ( V a r i a t i o n o f sound speed with a l t i t u d e , Speed
o f sound (m/ s e c ) , A l t i t u d e (m) )
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nSpeed o f sound a t s e a l e v e l : %. 3 f m/ s e c \n\n
, c1 )
Example 11.03d 11.03-data.sci

// Value

k =1.4;

3
4

// Gas

of

k :

K j / ( k g K ) ) :

Constant ( in

R=287;
Example 11.04 11.04.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 1 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 11.04 data . s c i
exec ( f i l e n a m e )

// Mach

1
2

number

at

entry :

M1=V1/ sqrt ( kRT1)

// S t a g n a t i o n

pressure

at

entry ( in

p01=p1 (1+(k1)/2M1 2 ) ( k / ( k1) )


97

kPa ) :

Figure 11.1: Output graph of S 11.03

98

// S t a g n a t i o n

temperature

T01=T1(1+(k1)/2M1 2 )
// S t a t i c

11

p2=p02 /(1+(k1)/2M2 2 ) ( k / ( k1) )

12

// T e m p e r a t u r e

14
15
16
17

18

19
20
21

at

at

entry ( in

10

13

pressure

at

exit ( in

exit ( in

K) :

kPa ) :

K) :

T2=T02/(1+(k1)/2M2 2 )
// Change

in

entropy ( in

k J / k g K ) :

ds=cp log (T2/T1)R/1000 log ( p2/p1 )


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n S t a g n a t i o n p r e s s u r e a t e n t r y : %. 3 f kPa\n\n
, p01 )
p r i n t f ( \n\ n S t a g n a t i o n t e m p e r a t u r e a t e n t r y : %. 3 f K\n\n
, T01 )
p r i n t f ( \n\ n S t a t i c p r e s s u r e a t e x i t : %. 3 f kPa\n\n , p2 )
p r i n t f ( \n\ nTemperature a t e x i t : %. 3 f K\n\n ,T2)
p r i n t f ( \n\nChange i n e n t r o p y : %. 3 f kJ /kgK\n\n , ds )
Example 11.04d 11.04-data.sci

// P r e s s u r e

p1 =350;

// T e m p e r a t u r e

4
5
6
7
8
9

at

entry ( in

K)

// V e l o c i t y

at

entry ( in

at

exit :

m/ s ) :

V1=183;
// Mach

no .

M2= 1 . 3 ;
// S t a g n a t i o n

p02 =385;

11

// S t a g n a t i o n

12

T02=350;

13

// Value

14

k =1.4;

15

at

kPa ) :

T1=333;

10

16

entry ( in

// Gas

of

pressure

at

temperature

exit ( in

at

kPa ) :

exit ( in

K) :

k :

constant ( in

Nm / k g K )

R=287;

17

// S p e c i f i c

18

cp =1;

heat

at

constant

p r e s s u r e ( k J / ( k g K ) :

99

Chapter 12
Steady One-Dimensional
Compressible Flow
12.1

Discussion

When executing the code from the editor, use the Execute File into Scilabtab
and not the Load in Scilabtab
The .sci files of the respective problems contain the input parameters of
the question

12.2

Scilab Code

Example 12.01 12.01.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 1 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.01 data . s c i
exec ( f i l e n a m e )

// Here

1
2

5
6

//

the

stagnation

Stagnation

quantities

temperature ( in

are

K) :

T0=T1(1+(k1)/2M1 2 )

// S t a g n a t i o n

p0=p1 ((1+( k1)/2M1 2 ) ( k / ( k1) ) )

// F i n d i n g

10
11

pressure ( in

kPa ) :

T2 / T1 :

T=t 2 / t 1
// T e m p e r a t u r e

at

exit ( in

K) :

100

constant .

12
13
14

T2=TT1
// F i n d i n g

p2 / p1 :

P=P2/P1

15

// P r e s s u r e

16

p2=P2p1

17

// D e n s i t y

18

d2=p2 103/R/T2

19

// V e l o c i t y

20

// F i n d i n g

22

a=a2 / a1

24
25
26
27
28
29
30

31

32

of

exit ( in

air

of

at

air

kPa ) :

exit ( in

at

kg /m 3 ) :

exit ( in

// Area

A2 / A1 :

at

exit ( in

m2) :

A2=aA1
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n S t a g n a t i o n t e m p e r a t u r e : %. 3 f K\n\n ,T0)
p r i n t f ( \n\ n S t a g a n t i o n p r e s s u r e : %. 3 f kPa\n\n , p0 )
p r i n t f ( \n\ nTemperature a e x i t %. 3 f K\n\n ,T2)
p r i n t f ( \n\ n P r e s s u r e a t e x i t : %. 3 f kPa\n\n , p2 )
p r i n t f ( \n\ nDensity o f a i r a t e x i t : %. 3 f kg /m3\n\n , d2
)
p r i n t f ( \n\ n V e l o c i t y o f a i r a t e x i t : %. 3 f m/ s e c \n\n ,V2
)
p r i n t f ( \n\ nArea a t e x i t : %. 3 f \n\n ,A2)
Example 12.01d 12.01-data.sci

1
2
3
4

// Mach

number

at

entry :

// T e m p e r a t u r e

at

entry ( in

M1= 0 . 3 ;

// P r e s s u r e

p1 =650;

8
9
10

K) :

T1=335;

m/ s e c ) :

V2=M2 sqrt ( kRT2)

21

23

at

// Area

at

at

entry ( in

entry ( in

kPa ) :

m2) :

A1= 0 . 0 0 1 ;
// Mach

number

at

exit :

M2= 0 . 8 ;

11

// / Value

12

k =1.4;

of

k :

101

13

// For

the

Mach

14

/ / T / T0 :

15

t 1 =0.9823 ,

16

// p / p0 :

17

P1 = 0 . 9 3 9 5 ;

18

// d / d0 :

19

den1 = 0 . 9 5 6 4 ;

20

//A/A :

21

a1 = 2 . 0 3 5 ;

22

// For

23

//

24

t2 =0.8865;

25

// p / p0 :

26

P2 = 0 . 6 5 6 0 ;

27

// d / d0 :

28

den2 = 0 . 7 4 0 0 ;

the

Mach

no : 0 . 8 :

T / T0 :

29

//A/A :

30

a2 = 1 . 0 3 8 ;

31

// Gas

32

no : 0 . 3 :

Constant ( in

Nm / k g K ) :

R=287;
Example 12.02 12.02.sce

1
2
3
4
5
6
7
8
9

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 2 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.02 data . s c i
exec ( f i l e n a m e )
// C h e c k i n g

for

// choked

else
// Not

choked

10

// T h e r e f o r e

11

pe=pb ;

12
13

chocking :

c=pb/p0 ;
i f ( c <=0.528)

// Mach

pressure

number

at

at

exit

back

pressure

exit :

Me=((( p0/ pe ) ( ( k1)/k ) 1) ( 2 / ( k1) ) ) 0 . 5

14

// T e m p e r a t u r e

at

exit ( in

15

Te=T0/(1+(k1)/2Me2 )

K) :

102

16
17

// V e l o c i t y

at

exit ( in

Ve=Me sqrt ( kRTe )

18

// D e n s i t y

19

de=pe 103/R/Te

20

// Mass

21
22
23
24
25

m/ s e c ) :

at

flow

exit ( in

rate

of

kg /m 3 ) :

a i r ( kg / s e c ) :

m=de VeAe
end ;
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nMach number a t e x i t : %. 3 f \n\n ,Me)
p r i n t f ( \n\nMass f l o w r a t e o f a i r : %. 3 f kg / s e c \n\n ,m)
Example 12.02d 12.02-data.sci

1
2

// Throat

area

// Back

pb =591;

// S t a g n a t i o n

p0 =1000;

7
8
9
10

of

nozzle ( in

m2) :

Ae = 0 . 0 0 1 ;
pressure

// S t a g n a t i o n

of

air ( in

pressure ( in

kPa ) :

kPa ) :

temperature ( in

K) :

T0=333;
// Gas

Constant ( in

Nm / k g K ) :

R=287;

11

// Value

12

k =1.4;

of

k :

Example 12.03 12.03.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 3 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.03 data . s c i
exec ( f i l e n a m e )

// S a t u r a t i o n

p0=p1 (1+(k1)/2M1 2 ) ( k / ( k1) )

// C h e c k i n g

1
2

7
8
9
10

pressure ( in

for

psia ) :

choking :

x=pb/p0 ;
i f ( x >0.528)
// Not

choked

else
103

11
12
13
14
15
16

// choked

end
// As

there

is

choking :

// V e l o c i t y

at

entry :

Mt=1;
V1=M1 sqrt ( kR(T1+460) 3 2 . 2 )

17

// D e n s i t y

18

d1=p1 / (R(T1+460) ) 144

19
20
21
22
23
24
25
26
27
28

// Mass

at

flow

the

entry ( in

rate ( in

lbm / f t 3 ) :

lbm / s e c ) :

m=d1V1A1
// F i n d i n g

the

valueof

A1 / A ;

A=1/M1((1+( k1)/2M1 2 ) /(1+(k1) /2 ) ) ( ( k+1) / ( 2 ( k1) ) )


// For

choked

flow ,

A t =A

At=A1/A
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nMach number a t t h r o a t : %. 3 f \n\n ,Mt)
p r i n t f ( \n\nMass f l o w r a t e : %. 3 f lbm/ s e c \n\n ,m)
p r i n t f ( \n\ nArea a t t h r o a t : %. 3 f f t 2\n\n , At )
Example 12.03d 12.03-data.sci

1
2
3
4

// Mach

number

// T e m p e r a t u r e

at

entry ( in

F) :

T1=40;
// P r e s s u r e

p1 =60;

// Area

at

at

entry ( in

psia ) :

entry ( in

ft 2) :

pressure ( in

psia ) :

A1= 0 . 0 1 3 ;

// Back

10

pb=30;

11

// Gas

12

entry :

M1= 0 . 5 2 ;

at

Consant ( in

f t l b f / l b m R )

R= 5 3 . 3 ;

13

// Value

14

k =1.4;

of

k :

Example 12.04 12.04.sce


104

1
2
3

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 4 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.04 data . s c i
exec ( f i l e n a m e )

// T e m p e r a t u r e

Tt=T0/(1+(k1)/2Mt 2)

// P r e s s u r e

pt=p0 ( Tt/T0) ( k / ( k1) )

// D e n s i t y

dt=pt 1000/R/Tt

at

at

the

throat ( in

// V e l o c i t y

11

Vt=Mt sqrt ( kRTt )

13

// Value

of

15

// As

16

pe=pb ;

17

// The

20

result

Mach

// C a l c u l a t i n g

27
28
29
30
31

pressure

the

// Area

of

A( in

A s t a r=Ae/Ay

26

m/ s ) :

at

are
at

the

constant

exit ,

exit

is

value

given

by

Ae / A :

of

at

m2) :

throat ( in

m2) :

At=Ax A s t a r
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nTemperature a t th e t h r o a t : %. 3 f K\n\n , Tt )
p r i n t f ( \n\ n P r e s s u r e a t t h r o a t : %. 3 f kPa\n\n , pt )
p r i n t f ( \n\ nDensity a t t h r o a t : %. 3 f kg /m3\n\n , dt )
p r i n t f ( \n\ n V e l o c i t y a t t h e t h r o a t : %. 3 f m/ s e c \n\n , Vt )
p r i n t f ( \n\nMach number a t th e e x i t : %. 3 f \n\n ,Me)
p r i n t f ( \n\ nArea a t t h r o a t : %. 3 f m2\n\n , At )
Example 12.04d 12.04-data.sci

therefore

Ay=1/Me((1+( k1)/2Me2 ) /(1+(k1) /2 ) ) ( ( k+1) / ( 2 ( k1) )


)

22

25

throat ( in

Me=sqrt ( ( ( p0/ pe ) ( ( k1)/k ) 1) 2/( k1) )

// Value

24

kg /m 3 ) :

properties

number

21

23

kPa ) :

At /A :

// S t a g n a t i o n

19

the

K) :

Ax=1/Mt((1+( k1)/2Mt 2) /(1+(k1) /2 ) ) ( ( k+1) / ( 2 ( k1) )


)

14

18

throat ( in

throat ( in

10

12

at

at

// S t a g n a t i o n

temperature ( in

K) :

T0=350;
105

// S t a g n a t i o n

p0 =1000;

// Back

pb =954;

// Mach

8
9
10

Pressure ( in

number

at

kPa ) :

kPa ) :

throat :

Mt= 0 . 6 8 ;
// Area

at

exit ( in

m2) :

Ae = 0 . 0 0 1 ;

11

// Value

12

k =1.4;

13

// Gas

14

pressure ( in

of

k :

Nm / k g K ) :

Constant ( in

R=287;
Example 12.05 12.05.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 5 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.05 data . s c i
exec ( f i l e n a m e )

// Mach

1
2

number

at

the

exit :

Me=sqrt ( ( ( p0/ pe ) ( ( k1)/k ) 1) 2/( k1) )

// T e m p e r a t u r e

Te=T0/(1+(k1)/2Me2 )

// Mass

9
10
11
12

flow

at

exit ( in

rate ( in

K) :

kg / s ) :

m=pe 1000Me sqrt ( k/R/Te ) Ae


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nMach number a t th e e x i t : %. 3 f \n\n ,Me)
p r i n t f ( \n\nMass f l o w r a t e : %. 3 f kg / s e c \n\n ,m)
Example 12.05d 12.05-data.sci

1
2

// S t a g n a t i o n

temperature ( in

K) :

T0=350;

// S t a g n a t i o n

p0 =1000;

// P r e s s u r e

pe = 8 7 . 5 ;

// Back

pb=50;

at

pressure ( in

exit ( in

Pressure ( in

kPa ) \

kPa )

kPa ) :

106

9
10
11
12

// Area

at

exit ( in

m2) :

Ae = 0 . 0 0 1 ;
// Gas

Nm / k g K )

Constant ( in

R=287;

13

// Value

14

k =1.4;

of

k :

Example 12.06 12.06.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 6 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.06 data . s c i
exec ( f i l e n a m e )

// Mach

1
2

5
6
7

umber

at

// T e m p e r a t u r e

at

// D e n s i t y

d1=p1 1000/R/T1

12
13
14
15
16
17
18
19

section

1( in

K) :

T1=T0/(1+(k1)/2M1 2 )

11

1:

M1=sqrt ( ( 2 / ( k1) ( ( p0/p1 ) ( ( k1)/k ) 1) ) )

10

section

at

// V e l o c i t y

section

at

1( in

kg /m 3 ) :

section1 ( in

m/ s e c ) :

V1=M1 sqrt ( kRT1)


// Area

at

section

1( in

m2) :

A1=%pi /4D2
// Mass

flow

rate ( in

kg / s e c ) :

m=d1A1V1
// Mach

number

at

section

2:

M2=sqrt ( ( 2 / ( k1) ) ( ( T0/T2) 1) )


// V e l o c i t y

at

section

2( in

m/ s e c ) :

V2=M2 sqrt ( kRT2)

20

// D e n s i t y

at

section

21

d2=d1V1/V2

22

// P r e s s u r e

23

p2=d2 /1000RT2

at

section

kg /m 3 ) :

2( in

// S t a g n a t i o n

25

p02=p2 (1+(k1)/2M2 2 ) ( k / ( k1) )

27
28
29

// F o r c e

exerted

on

at

kPa ) :

24

26

pressure

2( in

section

control

volume

2( in

by

kPa ) :

duct

wall ( in

F=(p2p1 ) 1000A1+m(V2V1)
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\nMass f l o w r a t e : %. 3 f kg / s e c \n\n ,m)
107

N) :

30

31

p r i n t f ( \n\ nLocal i s e n t r o p i c s t a g n a t i o n p r e s s u r e a t
s e c t i o n 2 :%. 3 f kPa\n\n , p02 )
p r i n t f ( \n\ nForce e x e r t e d on c o n t r o l volume by duct
w a l l :%. 3 f N\n\n ,F)
Example 12.06d 12.06-data.sci

1
2

// D i a m e t e r

of

// S t a g n a t i o n

p0 =101;

// S t a g n a t i o n

// P r e s s u r e

p1 = 9 8 . 5 ;

// T e m p e r a t u r e

11
12

pressure ( in

kPa ) :

temperature ( in

K) :

T0=296;

10

m) :

D=7.1610 3;

pipe ( in

at

section

at

1( in

section

kPa ) :

2( in

K) :

T2=287;
// Gas

constant ( in

Nm / k g K ) :

R=287;

13

// Value

14

k =1.4;

of

k :

Example 12.07 12.07.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 7 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.07 data . s c i
exec ( f i l e n a m e )

// Mach

1
2

5
6
7
8
9
10

number

at

section

1:

M1= sqrt ( 2 / ( k1) ( ( p0 / ( p0+p1 ) ) ( ( k1)/k ) 1) )


// T e m p e r a t u r e

at

section

1( in

K) :

T1=T0/(1+(k1) /2(M1) 2 )
V1=M1 sqrt ( kRT1)
// P r e s s u r e

at

section

1( in

kPa ) :

p1=gdHg(760 18.9) 103

11

// D e n s i t y

12

d1=p1/R/T1

13

// At

14

// ( p / p ) 1 :

at

section

1( in

kg /m 3 ) :

M1 = 0 . 1 9 0 ,

108

15

P1=5.745

16

//

17

F1=16.38

( f L m a x / Dh ) 1 :

18

// Value

19

L13=F1D/ f

20

// Value

21

P2=p2/p1P1

22

// For

23

of

this

25

F2=2.309

M=0.4 ,

26

// Value

27

L23=F2D/ f

30
31

32
33

value ,

Value

of

M2

is

obtained

as

of

// Length

fLmX /D = 2 . 3 0 9

L23 ( in

of

duct

m) :

between

section

and

2( in

// S t a g n a t i o n

// S t a g n a t i o n

p0 =760;

// Gauge

p1 = 18.9;

// Gauge

p2=412;

11
12
13
14

temperature ( in

K) :

pressure ( in

of

T0=296;

10

m) :

L12=L13L23
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nLength o f duct r e q u i r e d f o r c h o k i n g from
s e c t i o n 1 : %3f m\n\n , L13 )
p r i n t f ( \n\nMach number s e c t i o n 2 : %. 3 f \n\n ,M2)
p r i n t f ( \n\ Length o f duct between s e c t i o n 1 and 2 : %. 3 f
m\n\n , L12 )
Example 12.07d 12.07-data.sci

0.4

M2= 0 . 4 ;
// For

29

m) :

( p/p ) 2:

of

24

28

L13 ( in

// Mach

pressure

pressure

number

at

mm

at

section

at

section2 ( in

1( in

3:

M3=1;
// Gas

constant :

R=287;
// D e n s i t y

of

Hg ) :

m e r c u r y ( kg /m 3 ) :

dHg=13500;
109

mm

mm

of

of

Hg ) :

Hg ) :

15

// A c c e l e r a t i o n

16

g =9.8;

17

// F r i c t i o n

18

f =0.0235;

19

// D i a m e t e r

20

due

to

gravity ( in

m/ s e c 2 ) :

factor :

of

tube ( in

m) :

D=7.1610 3;

21

// Value

22

k =1.4;

of

k :

Example 12.08 12.08.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 8 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.08 data . s c i
exec ( f i l e n a m e )

// D e n s i t y

d1=p1 144/R/T1

1
2

6
7

at

// V e l o c i t y

at

// D e n s i t y

d2=d1V1/V2

11
12
13

1( in

section

2( in

at

section

// T e m p e r a t u r e

2( in

2( in

at

section

2:

// Mach

number

M2=V2/ sqrt ( kR 3 2 . 1 6 T2)


// S t a g n a t i o n

Temperature

16

// S t a g n a t i o n

17

p02=p2 ( T02/T2) ( k / ( k1) )

18

// Mach

pressure

Number

at

at

section

// S t a g n a t i o n

21

T01=T1(1+(k1)/2M1 2 )

25
26
27

at

section

section

2( in

( in

R) :

psia ) :

1:

M1=V1/ sqrt ( kR 3 2 . 1 6 T1)

20

24

R) :

T2=p2/d2/R144

T02=T2(1+(k1)/2M2 2 )

23

lbm / f t 3 ) :

section

15

22

ft / sec ) :

at

14

19

lbm / f t 3 ) :

V2=(p1p2 ) 144/ d1/V132.2+V1

10

section

// Energy

temperature

added ( in

at

section

1( in

R) :

Btu / lbm ) :

E=Cp( T02T01 )
// Change

in

entropy ( in

B t u / ( l b m R ) ) :

dS=Cp log (T2/T1) (CpCv) log ( p2/p1 )


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ n V e l o c i t y a t s e c t i o n 2 : %. 3 f f t / s e c \n\n ,V2)
110

28

29
30

31

32
33

p r i n t f ( \n\ nDensity a t s e c t i o n 2 : %. 3 f lbm/ f t 3\n\n , d2


)
p r i n t f ( \n\ nTemperature a t s e c t i o n 2 : %. 3 f R\n\n ,T2)
p r i n t f ( \n\ n S t a g n a t i o n Temperature a t s e c t i o n 2 : %. 3 f R
\n\n , T02 )
p r i n t f ( \n\ n S t a g n a t i o n p r e s s u r e a t s e c t i o n 2 : %. 3 f p s i a
\n\n , p02 )
p r i n t f ( \n\ nEnergy added : %. 3 f Btu/lbm\n\n ,E)
p r i n t f ( \n\nChange i n e n t r o p y : %. 3 f Btu / ( lbmR) \n\n , dS
)
Example 12.08d 12.08-data.sci

1
2

// T e m p e r a t u r e

// P r e s s u r e

p1 =20;

// P r e s s u r e

p2 =10;

7
8
9
10
11

// V e l o c i t y

R) :

at

section

1( in

psia ) :

at

section

2( in

psia ) :

at

section

1( in

ft / s ) :

// Cross s e c t i o n a l

// Gas

Constant ( in

R= 5 3 . 3 ;
// Value

14

k =1.4;

15

// S p e c i f i c

17

1( in

area

of

the

duct ( in

ft 2) :

A= 0 . 2 5 ;

13

18

section

V1=360;

12

16

at

T1=600;

of

f t l b f / l b m R ) :

k :

heat

at

constant

presure ( in

heat

at

constant

volume ( in

B t u / l b m R ) :

Cp= 0 . 2 4 ;
// S p e c i f i c

B t u / l b m R ) :

Cv= 0 . 1 7 1 ;
Example 12.09 12.09.sce

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 0 9 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.09 data . s c i
exec ( f i l e n a m e )

// Mach

1
2

nuber

at

section

1:

111

5
6

M1=V1/ sqrt ( kRT1)


// For

these

value

of

M1

and

M2 , t h e

obtained :
7

/ / ( To / T0 ) 1 :

t01 =0.7934;

/ / ( T0 / T0 ) 2 :

10

t02 =0.9787;

11

// ( p0 / p0 ) 1 :

12

P01 = 1 . 5 0 3 ;

13

// ( p0 / p0 ) 2 :

14

P02 = 1 . 0 1 9 ;

15

// (T/T ) 1 :

16

t1 =0.5289;

17

// (T/T ) 2 :

18

t2 =0.9119;

19

// ( p / p ) 1 :

20

P1 = 0 . 3 6 3 6 ;

21

// ( p / p ) 2 :

22

P2 = 0 . 7 9 5 8 ;

23

// (V/V ) 1 :

24

v1 = 1 . 4 5 5 ;

25

// (V/V ) 2 :

26

v2 = 1 . 1 4 6 ;

27

// Value

28

t=t 2 / t 1

29

// T e m p e r a t u r e

30

T2=t T1

31

// Value

32

p=P2/P1

of

of

33

// P r e s s u r e

34

p2=pp1

35

// Value

36

v=v2 / v1

37

// V e l o c i t y

38

of

T2 / T1 :

at

section

2( in

K) :

p2 / p1 :

at

section

2( in

kPa ) :

2( in

m/ s e c ) :

V2 / V1 :

at

section

V2=vV1

39

// D e n s i t y

40

d2=p2 1000/R/T2

41

// At

M1 ,

at

section

2( in

kg /m 3 ) :

T / T0 = 0 . 5 5 5 6

112

following

values

are

42

T01=T1 / 0 . 5 5 5 6

43

// At

44

T02=T2 / 0 . 7 7 6 4

45
46
47
48
49
50
51
52
53
54

55
56

M2 ,

// Heat

T / T0 = 0 . 7 7 6 4

added ( in

kJ / kg ) :

E=Cp( T02T01 )
// Change

in

e n t r o p y ( k J / k g K ) :

dS=Cp log (T2/T1)R log ( p2/p1 ) /1000


p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nTemperature a t s e c t i o n 2 : %. 3 f K\n\n ,T2)
p r i n t f ( \n\ n P r e s s u r e a t s e c t i o n 2 : %. 3 f kPa\n\n , p2 )
p r i n t f ( \n\ n V e l o c i t y a t s e c t i o n 2 : %. 3 f m/ s e c \n\n ,V2)
p r i n t f ( \n\ nDensity a t s e c t i o n 2 : %. 3 f kg /m3\n\n , d2 )
p r i n t f ( \n\ n S t a g n a t i o n t e m p e r a t u r e a t s e c t i o n 2 : %. 3 f K
\n\n , T02 )
p r i n t f ( \n\ nHeat added : %. 3 f kJ / kg \n\n ,E)
p r i n t f ( \n\nChange i n e n t r o p y : %. 3 f kJ / kg \n\n , dS )
Example 12.09d 12.09-data.sci

1
2

// T e m p e r a t u r e

// P r e s s u r e

p1 =135;

// V e l o c i t y

6
7
8
9
10

section

1( in

K) :

at

section

1( in

kPa ) :

at

section

1( in

m/ s e c ) :

V1=732;
// Mach

number

at

section

2:

M2= 1 . 2 ;
// Gas

constant ( in

Nm / k g K ) :

R=287;

11

// Value

12

k =1.4;

13

// S p e c i f i c

14

at

T1=333;

of

k :

heat

at

constant

presure ( in

Nm / k g K ) :

Cp=1;
Example 12.10 12.10.sce

1
2

pathname=g e t a b s o l u t e f i l e p a t h ( 1 2 . 1 0 . s c e )
f i l e n a m e=pathname+f i l e s e p ( )+ 12.10 data . s c i
113

exec ( f i l e n a m e )

// D e n s i t y

d1=p1 1000/R/T1

6
7

// Mach

at

section

number

at

1( in

section

kg /m 3 ) :

1:

M1=V1/ sqrt ( kRT1)

// S t a g n a t i o n

T01=T1(1+(k1)/2M1 2 )

10

// S t a g n a t i o n

temperature

pressure

at

at

section

section

11

p01=p1 (1+(k1)/2M1 2 ) ( k / ( k1) )

12

// The

13

// po2 / p01 :

14

p0 = 0 . 7 2 0 9 ;

15

/ / T2 / T1 :

16

T= 1 . 6 8 7 ;

17

// p2 / p1 :

18

p=4.5;

19
20
21
22

following

// T e m p e r a t u r e

p2=pp1

25

// V e l o c i t y

at

at

section

2( in

m/ s e c ) :

appendix :

V2=VV1
at

29

// S t a g n a t i o n

30

p02=p0 p01

31

// S t a g n a t i o n

32

T02=T01 ;

33

// Change

40

the

K) :

kPa ) :

// D e n s i t y

39

( in

2( in

d2=p2 1000/R/T2

38

section

28

37

section

at

27

36

from

T2=TT1

24

35

obtained

kPa ) :

/ / V2 / V1 :

// P r e s s u r e

34

are

1( in

K) :

V= 0 . 3 7 5 0 ;

23

26

values

1( in

in

section

pressure

( in

at

temperature

entropy ( in

kg /m 3 ) :

section

at

2( in

section

kPa ) :

2( in

K) :

k J / ( k g K ) ) :

dS=R/1000 log ( p0 )
p r i n t f ( \n\nRESULTS\n\n )
p r i n t f ( \n\ nTemperature a t s e c t i o n
p r i n t f ( \n\ n P r e s s u r e a t s e c t i o n 2 :
p r i n t f ( \n\ n V e l o c i t y a t s e c t i o n 2 :
p r i n t f ( \n\ nDensity a t s e c t i o n 2 :
p r i n t f ( \n\ n S t a g n a t i o n p r e s s u r e a t
114

2 : %. 3 f K\n\n ,T2)
%. 3 f kPa\n\n , p2 )
%. 3 f m/ s e c \n\n ,V2)
%. 3 f kg /m3\n\n , d2 )
s e c t i o n 2 : %. 3 f kPa\

41
42

n\n , p02 )
p r i n t f ( \n\nChange i n e n t r o p y : %. 3 f kgK\n\n , dS )
p r i n t f ( \n\ n S t a g n a t i o n t e m p e r a t u r e a t s e c t i o n 2 : %. 3 f K
\n\n , T02 )
Example 12.10d 12.10-data.sci

1
2

// T e m p e r a t u r e

// P r e s s u r e

p1 =65;

// V e l o c i t y

V1=668;

// Value

8
9
10

at

section

1( in

K) :

T1=278;
at

section

1( in

kPa ) :

at

section

1( in

m/ s e c ) :

of

gas

of

k :

constant ( in

Nm / k g K ) :

R=287;
// Value

k =1.4;

115

You might also like