diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | df60071cf1d1c18822d34f943ab8f412a8946b69 (patch) | |
tree | ab059cf19bad4a1233a464ccf5d72cf8b3fb323c /sample_notebooks/Hrituraj | |
parent | fba055ce5aa0955e22bac2413c33493b10ae6532 (diff) | |
download | Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.gz Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.bz2 Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.zip |
add books
Diffstat (limited to 'sample_notebooks/Hrituraj')
-rwxr-xr-x | sample_notebooks/Hrituraj/Various_types_of_tarrifs.ipynb | 318 |
1 files changed, 318 insertions, 0 deletions
diff --git a/sample_notebooks/Hrituraj/Various_types_of_tarrifs.ipynb b/sample_notebooks/Hrituraj/Various_types_of_tarrifs.ipynb new file mode 100755 index 00000000..d2ca1e19 --- /dev/null +++ b/sample_notebooks/Hrituraj/Various_types_of_tarrifs.ipynb @@ -0,0 +1,318 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:0f69a839d3ec8a6e20f49cef0966e931497f52ea6c7ffcec43b822cf678199cf" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Various types of tarrifs" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.1 page 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given Data :\n", + "E=438000.0 #in kWh(Energy consumed per year)\n", + "pf=0.8 #unitless\n", + "cosfi=pf #unitless\n", + "LoadFactor=40.0 #in %\n", + "#tarrif=Rs. 75/year/kw of max demand plus 3 paise per unit per reactive KVA\n", + "h=8760.0 #no. of years in a year\n", + "AvgLoad=E/h #kw\n", + "MaxLoad=AvgLoad/(LoadFactor/100) #in kw\n", + "MaxLoad_KVA=MaxLoad/pf #in KVA\n", + "tanfi=math.tan(math.acos(cosfi)) #unitless\n", + "ReactiveKVAR=h*tanfi*AvgLoad #in KVA\n", + "AnnualBill=75*MaxLoad+(3/100)*E+(1.5/100)*ReactiveKVAR #in Rs.\n", + "CostPerUnit=AnnualBill/E #in Rs.\n", + "CostPerUnit=CostPerUnit*100 #in Paisa\n", + "print \"Cost per unit is %0.2f Paisa\" %CostPerUnit" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cost per unit is 3.27 Paisa\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.2 page 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data :\n", + "#tarrif=Rs. 275/year/KVA of max demand plus 35 paise per unit\n", + "C1=275.0 #in Rs.year/KVA\n", + "C2=35.0 #in paisa/unit\n", + "LoadFactor=30.0 #in %/year\n", + "LoadFactor=30.0/100 #in fraction\n", + "#Let MaxDemand = x KW\n", + "#Case (i) PF=1\n", + "cosfi=1 #unitless\n", + "AnnualBillBYx=C1/cosfi+(C2/100)*LoadFactor*24*365 #in Rs.(Here 24*365 is for No. of hours in a year)\n", + "AnnualBill=AnnualBillBYx*100/(LoadFactor*24*365) #in paisa/unit\n", + "print \"Cost per unit(at unity power factor) is %0.2f paisa/unit\" %AnnualBill \n", + "#Case (i) PF=0.8\n", + "cosfi=0.8 #unitless\n", + "AnnualBillBYx=C1/cosfi+(C2/100)*LoadFactor*24*365 #in Rs.(Here 24*365 is for No. of hours in a year)\n", + "AnnualBill=AnnualBillBYx*100/(LoadFactor*24*365) #in paisa/unit\n", + "print \"Cost per unit(at 0.8 power factor) is %0.2f paisa/unit\" %AnnualBill" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cost per unit(at unity power factor) is 45.46 paisa/unit\n", + "Cost per unit(at 0.8 power factor) is 48.08 paisa/unit\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.3 page 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Given Data :\n", + "FixedLoad=200.0 #in kW\n", + "PF=0.8 #unitless\n", + "cosfi=PF #unitless\n", + "h=10.0 #in hours/day\n", + "d=300.0 #in days\n", + "Time=h*d #in hours\n", + "Energy=FixedLoad*Time #in kwh/year\n", + "# (i) tarrif=Rs. 100/KVA/Annum plus 20 paise per kwh\n", + "C1=100.0 #in Rs.year/KVA\n", + "C2=20.0 #in paisa/kwh\n", + "KVA=FixedLoad/cosfi #in KVA\n", + "AnnualBill=KVA*C1+(C2/100)*Energy #in Rs.\n", + "print \" Case (i) Annual Payment is %0.2f Rs.\" %AnnualBill \n", + "# (ii) tarrif=Rs. 100/KW/Annum plus 20 paise per kwh plus 2 paise/KVARH\n", + "C1=100.0 #in Rs./year/KW\n", + "C2=20.0 #in paisa/kwh\n", + "C3=2.0 #in paisa/KVARH\n", + "tanfi=math.tan(math.acos(cosfi)) #unitless\n", + "ReactiveKVARH=FixedLoad*tanfi*Time #in KVARH\n", + "AnnualBill=C1*FixedLoad+(C2/100)*Energy+(C3/100)*ReactiveKVARH #in Rs.\n", + "print \" Case (ii) Annual Payment is %0.2f Rs.\" %AnnualBill " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Case (i) Annual Payment is 145000.00 Rs.\n", + " Case (ii) Annual Payment is 149000.00 Rs.\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.4 page 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data :\n", + "Energy=180000.0 #in kwh\n", + "LoadFactor=45.0 #in %/year\n", + "LoadFactor=45.0/100 #in fraction\n", + "#Charges=Rs. 50/KW/Annum plus 8 paise per unit\n", + "C1=50 #in Rs.year/KW\n", + "C2=8 #in paisa/unit\n", + "h=365*24 #no. of hours per year\n", + "AvgLoad=Energy/h #in KW\n", + "MaxLoad=AvgLoad/LoadFactor #in KW\n", + "FixCharges=MaxLoad*C1 #in Rs.\n", + "PlusCharges=(C2/100)*Energy #in rs.\n", + "TotalTarrif=FixCharges+PlusCharges #in Rs.\n", + "print \"Total Annual electricity charges is %0.2f Rs.\" %TotalTarrif" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Annual electricity charges is 2283.11 Rs.\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.5 page 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data :\n", + "Energy=25.0*10**6 #in kwh\n", + "MaxDemand=1600.0 #in KW\n", + "#(i) Rs. 70/KW max demand plus 2 paise per kwh\n", + "C1=70.0 #in Rs.year/KW\n", + "C2=2 #in paisa/unit\n", + "AnnualCost=MaxDemand*C1+(C2/100)*Energy #in Rs.\n", + "print \"Case (i) Annual cost of energy is %0.2f Rs.\" %AnnualCost \n", + "#(ii) Annual cost at a flat rate of 5p/kwh\n", + "C=5.0 #in paisa/kwh\n", + "AnnualCost=(C/100)*Energy #in Rs.\n", + "print \"Case (ii) Annual cost of energy is %0.2f Rs.\" %AnnualCost \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Case (i) Annual cost of energy is 112000.00 Rs.\n", + "Case (ii) Annual cost of energy is 1250000.00 Rs.\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.6 page 293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data :\n", + "MaxDemand=20 #in KW\n", + "#(i) Rs. 180/KW/annum max demand plus 15 paise per unit\n", + "#(ii) Flat rate tarrif 40 paise/unit\n", + "C1=180.0 #in Rs.year/KW\n", + "C2=15.0 #in paisa/unit\n", + "#AnnualBill1=C1*MaxDemand+(C2/100)*x x is the energy consumed\n", + "C=40.0 #in paisa/unit\n", + "#AnnualBill2=(C/100)*x x is the energy consumed\n", + "#Puting two bills equal gives :\n", + "x=C1*MaxDemand/((C/100)-(C2/100)) #in kwh\n", + "print \"No. of units to be consumed is %0.2f or in %0.2f kwh \" %(x,x)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "No. of units to be consumed is 14400.00 or in 14400.00 kwh \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Exa 11.7 page 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given Data :\n", + "MaxDemand=500.0 #in KW\n", + "LoadFactor=70.0 #in %/year\n", + "LoadFactor=70.0/100 #in fraction\n", + "cosfi=0.8 #unitless\n", + "#(i) Rs. 80/KVA of max demand\n", + "#(ii) Running chargeare 5 paise/kwh\n", + "C1=80.0 #in Rs./KVA\n", + "C2=5.0 #in paisa/kwh\n", + "AvgLoad=MaxDemand*LoadFactor #in KW\n", + "h=365.0*24 #no. of hours per year\n", + "Energy=AvgLoad*h #in kwh\n", + "MaxDemandKVA=MaxDemand/cosfi #in KVA\n", + "AnnualBill=MaxDemandKVA*C1+(C2/100)*Energy #in RS\n", + "print \"Annual bill of consumer is %0.2f Rs.\" %AnnualBill " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Annual bill of consumer is 203300.00 Rs.\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |