1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 1: Fundamentals"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.1: Chapter_1_Example_1.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"//page no.8\n",
"T = 80;//temperature of chlorine gas in degree F\n",
"p = 100;//pressure in psia\n",
"W = 2*35.45;//molecular weight of chlorine \n",
"R = 1545/W;//specific gas constant in ft-lb/lb-degreeR\n",
"gam = p*(144/R)*(1/(460+T));//specific weight of chlorine in lb/cuft\n",
"Spec_vol = 1/gam;//specific volume in cuft/lb\n",
"rho = gam/32.2;//density of chlorine in slug/cuft\n",
"printf('Spec. weight = %.3f lb/cuft\n Spec. volume = %.3f cuft/lb\n density = %.4f slug/cuft',gam,Spec_vol,rho);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.2: Chapter_1_Example_2.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"//page no. 12\n",
"\n",
"funcprot(0);\n",
"gamma = 1.4;\n",
"T1 = 60;//temperature of air in degree F\n",
"p1 = 14.7;//pressure in psia\n",
"k = 0.5;//(final volume/initial volume) = k\n",
"R = 53.3;//Engineering gas constant\n",
"gam1 = p1*(144/R)*(1/(460+T1));//lb/cuft\n",
"gam2 = gam1/k;//lb/cuft\n",
"p2 = (p1/(gam1^(gamma)))*(gam2^(gamma));// in psia\n",
"T2 = p2*(144/R)*(1/gam2);//in degree F\n",
"a1 = sqrt(gamma*32.2*R*(460+T1));// in fps\n",
"a2 = sqrt(gamma*32.2*R*(T2));// in fps\n",
"printf('Final pressure = %.1f psia\n Final temperature = %d degreeR \n Sonic velocity before compression = %d fps\n Sonic velocity after compression = %d fps',p2,T2,a1,a2);\n",
"\n",
"//there are small errors in the answers given in textbook"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.3: Chapter_1_Example_3.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"//page no. 17\n",
"\n",
"r1 = 0.25;// radius of cylinder in feet\n",
"l = 2;//length of cylnider in feet\n",
"r2 = 0.30;// radius of co-axial cylinder in feet\n",
"mu = 0.018;//lb-sec/ft^2\n",
"torque = 0.25;// in ft-lb\n",
"dv_dy1 = torque/(4*%pi*mu*r1^2);//velocity gradient at radius = 0.25 in fps/ft\n",
"dv_dy2 = torque/(4*%pi*mu*r2^2);//velocity gradient at radius = 0.30 in fps/ft\n",
"V1 = integrate('-torque/(4*%pi*mu*r^2)','r',r2,r1);// velocity in fps\n",
"rpm1 = V1*60/(2*%pi*r1);\n",
"V2 = torque*(r2-r1)/(4*%pi*mu*r1^2);//in fps\n",
"rpm2 = V2*60/(2*%pi*r1);\n",
"hp = 2*%pi*r1*(rpm1/(550*60));\n",
"printf('Velocity gradient at the inner cylinder wall is %.1f fps/ft and \n at the outer cylinder wall is %.1f fps/ft',dv_dy1,dv_dy2);\n",
"printf('\n rpm = %.1f and approximate rpm = %.1f \n hp = %.5f ',rpm1,rpm2,hp);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.4: Chapter_1_Example_4.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"//page no.20\n",
"\n",
"T = 70;//degreeF\n",
"del_p = 0.1;// in psi\n",
"sigma = 0.00498;// lb/ft\n",
"R = (sigma*2)/(del_p*144);//in ft\n",
"d = 12*2*R;// in inches\n",
"printf('Diameter of the droplet of water, d = %.4f in',d);"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1.5: Chapter_1_Example_5.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clear;\n",
"clc;\n",
"\n",
"//page no. 20\n",
"\n",
"l = 12;// length of the cylinder\n",
"T = 150;//temperature of water in degreeF\n",
"p1 = 14.52;//atmospheric pressure in psia\n",
"p2 = 3.72;//the pressure on the inside of the piston in psia\n",
"F = 0.25*(p1-p2)*%pi*l^2;//Force on the piston in lb\n",
"printf('Minimum force on the piston to be applied is, F = %d lb.',F);\n",
"\n",
"//there is an error in the answer given in textbook"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Scilab",
"language": "scilab",
"name": "scilab"
},
"language_info": {
"file_extension": ".sce",
"help_links": [
{
"text": "MetaKernel Magics",
"url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md"
}
],
"mimetype": "text/x-octave",
"name": "scilab",
"version": "0.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|