You are on page 1of 71

Scilab Textbook Companion for

Examples in Thermodynamics Problems


by W. R. Crawford1
Created by
Kranthi Naik
B.Tech
Civil Engineering
IIT Bombay
College Teacher
Shimpi
Cross-Checked by
Chaitanya
September 16, 2014

1 Funded

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


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

Book Description
Title: Examples in Thermodynamics Problems
Author: W. R. Crawford
Publisher: Sir Isaac Pitman, London
Edition: 3
Year: 1937
ISBN: 978-0471862567

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

Contents
List of Scilab Codes

1 Heating and expansion of gases entropy

2 Air cycle efficiencies

15

3 Properties of steam

17

4 The steam engine

24

5 Air compressors and motors refrigeration

32

6 flow through nozzles steam turbines

40

7 Combustion boiler trials

52

8 Internal combustion engines Variable specific heats

60

9 Valve Dlagrams and value gears

68

List of Scilab Codes


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

1.1
1.2
1.4
1.5
1.8
1.9
1.11
1.13
1.20
1.22
1.23
1.26
2.2
2.4
2.5
3.1
3.2
3.3
3.4
3.5
3.6
3.10
3.12
3.17
4.1
4.2
4.3
4.10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

4.14
4.16
4.17
4.19
4.21
4.23
5.1
5.2
5.3
5.5
5.6
5.9
5.12
5.14
5.15
5.16
5.18
6.1
6.2
6.4
6.5
6.6
6.8
6.10
6.11
6.13
6.15
6.16
6.18
6.19
6.23
6.25
16.28
7.1
7.2
7.4
7.6
7.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

7.9
7.11
7.13
7.15
7.16
7.17
8.1
8.3
8.6
8.8
8.10
8.12
8.19
8.20
8.21
8.22
9.5
5.7
9.10
9.12
9.17

Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example
Example

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

55
56
56
57
58
59
60
61
61
62
63
64
65
65
66
66
68
68
69
69
70

Chapter 1
Heating and expansion of gases
entropy

Scilab code Exa 1.1 Example 1


1
2
3
4
5
6
7
8
9
10

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =280 // l b / i n 2
v =2 // f t 3
p2 =20 // l b / i n 2
v2 =18.03 // f t 3
//CALCULATIONS
W =144*( p1 *v - p2 * v2 ) /(1.2 -1) // f t / l b
//RESULTS
printf ( The volume and work done d u r i n g t h e
e x p a n s i o n=% f f t / l b ,W )

Scilab code Exa 1.2 Example 2


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

of variables
7

3
4
5
6
7
8
9
10
11
12
13

v =2 // f t 3
v2 =20 // f t 3
p =100000 // f t l b
v2 =10.41 // l b / i n 2
v3 =10 // l b / i n 2
p1 =1.3 // l b
p2 =( v2 *199.5) /9.95 // l b / i n 2
//CALCULATIONS
P =( p2 / v3 - v2 ) // l b / i n 2
//RESULTS
printf ( The i n i t i a l a n d f i n a l p r e s s u r e=% f l b / i n 2 ,P
)

Scilab code Exa 1.4 Example 3


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
Cp =0.24 // l b / i n 2
Cv =0.18 // f t 3
p1 =5 // l b / i n 2
T1 =20 // D e g r e e C
T2 =150 // D e g r e e C
//CALCULATIONS
W = p1 * Cp *( T2 - T1 ) //C . H . U
H = p1 * Cv *( T2 - T1 ) //C . H . U
Gamma = Cp / Cv // l b / i n 2
//RESULTS
printf ( t h e c o n s t a n t p r e s s u r e=% f C . H . U ,W )
printf ( t h e c o n s t a n t volume t h e v a l u e o f g a s=% f l b /
i n 2 , Gamma )

Scilab code Exa 1.5 Example 4


8

1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
Gama =1.33 // f t / l b
p =100 // l b / i n 2
p1 =20 // l b / i n 2
v2 =10.05 // f t 3
v =3 // f t / l b
//CALCULATIONS
W =144*( p *v - p1 * v2 ) /0.33 // f t l b
//RESULTS
printf ( The work done=% f f t l b ,W )

Scilab code Exa 1.8 Example 5


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =3.74 // f t / l b
p1 =2.48 // f t / l b
v =5.7 // f t l b
Cv =0.21 // f t / l b
P =440 // l b / i n 2
P1 =160 // l b / i n 2
P2 =14 // l b / i n 2
T =25 // d e g r e e C
T1 =100 //F
vs =( %pi *( p1 ) ^2/4) *( p /1728) // f t 3
vc =5.7 // f t 3
v1 =4.7 // f t 3
v2 = vs / v1 // f t 3
v3 =0.01273 // f t 3
T2 =298 //F
//CALCULATIONS
W =( P2 *144* v3 ) /( T2 * T1 ) // l b
T3 =[( P1 *144*1) /( P2 *144*7) * T2 ] // D e g r e e C
T4 =( P / P1 ) * T3 // D e g r e e C
9

22 H = W * Cv *( T4 - T3 ) //C . H . U
23 //RESULTS
24 printf ( The h e a t s u p p l i e d d u r i n g e x p l o s i o n=% f C . H . U

,H )

Scilab code Exa 1.9 Example 6


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =10 // f t 3
p =100 // l b / i n 2
p1 =18 // l b / i n 2
v1 =50 // f t 3
n = log ( p / p1 ) / log (5)
gama =1.4 // a i r
//CALCULATIONS
W =[144*( p *v - p1 * v1 ) ]/( n -1) // f t l b
H =( gama - n ) /( gama -1) * W // f t l b
E =W - H // f t l b
//RESULTS
printf ( The h e a t s u p p l i e d and t h e c h a n g e o f i n t e r n a l
e n e r g y=% f f t l b ,E )

Scilab code Exa 1.11 Example 7


1
2
3
4
5
6
7
8

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =2 // f t 3
p =1100 // l b / i n 2
t1 =44 // D e g r e e C
t2 =15 // D e g r e e C
p1 =300 // l b / i n 2
t3 =3 // D e g r e e c
10

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

Cv =0.17 // f t / l b
T =273 //F
R =96 // f t l b
p3 =300 // l b / i n 2
n =1.12 // l b
gama =1.404 // l b
W =[(144* p * v ) /( T + t1 ) ]/ R // l b
//CALCULATIONS
Wc = W * Cv *( t1 - t2 ) //C . H . U
p2 = p *( T + t2 ) /( T + t1 ) // l b / i n 2
A =(144* p3 * v ) /( R *276) // l b
W1 =( A / W ) * v // f t 3
H =[( gama - n ) /( gama -1) ]*[144*( p *0.65 - p1 * v ) /( n -1) ] // f t
lb
H1 = H /1400 //C . H . u
//RESULTS
printf ( t h e h e a t was l o s t by a l l t h e a i r i n t h e
v e s s e l b e f o r e l e a k a g e began=% f C . H . U , Wc )
printf ( t h e h e a t was l o s t o r g a i n n e d l e a k a g e by t h e
a i r =% f C . H . U , H1 )

Scilab code Exa 1.13 Example 8


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =0.218 // f t 3
h1 =0.156 // f t 3
n =0.249 // l b
h2 =0.178 // l b
c =0.208 // l b
c1 =0.162 // l b
w1 =1 // f t 3
p =150 // l b / i n 2
T =100 // D e g r e e C
T1 =373 //F
11

13
14
15
16
17
18
19

Cp =( h *0.2312) +( n *0.3237) +( c *0.4451) //C . H . U/ l b


Cv =( h1 *0.2312) +( h2 *0.3237) +( c1 *0.4451) //C . H . U// l b
R =1400*( Cp - Cv ) // f t l b u n i t s
//CALCULATIONS
W =(144* p * w1 ) /( R * T1 ) // l b
//RESULTS
printf ( The c h a r a c t e r i s t i c c o n s t a n t o f t h e g a s=% f
l b ,W )

Scilab code Exa 1.20 Example 9


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
T =200 // D e g r e e C
p =150 // l b / i n 2
v =12 // f t 3
R =96 // Lb
T1 =473 //F
T2 =273 //F
j =1400 // l b
Cv =0.169 // l b / i n 2
v1 =( R * T1 ) /( p *144) // f t 3
//CALCULATIONS
Fhi =( R / j ) * log ( v / v1 ) + Cv * log ( T2 / T1 ) // r a n k
//RESULTS
printf ( The c h a n g e o f e n t r o p y=% f r a n k , Fhi )

Scilab code Exa 1.22 Example 10


1 clc
2 // i n i t i a l i s a t i o n
3 v =10 // f t 3
4 T =20 // D e g r e e C

of variables

12

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

p =15 // l b i n 2
p1 =200 // l b // i n 2
gama =1.41 // l b
Cv =0.169 // l b
v2 =1.153 // f t 3
j =1400 // l b
T1 =293 //F
T2 =451 //F
T1 =[( p1 * v2 ) /( p * v ) ]* T1 // D e g r e e C
//CALCULATIONS
R = Cv * j *( gama -1)
W =0.816 // l b
Fhi = Cv *[( gama -1.2) /(1.2 -1) ]* log ( T1 / T2 ) * W // r n a k
//RESULTS
printf ( The c h a n g e o f e n t r o p y=% f r a n k , Fhi )

