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
|
{
"metadata": {
"name": "",
"signature": "sha256:25ad1e2d44436c7f3601ad03c17827fcc9d4a9726e4cce4d60e192c21e28061e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter6-Combustion Chambers and After burners"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex1-pg309"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#determine number of mole of hydrogen and oxygen\n",
"nH2=12/2. ##molecular mass og hydrogen =2kg/kmol\n",
"nO2=8/32. ##Molecular mass of O2=32kg/kmol\n",
"print'%s %.f %s'%(\"No. of kilomoles of H2\",nH2,\"\")\n",
"print'%s %.2f %s'%(\"No. of kilomoles of O2\",nO2,\"\")"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"No. of kilomoles of H2 6 \n",
"No. of kilomoles of O2 0.25 \n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Ex3-pg317"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate lower and higher heating values of hydrogen\n",
"T=298.16 ##in K\n",
"dhf=-241827. ##heat of formation of H2O(g in kJ.\n",
"n=1 ##kmol\n",
"Qr=n*dhf ##kJ/kmol\n",
"LHV=(-1.)*Qr/2.\n",
"print'%s %.1f %s'%(\"LHV in\",LHV,\"kJ/kg\")\n",
"HHV=LHV+9*2443\n",
"print'%s %.1f %s'%(\"HHV in \",HHV,\"kJ/kg\")"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"LHV in 120913.5 kJ/kg\n",
"HHV in 142900.5 kJ/kg\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Ex5-pg320"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calcualte the ratio Nh2/no2 of the reactants and fuel oxdizer and adiabatic flame temperature\n",
"##from equation CH4+2.4(O2+3.76N2)-->CO2+2H2O+0.4O2+9.02N2\n",
"f=(12+4.)/(2.4*(32.+3.76*28.)) ##fuel to air ratio based on mass.\n",
"fs=(12+4.)/(2.*(32.+3.76*28.)) ##fuel to air ratio based on stoichometric condition.\n",
"feq=f/fs\n",
"print'%s %.7f %s'%(\"fuel to air ratio based on mass\",f,\"\")\n",
"print'%s %.7f %s'%(\"fuel to air ratio based on stoichometric condition\",fs,\"\")\n",
"print'%s %.7f %s'%(\"Equivalent ratio\",feq,\"\")\n",
"dH=-802303 ##kJ\n",
"dC=484.7 ##kJ\n",
"Dt=(-1)*dH/dC ##Dt=T2-Tf\n",
"Tf=25+273\n",
"T2=Dt+Tf\n",
"print'%s %.4f %s'%(\"The diabatic flame temperature in\",T2,\" K\")"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"fuel to air ratio based on mass 0.0485625 \n",
"fuel to air ratio based on stoichometric condition 0.0582751 \n",
"Equivalent ratio 0.8333333 \n",
"The diabatic flame temperature in 1953.2569 K\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex6-pg323"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"#calculate mole fraction of N2 at equlibrium when pm is 1 atm and 10 atms\n",
"print(\"Example 6.6\")\n",
"Kp=0.1\n",
"x=poly(0,\"x\")\n",
"pm=1\n",
"y=4*(x)^2*pm-Kp+Kp*(x)^2\n",
"d=roots(y)\n",
"for i=1:1:2\n",
"\n",
"if real(d(i))>0 then\n",
" print(d(i),\"(a)Mole fraction of N2 at equilibrium when pm is 1 atm:\")\n",
"end\n",
"end\n",
"//part (b)\n",
"Kp=0.1\n",
"x=poly(0,\"x\")\n",
"pm=10\n",
"y=4*(x)^2*pm-Kp+Kp*(x)^2\n",
"d=roots(y)\n",
"for i=1:1:2\n",
"\n",
"if real(d(i))>0 then\n",
" print(d(i),\"(b)Mole fraction of N2 at equilibrium when pm is 10 atm:\")\n",
"end\n",
"end\n"
],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
|