{ "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": {} } ] }