Scilab code Exa 1.23 Example 11


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =1 // l b
T =200 // D e g r e e C
p1 =15 // l b / i n 2
v1 =4 // f t 3
gama =1.41 // l b
Cv =0.169 // l b
J =1400 // l b
n =1.2
T =473 //F
v2 =16.1 // f t 3
T1 =473 //F
//CALCULATIONS
T2 =( p1 * v2 ) /( p * v1 ) * T1 // D e g r e e C
R = Cv * J *( gama - p ) // l b / i n 2
13

18 Fhi =0.1772* log (1.317) // r a n k


19 //RESULTS
20 printf ( t h e c h a n g e o f e n t r o p y from

intial conditions

=% f r a n k , Fhi )

Scilab code Exa 1.26 Example 12


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
w =0.066 // f t 3
p =14.7 // l b / i n 2
w1 =14.2 // l b / i n 2
w2 =2780 // l b / i n 2
g =0.038 // l b
a =28.9 // l b
R = w2 / w1 // f o r g a s
R1 =93 // f o r a i r
T =273 //F
V =0.4245 // f t 3
//CALCULATIONS\
W =( p *144* w ) /( T * R ) // l b
m =( g - W ) // l b g a s
T2 =( V + w ) // f t 3
//RESULTS
printf ( The volume o f m i x t u r e=% f f t 3 , T2 )

14

Chapter 2
Air cycle efficiencies

Scilab code Exa 2.2 Example 1


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
T1 =(100+273) // D e g r e e C
T2 =(300+273) // d e g r e e C
T =(1 - T1 / T2 ) *100 //F
lam =0.41 // i n
//CALCULATIONS
R = log ( T2 ) - log ( T1 ) // l b / i n 2
r =2.849 // r a t i o o f c o m p r e s s i o n
//RESULTS
printf ( The i d e a l e f f i c i e n c y and t h e c o m p r e s s i o n
r a t i o =% f r a t i o o f c o m p r e s s i o n ,r )

Scilab code Exa 2.4 Example 2


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

of variables
15

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

r =0.60 // i n
v =3 // i n
p =15.4 // l b
r =5 // i n
P =2000 // r p m
V =19000 //B . Th . U Per l b
lam =1.41 // l b
n =0.4831 // p e r c e n t
P =15.4/4 // l b
H = P * V //B . Th . U
l =4.5 // l b
A =9 // l b
S =1000 // l b
//CALCULATIONS
R =0.60* n *100 // p e r c e n t
C = H * R //B . Th . U
I =( C *778) /(60*33000) // l b
P1 =( I *12*4*33) /( l * A * %pi ) // l b / i n 2
//RESULTS
printf ( The mean e f f i c i t y p r e s s u r e=% f l b / i n 2 , P1 )

Scilab code Exa 2.5 Example 3


1
2
3
4
5
6
7
8
9
10

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =15 // i n
S =(5*14/100) // l n
lam =1.4 // i n
v1 =1.7 // i n
//CALCULATIONS
N =(1 -0.38) *100 // p e r c e n t
//RESULTS
printf ( t h e i d e a l e f f i e c n c y f o r an e n g i n e =% f
p e r c e n t ,N )

16

Chapter 3
Properties of steam

Scilab code Exa 3.1 Example 1


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =100 // l b / i n 2
x =0.8 // l b
t1 =164 // d e g r e e C
t2 =4.45 // f t 3
p1 =0.016 // f t 3
h1 =493.4 //C . H . U/ l b
h2 =165.9 //C . H . U/ l b
S = h2 + h1 //C . H . U/ l b
w =(144* p ) /1400*( t2 - p1 ) //C . H . U/ l b
H = h2 +( x * h1 ) //C . H . U// l b
w1 =( x *144* p ) /1400*( t2 - p1 ) //C . H . U
//CALCULATIONS
E =S - w //C . H . U/ l b
IE =H - w1 //C . H . U/ l b
//RESULTS
printf ( The steam i s t o t a l h e a t d r y and s a t u r e d=% f
C . H . U/ l b ,E )
19 printf ( T o t a l h e a t o f wet steam=% f C . H . U/ l b , IE )

17

Scilab code Exa 3.2 Example 2


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
t1 =35 // d e g r e e C
p =100 // l b / i n 2
L =435 //C . H . U
L2 =539.3 //C . H . U
h1 =165.9 //H . C . U/ l b
h2 =493.4 //C . H . U/ l b
S =( h1 - t1 ) //C . H . U
h3 =304.1 //C . H . U
h4 =335 //C . H . U/ l b
//CALCULATIONS
X1 = h3 / h2 //C . H . U/ l b
X2 = h4 / L2 //C . H . U/ l b
//RESULTS
printf ( The h e a t g i v i n g t o t h e w a t e r and steam i s =%
f C . H . U/ l b , X2 )

Scilab code Exa 3.3 Example 3


1
2
3
4
5
6
7
8
9
10

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =35 // l b / i n 2
w =1425 // l b
q =1474 // l b
s1 =126.7 //C . H . U/ l b
s2 =28 //C . H . U/ l b
t1 =5 // d e g r e e C
t2 =28 // d e g r e e C
L1 =521.4 //C . H . U/ l b
18

11
12
13
14
15
16
17
18

w1 =245 // l b
w2 =0.2 // l b
//CALCULATIONS
W =( s1 - s2 ) + L1 //C . H . U/ l b
H = q *( t2 - t1 ) //C . H . U/ l b
T = H / W // l b
//RESULTS
printf ( The t o t a l e q u i v a l e n t=% f l b ,T )

Scilab code Exa 3.4 Example 4


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =100 // l b / i n 2
w =2400 // l b
t1 =15 // d e g r e e C
s1 =165.9 //C . H . U/ l b
x =0.9 // l b
L2 =493.4 //C . H . U/ l b
t2 =65 // d e g r e e
x4 =0.8 // l b
s3 =64.8 //C . H . U/ l b
w1 =2000 // l b
w2 =2400 // l b
b1 =12400 // l b
b2 =22000 // l b
p1 =4400 // l b
n =421.65 // l b
h1 = w2 *[ s1 +( x * L2 ) ] //C . H . U/ h r
h2 = w1 *[ s1 +( x4 + L2 ) ] //C . H . U/ h r
//CALCULATIONS
T = w *[( s1 - t1 ) +( x * L2 ) ] //C . H . U/ h r
T1 = w1 *[( s1 - s3 ) +( x4 * L2 ) ] //C . H . U/ h r
H = T + T1 //C . H . U/ h r
X = n / L2 //C . H . U/ l b
19

25
26

//RESULTS
printf ( The t h e r m a l c a p a c i t y o f t h e p i p e=% f C . H . U/
h r ,X )

Scilab code Exa 3.5 Example 5


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
w1 =4.5 // l b
s1 =45.5 // l b
p1 =165 // l b / i n 2
T =140 // D e g r e e C
h1 =30 // i n
h2 =4 // i n
p2 =0.49 // l n / i n 2
T1 =( w1 + s1 ) // l b
T2 =103.5 // D e g r e e C
T3 =140 // D e g r e e
h3 =0.48 // i n
x =0.988 // b e r f o r e t h r o t t l i n g
T =[103.12+537.1+ h3 *( T3 - T2 ) ] //C . H . U/ l b
x1 =0.012 // l b o f w a t e r
X = s1 * x1 // l b w a t e r
w =50 // l b o f steam
//CALCULATIONS
P = h2 + h1 // i n o f m e r c u r y
P1 = s1 * x1 // l b / i n 2
T4 = w1 + P1 // l b
D =( w - T4 ) / w // l b
//RESULTS
printf ( The d r y n e s s o f steam w i t h a combined=% f l b
,D )

20

Scilab code Exa 3.6 Example 6


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
w =40 // l b
w1 =380 // l b
t1 =80 // D e g r e e
p =85 // l b / i n 2
p1 =15 // l b / i n 2
W = w + w1 // l b / h r
P = p + p1 // l b / i n 2
T =659.3 //C . H . U/ l b
d =10 // h . p
//CALCULATIONS
H = W *T - w1 * t1 //C . H . U/ h r
H1 =( d *33000*60) /1400 //C . H . U/ h r
T1 = H1 / H *100 // p e r c e n t
D = w1 /( w1 + w ) //C . H . U/ h r
H2 =[ W *(99.6+ D *539.3) - w1 * t1 ] //C . H . U/ h r
T2 =H - H2 //C . H . U/ h r
H3 = T2 - H1 //C . H . U/ h r
E =(1400* H3 ) /(60*33000) // h . p
//RESULTS
printf ( The amount o f r a d i a t i o n s from t h e e n g i n e =%
f h . p ,E )

Scilab code Exa 3.10 Example 7


