{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Ch-11, Hydro-Thermal Co-Ordination" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## example 11.2 Page 234" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "for load condition 500MW \n", " then, \n", " \t lamda 31.705000 \t p1=192.625000MW \n", " \t p2=377.898428MW \t pl=0.377898MW\n", "\n", "daily water used 49431.586210m**3 \n", "daily operating cost of thermal plant Rs155150.878125\n" ] } ], "source": [ "from numpy import arange, mat\n", "#given\n", "l1=700 ;t1=14 ;l2=500; t2=10\n", "ac=24 ;bc=0.02#variables of cost equation\n", "aw=6 ;bw=0.0025 #variables of watere quantity equation\n", "b22=0.0005 #loss coefficient\n", "r2=2.5\n", "lam=arange(1,40,0.001)\n", "gg=1; q=1\n", "for lam in arange(25,40,0.001):\n", " a=mat([[2*bc ,0],[0, r2*bw*2+2*b22*lam]])\n", " b=([[lam-ac] ,[lam-aw*r2]])\n", " pq=(a**-1)*b\n", " \n", " g=round(pq[0]+pq[1])\n", " lq=round(l2+b22*pq[1]**2)\n", "\n", " if g>=lq:\n", " print \"\\nfor load condition %dMW \\n then, \\n \\t lamda %f \\t p1=%fMW \\n \\t p2=%fMW \\t pl=%fMW\"%(l2,lam,pq[0],pq[1],2*b22*pq[1])\n", " break\n", " #end\n", "#end\n", "dwu=[(aw+bw*p)*p*t1+t2*(aw+bw*pq[1])*pq[1]]*3600\n", "doc=[(ac+bc*p)*p*t1+(ac+bc*pq[0])*pq[0]*t2]\n", "print \"\\ndaily water used %fm**3 \\ndaily operating cost of thermal plant Rs%f\"%(dwu[0],doc[0])\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## example 11.3 Page 235" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " hydro plant power is 237.047484MW \n", " the cost of water is 0.788486Rs.per hour/m**3/sec\n" ] } ], "source": [ "from math import sqrt\n", "#given \n", "p=250#load\n", "rt=14 #run time\n", "t=24#total time\n", "ac=5 ;bc=8; cc=0.05 #variables of cost equation\n", "bw=30; cw=0.05 #variables of water per power\n", "qw=500#quantity of water\n", "lam=bc+cc*2*p #lambda\n", "a=-qw*(10**6)/(3600*rt)\n", "inn=sqrt(bw**2-4*cw*a)\n", "phh1=(-bw+inn)/(2*cw)#solution of quadratic equation\n", "phh2=(-bw-inn)/(2*cw)\n", "if phh1>0 :\n", " r=lam/(bw+cw*phh1) \n", " print \" hydro plant power is %fMW \\n the cost of water is %fRs.per hour/m**3/sec\"%(phh1,r) \n", "\n", "if phh2>0 :\n", " r=lam/(bw+cw*phh2) \n", " print \" hydro plant power is %fMW \\n the cost of water is %fRs.per hour/m**3/sec\"%(phh2,r) " ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.9" } }, "nbformat": 4, "nbformat_minor": 0 }