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
|
{
"metadata": {
"name": "",
"signature": "sha256:c68fc201cfe81f16f5fdc7644c90e046b65f1cf7e7075d3bd357ce452cccc83a"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter08:Biomass Energy"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex8.1:pg-271"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"Gascook=5*0.227 # gas required for cooking in m^3/day\n",
"Gaslight=0.126*2*3 # gas required for lighting in m^3/day\n",
"Totalgasreq=Gascook+Gaslight # in m^3/day\n",
"gasperday=0.34*0.18*7 # in m^3/day\n",
"\n",
"n=1+Totalgasreq/gasperday # no. of cows\n",
"print \"The number of cows is \",int(n)\n",
"cowfeed=7*n # in kg\n",
"slurry=cowfeed*2.0/1090 # in m^3\n",
"totalslurry=50.0*slurry # in m^3\n",
"reqvolume=totalslurry/0.9 \n",
"print \"The total volume of digester is \",round(reqvolume,2),\"m^3\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The number of cows is 5\n",
"The total volume of digester is 3.86 m^3\n"
]
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex8.2:pg-272"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"Gaslight=10*0.227*4 # gas required for lighting in m^3/day\n",
"Eleccomp=10*250*6*60*60/1000000.0 # electrical energy required by computers in MJ\n",
"effith=0.25 # thermal efficieny\n",
"efficonv=0.80 # conversion efficiency\n",
"Heat=23.0 # heating value of biogas in MJ/m^3\n",
"rho=1090.0 # slurry density in kg/m^3\n",
"Engineinput=Eleccomp/(effith*efficonv)\n",
"\n",
"energypump=746*2*2*60*60/1000000.0 # mechanical energy required for pumping in MJ\n",
"themalinput=energypump/effith # required thermal input in MJ\n",
"totalinput=themalinput+Engineinput # total thermal input required by engine\n",
"\n",
"Volreq=totalinput/Heat # volume required per day in m^3/day\n",
"Totalrq=Volreq+Gaslight # total gas required in m^3 /day\n",
"\n",
"n=Totalrq/(7*0.18*0.34) # solid mass is 18% and n is number of cows required\n",
"n=round(n)\n",
"print \"The number of cows is\",n\n",
"feed=7*n # daily feed in kg\n",
"slurry=2*feed # in kg\n",
"volslurry=slurry/rho # volume of slurry added per day in m^3\n",
"totalvol=50*volslurry/0.9 # total volume for 50 days in m^3 when 90 % is occupied by slurry\n",
"\n",
"print \"The size of biogas plant is \",round(totalvol,2),\"m^3\"\n",
"\n",
"\n",
"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The number of cows is 53.0\n",
"The size of biogas plant is 37.82 m^3\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex8.3:pg-273"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"Voldaily=1200 # daily production in m^3/day\n",
"prodrate=Voldaily/24.0 # gas production rate per hour\n",
"consrate=Voldaily/6.0 #gas consumtion rate per hour\n",
"Vg1=(consrate-prodrate)*2 # gas holder size required for 2 hours in litres\n",
"Vg2=prodrate*9 # gas holder size for 9 hours without consumption in litres\n",
"if Vg1>Vg2:\n",
" Vgmax=Vg1\n",
"else:\n",
" Vgmax=Vg2\n",
"Vg=Vgmax*1.25 # required gas holder with 25 % safety margin in litres\n",
"print \"required gas holder size is \",Vg,\"litres\"\n",
"Capacity=Vg/Voldaily # required gas holder capacity\n",
"\n",
"print \"required gas holder capacity is \",round(Capacity*100,2),\"%\"\n",
" \n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"required gas holder size is 562.5 litres\n",
"required gas holder capacity is 46.88 %\n"
]
}
],
"prompt_number": 11
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex8.4:pg-274"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"drymattrprd=2 # dry matter produced in kg/day/cow\n",
"gasyield=0.22 # biogas yield in m^3 /kg\n",
"drymttr=18/100.0 # dry matter in cowdung\n",
"rho=1090 # slurry density in kg/m^3\n",
"effibrnr=0.6 # burner efficiency\n",
"Heat=23.0 # heating value of biogas in MJ/m^3\n",
"\n",
"dungprd=drymattrprd*2/0.18 # dung produce in kg/day by 2 cows\n",
"slurry=2*dungprd # slurry produce in kg/day\n",
"volslurry=slurry/rho # volume of slurry in m^3\n",
"totalslurry=30*volslurry # for 30 days slurry in m^3\n",
"digestersize=totalslurry/0.85 # in m^3\n",
"print \"the volume of digester is \",round(digestersize,2),\"m^3\"\n",
"\n",
"gasprd=drymattrprd*2*gasyield # gas produced in m^3/day\n",
"\n",
"Energytherm=gasprd*Heat*effibrnr # total thermal energy available in MJ/day\n",
"\n",
"\n",
"thermalpower=Energytherm*1000000/(24*60*60) # in watts\n",
"\n",
"print \"total thermal power is \",round(thermalpower,3),\"W\"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"the volume of digester is 1.44 m^3\n",
"total thermal power is 140.556 W\n"
]
}
],
"prompt_number": 20
}
],
"metadata": {}
}
]
}
|