1
2
3
4
5
6
7

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
w =40 // l b
w1 =380 // l b
t1 =80 // D e g r e e
p =85 // l b / i n 2
p1 =15 // l b / i n 2
21

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

W = w + w1 // l b / h r
P = p + p1 // l b / i n 2
T =659.3 //C . H . U/ l b
d =10 // h . p
//CALCULATIONS
H = W *T - w1 * t1 //C . H . U/ h r
H1 =( d *33000*60) /1400 //C . H . U/ h r
T1 = H1 / H *100 // p e r c e n t
D = w1 /( w1 + w ) //C . H . U/ h r
H2 =[ W *(99.6+ D *539.3) - w1 * t1 ] //C . H . U/ h r
T2 =H - H2 //C . H . U/ h r
H3 = T2 - H1 //C . H . U/ h r
E =(1400* H3 ) /(60*33000) // h . p
//RESULTS
printf ( The amount o f r a d i a t i o n s from t h e e n g i n e =%
f h . p ,E )

Scilab code Exa 3.12 Example 8


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =120 // l b / i n 2
ts =264 // d e g r e e C
T1 =(273+130.6) //F
v =0.0171 // f t 3/ l b
L1 =518.4 // l b
T2 =(273+171.9) //F
L2 =487.4 // l b
Cp =0.48 // l b
L =0.0894/ Cp // l b
Ts = T2 *1.205 // d e g r e e
ta =536 -273 // D e g r e e C
T =649.9 //C . H . U
S =131.2 //C . H . U
w =(144*40) /1400*(10.49 - v ) //C . H . U
22

17
18
19
20
21
22
23
24
25

C =T - S //C . H . U
I =C - w //C . H . U
E =(704.7 -57.8) //C . H . U
E1 =E -606.5 //C . H . U
//CALCULATIONS
E1 =E -606.5 //C . H . U
H =(704.7 - T ) //C . H . U
//RESULTS
printf ( Heat and i n t e r n a l e n e r g y a f t e r e a c h
o p e r a t i o n=% f C . H . U ,H )

Scilab code Exa 3.17 Example 9


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
A =28.1 // i n Hg vacuum
a =0.93 // l b / i n 2
T =33 // D e g r e e
p =0.729 // l b / i n 2
P = - p + a // l b / i n 2
p1 =120000 // l b
p2 =28.1 // i n
a1 =0.9 // l n
p3 =1000 // l b
t =15 // d e g r e e C
A1 =[ a1 *( p1 /(60* p3 ) ) ] // l b /mim
v =( A1 *96*306) /(144* P ) // f t 3 o f a i r p e r min
V =37.3+ a1 *610 //C . H . U/ l b
//CALCULATIONS
H =( V - T ) //C . H . U
W =( H / t ) *( p1 /60) // g a l / min
//RESULTS
printf ( The w a t e r p e r m i n u t e i n c u b i c f e e t p e r
m i n u t e p a s s i n g t o a i r e x t r a c t o r=% f g a l / min ,W )

23

Chapter 4
The steam engine

Scilab code Exa 4.1 Example 1


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =90 // l b / i n 2
x1 =0.9 // l b
p1 =10 // l b / i n 2
x2 =0.81 // l b
s1 =161.5 // l b . i n 2
s2 =89.1 // l b . i n 2
L1 =496.8 // l b . i n 2
L2 =545.5 // l b . i n 2
//CALCULATIONS
bc =( s1 - s2 ) +( x1 * L1 ) //C . H . U/ l b
da = x2 * L2 //C . H . U/ l b
W = bc - da //C . H . U/ l b
R = W / bc *100 // p e r c e n t
//RESULTS
printf ( t h e work done p e r =% f p e r c e n t ,R )

Scilab code Exa 4.2 Example 2


24

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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =1600 // i . h . p
h1 =20000 // l b
h2 =230 // l b / i n 2
T1 =293.3 // D e g r e e C
x =25.91 // i n
v =30 // i n
T2 =201 // D e g r e e C
T = T1 - T2 // d e g r e e C
x2 =0.845 // l b
L2 =566.51 // l b
s1 =724 // l b
h3 =1400 //C . H . U/ h r
x =33000 // f t 3
//CALCULATIONS
H =671.48 //C . H . U/ l b
ea = x2 * L2 //C . H . U/ l b
W =H - ea //C . H . U/ l b
R = W / H *100 // p e r c e n t
S = h2 * s1 //C . H . U
I =[( h * x *60) /( h3 * h1 * s1 ) ]*100 // p e r c e n t
R1 = I / R *100 // p e c e n t
//RESULTS
printf ( The i n d i c a t e d t h e r m a l e f f i c i e n c y r a t i o =% f
p e r c e n t , R1 )

Scilab code Exa 4.3 Example 3


1
2
3
4
5
6

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h1 =180 // l b / i n 2
h2 =3 // l b / i n 2
r1 =60 // p e r c e n t
r2 =90 // p e r c e n t
25

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

p3 =100 // l b / i n 2
p4 =10 // l b / i n 2
v1 =4.4 // f t 3/ l b
v2 =2* v1 // f t 3
p =44 // l b / i n 2
x2 =0.95 // f t 3
s1 =165.9 // l b
s2 =89.1 // l b
L1 =493.4 // l b
H =( s1 - s2 ) + L1 //C . H . U/ l b
W =65.8 //C . H . U/ l b
//CALCULATIONS
R = W / H *100 // p e r c e n t
//RESULTS
printf ( The r a n k i n e e f f i c i e n c y o f t h e e n g i n e=% f
p e r c e n t ,R )

Scilab code Exa 4.10 Example 4


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =85 // l b / i n 2
h =210 // i . p .m
h1 =8 // i n
h2 =2.5 // i n
h3 =20 // i n
x =0.75 // i n
p1 =100 // l n / i n 2
x1 =33000 // i n
p2 =15 // l b / i n 2
v2 = %pi /4*( h1 /12) ^2*( h3 /12) // f t 3
A =144*[29.08*1.6931 -8.724] // f t / l b
d = x * A // f t / l b
v3 =0.5816 // f t 3
P = d /(144* v3 ) // l b / i n 2
26

17
18
19
20
21
22
23
24

P1 = %pi /4*64 // i n 2
r =25* %pi /16 // i n 2
//CALCULATIONS
H = P *( h3 /12) * P1 * h /( x1 )
I =( P *( h3 /12) *( P1 - r ) * h ) /( x1 ) // I . h . P
T = H + I // I . h . p
//RESULTS
printf ( t h e h . p d i a m e t e r o f t h e p i s t o n and p i s t o n
r o d =% f I . h . p ,T )

Scilab code Exa 4.14 Example 5


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
a =1.025 // i n 2
h =18 // i n
h1 =24 // i n
x =8.2 // p e r c e n t
v =15 // i n
v2 =6.9 // f t 3
p =0.74 // l b / i n 2
p1 =50 // l b / i n 2
p2 =83 // l b / i n 2
P3 =48.0 // l b / i n
P1 =29.8 // l b / i n 2
P2 =14.6 // l b / i n 2
h2 =29.8 // i n
D =( %pi /4) *(3/2) ^2*2 // f t 3
v1 =23400 // f t . l b
W = a * v1 // f t . l b
V =0.082* D // f t 3
Q =1.530 // f t 3
//CALCULATIONS
I = V + Q // f t 3
P = P3 + P2 // l b / i n 2
27

24
25
26
27
28
29
30

V1 = p * v2 // f t 3
W1 = I / V1 // l b
S = p2 + P2 // / l / i n 2
H =659.06 //C . H . U/ l b
T = W /( H * W1 *1400) *100 // p e r c e n t
//RESULTS
printf ( The t h e r m a l e f f i c i e n c y o f t h e e n g i n e=% f
p e r c e n t ,T )

Scilab code Exa 4.16 Example 6


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =4.6 // f t 3
h =5 // p e r c e n t
p =60 // l b / i n 2
p1 =0.8 // f t 3
p2 =19 // l b / i n 2
a =100 // r . p .m
h1 =5920 // l b
W = h1 /(2* a * p ) // l b
V =(0.25* v ) // f t 3
v1 =21.07 // f t 3
w = V / v1 // l b
H = W + w // l b
v2 = H *7.17 // f t 3
P = w * v2 // f t 3
P1 =0.675* v // f t 3
//CALCULATIONS
DP = P1 / v2 // f t 2
//RESULTS
printf ( The a s s u m p t i o n s do you make i n w o r k i n g o u t
t h e d r y n e s s o f t h e steam=% f f t 3 , DP )

28

Scilab code Exa 4.17 Example 7


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =0.08 // l b
p =60 // l b / i n 2
p1 =0.50 // l b / i n 2
v =0.5 // f t 3
v1 =7.17 // f t 3
V = h * v1 // f t 3
//CALCULATIONS
W = p1 / v1 // l b
I = v / v1 // l b
M =h - I // l b
//RESULTS
printf ( t h e d r y n e s s o f t h e steam a t t h i s p r e s s u r e
and m i s s i n g q u a n t i t y =% f l b ,M )

Scilab code Exa 4.19 Example 8


