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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 3: PROPERTIES OF A PURE SUBSTANCE"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.1: MASS_OF_WATER_AND_VAPOUR.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc;\n",
"V=0.01; // Volume of water in a rigid vessel in m^3\n",
"m=4.5; // Mass of water+ steam in a rigid vessel in kg\n",
"T=35; // Temperature of water in a rigid vessel in degree celcius\n",
"// (a) \n",
"v=V/m; // specific volume of water\n",
"// From steam table\n",
"vf=0.001006; vg=25.22; // specific volume in m^3/kg\n",
"x=(v-vf)/(vg-vf); // Quality of steam\n",
"x1=1-x; // Quality of water\n",
"mg=x*m; // Mass of steam\n",
"mf=x1*m; // Mass of water\n",
"disp ('kg',mf,'Mass of water in a rigid vessel = ','kg',mg,'Mass of steam in a rigid vessel = ',x1,'Quality of water in a rigid vessel = ',x,'Quality of steam in a rigid vessel = ',' (a) ');\n",
"// (b) \n",
"vc=0.003155; // Crictical volume for water in m^3/kg\n",
"disp ('The level of liquid water will rise in the vessel. Since v < vc and refer figure 3.21',' (b) ');\n",
"// (c) \n",
"disp ('The final temperature after heating is 370.04 oC. Because it is constant volume process and refer figure 3.21',' (c) ');\n",
"// (d) \n",
"m1=0.45; // Mass of water in kg\n",
"v1=V/m; // specific volume of water\n",
"disp ('Level of liquid drops to bottom (v1 > vc). Temperature on reaching saturation state is 298.5 oC and refer figure 3.21', ' (d) ');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.2: THE_QUALITY_OF_VAPOUR.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc;\n",
" // (a) Ammonia 26 oC and 0.074 m^3/kg\n",
"// From saturation table of ammonia at 26 oC\n",
"v=0.074; // specific volume of ammonia in m^3/kg\n",
"vf=0.001663; vg=0.1245; // specific volume of ammonia in m^3/kg\n",
"x=(v-vf)/(vg-vf); // Quality of vapour since v<vg\n",
"disp (x,'The Quality of ammonia = ','(a) Ammonia 26 oC and 0.074 m^3/kg');\n",
"// (b).Ammonia 550kPa and 0.31m^3/kg\n",
"// From saturation table of ammonia at 550 kPa\n",
"v=0.31; // specific volume of ammonia in m^3/kg\n",
"vg=0.23; // specific volume of ammonia in m^3/kg\n",
"// v > vg . Since from superheated table by interpolation for 550kPa and v\n",
"T=82.1; // Temperature of ammonia in degree celcius\n",
"disp ('oC',T,'Temperature of ammonia = ','(b).Ammonia 550kPa and 0.31m^3/kg');\n",
"// (c).Freon 12, 0.35MPa and 0.036 m^3/kg\n",
"// From saturation table of Freon 12 at 0.35MPa\n",
"v=0.036; // specific volume of Freon 12 in m^3/kg\n",
"vf=0.000722; vg=0.049329; // specific volume of Freon 12 in m^3/kg\n",
"x=(v-vf)/(vg-vf); // Quality of vapour since v<vg\n",
"disp (x,'The Quality of Freon 12 = ','(c).Freon 12, 0.35MPa and 0.036 m^3/kg');\n",
"// (d).Methane 0.5MPa and 1.0 m^3/kmol\n",
"v=1; // specific volume of Methane in m^3/kmol\n",
"// From table at 0.5 MPa molar values are\n",
"vf=0.04153; vg=2.007; // specific volume of Methane in m^3/kmol\n",
"x=(v-vf)/(vg-vf); // Quality of vapour since v<vg\n",
"disp (x,'The Quality of Methane = ','(d).Methane 0.5MPa and 1.0 m^3/kmol');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.3: MASS_OF_AIR.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc;\n",
"V=300; // Volume of air in the room in m^3\n",
"p=1; // Atmospheric pressure in bar\n",
"T=25; // Temperature of air in Degree Celcius\n",
"R=287; // Characteristic constant of Air in J/kg k\n",
"m=(p*10^5*V)/(R*(T+273)); // Ideal gas equation\n",
"disp ('kg',m,'Mass of air in room');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.4: MOLECULAR_WEIGHT_OF_THE_GAS.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc;\n",
"D=20; // Diameter of the sphere in cm\n",
"m=2.54; // Mass of gas filled in sphere in gram\n",
"p=10; // Pressure of gas in bar\n",
"T=25; // Temperature of gas in Degree Celcius\n",
"R=8.3144*10^3; // Universal gas constant in J/kmol K\n",
"V=(3.14*(D*10^-2)^3)/16; // Volume of das in sphere in m^3\n",
"M=(m*10^-3*R*(T+273))/(p*10^5*V); // Molecular weight of the gas\n",
"disp (M,'Molecular weight of the gas');\n",
"disp ('Therefore gas in sphere is Helium (unless mixture of two or more gases)');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.5: PRESSURE_AND_TEMPERATURE_OF_AIR.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc;\n",
"p2=2.5; // Pressure of air in the cylinder in bar\n",
"T1=430; // Temperature of air in cylinder in Degree Celcius\n",
"V1=1.2; // Volume of cylinder in m^3\n",
"V2=0.6; // Volume of cylinder upto end stops in m^3\n",
"// (a) Temperature of air when the piston reaches the stops\n",
"T2=(T1+273)*(V2/V1); // constant pressure process\n",
"disp ('K',T2,'Temperature of air when the piston reaches the stops');\n",
"// (b) The pressure of air when its temperature equals to 25 oC\n",
"T3=25; //Room temperature in Degree Celcius\n",
"p3=p2*((T3+273)/T2); // constant volume process\n",
"disp ('bar',p3,'The pressure of air when its temperature equals to 25 oC');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.7: DETERMINATION_OF_SPECIFIC_VOLUME.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc;\n",
"p=6000; // Pressure of nitrogen gas in kPa\n",
"T=150; // Temperature of nitrogen gas in kelvin\n",
"V=250; // Volume of tank in litres\n",
"R_1=8.3143; // Universal gas constant in kJ/kmol K\n",
"M=28.1013; // Molecular mass\n",
"// (a).Beattie - Bridgeman equation of state\n",
"// Constants for nitrogen gas\n",
"c=4.2*10^4; Ao=136.2315; a=0.02617; Bo=0.05046; b=-0.00691;\n",
"// By substituting these values in the following equation \n",
"// p=(R_1*T/v^2)*(1-(c/(vT^3)))*(v+Bo*(1-(b/v)))-(Ao/v^2*(1-(a/v)))\n",
"// By trial and error we get\n",
"v=0.1222; // specific volume in m^3/kmol\n",
"m=(M*V/1000)/v; // Mass of nitrogen gas\n",
"disp ('m^3/kmol',v,'specific volume of nitrogen gas = ','kg',m,'Mass of nitrogen gas = ','(a).Beattie - Bridgeman equation of state');\n",
"// (b).Nitrogen tables\n",
"// From property table of nitrogen fas\n",
"v=0.004413; // specific volume in m^3/kg\n",
"m=(V/1000)/v; // Mass of nitrogen gas\n",
"disp ('m^3/kg',v,'specific volume of nitrogen gas = ','kg',m,'Mass of nitrogen gas = ','(b).Nitrogen tables');\n",
"// (c).Ideal gas equation of state\n",
"m=(p*V/1000)/(R_1*T/M); //Mass of nitrogen gas\n",
"disp ('kg',m,'Mass of nitrogen gas = ','(c).Ideal gas equation of state');\n",
"// (d).Generalized compressibility chart\n",
"// The crictical properties for nitrogen gas \n",
"Tc=126.2; // Temperature in kelvin\n",
"Pc=3.349; // Pressure in MPa\n",
"// Reduced properties are\n",
"Pr=p/Pc; Tr=T/Tc;\n",
"z=0.6; // From chart\n",
"m=(p*V/1000)/(z*R_1*T/M); //Mass of nitrogen gas\n",
"disp ('kg',m,'Mass of nitrogen gas = ','(d).Generalized compressibility chart');\n",
"disp ('Ideal gas equation of state','Generalized compressibility chart','Beattie - Bridgeman equation of state','Nitrogen tables',' (e).Arrangement the methods in order of percentage error : ');"
]
}
,
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.8: CALCULATION_OF_SPECIFIC_VOLUME_USING_REDLICH_KWONG_EQUATION.sce"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"clc;\n",
"T=-58.7; //Normal boling point of CF3Br in Degree Celcius\n",
"Tc=340.9; // Crictical temperature of CF3Br in K\n",
"pc=4.05; // Crictical pressure of CF3Br in MPa\n",
"M=148.9; // Moleclar mass of CF3Br\n",
"p=1.01325*10^5; // Atmospheric pressure in N/m^2\n",
"R1=8314.4; // Universal gas constant in J/kmol K\n",
"R=R1/M; // Gas constant of CF3Br\n",
"a=(0.42748*R^2*Tc^2.5)/(pc*10^6); // Constant of Redlich-Kwong equation of state\n",
"b=(0.08664*R*Tc)/(pc*10^6); // Constant of Redlich-Kwong equation of state\n",
"vi=(R*(T+273))/p; // Ideal gas volume for assigning initial value\n",
"// By substituting these values in the Redlich-Kwong equation of state \n",
" // vi_1=(R*(T+273)/p)+b-((a/(p*(273+T)^0.5*vi))) and and solving it by trial and error method we get\n",
"vi_1=0.11443; // in m^3/kg\n",
"disp ('m^3/kg',vi_1,'Saturated vapour volume');"
]
}
],
"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
}
|