{
 "metadata": {
  "name": "",
  "signature": "sha256:aae7358a1641809b7b2e92e647a38df4d3df23fcb8fc4fc8de6985e2dc22bd13"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 - Radial Flow Gas and Steam Turbines"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.1 Page 266"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import atan, pi, tan, degrees, cos\n",
      "#input data\n",
      "P00=3#The pressure at which air is received in bar\n",
      "T00=373#The temperature at which air is received in K\n",
      "rt=0.5#The rotor tip diameter of turbine in m\n",
      "rh=0.3#The rotor exit diameter of the turbine in m\n",
      "b=0.03#The rotor blade width at entry in m\n",
      "b11=60#The air angle at rotor entry in degree\n",
      "a11=25#The air angle at nozzle exit in degree\n",
      "Ps=2#The stage pressure ratio\n",
      "nn=0.97#The nozzle efficiency\n",
      "N=7200#The speed of the turbine rotation in rpm\n",
      "R=287#The universal gas constant in J/kg.K\n",
      "Cp=1005#The specific heat of air at constant pressure in J/kg.K\n",
      "r=1.4#The ratio of specific heats of air\n",
      "\n",
      "#calculations\n",
      "U1=(3.14*rt*N)/60#Peripheral velocity of impeller at inlet in m/s\n",
      "Cr=U1/(1/tan(pi/180*a11)-1/tan(pi/180*b11))#The radial velocity at inlet in m/s\n",
      "ps1=Cr/U1#Flow coefficient \n",
      "sl=1+(ps1*1/tan(pi/180*b11))#Loading coefficient\n",
      "DR=((1-(ps1*1/tan(pi/180*b11)))/2)#Degree of reaction\n",
      "nts=((sl*U1**2)/(Cp*T00*(1-((1/Ps)**((r-1)/r)))))#Stage efficiency of the turbine\n",
      "C2=Cr#Absolute velocity at the exit in m/s\n",
      "U2=(3.1415*rh*N)/60#Peripheral velocity of impeller at exit in m/s\n",
      "b22=degrees(atan(C2/U2))#The air angle at rotor exit in degree\n",
      "dT=DR*U1*Cr*1/tan(pi/180*a11)/Cp#Total actual change in temperature in a stage turbine in K\n",
      "dT0=(U1*Cr*1/tan(pi/180*a11))/Cp#The total change in temperature in turbine in K\n",
      "T02=T00-dT0#The exit absolute temperature in K\n",
      "T2=T02-((C2**2)/(2*Cp))#The actual exit temperature in K\n",
      "T1=dT+T2#The actual inlet temperature in K\n",
      "Cx1=Cr*1/tan(pi/180*a11)#Inlet absolute velocity of air in tangential direction in m/s\n",
      "C1=Cx1/cos(pi/180*a11)#Absolute velocity at the inlet in m/s\n",
      "dT1=(C1**2/2)/(Cp*nn)#The absolute change in temperature at the first stage in K\n",
      "dP1=(1-(dT1/T00))**(r/(r-1))#The absolute pressure ratio in first stage \n",
      "P1=dP1*P00#The inlet pressure in bar\n",
      "d1=(P1*10**5)/(R*T1)#The inlet density in kg/m**3\n",
      "A1=3.1415*rt*b#The inlet area of the turbine in m**2\n",
      "m=d1*A1*Cr#The mass flow rate of air at inlet in kg/s\n",
      "P2=P00/Ps#The exit pressure in bar\n",
      "d2=(P2*10**5)/(R*T2)#The exit density of air in kg/m**3\n",
      "bh=(m/(d2*3.1415*rh*Cr))#Rotor width at the exit in m\n",
      "W=m*U1*Cx1*10**-3#The power developed by the turbine in kW\n",
      "\n",
      "#output\n",
      "print '(a)\\n    (1)The flow coefficient is %3.3f\\n    (2)The loading coefficient is %3.3f\\n(b)\\n    (1)The degree of reaction is %0.2f %% \\n    (2)The stage efficiency of the turbine is %0.2f %% \\n(c)\\n    (1)The air angle at the rotor exit is %3.2f degree\\n    (2)The width at the rotor exit is %0.2f cm\\n(d)\\n    (1)The mass flow rate is %3.2f kg/s\\n    (2)The power developed is %3.2f kW'%(ps1,sl,DR*100,nts*100,b22,bh*100,m,W)\n",
      "# answer in the textbook is not correct."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        "    (1)The flow coefficient is 0.638\n",
        "    (2)The loading coefficient is 1.368\n",
        "(b)\n",
        "    (1)The degree of reaction is 31.58 % \n",
        "    (2)The stage efficiency of the turbine is 72.12 % \n",
        "(c)\n",
        "    (1)The air angle at the rotor exit is 46.75 degree\n",
        "    (2)The width at the rotor exit is 6.31 cm\n",
        "(d)\n",
        "    (1)The mass flow rate is 11.78 kg/s\n",
        "    (2)The power developed is 572.01 kW\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.2 Page 270"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sin\n",
      "#input data\n",
      "P0=4#Overall stage pressure ratio \n",
      "T00=557#Temperature at entry in K\n",
      "P3=1#Diffuser exit pressure in bar\n",
      "m=6.5#Mass flow rate of air in kg/s\n",
      "ps1=0.3#Flow coefficient \n",
      "N=18000#Speed of the turbine in rpm\n",
      "Dt=0.42#Rotor tip diameter in m\n",
      "D2m=0.21#Mean diameter at rotor exit in m\n",
      "R=287#The universal gas constant in J/kg.K\n",
      "Cp=1.005#The specific heat of air at constant pressure in kJ/kg.K\n",
      "r=1.4#The ratio of specific heats of air\n",
      "\n",
      "#calculations\n",
      "U1=(3.1415*Dt*N)/60#Peripheral velocity of impeller at inlet in m/s\n",
      "Cr1=ps1*U1#The radial velocity at inlet in m/s\n",
      "a11=degrees(atan(Cr1/U1))#The nozzle exit air angle in degree\n",
      "W=m*U1**2*10**-3#Power developed by turbine in kW\n",
      "dT=(1/P0)**((r-1)/r)#The total isentropic temperature ratio in entire process \n",
      "T3s=dT*T00#The final isentropic temperature at exit in K\n",
      "dh2=W/m#The absolute enthalpy change in the first two stages in kJ/kg\n",
      "ns=dh2/(Cp*(T00-T3s))#The stage efficiency of the turbine\n",
      "T02=T00-(W/(m*Cp))#The absolute temperature at the entry of second stage in K\n",
      "T03=T02#The absolute temperature at exit of second stage in K\n",
      "dH=Cp*(T02-T3s)#The total enthalpy loss in kJ/kg\n",
      "dHn=dH/2#The enthalpy loss in the nozzle in kJ/kg\n",
      "C1=Cr1/sin(pi/180*a11)#Absolute velocity at the inlet in m/s\n",
      "dH0=((C1**2)/(2000*Cp))+(dHn)#The isentropic absolute enthalpy loss in nozzle in kJ/kg\n",
      "dT0=dH0/Cp#The isentropic absolute temperature loss in nozzle in K\n",
      "T1s=T00-dT0#The isentropic temperature at the entry in K\n",
      "P1=P0*(T1s/T00)**(r/(r-1))#The pressure at the entry of turbine in bar\n",
      "T1=T00-((C1**2)/(2000*Cp))#The temperature at the entry of turbine in K\n",
      "d1=(P1*10**5)/(R*T1)#The density of the air at inlet in kg/m**3\n",
      "b1=m/(d1*Cr1*3.141*Dt)#The width of the rotor at inlet in m\n",
      "C2=Cr1#The avsolute velocity at the second stage entry in m/s\n",
      "T2=T02-((C2**2)/(2000*Cp))#The temperature at the second stage entry in K\n",
      "P23=(T2/T03)**(r/(r-1))#The pressure ratio at the second stage\n",
      "P2=P23*P3#The pressure at the second stage in bar\n",
      "d2=(P2*10**5)/(R*T2)#The density of the air at second stage in kg/m**3\n",
      "C2=Cr1#The absolute velocity at the second stage in m/s\n",
      "A2=m/(d2*C2)#The area of cross section at the second stage in m**2\n",
      "h2=(A2/(3.14*D2m))#The rotor blade height at the exit in m\n",
      "M1=C1/(r*R*T1)**(1/2)#The mach number at the nozzle\n",
      "U2=(3.14*D2m*N)/60#The Peripheral velocity of impeller at exit in m/s\n",
      "M2r=(((C2**2)+(U2**2))**(1/2))/(r*R*T2)**(1/2)#The mach number at the rotor exit \n",
      "Ln=(dHn*10**3)/((C1**2)/2)#The nozzle loss coefficient\n",
      "Lr=(dHn*10**3)/(((((C2**2)+(U2**2))**(1/2))**2)/2)#The rotor loss coefficient\n",
      "\n",
      "#output\n",
      "print '(a)The nozzle exit air angle is %3.2f degree\\n(b)The power developed is %3.1f kW\\n(c)The stage efficiency is %0.2f %%\\n(d)The rotor width at the entry is %0.2f cm\\n(e)The rotor blade height at the exit is %0.2f cm\\n(f)\\n    (1)The mach number at the nozzle exit is %3.4f\\n    (2)The mach number at the rotor exit is %3.2f\\n(g)\\n    (1)The nozzle loss coefficient is %3.4f\\n    (2)The rotor loss coefficient is %3.3f'%(a11,W,ns*100,b1*100,h2*100,M1,M2r,Ln,Lr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The nozzle exit air angle is 16.70 degree\n",
        "(b)The power developed is 1018.4 kW\n",
        "(c)The stage efficiency is 85.58 %\n",
        "(d)The rotor width at the entry is 2.76 cm\n",
        "(e)The rotor blade height at the exit is 9.99 cm\n",
        "(f)\n",
        "    (1)The mach number at the nozzle exit is 0.9489\n",
        "    (2)The mach number at the rotor exit is 0.58\n",
        "(g)\n",
        "    (1)The nozzle loss coefficient is 0.1546\n",
        "    (2)The rotor loss coefficient is 0.496\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.3 Page 274"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import acos\n",
      "#input data\n",
      "ntt=0.9#Total-to-total efficiency\n",
      "P00=300#The pressure at entry to the nozzle in kPa\n",
      "T00=1150#The temperature at entry to the nozzle in K\n",
      "T1=1013#The static temperature at the outlet of the nozzle in K\n",
      "P03=100#The pressure at the outlet of the diffuser in kPa\n",
      "R=284.5#The universal gas constant in J/kg.K\n",
      "Cp=1.147#The specific heat of air at constant pressure in kJ/kg.K\n",
      "r=1.33#The ratio of specific heats of given gas\n",
      "\n",
      "#calculations\n",
      "U1=(ntt*Cp*1000*T00*(1-((P03/P00)**((r-1)/r))))**(1/2)#The impeller tip speed in m/s\n",
      "T01=T00#The absolute temperature at the entry in K\n",
      "C1=(2000*Cp*(T01-T1))**(1/2)#The absolute velocity at the inletof turbine in m/s\n",
      "a11=acos(pi/180*U1/C1)#The flow angle at the nozzle oulet in degree\n",
      "M1=C1/(r*R*T1)**(1/2)#The mach number at the nozzle outlet \n",
      "\n",
      "#output\n",
      "print '(a)The impeller tip speed is %3.1f m/s\\n(b)The flow angle at the nozzle oulet is %3.2f degrees\\n(c)The mach number at the nozzle outlet is %3.2f'%(U1,a11,M1)\n",
      "# answer in the textbook is not correct fot part(b)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)The impeller tip speed is 532.2 m/s\n",
        "(b)The flow angle at the nozzle oulet is 1.55 degrees\n",
        "(c)The mach number at the nozzle outlet is 0.91\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.4 Page 275"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#input data\n",
      "D1=0.09#Rotor inlet tip diameter in m\n",
      "D2t=0.062#Rotor outlet tip diameter in m\n",
      "D2h=0.025#Rotor outlet hub diameter in m\n",
      "N=30000#Blade speed in rpm\n",
      "d2=1.8#Density of exhaust gases at impeller exit in kg/m**3\n",
      "C2s=0.447#Ratio of absolute velocity and isentropic velocity at exit\n",
      "U1Cs=0.707#Ratio of impeller tip velocity and isentropic velocity\n",
      "\n",
      "#calculations\n",
      "U1=(3.1415*D1*N)/60#The impeller tip speed in m/s\n",
      "Cs=U1/U1Cs#Isentropic velocity in m/s\n",
      "C2=C2s*Cs#Absolute velocity at the exit in m/s\n",
      "A2=(3.141/4)*((D2t**2)-(D2h**2))#Area at the exit in m**2\n",
      "Q2=A2*C2#Volume flow rate at the impeller exit in m**3/s\n",
      "M=d2*Q2#Mass flow rate in kg/s\n",
      "W=M*U1**2#Power developed in W\n",
      "\n",
      "#output\n",
      "print '(a)Volume flow rate at the impeller exit is %3.3f m**3/s\\n(b)Power developed is %0.3f kW'%(Q2,W/1000)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Volume flow rate at the impeller exit is 0.226 m**3/s\n",
        "(b)Power developed is 8.127 kW\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.5 Page 276"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#input data\n",
      "P00=3.5#Total-to-static pressure ratio\n",
      "P2=1#Exit pressure in bar\n",
      "T00=923#Inlet total temperature in K\n",
      "U1Cs=0.66#Blade to isentropic speed ratio\n",
      "D=0.45#Rotor diameter ratio\n",
      "N=16000#Speed from nozzle in rpm\n",
      "a11=20#Nozzle exit angle in degree\n",
      "nn=0.95#Nozzle efficiency\n",
      "b1=0.05#Rotor width at inlet in m\n",
      "R=287#The universal gas constant in J/kg.K\n",
      "Cp=1005#The specific heat of air at constant pressure in J/kg.K\n",
      "r=1.4#The ratio of specific heats of air\n",
      "\n",
      "\n",
      "#Calculations\n",
      "T2s=T00*(1/P00)**((r-1)/r)#Isentropic temperature at the exit in K\n",
      "Cs=(2*Cp*(T00-T2s))**(1/2)#The isentropic velocity in m/s\n",
      "U1=U1Cs*Cs#The impeller tip speed in m/s\n",
      "D1=(U1*60)/(3.14*N)#Rotor inlet diameter in m\n",
      "D2=D*D1#Rotor outlet diameter in m\n",
      "Cr2=U1*tan(pi/180*a11)#The relative velocity at the exit in m/s\n",
      "U2=(3.1415*D2*N)/60#Peripheral velocity of impeller at exit in m/s\n",
      "b22=degrees(atan(Cr2/U2))#The air angle at rotor exit in degree\n",
      "T02=T00-((U1**2)/(Cp))#The absolute temperature at the exit in K\n",
      "T2=T02-((Cr2**2)/(2*Cp))#The temperature at the exit of turbine in K\n",
      "T1=T2+((U1**2)/(2*Cp))#The temperature at the entry of turbine in K\n",
      "T1s=T00-((T00-T1)/nn)#Isentropic temperature at the entry in K\n",
      "P1=P00*(T1s/T00)**(r/(r-1))#The pressure at the entry stage in bar\n",
      "d1=(P1*10**5)/(R*T1)#The density of the air  at the inlet in kg/m**3\n",
      "A1=3.1415*D1*b1#The area at the inlet in m**2\n",
      "Cr1=Cr2#The relative velocity at the entry in m/s\n",
      "m=d1*A1*Cr1#The mass flow rate for a 90degree IFR turbine Degree of Reaction is 0.5 in kg/s\n",
      "W=(m*U1**2)*10**-6#Power developed in MW\n",
      "d2=(P2*10**5)/(R*T2)#The density of the air at the exit in kg/m**3\n",
      "b2=m/(d2*3.141*D2*Cr2)#Rotor width at the exit in m\n",
      "D2h=D2-b2#Hub diameter at the exit in m\n",
      "D2t=D2+b2#Tip diameter at the exit in m\n",
      "nts=(W*10**6)/(m*Cp*(T00-T2s))#Total-to-static efficiency\n",
      "C1=U1/cos(pi/180*a11)#Absolute velocity at the entry in m/s\n",
      "Ln=(Cp*(T1-T1s))/((C1**2)/2)#Nozzle enthalpy loss coefficient\n",
      "W2=((U2**2)+(Cr2**2))**(1/2)#Resultant relative velocity at the exit in m/s\n",
      "T2s=T1*(P2/P1)**((r-1)/r)#Isentropic temperature at the exit in K\n",
      "Lr=(Cp*(T2-T2s))/((W2**2)/2)#Rotor enthalpy loss coefficient\n",
      "\n",
      "#output\n",
      "print '(a)\\n    (1)Rotor inlet diameter is %3.2f m\\n    (2)Rotor outlet diameter is %3.3f m\\n(b)The air angle at rotor exit is %3.2f degree\\n(c)The mass flow rate for a 90degree IFR turbine Degree of Reaction is 0.5 is %3.2f kg/s\\n(d)Power developed is %3.3f MW\\n(e)\\n    (1)Hub diameter at the exit is %3.4f m\\n    (2)Tip diameter at the exit is %3.4f m\\n(f)Total-to-static efficiency is %3.4f\\n(g)Nozzle enthalpy loss coefficient is %3.4f\\n(h)Rotor enthalpy loss coefficient is %3.4f'%(D1,D2,b22,m,W,D2h,D2t,nts,Ln,Lr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        "    (1)Rotor inlet diameter is 0.59 m\n",
        "    (2)Rotor outlet diameter is 0.265 m\n",
        "(b)The air angle at rotor exit is 38.95 degree\n",
        "(c)The mass flow rate for a 90degree IFR turbine Degree of Reaction is 0.5 is 14.21 kg/s\n",
        "(d)Power developed is 3.456 MW\n",
        "(e)\n",
        "    (1)Hub diameter at the exit is 0.0834 m\n",
        "    (2)Tip diameter at the exit is 0.4466 m\n",
        "(f)Total-to-static efficiency is 0.8712\n",
        "(g)Nozzle enthalpy loss coefficient is 0.0526\n",
        "(h)Rotor enthalpy loss coefficient is 0.3396\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex 6.6 Page 280"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#input data\n",
      "P00=700#Total-to-static pressure ratio\n",
      "T00=1145#Inlet total temperature in K\n",
      "P1=527#The pressure at the entry stage in bar\n",
      "T1=1029#The temperature at the entry of turbine in K\n",
      "P2=385#The pressure at the second stage in bar\n",
      "T2=915#The temperature at the second stage entry in K\n",
      "T02=925#The absolute temperature at the exit in K\n",
      "D2mD1=0.49#The ratio of rotor exit mean diameter to rotor inlet diameter\n",
      "N=24000#Blade speed in rpm\n",
      "R1=8.314#The gas constant of given gas in kJ/kg.K\n",
      "r=1.67#The ratio of specific heats of the gas\n",
      "m=39.94#Molecular weight of a gas \n",
      "\n",
      "#calculations\n",
      "R=R1/m#The universal gas constant in kJ/kg.K\n",
      "Cp=(r*R)/(r-1)#The specific heat of air at constant pressure in kJ/kg.K\n",
      "T2ss=T00*(P2/P00)**((r-1)/r)#Isentropic stage temperature at the exit in K\n",
      "nts=(T00-T02)/(T00-T2ss)#Total-to-static efficiency of the turbine\n",
      "U1=(Cp*1000*(T00-T02))**(1/2)#The impeller tip speed in m/s\n",
      "D1=(U1*60)/(3.1415*N)#Rotor inlet diameter in m\n",
      "D2m=D1*D2mD1#Rotor exit mean diameter in m\n",
      "C1=(2*Cp*(T00-T1))**(1/2)#Absolute velocity at the entry in m/s\n",
      "T1s=T00*(P1/P00)**((r-1)/r)#Isentropic temperature at the entry in K\n",
      "Ln=(Cp*(T1-T1s))/((C1**2)/2)#Nozzle enthalpy loss coefficient\n",
      "C2=(2*Cp*1000*(T02-T2))**(1/2)#The temperature at the exit of turbine in K\n",
      "U2=(3.14*D2m*N)/(60)#Peripheral velocity of impeller at exit in m/s\n",
      "W2=((C2**2)+(U2**2))**(1/2)#Resultant relative velocity at the exit in m/s\n",
      "T2s=T1*(P2/P1)**((r-1)/r)#stage temperature at the exit in K\n",
      "Lr=(Cp*1000*(T2-T2s))/((W2**2)/2)#Rotor enthalpy loss coefficient\n",
      "ntt=1/((1/nts)-((C2**2)/(2*U1**2)))#Total-to-total efficiency\n",
      "\n",
      "#output\n",
      "print '(a)Total-to-static efficiency of the turbine is %0.1f %%\\n(b)\\n    (1)Rotor inlet diameter is %3.3f m\\n    (2)Rotor exit mean diameter is %3.3f m\\n(c)\\n    (1)Nozzle enthalpy loss coefficient is %3.4f\\n    (2)Rotor enthalpy loss coefficient is %3.4f\\n(d)Total-to-total efficiency is %0.2f %%'%(nts*100,D1,D2m,Ln,Lr,ntt*100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)Total-to-static efficiency of the turbine is 90.1 %\n",
        "(b)\n",
        "    (1)Rotor inlet diameter is 0.269 m\n",
        "    (2)Rotor exit mean diameter is 0.132 m\n",
        "(c)\n",
        "    (1)Nozzle enthalpy loss coefficient is 0.0625\n",
        "    (2)Rotor enthalpy loss coefficient is 0.2138\n",
        "(d)Total-to-total efficiency is 93.95 %\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}