1
2
3
4
5
6
7
8
9

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =120 // l b / i n 2
p2 =15 // l b / i n 2
//CALCULATIONS
v =1.65 // l b
D = sqrt ( v ) // l b
//RESULTS
printf ( The a b o v e p r e s s u r e a r e by g a u g e=% f l b ,D )

29

Scilab code Exa 4.21 Example 9


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =150 // l b / i n 2
x =198 // r . p .m
x1 =33000 // l b
h =2700 // l b
h1 =1400 // l b
h2 =51600 // l b
r =165 //C . H . U/ l b
s =60 // l b
t =48 // D e g r e e C
t1 =11 // d e g r e e C
t2 =36 // D e g r e e C
P1 =(40*75* t2 * x ) /(12* x1 ) // l b
P2 =(38*70* t2 * x ) /(12* x1 ) // l b
L1 =( t1 *300* t2 * x ) /(12* x1 ) // l b
L2 =(12*295* t2 * x ) /(12* x1 ) // l b
T = P1 * P2 * L1 * L2 // l b
H =5294 //C . H . U/ min
T1 = h / s // / l b / min
H1 = T1 *663 // l b / min
H2 =( h2 / s *(36 -11) +( h / s ) *( t ) ) //C . H . U
H3 =( h /60) * t //C . H . U
//CALCULATIONS
TE = H / H1 - H3 *100 // p e r c e n t
R = r /(663 - t ) *100 // p e r c e n t
//RESULTS
printf ( The r a n k i n e e f f i c i e n c y =% f p e r c e n t ,R )

Scilab code Exa 4.23 Example 10


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

of variables
30

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

p1 =100 // l n / i n 2
p2 =2.5 // l b / i n 2
p3 =20 // l b / i n 2
d =0.75 // l b
p =0.5 // l b
r =16 // i n
p4 = p1 / r // l b / i n 2
P5 =50 // l b / i n 2
W1 =13960 // f t / l b
W2 =19040 // f t / l b
T =33000 // f t / l b
v =4.43 // f t 3
v1 = v * d // f t 3
W3 = T * v1 // f t / l b
Hp =3416 // f t / l b
Lp =3416 // f t / l b
//CALCULATIONS
W = Lp * v1 // f t l b
//RESULTS
printf ( The t h e r m a l e f f i c i e n c y o f a compound steam
and work done=% f f t l b ,W )

31

Chapter 5
Air compressors and motors
refrigeration

Scilab code Exa 5.1 Example 1


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
a =7 // i n
b =10 // i n
c =12 // i n
r =96 // i n
p1 =15 // l b / i n 2
p2 =100 // l b / i n 2
T =16 // D e g r e e C
gama =1.4 // i n
h =120 // r . p .m
T1 = T +273 //C a b s o l u t e
//CALCULATIONS
v1 =( %pi /4) *( a / c ) ^2*( b / c ) // f t 3
w =( p1 *144* v1 ) /( r * T1 ) // l b
w1 = h * w // l b
W =1680*[1.72 -1] // f t l b
I =144* p1 * v1 * log ( p2 / p1 ) // f t l b
E = I / W *100 // p e r c e n t
32

20
21

//RESULTS
printf ( The i d e a l e f f i c i e n c y i s d e f i n e d a s t h e r a t i o
o f t t h i s work=% f p e r c e n t ,E )

Scilab code Exa 5.2 Example 2


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h1 =16 // i . h . p
p1 =100 // l b / i n 2
p2 =15 // l b / i n 2
R =275 //R . p .m
h =550 // f t / min
q =33000 // i n 2
v1 =4.85 // l b
B =8.53 // i n
//CALCULATIONS
M =( p1 / v1 ) - p2 +( p1 / v1 - p2 ) *1/0.2
S = h /(2* R ) // f t
I =( q * h1 ) /( M * S * R ) // i n 2
//RESULTS
printf ( The e f f e c t o f t h e c l e a r a n c e volume=% f i n 2
,I )

Scilab code Exa 5.3 Example 3


1
2
3
4
5
6
7

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =100 // f t 3
t =15 // d e g r e e C
p =120 // l b / i n 2
gama =1.3 // i n
t1 =15 // D e g r e e C
33

8 M =[(144* t * h *2.6) /(0.3) *(1.271 -1) ] // f t l b


9 //CALCULATIONS
10 V = sqrt ( p / t ) // f t l b
11 //RESULTS
12 printf ( Compare t h e v a l u e s o f t h e two c y l i n d e r s =% f

f t l b ,V )

Scilab code Exa 5.5 Example 4


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =0.2 // f t 3
v =10 // p e r c e n t
T =15 // d e g r e e c
p =30 // l b / i n 6 2
t1 =15 // D e g r e e C
p1 =60 // l b / i n 2
v1 =2.2 // f t 3
v3 =0.328 // f t 3
A =( v1 - v3 ) // f t 3
v2 =1.341 // f t 3
V = v2 - h // f t
t2 =288 // D e g r e e C
//CALCULATIONS
T2 =( t2 * p * v2 ) /( t1 * v1 ) // D e g r e e C a b s o l u t e
v5 =( t2 / T2 ) * V // f t 3
v7 =0.164 // f t 3
v8 = v5 -( v7 /11) * v5
v6 = v8 /(1 - v7 /11) // f t 3
//RESULTS
printf ( The r e q u i r e d volume o f t h e H . P c y l i n d e r
i n c l u d i n g c l e a r a n c e=% f f t 3 , v6 )

34

Scilab code Exa 5.6 Example 5


1
2
3
4
5
6
7
8
9
10

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =80 // l b / i n 2
p2 =20 // l b / i n 2
//CALCULATIONS
P = sqrt ( p1 * p2 ) // l b / i n 6 2
V = P / p1 // s t r o k e
W = p2 / P // s t r o k e
//RESULTS
printf ( t h e r a t i o o f c u t o f f t o l e n g t h o f s t r o k e=% f
s t r o k e ,W )

Scilab code Exa 5.9 Example 6


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =25 // l b / i n 2
p2 =50 // l b / i n 2
p3 =75 // l b / i n 2
p4 =100 // l b / i n 2
v1 =29.2 // f t 3
v2 =28.8 // f t 3
v3 =28.1 // f t 3
v4 =27.2 // f t 3
h =14.7 // l b / i n 2
v =3 // p e r c e n t
s =5 // s t r o k e
//CALCULATIONS
V =( %pi * p1 ) /(4) *4 // i n 3
V1 = v / p4 * V // i n 3
//RESULTS
printf ( The volume o f e f f i c i e n c y o f p r e s s u r e=% f i n
3 , V1 )
35

Scilab code Exa 5.12 Example 7


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =15 // l b / i n 2
p2 =60 // l b / i n 2
t =16 // D e g r e e C
Ta =273+ t // D e g r e e C a b s o l u t e
T =1.486 // l b / i n 2
Td = Ta / T // D e g r e e C a b s o l u t e
//CALCULATIONS
P = Td /( Ta - Td ) // D e g r e e C a b s o l u t e
//RESULTS
printf ( The l o w e s t t e m p e r a t u r e and c o e f f i c i e n t o f
p e r f o r m a n c e=% f D e g r e e C a b s o l u t e ,P )

Scilab code Exa 5.14 Example 8


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
T1 =30 // D e g r e e c
T2 = -10 // d e g r e e C
t1 =263 //F
t2 =303 //F
h1 =20 // U n i t s
h2 =79 //C . H . U/ l b
h =24 // h o u r s
T3 =1 // D e g r e e C
p =2.2046 //C . H . U/ s e c
//CALCULATIONS
P = h1 * p //C . H . U/ s e c
36

14
15
16
17
18
19
20

T = t1 /( t2 - t1 ) //F
H = P *60 //C . H . U
W =( H *1400) / T // f t / l b
hp = W /33000 // h . p
W1 =( H *60* h ) /(80*2240) // t o n s
//RESULTS
printf ( t h e c y c l e i s a p e r f e c t one=% f t o n s , W1 )

Scilab code Exa 5.15 Example 9


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =930 // l b / i n 2
p2 =440 // l b / i n 2
T =268 //F
t1 =25 //F
t2 =5 //F
h1 =19.4 //C . H . U
h2 = -1.8 //C . H . U
h3 =29 //C . H . U
h4 =58.6 //C . H . U
d =0.6 //C . H . U
d1 =0.06 // l b
d2 = -0.01 // l b
c =40 // p e r c e n t
h =24 // h o u r
t3 =10 //C
d3 =15 // l b
h5 =80 //C . H . U
//CALCULATIONS
A =[ h1 -( h2 ) ] -[ d1 -( d2 ) ]* T //C . H . U
FD = A / T // u n i t s o f e n t r o p y
AD =( d * h4 /T -0.07 - A / T ) * T //C . H . U
W =4.28 //C . H . U
T = AD / W //C . H . U
37

26
27
28
29
30
31
32

