{
 "metadata": {
  "name": "",
  "signature": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter6, Steam"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1, page 346"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import pi, cos, sin, atan, sqrt, acos\n",
      "\n",
      "#initialisation of variables\n",
      "c=400.0 #steam speed in m/s\n",
      "alpla=12.0 #angle in degrees\n",
      "cwo=0\n",
      "pi=(22.0/7)\n",
      "#CALCULATIONS\n",
      "u=c*cos(12*(pi/180))/2\n",
      "cwi=c*cos(12*(pi/180))\n",
      "cfi=c*sin(12*(180/pi))\n",
      "thetha=atan(cfi/(cwi-u))*(pi/180)\n",
      "cro=sqrt((cfi)**2+(cwi-u)**2)\n",
      "phi=acos(u/cro)*(180/pi)\n",
      "wo=(cwi-cwo)*u\n",
      "ke=(c)**2/2\n",
      "eff=wo/ke\n",
      "#RESULTS\n",
      "print ' blade efficiency is %2f'%eff"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " blade efficiency is 0.956738\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2, page 349"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "from math import asin\n",
      "#initialisation of variables\n",
      "hd=159 #heat drop in kj/kg\n",
      "eff=0.89 #and its corresponding efficiency is mentioned\n",
      "ra=0.4 #ratio of blade speed to steam speed\n",
      "sp=3000 #rotational speed of an impulse turbine wheel in revolutions\n",
      "a=20 #angle is 20 degrees\n",
      "beff=0.76 #blade efficiency\n",
      "cwo=5.4 #m/s\n",
      "pi=(22/7)\n",
      "bvc=0.82 #blade velocity coefficient\n",
      "m=15 #mass is 15 kgs\n",
      "#CALCULATIONS\n",
      "ci=44.72*sqrt(eff*hd)\n",
      "u=ci*ra\n",
      "dm=(60*u)/(sp*0.3184)\n",
      "cfi=ci*sin(20*(pi/180))\n",
      "cwi=ci*cos(20*(pi/180))\n",
      "cri=sqrt((cwi-u)**2+(cfi)**2)\n",
      "cro=bvc*cri\n",
      "x=(beff*(ci)**2)/(2*u) #x=cwi-cwo\n",
      "theta=atan((cfi/(cwi-u)))*(180/pi)\n",
      "cfo=sqrt((cro)**2-(cwo+u)**2)\n",
      "co=sqrt((cwo)**2+(cfo)**2)\n",
      "bet=(asin(cfo/co))*(180/pi)\n",
      "pd=(m*x*u)/1000\n",
      "re=hd-(pd/15)\n",
      "phi=asin((cfo/cro))*(180/pi)\n",
      "#RESULTS\n",
      "print 'mean blade ring diameter is %2fm'%dm  #textbook answer is wrong\n",
      "print ' \\npower developed is %2fkw'%(pd)\n",
      "print ' \\nresidual energy at out let foe friction and nozzle efficiency is %2fkw/kg'%(re )\n",
      "print ' \\nblade angles are %2f,%2f,%2f'%(theta,bet,phi)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "mean blade ring diameter is 13.366333m\n",
        " \n",
        "power developed is 1613.115917kw\n",
        " \n",
        "residual energy at out let foe friction and nozzle efficiency is 51.458939kw/kg\n",
        " \n",
        "blade angles are 0.000000,92.007507,35.107859\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3, page 352"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import pi, tan\n",
      "#initialisation of variables\n",
      "alpha=20 #angle in degrees\n",
      "theta=27 #angle in degrees\n",
      "m=10 #kgs\n",
      "vs=0.4799 #specific volume in m*m*m/kg\n",
      "pi=(22/7)\n",
      "u=100 #blade speed in m/s\n",
      "#CALCULATIONS\n",
      "ci=u*tan(27*(pi/180))/(cos(20*(pi/180))*tan(27*(pi/180))-sin(20*(pi/180)))\n",
      "x=2*ci*cos(20*(pi/180))-u\n",
      "pd=m*x*u\n",
      "cf=ci*sin(20*(pi/180))\n",
      "a=(m*vs)/cf\n",
      "dm=sqrt(a/(0.08*pi))\n",
      "h=0.08*dm\n",
      "#RESULTS\n",
      "print 'power developed is %2f w'%(pd)\n",
      "print ' \\narea of flow is %2f m*m'%(a)\n",
      "print ' \\nblade height is %2f m'%(h)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "power developed is 600057.358847 w\n",
        " \n",
        "area of flow is 0.037652 m*m\n",
        " \n",
        "blade height is 0.030958 m\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4, page 359"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variables\n",
      "sp=1500 #rotational speed of an impulse turbine wheel in revolutions\n",
      "pi=(22/7)\n",
      "dm=1.5 #diameter in m\n",
      "ra=0.8 #ratio of blade speed to steam speed\n",
      "x=159 #x=cwi-cwo in m/s\n",
      "m=10 #kgs mass\n",
      "cf=50.4 #m*m*m/kg\n",
      "vs=1.159 #\n",
      "#CALCULATIONS\n",
      "u=(pi*dm*sp)/60\n",
      "ci=u/ra\n",
      "pd=(m*x*u)/1000\n",
      "a=(m*vs)/cf\n",
      "h=a/(pi*dm)\n",
      "#RESULTS\n",
      "print 'power developed for steam flow is %2f kw'%(pd)\n",
      "print ' \\nheight of the blade is %2f m'%(h)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "power developed for steam flow is 187.392857 kw\n",
        " \n",
        "height of the blade is 0.048779 m\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5, page 365"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variables\n",
      "u=170 #blade velocity in m/s\n",
      "ra=0.2 #ratio of blade speed to steam speed\n",
      "cril=696 #m/s\n",
      "co1=0.84 #velocity coefficient \n",
      "co2=0.87 #velocity coefficient\n",
      "co3=0.90 #velocity coefficient\n",
      "cri2=232 #m/s\n",
      "#CALCULATIONS\n",
      "ci=u/ra\n",
      "crol=cril*co1\n",
      "ci2=crol*co2\n",
      "cro2=cri2*co3\n",
      "wd=(1176+344)*u*10**-3\n",
      "beff=wd*1000*2/(ci**2)\n",
      "#RESULTS\n",
      "print 'work developed in the blade is %2f kj/kg'%(wd)\n",
      "print ' \\nblading efficiency is %2f'%(beff)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "work developed in the blade is 258.400000 kj/kg\n",
        " \n",
        "blading efficiency is 0.715294\n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6, page 368"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variables\n",
      "u=250 #blade speed in m/s\n",
      "theta=80 #angle in degrees\n",
      "alpha=20 #angle in degrees\n",
      "oed=786.7 #overall enthalpic drop in kj/kg\n",
      "sp=3000 #rotational speed of an impulse turbine wheel in revolutions\n",
      "p=6000 #power developed in kw\n",
      "rf=1.04 #reheat factor\n",
      "ie=2993.4 #kj/kg\n",
      "vs=9.28 #m*m*m/kg\n",
      "pi=(22/7)\n",
      "#CALCULATIONS\n",
      "ci=(u*sin(100*(pi/180)))/sin(60*(pi/180))\n",
      "x=(2*ci*cos(20*(pi/180)))-u #x=cwi-cwo\n",
      "wd=x*u*10**-3\n",
      "ed=wd*10\n",
      "teff=ed/oed\n",
      "seff=teff/rf\n",
      "m=p/ed\n",
      "ae=ie-ed\n",
      "cf=ci*sin(20*(pi/180))\n",
      "a=(m*vs)/cf\n",
      "dm=(60*u)/(pi*sp)\n",
      "h=a/(pi*dm)\n",
      "#RESULTS\n",
      "print 'enthalpy drop is %2f kj/kg'%(ed)\n",
      "print ' \\nturbine efficiency is %2f'%(teff)\n",
      "print ' \\nstage efficiency is %2f'%(seff)\n",
      "print ' \\nmass flow of steam is %2f kg/s'%(m)\n",
      "print ' \\nblade height us %2f m'%(h)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "enthalpy drop is 710.164887 kj/kg\n",
        " \n",
        "turbine efficiency is 0.902714\n",
        " \n",
        "stage efficiency is 0.867994\n",
        " \n",
        "mass flow of steam is 8.448742 kg/s\n",
        " \n",
        "blade height us 0.161268 m\n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7, page 371"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#initialisation of variables\n",
      "x1=3025 # according to 20 bar pressure and 300 degrees temp\n",
      "x2=2262 #according to 20 bar pressure and 300 degrees temp\n",
      "x3=2039 #according to 20 bar pressure and 300 degrees temp\n",
      "x4=2896 #according to 20 bar pressure and 300 degrees temp\n",
      "x5=2817 #according to 20 bar pressure and 300 degrees temp\n",
      "x6=2728 #according to 20 bar pressure and 300 degrees temp\n",
      "x7=2699 #according to 20 bar pressure and 300 degrees temp\n",
      "x8=2592 #according to 20 bar pressure and 300 degrees temp\n",
      "x9=2525 #according to 20 bar pressure and 300 degrees temp\n",
      "x10=2430 #according to 20 bar pressure and 300 degrees temp\n",
      "x11=2398 #according to 20 bar pressure and 300 degrees temp\n",
      "x12=2262 #according to 20 bar pressure and 300 degrees temp\n",
      "x13=2192 #according to 20 bar pressure and 300 degrees temp\n",
      "#CALCULATIONS\n",
      "ieff=(x1-x2)/(x1-x3)\n",
      "feff=(x1-x4)/(x1-x5)\n",
      "seff=(x4-x6)/(x4-x7)\n",
      "teff=(x6-x8)/(x6-x9)\n",
      "oeff=(x8-x10)/(x8-x11)\n",
      "yeff=(x10-x12)/(x10-x13)\n",
      "ced=(x1-x5)+(x4-x7)+(x6-x9)+(x8-x11)+(x10-x13)\n",
      "rf=ced/(x1-x3)\n",
      "#RESULTS\n",
      "print 'cumulative enthaloy drop is %.f'%(ced)\n",
      "print ' \\nreheat factor is %0.2f'%(rf)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "cumulative enthaloy drop is 1040\n",
        " \n",
        "reheat factor is 1.05\n"
       ]
      }
     ],
     "prompt_number": 35
    }
   ],
   "metadata": {}
  }
 ]
}