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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
{
"metadata": {
"name": "",
"signature": "sha256:47ed2e07aa752d35a238880d941b7ff865358a9055d3a5d12934bca3f8fdda8e"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter09:Geothermal Energy"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex9.1.i:pg-302"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"G=39.0 # temperature gradient in K/km.\n",
"h2=10.0 # depth in km\n",
"rhor=2700.0 # kg/m^3\n",
"cr=820.0 # in J/kg-K\n",
"\n",
"h1=120/G # T1-T0=120 K is given\n",
"h21=h2-h1 # in km\n",
"E0byA=(rhor*(1000**3)*G*cr*h21**2)/2 # in J/km^2 Heat content per square km\n",
"print\" The Heat content per square km is \",E0byA,\"J/km^2\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
" The Heat content per square km is 2.06923846154e+18 J/km^2\n"
]
}
],
"prompt_number": 30
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex9.1.ii:pg-302"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"G=39.0 # temperature gradient in K/km.\n",
"h2=10.0 # depth in km\n",
"rhor=2700.0 # kg/m^3\n",
"cr=820.0 # in J/kg-K\n",
"QbyA=0.5 #water flow rate in m^3/sec-km^2 \n",
"rhow=1000.0 # density of water in kg/m^3\n",
"cw=4200.0 # specific heat of water in J/kg-K \n",
"h1=120.0/G # T1-T0=120 K is given\n",
"h21=h2-h1 # in km\n",
"t=25 # time in years\n",
"\n",
"thetao=G*h21/2.0 # in degree K\n",
"print \"Useful initial temp is\",thetao,\"degree K\"\n",
"tau=rhor*cr*h21*(1000**3)/(QbyA*rhow*cw) # in seconds\n",
"tau=tau/(2*60*60*24*365) # in years\n",
"theta=thetao*math.exp(-t/tau) # in degree Kelvin\n",
"print \"Useful average temp after 25 years is\",round(theta,2),\"degree K\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Useful initial temp is 135.0 degree K\n",
"Useful average temp after 25 years is 108.77 degree K\n"
]
}
],
"prompt_number": 27
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex9.1.iii:pg-302"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"G=39.0 # temperature gradient in K/km.\n",
"h2=10.0 # depth in km\n",
"rhor=2700.0 # kg/m^3\n",
"cr=820.0 # in J/kg-K\n",
"\n",
"h1=120/G # T1-T0=120 K is given\n",
"h21=h2-h1 # in km\n",
"E0byA=(rhor*(1000**3)*G*cr*h21**2)/2 # in J/km^2 Heat content per square km\n",
"\n",
"thetao=G*h21/2.0 # in degree K\n",
"tau=rhor*cr*h21*(1000**3)/(QbyA*rhow*cw) # in seconds\n",
"tau=tau/(2*60*60*24*365) # in years\n",
"theta=thetao*math.exp(-t/tau) # in degree Kelvin\n",
"\n",
"Heatinitial=E0byA/(60*60*365*24*tau)/1000000 # intial heat extraction rate in MW /km^2\n",
"\n",
"Heat25=Heatinitial*math.exp(-t/tau) # heat extraction rate after 25 years in MW /km^2\n",
"\n",
"print \"Initial Heat extraction rate is \",Heatinitial,\"MW/km^2\"\n",
"\n",
"print \"Final Heat extraction rate is \",round(Heat25,2),\"MW/km^2\"\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Initial Heat extraction rate is 567.0 MW/km^2\n",
"Final Heat extraction rate is 456.84 MW/km^2\n"
]
}
],
"prompt_number": 39
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex9.2.i:pg-304"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"w=0.6 # in km \n",
"h2=2.5 # in km\n",
"p=5/100.0 # porosity\n",
"rhor=3000.0 # density of sediment in kg/m^3\n",
"cr=750.0 # specific heat of sediment in J/kg-K\n",
"rhow=1000.0 # density of water in kg/m^3\n",
"cw=4200.0 # specific heat of water in J/kg-K\n",
"G=35.0 # temperature gradient in degree C/km\n",
"T1=45.0 # temp 1 in degree celsius\n",
"T0=12.0 # temp 2 in degree celsius\n",
"Q=0.75 # water extraction rate in m^3/sec-km^2\n",
"\n",
"T2=T0+G*h2 # initial temp in degree celsius\n",
"\n",
"thetao=T2-T1 # in degree celsius\n",
"\n",
"E0byA=(p*rhow*(1000**3)*cw+(1-p)*rhor*(1000**3)*cr)*w*thetao # in J/km^2\n",
"\n",
"print \"The heat content is\",round(E0byA,-14),\"J/km^2\"\n",
"\n",
"# the answer is different in textbook due to wrong thetao\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The heat content is 7.68e+16 J/km^2\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex9.2.ii:pg-304"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"w=0.6 # in km \n",
"h2=2.5 # in km\n",
"p=5/100.0 # porosity\n",
"rhor=3000.0 # density of sediment in kg/m^3\n",
"cr=750.0 # specific heat of sediment in J/kg-K\n",
"rhow=1000.0 # density of water in kg/m^3\n",
"cw=4200.0 # specific heat of water in J/kg-K\n",
"G=35.0 # temperature gradient in degree C/km\n",
"T1=45.0 # temp 1 in degree celsius\n",
"T0=12.0 # temp 2 in degree celsius\n",
"Q=0.75 # water extraction rate in m^3/sec-km^2\n",
"\n",
"tau=((p*rhow*cw+(1-p)*rhor*cr)*w*1000**3/(Q*rhow*cw))/(60*60*24*365) # in years\n",
"\n",
"print \"Time constant is \",round(tau,1),\"years\"\n",
"\n",
"# the answer is different in textbook due to wrong calculations\n"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Time constant is 14.2 years\n"
]
}
],
"prompt_number": 58
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Ex9.2.iii:pg-304"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"# given data\n",
"w=0.6 # in km \n",
"h2=2.5 # in km\n",
"p=5/100.0 # porosity\n",
"rhor=3000.0 # density of sediment in kg/m^3\n",
"cr=750.0 # specific heat of sediment in J/kg-K\n",
"rhow=1000.0 # density of water in kg/m^3\n",
"cw=4200.0 # specific heat of water in J/kg-K\n",
"G=35.0 # temperature gradient in degree C/km\n",
"T1=45.0 # temp 1 in degree celsius\n",
"T0=12.0 # temp 2 in degree celsius\n",
"Q=0.75 # water extraction rate in m^3/sec-km^2\n",
"T2=T0+G*h2 # initial temp in degree celsius\n",
"t=25 # time in years\n",
"thetao=T2-T1 # in degree celsius\n",
"\n",
"E0byA=(p*rhow*(1000**3)*cw+(1-p)*rhor*(1000**3)*cr)*w*thetao # in J/km^2\n",
"\n",
"tau=((p*rhow*cw+(1-p)*rhor*cr)*w*1000**3/(Q*rhow*cw)) # in seconds\n",
"Pperkm2=(E0byA)/(tau*1000000) # initial power per square km in MW/km^2\n",
"print \"initial power per square km is\",Pperkm2,\" MW/km^2\"\n",
"Power20=Pperkm2*math.exp(-25*60*60*24*365/tau) # power per square km in MW/km^2 after 25 years\n",
"print \"power per square km in MW/km^2 after 25 years is \",round(Power20,2),\"MW/km^2\"\n",
"\n",
"# The answers are slightly different due to approximation in textbook"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"initial power per square km is 171.675 MW/km^2\n",
"power per square km in MW/km^2 after 25 years is 29.44 MW/km^2\n"
]
}
],
"prompt_number": 68
}
],
"metadata": {}
}
]
}
|