P =0.4* T //C . H . U
H = P * W * d3 //C . H . U
H1 = P * W * d3 *60* h //C . H . U
H2 = t3 + h5 //C . H . U
W1 = H1 /( H2 *2240) // t o n d
//RESULTS
printf ( The many t o n s o f i c e would a machine w o r k i n g
b e t w e e n t h e same l i m i t and h a v i n g a r e l a t i v e
c o e f f i c i e n t =% f t o n s , W1 )

Scilab code Exa 5.16 Example 10


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
t1 =20 // D e g e r e e C
t2 = -10 // d e g r e e C
h =0.95 // d r y
t3 =35 // D e g r e e C
h1 =0.066 // l b
h2 =1.089 // l b
v1 = -0.033 // l b
v2 =1.193 // l b
v3 =0.508 // l b
T1 =263 //F
T2 =293 //F
//CALCULATIONS
T = T1 /( T2 - T1 ) //F
E = h1 -( v1 ) // l b
C =0.1079 // l b
CP = E / C // l b
A = CP *( T2 - T1 ) -E * T1 //C . H . U
F = A / T1 // u n i t s o f e n t r o p y
H =254.212 //C . H . U
H2 =274.447 //C . H . U
W =[ CP *( T2 - T1 ) + h *1.023*( T2 - T1 ) -E * T1 ] //C . H . U
38

P = H / W //C . H . U
V = A + v3 *15 - T1 * v3 *0.0507 //C . H . U
H1 = T1 *[ v3 *0.0507+0.05*1.023] //C . H . U
N = H2 /( W + V ) //C . H . U
//RESULTS
printf ( The u p p e r and l o w e r t e m p e r a t u r e l i m i t s
r e s p e c t i v e l y =% f F ,T )
30 printf ( The v a p o u r c o m p r e s s i o n c y c l e work done=% f C
. H . U ,H )
31 printf ( The v a p o u r i s now a d d i t i o n a l work done=% f C
. H . U ,N )
24
25
26
27
28
29

Scilab code Exa 5.18 Example 11


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =0.8 // d r y
p =120 // l b / i n 2
p1 =1 // l b / i n 2
t =100 // D e g r e e C
A =99.6 -38.6 -0.178*311.8 //C . H . U
G =311.8 // u n i t s o f e n t r o p y
AF =440.52 //C . H . U
H =399.82 // l b / i n 2
p =307 // l b
//CALCULATIONS
T = H / p //C . H . U
//RESULTS
printf ( t h e o r e t i c a l c o e f f i c i e n t p f p e r f o r m a n c e a s a
r e f r i g e r a t i o r =% f C . H . U ,T )

39

Chapter 6
flow through nozzles steam
turbines

Scilab code Exa 6.1 Example 1


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =150 // l b / i n 2
p2 =10 // l b / i n 2
n =10 // p e r c e n t
T =183.6+479.4 //C . H . U
x2 =0.852 //C . H . U
H =553.9 //C . H . U/ l b
h1 =T - H //C . H . U/ l b
//CALCULATIONS
V = sqrt (2*32.2*1400* h1 ) // f t / s e c
V1 = sqrt (2*32.2*1400*0.9* h1 ) // f t / s e c
//RESULTS
printf ( t h e n e g l e c t i n g f r i c t i o n =% f f t / s e c ,V )
printf ( t h e f r i c t i o n a l d r o p i n t h e n o z z l e i s 10
r e c e n t o f t h e t o t a l h e a t d r o p=% f f t / s e c , V1 )

40

Scilab code Exa 6.2 Example 2


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =((3140* %pi *60*60) /(4*4*144) ) // f t / s e c
v1 =0.852*38.37 // f t 3
//CALCULATIONS
W =( v / v1 ) // l b
V =(2970* %pi *60*60) /(4*4*144) // f t 3
W1 =( V / v1 ) // l b
//RESULTS
printf ( t h e w e i g h t o f steam p e r h o u r=% f l b ,W )
printf ( t h e w e i g h t o f steam p e r h o u r=% f l b , W1 )

Scilab code Exa 6.4 Example 3


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =300 // l b
p =75 // l b / i n 2
p2 =8 // l b / i n 2
h =90 //C . H . U/ l b
Pt =0.58* p // l b / i n 2 a b s o l u t e
h1 =24 // l b /C . H . U
D =0.968 //C . H . U
D1 =0.886 //C . H . U
v =9.7 // f t 3
v1 =47.24 // f t 3
V = sqrt (2*32.2*1400*24) // f t / s e c
V1 = sqrt (2*32.2*1400*90) // f t / s e c
//CALCULATIONS
H =( p1 * v * D /3600) // f t 3
V2 =( p1 * v1 * D1 /3600) // f t 3
A =0.768 // i n 2
A1 =1.72 // i n 2
41

20 d = sqrt (4*0.768/ %pi ) // i n


21 d1 = sqrt ((4* A1 ) /( %pi ) ) // i n
22 //RESULTS
23 printf ( t h e d i a m e t e r s a t t h e t h r o a t and e x i t

of the

n o z z l e=% f i n , d1 )

Scilab code Exa 6.5 Example 4


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d =2.15 // i n 2
a =0.98 // d r y
p =100 // l b / i n 2
p1 =11000 // l b
P =0.58* p // l b / i n 2
H =24 //C . H . U/ l b
D =0.947 // l b
s =7.407 // f t 3
//CALCULATION
V = sqrt (2*32.2*1400* H ) // f t / s e c
V1 = V *( d /144) // f t 3
T = V1 /( s * D ) // l b
A =( p1 /3600) // l b
C = A / T // l b
//RESULTS
printf ( t h e c o e f f i c i e n t o f d i s c h a r g e f o r t h e n o z z l e s
=% f l b ,C )

Scilab code Exa 6.6 Example 5


1 clc
2 // i n i t i a l i s a t i o n
3 p =9.5 // l b

of variables

42

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

p1 =120 // l b
e =0.88 // i n
p2 =80 // l b / i n 2
d =25 // i n
d1 =0.125 // i n
t =14 // d e g r e e C
T = e *19 //C . H . U/ l b
D =0.975 // i n
V = sqrt (2*32.2*1400* T ) // f t / s e c
S =5.467 // f t 3
//CALCULATIONS
V1 = p * S * D // f t 3
T1 =( V1 *144/ V ) // i n 2
C =25* %pi // i n
N = C /2.5 // i n
P = C /31 // i n
W = d1 / sind ( t ) // i n
L =P - W // i n
W1 = L * sind ( t ) // i n
T2 =( T1 ) /(31* W1 ) // i n
//RESULTS
printf ( The number o f n o z z l e s t h e i r b r e a d t h and
h e i g h=% f i n , T2 )

Scilab code Exa 6.8 Example 6


1
2
3
4
5
6
7
8
9

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =100 // l b / i n 2
p2 =15 // l b / i n 2
d1 =95 // p e r c e n t
d2 =30 // p e r c e n t
P =0.58* p1 // l b / i n 2
H =0.95*25 //C . H . U/ l b
H1 =0.95*76.5 //C . H . U/ l b
43

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

D =0.97 // i n
D1 =0.905 // i n
V =7.407 // f t 3
V1 = sqrt (2*32.2*1400* H ) // f t / s e c
V2 = sqrt (2*32.2*1400* H1 ) // f t / s e c
//CALCULATIONS
V3 =(2* %pi *1* V1 ) /(64*4*144) // f t 3
W =( V3 *3600) /( V * D ) // l b
K = V2 /(2*32.2) // f t l b s e c
E =[(( V2 ) ^2* W ) /(2*32.2*3600) ] // f t . l b
W1 =( E * d2 ) /( p1 *550) // f t . l b
//RESULTS
printf ( t h e q u a n t i t y o f steam u s e d p e r h o u r and
h o r s e power d e v e l o p e d=% f f t . l b , W1 )

Scilab code Exa 6.10 Example 7


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d =0.15 // l b
p =20 // l b / i n 2
p1 =100 // l b / iN62
t =200 // d e g r e e C
f =10 // p e r c e n t
Pt =0.5457* p1 // l b / i n 2
x1 =0.996 // i n
x2 =0.952 // i n
h =29 //C . H . U/ l b
h1 =65 //C . H . U/ l b
v =7.73 // f t 3
v1 =20.12 // f t 3
T =0.364 // i n
T1 =0.465 // i n
v2 = sqrt (2*32.2*1400* h ) // f t / s e c
v3 = sqrt (2*32.2*1400* h1 ) // f t / s e c
44

19
20
21
22
23
24
25

//CALCULATIONS
V1 = d * v * x1 // f t 3
V2 = d * v1 * x2 // f t 3
A1 =( V1 / v2 ) *144 // i n 2
A2 =( V2 / v3 ) *144 // i n 2
//RESULTS
printf ( t h e t h r o a t and e x i t d i a m e t e r s o f t h e n o z z l e=
% f i n 2 , A2 )

