diff options
author | kinitrupti | 2017-05-12 18:53:46 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:53:46 +0530 |
commit | 6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch) | |
tree | 22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /Non_Conventional_Energy_Resources_by_B.H.Khan/Chapter8.ipynb | |
parent | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff) | |
download | Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2 Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip |
Removed duplicates
Diffstat (limited to 'Non_Conventional_Energy_Resources_by_B.H.Khan/Chapter8.ipynb')
-rwxr-xr-x | Non_Conventional_Energy_Resources_by_B.H.Khan/Chapter8.ipynb | 221 |
1 files changed, 221 insertions, 0 deletions
diff --git a/Non_Conventional_Energy_Resources_by_B.H.Khan/Chapter8.ipynb b/Non_Conventional_Energy_Resources_by_B.H.Khan/Chapter8.ipynb new file mode 100755 index 00000000..78ee7847 --- /dev/null +++ b/Non_Conventional_Energy_Resources_by_B.H.Khan/Chapter8.ipynb @@ -0,0 +1,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": {}
+ }
+ ]
+}
\ No newline at end of file |