Scilab code Exa 6.11 Example 8


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =0.5 // l b
p1 =2.5 // l b / i n 2
p2 =100 // l b / i n 2
t =250 // D e g r e e C
pv =1.3 // c o n s t a n t
pt =0.5457* p2 // l b / i n 2
t1 =18 // d e g r e e C
h1 =32 //C . H . U/ l b
h2 =151 //C . H . U/ l b
D =0.887 // i n
V1 = sqrt (2*32.2*1400* h1 ) // f t / s e c
V2 = sqrt (2*32.2*1400* h2 ) // f t . s e c
s1 =8.74 // f t 3
s2 =140.8 // f t 3
T1 =0.687 // i n
T1 =1.77 // i n
V3 = h * s1 // f t 3/ s e c
V4 = h * s2 // f t 3/ s e c
//CALCULATIONS
A1 =( V3 / V1 ) *144 // i n 2
A2 =( V4 / V2 ) *144 // i n 2
//RESULTS
45

25

printf ( t h e s i z e o s n o z z l e=% f i n 2 , A2 )

Scilab code Exa 6.13 Example 9


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =500 // g a l l o n s
p1 =150 // l b / i n 2
p2 =0.6 // l b / i n 2
P = p2 * p1 // l b / i n 2
h =25 //C . H . U/ l b
p =62.4 // l b / f t 2
V = sqrt (2*32.2*1400* h ) // f t / s e c
D =0.996 // i n 2
d =4.898 // i n 2
v1 =1.2 // i n
vi =163.2 // f t / s e c
m = V /32.2 // f t . l b . s e c
//CALCULATIONS
W = V / vi -1 // l b
W1 =(5000) /(3600* W ) // f t / s e c
V1 = W1 * d * D // f t 3
A = V1 / V *144 // i n 2
I =(50/36+ W1 ) // l b / s e c
A1 =( I *144) /(62.4* vi ) // i n 2
//RESULTS
printf ( t h e a e r a o f t h e s t r e a m and w a t e r o r i f i c e s =%
f i n 2 , A1 )

Scilab code Exa 6.15 Example 10


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

of variables
46

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

a =50 // d e g r e e c
v =2000 // f t / s e c
p =800 // f t / s e c
b =20 // D e g r e e C
v1 =0.9 // i n 2
v2 =513 // f t / s e c
W =(1/32.2) *[1810 -( -313) ]* p // f t / l b l b s t r e a m / s e c
K =( v ^2) /(2*32.2) // f t / l b s e c
//CALCULATIONS
D =( W / K ) *100 // p e r c e n t / l b
//RESULTS
printf ( t h e work done p e r l b=% f p e r c e n t / l b ,D )

Scilab code Exa 6.16 Example 11


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
t =65 //B . Th . U p e r l b
n =0.98 // d r y
p =105 // l b / i n 2
a =14 // D e g r e e C
b =20 // D e g r e e C
p1 =800 // f t / s e c
v =0.80 // f t / l b
p2 =3.5 // l b / s e c
q =1400 // i n
V = sqrt (2*32.2*778* t ) // f t / s e c
W =( p1 ) *(1750 - b ) /32.2 // f t l b / l b s t r e a m / s e c
H =( W * p2 /550) // f t / l b
E =1/64.4*[(1053) ^2 -(825) ^2] // f t . l b steam / s e c
//CALCULATIONS
Hd =( E / q ) //C . H . U
//RESULTS
printf ( t h e steam a s i t l e a v e s t h e b l a d e s and h o u r s e
47

power=% f C . H . U , Hd )

Scilab code Exa 6.18 example 12


1
2
3
4
5
6
7
8
9
10

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =300 // f t / s e c
W =880 // f t / s e c
a =18 // d e g r e e C
g =32.2 // f t
//CALCULATIONS
Wd =( p * W ) / g // f t l b
//RESULTS
printf ( t h e work done / l b steam s e c=% f f t l b , Wd )

Scilab code Exa 6.19 Example 13


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
a =35 // D e g r e e C
b =20 // d e g r e e C
f =2 // f t
w =422 // f t
w1 =222 // f t
g =32.2 // f t
s =1500 // r p m
j =0.8 // f t
p =3 // l b / s e c
h =80 // p e r c e n t
i =1400 // f t
P =( %pi *(31/12) *( s /60) ) // f t / s e c
W = P / g *[ w -( - w1 ) ] // f t l b
H =( p * W ) /550 // f t l b
48

17 //CALCULATIONS
18 E = W /( j * i ) //C . H . U
19 //RESULTS
20 printf ( t h e h o u s e power d e v e l o p e d p e r p a i r

of rings

i f t h e steam=% f f t l b ,E )

Scilab code Exa 6.23 Example 14


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
d =7 // f t
h =2 // i n
s =750 // r p m
s1 =31.3 // l b / s e c
h1 =1.5 // i n
a =25 // D e g r e e c
p =5.7 // l b / i n 2
d1 =0.97 // i n
h2 =370 // f t / s e c
j =32.2 // i n
k =1400 // i n
e =0.75 // p e r c e n t
w =326 // i n
p =290 // i n
vi =155 // f t / s e c
//CALCULATIONS
P =( %pi *7.69* s ) /(60) // f t / s e c
H =( P * h2 * s1 ) /(550* j ) // f t / s e c
E =( P * h2 ) /( j * e * k ) //C . H . U/ l b
//RESULTS
printf ( t h e d r o p i n p r e s s u r e w h i l e t h e steam i s
p a s s i n g t h r o u g h t h e t u r b i n e=% f C . H . U/ l b ,E )

49

Scilab code Exa 6.25 Example 15


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =300 // l b / i n 2
ab =100 // d e g r e e C
w =26.4 //C
t =40 // l b / i n 2
t1 =180 // D e g r e e C
p1 =0.5 // l b / i n 2
T =732.38 //C . H . U
W =26.2 //C . H . U/ l b
W1 =102 //C . H . U/ l b
x =0.963 // i n
d =335 //C . H . U/ l b
E =743.85 //C . H . U/ l b
//CALCULATIONS
H =T - w //C . H . U/ l b
h =T - W1 //C . H . U/ l b
H1 =E - h //C . H . U/ l b
T1 = H + H1 //C . H . U/ l b
Wd = W1 + d //C . H . U
//RESULTS
printf ( t h e t o t a l work done p e r l b steam=% f C . H . U ,
Wd )

Scilab code Exa 16.28 Example 16


1
2
3
4
5
6
7

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =100 // l b / i n 6 2
p1 =0.5 // l b / i n 2
T1 =659.3 //C . H . U/ l b
T2 =26.2 //C H U/ l b
W =181 //C H U/ l b
50

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

H1 =66 //C H U/ l b
H2 =115 //C H U / l b
D =0.912 //C H U/ l b
H3 =533.4 //C H U/ l b
T3 =108.5 // D e g r e e C
T4 =26.4 // D e g r e e C
W1 =82.1/( D * H3 ) // l b
s =1 - W1 // l b
//CALCULATIONS
T = W /( T1 - T2 ) *100 // p e r c e n t
Wd = H1 +( H2 * s ) //C H U/ l b
H = T1 - T3 //C H U// l b
TE = Wd / H *100 // p e r c e n t
//RESULTS
printf ( t h e w i t h o u t b l e e d i n g % f p e c e n t ,T )
printf ( t h e p r o p e r w e i g h t o f steam i s b l e d=% f
p e r c e n t , TE )

51

Chapter 7
Combustion boiler trials

Scilab code Exa 7.1 Example 1


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
C =86 // p e r c e n t
h =4.2 // p e r c e n t
w =20 // l b
a = w +0.902 // l b
C2 =44/12 // l b
N =0.77 // l b
CO2 =3.15
H2O =0.042*9 // l b
N2 = w * N // l b
Ox =a - CO2 - H2O - N2 // l b
//CALCULATIONS
Co2 = CO2 / a *100 // p e r c e n t
H2o = H2O / a *100 // p e r c e n t
n2 = N2 / a // p e r c e n t
o2 = Ox / a *100 // p e r c e n t
//RESULTS
printf ( t h e c o m p o s i t i o n o f t h e p r o d u c t s o f
c o m b u t i o n s by w e i g h t=% f p e r c e n t , o2 )

52

Scilab code Exa 7.2 Example 2


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g =0.05 // p e r c e n t
n =0.35 // p e r c e n t
c =0.5 // p e r c e n t
h =10 // p e r c e n t
m =167 //C H U
h1 =162 //C H U
v =1 // f t 3
H2 =0.5 // f t 3
Co =0.05 // f t 3
v2 =3 // f t
//CALCULATIONS
G =( g * c ) +( n * H2 ) // f t 3
Tv =( g * h1 ) +( n * m ) //C H U
M = Tv / v2 //C H U/ f t 3
//RESULTS
printf ( t h e g a s w i t h t w i c e i t s volume o f a i r =% f C H
U/ f t 3 ,M )

Scilab code Exa 7.4 Example 3


1
2
3
4
5
6
7

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
g =8 // p e r c e n t
f =88 // p e r c e n t
C =12 // p e r c e n t
w =20 // l b
C1 =11/3 // l b
53

8
9
10
11
12
13
14
15
16

CO2 =3/11 // l b
e =0.08 // l b
D =0.0218 // l b C
w1 =0.88 // l b
//CALCULATIONS
W1 = w1 / D // l b l b f u e l
T = w1 / D * w // l b / h r
//RESULTS
printf ( t h e t o t a l w e i g h t o f e x a u s t g a s l e a v i n g t h e
e n g i n e p e r h o u r=% f l b / h r ,T )

Scilab code Exa 7.6 Example 4


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
a =30 // p e r c e n t
b =20 // p e r c e n t
c =8 // p e r c e n t
h =42 // p e r c e n t
t1 =20 // d e g r e e C
g =0.24 // i n
t2 =320 // d e g r e e c
M =7.654 // l b / l b f u e l
A =3* M // l b / l b f u e l
W =0.08+0.04 // l b
T = A +0.8 // l b
w1 =0.72+0.3 // l b
w =T - w1 // l b
d = w *0.24*( t2 - b ) //C H U/ l b f u e l
H =1.02*(639+0.49*220 - t1 ) //C H U/ l b f u e l
//CALCULATIONS
T1 = d + H //C H U/ l b f u e l
//RESULTS
printf ( t o t a l h e a t c a r r i e d away by f l u e g a s e s=% f C
H U/ l b f u e l , T1 )
54

Scilab code Exa 7.7 Example 5


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =40 // p e r c e n t
g =30 // p e r c e n t
c =8 // p e r c e n t
n =10 // p e r c e n t
w =6 // p e r c e n t
g1 =10 // p e r c e n t
g2 =4.14 // f t 3
Ch4 =4.562 // f t 3 o f a i r
Co2 =0.44 // f t
H2o =1.18 // f t 3
N2 =3.7 // f t 6 3
x =41.4/11 // f t 6 3
//CALCULATIONS
T = Ch4 + x // f t 3
v =1+ T // f t 3
V = x + g2 // f t 3
D =v - V // f t 3
P = D / v *100 // p e r c e n t
//RESULTS
printf ( t h e v o l u e m e o f a i r s u p l i e d p e r=% f p e r c e n t ,
P)

Scilab code Exa 7.9 Example 6


1 clc
2 // i n i t i a l i s a t i o n
3 Ox =2.679 // l b

of variables

55

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

O2 = Ox -0.03 // l b O2/ l b f u e l
o2 = O2 *100/23 // l b a i r l b f u e l
E = o2 /2 // l b
a =17.325 // l b / l b f u e l
Co2 =3.294 // l b
H2o =0.315 // l b
N2o =13.34 // l b
O2 =23/100* E // l b
So2 =0.005*2 // l b
//CALCULATIONS
W = Co2 + N2o + O2 + So2 // l b / l b f u e l
//RESULTS
printf ( t h e t o t e l w e i g h t o f d r y p r o d u c t s=% f l b / l b
f u e l ,W )

Scilab code Exa 7.11 Example 7


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
l =8.7 // p e r c e n t
Co2 =42 // p e r c e n t
N =28 // p e r c e n t
O2 =32 // p e r c e n t
x =27.65 // l b a i r
W =( O2 /12) *(100/23) // l b
//CALCULATIONS
A =x - W // l b
//RESULTS
printf ( t h e a i r t o f l u e s / l b c a r b o n=% f l b ,A )

Scilab code Exa 7.13 Example 8


1 clc

56

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

// i n i t i a l i s a t i o n o f v a r i a b l e s
Co =2420 //C H U
a =3400/6 //C H U
R = Co /3246 //C H U
T =1+0.745 // l b
n =1.12 // l b
O2 =1.33/1.745 // l b
C = O2 *100/23 // l b
CB = n / T // l b
m =1.74 // l b
k =2.33 // l b
l =1.33 // l b
c =77 // l b
d =23 // l b
//CALCULATIONS
Y = l * c / d //N2
//RESULTS
printf ( t h e w e i g h t o f a i r and steam =% f N2 ,Y )

Scilab code Exa 7.15 Example 9


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
w =20 // l b
t =320 // d e g r e e C
t1 =22 // D e g r e e C
w1 =0.0807 // l b
A =0.03901 //AH
W =0.07469 //AH
g =5.2 //A
Q =W - A //A
//CALCULATIONS
H =( g *0.625) /( Q ) // f t
//RESULTS
printf ( w e i g h t o f e q u a l column o f e x t e r n a l a i r =% f
57

f t ,H )

Scilab code Exa 7.16 Example 10


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =120 // l b / i n 2
h =30 // i n
t =48 // d e g r e e C
C =1000 // l b
t1 =26 // d e g r e e C
m =2.2 // p e r c e n t
g =18 // l b
f =127 // l b
j =33000 // i n
q =1400 // i n
L =0.978*8000 //C . H . U
b =50 // i n
t2 =320 // d e g r e e C
g1 =0.24 // i n
d =0.90 // i n
a =0.4912*30 // l b / i n 2
P = p + a // l b / i n 2 a b s
T =178.62+ d *483.45 //C . H . U/ l b
//CALCULATIONS
Wt = C / f // l b
H = Wt *( T - t ) //C . H . U
F =0.022*(638.9+0.48*220 - t1 ) //C . H . U
G = g *0.24*( t2 - t1 ) //C . H . U
E = H / L *100 // p e r c e n t
E1 = b * j *60/( L * f * q ) *100 // p e r c e n t
//RESULTS
printf ( t h e h e a t b a l a n c e f o r t h e b o i l e r and f i n d i t s
e f f i c i e n c y and t h e o v e r a l l e f f i c i e n c y o f t h e
p l a n t=% f p e r c e n t , E1 )
58

Scilab code Exa 7.17 Example 11


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =7950 // l b C . H . U / l b
w =15 // p e r c e n t
c =0.85 // l b
w1 =14 // p e r c e n t
w2 =9 // p e r c e n t
t1 =15 // d e g r e e C
t2 =325 // d e g r e e C
g =0.25 // l b
//CALCULATIONS
H = c * v //C . H . U
H1 =0.15*(638.9+0.48*225 -15) //C . H . U
C = c * c // l b
A =19.2 // l b
Wt = A + C // l b
P = Wt * g *( t2 - t1 ) //C . H . U/ l b c o a l
R =0.14* H //C . H . U
R1 =H - H1 -P - R //C . H . U
B = R1 / H *100 // p e r c e n t
//RESULTS
printf ( t h e e f f i c i e n c y o f a b o i l e r =% f p e r c e n t ,B )

59

Chapter 8
Internal combustion engines
Variable specific heats

Scilab code Exa 8.1 Example 1


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
b =6 // i n
b1 =9 // i n
r1 =4 // r a t i o
r2 =1 // r a t i o
p =50 // l b / i n 2
s =300 // r p m
e =30 // p e r c e n t
v =260 //C . H . U
a =1.41
h =0.30 // i n
g =33000 // i n
g1 =1400 // i n
A =1 -( r2 / r1 ) ^0.41 // l b / i n 2
//CALCULATIONS
I =( p * %pi *36/4*9/12* s /2) *1/ g // f t 3
X =( I * g ) /( g1 * v * h ) // f t 3
C = X *60/ I // f t 3
60

20 R = h / A *100 // p e r c e n t
21 //RESULTS
22 printf ( The f u e l c o n s u m p t i o n i n

f t 3/ h p h r and t h e
e f f i c i e n c y r e l a t i v e t o t h e a i r s t a n d a r d c y c l e=% f
p e r c e n t ,R )

Scilab code Exa 8.3 Example 2


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =200 // r p m
h1 =50 // i h p
P4 =33.4 // l b / i n 2
W =9000 // f t l b
x =33000 // f t . l b
p =1728 // f t / l b
//CALCULATIONS
w = h1 * x /100 // f t l b
T = w / W // f t 3
V =13/14* T // f t 3
D =(( V * p *8) /(3* %pi ) ) ^(1/3) // i n
//RESULTS
printf ( The d i a m e t e r o f t h e c y l i n d e r o f a s i n g l e
a c t i n g and s w e p t volume=% f i n ,D )

Scilab code Exa 8.6 Example 3


1
2
3
4
5
6

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
h =12 // i n
h1 =18 // i n
v =19000 //B . Th . U/ l b
T =12600 // l b / i n 2
61

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

m =90 // l b / i n 2
w =120 // g a l
t1 =140 //F
t2 =60 //F
t3 =570 //F
Cv =0.24 // f t / l b
q =810 // f t / l b
n =16.9 // l b
//CALCULATIONS
H =( n / t2 * v ) //B . Th . U
H1 =[ m * %pi *(144/4) *( h1 / h ) *( T / t2 ) ]/(778*2) //B . TH . U/ min
H2 =1750 //B . Th . U
H3 =( H1 - H2 ) //B . Th . U
W =( w *10/ t2 ) *( t1 - t2 ) //B , Th . U
G =(( q + n ) /( t2 ) ) *( t3 - t2 ) * Cv //B . TH . U
//RESULTS
printf ( The h e a t b a l a n c e s h o w i n g h e a t q u a n t i t i e s
r e c e i v e d and t h e d i s c h a r g e d p e r min=% f B . TH . U ,G
)

Scilab code Exa 8.8 Example 4


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =12.5 // i . p . h
p1 =8.25 // i n
p2 =12 // i n
t =110 // p e r min
g1 =280 //C . H . U/ f t 3
g2 =215 // f t 3
V =25 // p e r c e n t
e =0.875 // i n
T =33000 // i n
v1 =0.4170 // f t 3
//CALCULATIONS
62

14
15
16
17
18
19
20
21
22

M =( T * v ) /(( %pi *( p1 ) ^2) /(4) *( p2 / p2 ) *( t ) ) // l b . i n 2


V1 = %pi *( p1 ) ^2/4* p2 /1728* e // f t 3
V2 =( %pi *( p1 ) ^2* p2 ) /(4*4*1728) // f t 3
G =( g2 /60*1/ t ) // f t 3
T1 = G * g1 //C . H . U
T2 =( T1 / v1 ) //C . H . U
F =( M / T2 ) //C . H . U
//RESULTS
printf ( The v a l u e o f t h e Tookey f a c t o r f o r g a s
e n g i n e=%. f C . H . U ,F )

Scilab code Exa 8.10 Example 5


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p1 =140 // l b / i n 2
p2 =6.6 // l b / i n 2
v1 =122 // r . p .m
v2 =1250 // b . h . p
t =1425 // i . h . p
p3 =77.8 // l b / i n 2
h =0.356 // l b
v =10000 //C . H . U/ l b
h2 =2400 // l b
q =33000 // i n
j =1400 // i n
//CALCULATIONS
t =( v2 * q *60) /( j * h * v2 * v ) *100 // p e r c e n t
V =( p3 *144* v1 ) /( q *2) //V
V1 =( p2 *144* v1 ) / q //V
T =24.16 //V
V2 = t / T // f t 3
I = V * V2 // f t 3
I1 = V1 * V2 // f t 3
H =24904 //C / .H . U//mim
63

T =( I * q *60) /( j * h * v2 * v ) *100 // p e r c e n t
T1 =( I1 * q ) /( j * H ) *100 // p e r c e n t
T2 =( h * v2 * v ) /(60) //C . H . U
H1 =( v2 * q ) /( j ) //C . H . U/mim
H2 =H -( I1 * q * v2 ) /( j * t ) //C . H . U/mim
T3 = H1 + H2 //C . H . U/mim
Tn = T2 - T3 //C . H . U/mim
//RESULTS
printf ( t h e o v e r a l l t h e r m a l e f f c i e n c y =% f p e r c e n t ,t
)
32 printf ( t h e c y l i n d e r volume i n f t 3=% f volume ,V )
33 printf ( t h e t h e r m a l e f f i c i e n c y o f steam e n g i n e=% f
p e r c e n t , T1 )
34 printf ( t o t a l h e a t i n o i l . mim=% f C . H . U/mim , Tn )

23
24
25
26
27
28
29
30
31

Scilab code Exa 8.12 Example 6


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
r =14 // i n
r1 =1.8 // i n
t =30.4 // l b
e =0.6 // l b
lam =1.4
d =12 // i n
d1 =18 // i n
v =10000 //C . H . U/ l b
P =200 // r m p
//CALCULATIONS
A =1 -(1/( lam *( r ) ^0.4) ) *(( r1 ) ^ lam -1) /( r1 -1) // p e r c e n t
T = e * A // p e r c e n t
H = t /60* v //C . H . U
H1 = H * T //C . H . U
I =( H1 *1400) /(33000) // l n / i n 2
M =( I *33000) /(2* %pi *144/4* d1 /12* P /2) // l b / i n 2
64

19
20

//RESULTS
printf ( t h e i n d i c a t e d h o u r s e power and t h e mean
e f f i e c t i v e p r e s s u r e o f t h e e n g i n e=% f l b / i n 2 ,M )

Scilab code Exa 8.19 Example 7


1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
cv =0.1714 //C . H . U
R =100.3 // f t . l b
T =500 // d e g r e e c
J =1400 // i n
Lam = R / J //C . H . U p e r c e n t C
//CALCULATIONS
Cp = Lam + cv //C . H . U p e r c e n t C
//RESULTS
printf ( The s p e c i f i c h e a t a t c o n s t a n t volume o f a
g a s e o u s m i x t u r e i s =% f C . H . U p e r c e n t C , Cp )

Scilab code Exa 8.20 Example 8


1
2
3
4
5
6
7
8
9

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
a =0.124 // i n
b =0.000025 // i n
R =0.0671 // h e a t u n i t s
//CALCULATIONS
Cp =( R + a + b ) + b //T
//RESULTS
printf ( t h e s p e c i f i c h e a t o f a g a s a t c o n s t a n t
volume=% f T , Cp )

65

Scilab code Exa 8.21 Example 9


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =18 // f t 3
p =14 // l b / i n 2
p1 =150 // l b / i n 2
Cp =0.242 //T
Cv =0.171 //T
j =1400 // f t
R = j *( Cp - Cv ) // f t . l b
p2 =144 // f t
I1 =137500 // f t / l b
I2 =6.37 // f t / l b
v2 =3.282 // f t 3
//CALCULATIONS
T =( p2 * p * v ) / R // D e g r e e C
T2 =( p2 * p1 * v2 ) /( R ) // D e g r e e c
W = Cp *( T2 - T ) +0.00002*[( T2 ) ^2 -( T ) ^2] //C . H . U/ l b
C = v / v2 // r a t i o
//RESULTS
printf ( The work done t h e t e m p e r a t u r e s a t t h e
b e g i n n i n g and end o f c o m p r e s s i o n r a t i o =% f r a t i o
,C )

Scilab code Exa 8.22 Example 10


1 clc
2 // i n i t i a l i s a t i o n o f
3 r =12.5 // r a r i o
4 p =0.39*10^6 // f t . l b

variables

66

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

p1 =14 // l b / i n 2
t =373 // D e g r e e C
g =18 // f t 3
t1 =100 // D e g r e e C
V = g / r // f t 3
I =0.2*10^6 // f t l b / l b
T =0.59*10^6 // f t . l b / l b
D =0.221*10^6 // f t . l b / l b
A =0.095*10^6 // f t . l b / l b
E =0.264*10^6 // f t . l b / l b
E1 =0.390*10^6 // f t . l b / l b
//CALCULATIONS
W =( E / E1 ) *100 // p e r c e n t
M =( E ) /(144*( g - V ) ) // l b . i n 2
//RESULTS
printf ( t h e e f f i c i e n c y o f t h e e n g i n e and t h e m e p
on t h e a s s u m p t i o n t h a t t h e s p e c i f i c h e a t s=% f l b
i n 2 ,M )

67

Chapter 9
Valve Dlagrams and value gears

Scilab code Exa 9.5 Example 1


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =20 // i n
l =100 // i n
r =120 // r . p .m
v =3.5 // i n
l2 =1 // i n
l3 =1/8 // i n
v1 =1.44 // umega i n / s e c
//CALCULATIONS
V = p *(1.06/1.166) // umega i n . / s e c
R =( V / v1 ) // umega i n / s e c
//RESULTS
printf ( The r a t i o o f v e l o c i t y o f t h e p i s t o n t o t h e
v e l o c i t y =% f umega i n / s e c ,R )

Scilab code Exa 5.7 Example 2

68

1
2
3
4
5
6
7
8
9
10
11

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =0.6 // i n
m =1.0 // i n
t =0.75 // i n
p =4 // i n
//CALCULATIONS
D = t / m // i n
A =( p * m / D ) // i n
//RESULTS
printf ( t h e t r a v e l and l a p s o f t h e v a l u e=% f i n ,A )

Scilab code Exa 9.10 Example 3


1
2
3
4
5
6
7
8
9

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
l =1.5 // i n
p =4.0 // i n
v =0.98 // i n
//CALCULATIONS
T =( l * p / v ) // i n
//RESULTS
printf ( t h e p a r t i c u l a r s o f a v a l u e and i t e c c e n t r i c =
% f i n ,T )

Scilab code Exa 9.12 Example 4


1
2
3
4
5
6

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
p =1/10 // i n
v1 =3/4 // i n
v2 =3/5 // i n
m =1*1/2 // i n
69

7
8
9
10
11
12
13
14
15

l =4 // c r a n k s
a1 =1.25 // i n
a2 =0.7 // i n
//CALCULATIONS
C = a1 / a2 // i n
A = l * a1 / a2 // i n
S =( A /2 - a1 ) // i n
//RESULTS
printf ( t h e t r a v e l o f t h e v a l u e =% f i n ,S )

Scilab code Exa 9.17 Example 5


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

clc
// i n i t i a l i s a t i o n o f v a r i a b l e s
v =3*1/2 // i n
a =30 // d e g r e e
l =0.8 // i n
v1 =0.2 // i n
L =0.13 // i n
m =1.075 // i n
d =0.58 // i n
p =1.875 // i n
//CALCULATIONS
V =( p - d ) // i n
P = V +1.25 // i n
//RESULTS
printf ( t h e main v a l u e and t h e maximum o p e n i n g t o
steam=% f i n ,P )

70

You might also like