diff options
Diffstat (limited to 'Applied_Thermodynamics')
21 files changed, 15183 insertions, 0 deletions
diff --git a/Applied_Thermodynamics/Chapter1.ipynb b/Applied_Thermodynamics/Chapter1.ipynb new file mode 100755 index 00000000..136a766b --- /dev/null +++ b/Applied_Thermodynamics/Chapter1.ipynb @@ -0,0 +1,1252 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3d30e44891eb37ef00ed656432995cc8c4288cfa1fdb5a14ded0356bbe856a8e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: Fundamental Concepts and Definitions" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "h = 30*10**-2 #Manometer deflection of Mercury(in m):\n", + "d = 13550 #Density of mercury(in kg/m**3)\n", + "g = 9.78 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculations:\n", + "P = d*g*h #Pressure difference(in Pa):\n", + "\n", + "#Results:\n", + "print \"Pressure Difference: \" ,round(P,2),\"Pa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure Difference: 39755.7 Pa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "#Variable Declaration: \n", + "d = 30*10**-2 #Diameter of the vessel(in m):\n", + "g = 9.78 #Accelertion due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "p = 76*(10**-2)*13550*g #Atmospheric pressure(in Pa):\n", + "a = (round(math.pi,2)*d**2)/4 #Area:\n", + "F = p*a #Effort required:\n", + "\n", + "#Results:\n", + "print \"Effort required: \",round(F,2),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effort required: 7115.48 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "h = 30*10**-2 #Difference in mercury column(in m):\n", + "pa = 101 #Atmospheric Pressure(in kPa):\n", + "g = 9.78 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "gp = 13550*g*h*10**-3 #Guage pressure(in kPa):\n", + "ap = gp+pa #Actual pressure:\n", + "\n", + "#Results:\n", + "print \"Actual pressure of air : \",round(ap,2),\" Kpa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual pressure of air : 140.76 Kpa\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "h = 1 #Depth of tank(in m):\n", + "s = 0.8 #Specific gravity:\n", + "d = 1000 #Density of water(in kg/m**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "dO = s*d #Density of oil(in kg/m3):\n", + "gp = dO*g*h*10**-3 #Gauge pressure(in kPa):\n", + "\n", + "#Results:\n", + "print \"Gauge pressure\",gp,\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gauge pressure 7.848 KPa\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "h = 76*10**-2 #Barometer Reading(in m):\n", + "d = 13.6*10**3 #Density of mercury(in kg/m**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "h1 = 40*10**-2 #Difference of heights in gas barometer(in m):\n", + "pg = (d*g*h1+d*g*h)*10**-3 #Pressure of gas(in kPa):\n", + "\n", + "#Results:\n", + "print \"Pressure of gas:\",round(pg,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure of gas: 154.76 kPa\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "m = 1 #Mass of water(in kg):\n", + "h = 1000 #Altitude(in m):\n", + "c = 4.18*10**3 #Specific heat of water(in J/kg-K):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "Q = m*g*h #Heat required for heating = Potential energy \n", + "dT = Q/c\n", + "\n", + "#Results\n", + "print \"The change in temperature: \",round(dT,2),\"\u00baC\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in temperature: 2.35 \u00baC\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "w = 100 #Weight of object at standard gravitational acceleration(in N):\n", + "g = 9.81 #Standard acceleration due to gravity(in m/s**2):\n", + "g1 = 8.5 #Gravitation acceleration at given location(in m/s**2):\n", + "\n", + "#Calculation:\n", + "m = w/g #Mass of object(in kg):\n", + "s = m*g1 #Spring balance reading(in N):\n", + "\n", + "#Results:\n", + "print \"The spring balance reading:\",round(s,2),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The spring balance reading: 86.65 N\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "#Variable Declaration: \n", + "dia = 15*10**-2 #Diameter of cylinder(in m):\n", + "h = 12*10**-2 #Manometer difference in Hg column(in m):\n", + "d = 13.6*10**3 #Density of mercury(in kg/m**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "w = h*d*g*math.pi*dia**2/4 #Weight of piston(in N): pressure*area\n", + "m = w/g #Mass of the piston(in kg):\n", + "\n", + "#Results:\n", + "print \"Mass of the piston:\",round(m,2),\"Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of the piston: 28.84 Kg\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Hab = 2*10**-2 #Height of water column in limb AB(in m):\n", + "Hcd = 10*10**-2 #Height of mercury column in limb CD(in m):\n", + "h = 76*10**-2 #Barometer reading for atmospheric pressure(in m):\n", + "dm = 13.6*10**3 #Density of mercury(in kg/m**3):\n", + "dw = 1000 #Density of water(in kg/m**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "Patm = dm*h*g*10**-3 #Atmospheric pressure(in kPa):\n", + "Pab = dw*Hab*g*10**-3 #Pressure of water in column AB(in kPa):\n", + "Pcd = dm*Hcd*g*10**-3 #Pressure of mercury in column CD(in kPa):\n", + "Ps = Patm+Pcd-Pab #Pressure of steam(in kPa):\n", + "\n", + "#Results:\n", + "print \"Pressure of steam:\",round(Ps,2),\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure of steam: 114.54 KPa\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Pa = 400 #Pressure in compartment A(in kPa):\n", + "Pb = 150 #Pressure in compartment B(in kPa):\n", + "h = 720*10**-3 #Reading of barometer(in m):\n", + "d = 13.6*10**3 #Density of mercury(in kg/m**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "Patm = d*g*h*10**-3 #Atmospheric pressure from barometer reading(in kPa):\n", + "PaA = Pa+Patm #Absolute pressure in compartment A(in kPa):\n", + "PaB = Pb+Patm #Absolute pressure in compartment B(in kPa):\n", + "\n", + "#Results:\n", + "print \"Absolute pressure in compartment A:\",round(PaA,2),\"KPa\"\n", + "print \"Absolute pressure in compartment B:\",round(PaB,2),\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure in compartment A: 496.06 KPa\n", + "Absolute pressure in compartment B: 246.06 KPa\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Patm = 90 #Atmospheric pressure(in kPa):\n", + "dw = 1000 #Density of water(in kg/m**3):\n", + "doil = 850 #Density of oil(in kg/m**3):\n", + "dm = 13600 #Density of mercury(in kg/m**3):\n", + "h1 = 0.15 #Height of water column(in m):\n", + "h2 = 0.25 #Height of oil column(in m):\n", + "h3 = 0.40 #Height of mercury column(in m):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "Pw = dw*g*h1*10**-3 #Pressure due to water column at reference line(in kPa):\n", + "Po = doil*g*h2*10**-3 #Pressure due to oil column at reference line(in kPa):\n", + "Pm = dm*g*h3*10**-3 #Pressure due to mercury column at reference line(in kPa):\n", + "Pa = Patm+Pm-Pw-Po #Pressure due to air(in kPa):\n", + "\n", + "#Results:\n", + "print \"Air pressure:\" ,round(Pa,2),\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air pressure: 139.81 KPa\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "v = 750.0 #Velocity of the object(in m/s):\n", + "F = 4000.0 #Gravitational force acting on the body(in N):\n", + "g = 8.0 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "m = F/g #Mass of the object(in kg):\n", + "KE = (m*v**2)/2 #Kinetic energy of the body(in J):\n", + "\n", + "#Results:\n", + "print \"Kinetic energy:\",round(KE/10**8,1),\"x 10^8 J\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Kinetic energy: 1.4 x 10^8 J\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Cp = 2.286 #Specific heat at constant pressure(in kJ/kg-K):\n", + "Cv = 1.768 #Specific heat at constant volume(in kJ/kg-K):\n", + "Ru = 8.314 #Universal gas constant(in kJ/kg-K):\n", + "\n", + "#Calculation:\n", + "R = Cp-Cv #Gas constant(in kJ/kg-K):\n", + "m = Ru/R #Molecular weight of gas(in kg/K mol):\n", + "\n", + "#Results:\n", + "print \"Molecular weight of gas:\" ,round(m,2),\"Kg/K mol\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Molecular weight of gas: 16.05 Kg/K mol\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p1 = 750*10**3 #Initial pressure(in Pa):\n", + "t1 = 600 #Initial temperature(in K):\n", + "v1 = 0.2 #Initial volume(in m**3):\n", + "p2 = 2*10**5 #Final pressure(in Pa):\n", + "v2 = 0.5 #Final volume(in m**3):\n", + "\n", + "#Calculation:\n", + "t2 = p2*v2*t1/(p1*v1) #Final temperature(in K):\n", + "\n", + "#Results:\n", + "print \"Final temperature:\",t2,\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final temperature: 400.0 K\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p1 = 100 #Initial pressure(in kPa):\n", + "t1 = 300 #Initial temperature(in K):\n", + "v1 = 5 #Initial volume(in m**3):\n", + "p2 = 50 #Final pressure(in kPa):\n", + "t2 = 280 #Final temperature(in K):\n", + "v2 = 5 #Final volume(in m**3):\n", + "R = 287.0 #Gas constant for air(in J/kg-K):\n", + "\n", + "#Calculation:\n", + "m1 = p1*v1/(R*t1)*10**3 #Initial mass(in kg):\n", + "m2 = p2*v2/(R*t2)*10**3 #Final mass(in kg):\n", + "dm = m1-m2 #Mass removed(in kg):\n", + "V = dm*R*t1/p1/1000 #Volume of this mass of air at initial states(in m**3):\n", + "\n", + "#Results:\n", + "print \"Mass of air removed: \",round(dm,3),\"Kg\"\n", + "print \"Volume of air at initial states: \",round(V,2),\"m^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of air removed: 2.696 Kg\n", + "Volume of air at initial states: 2.32 m^3\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "#Variable Declaration: \n", + "d = 1 #Diameter of the vessel(in m):\n", + "h = 4 #Height of the vessel(in m):\n", + "p1 = 100 #Initial pressure(in kPa):\n", + "t1 = 300 #Initial temperature(in K):\n", + "p2 = 125 #Final pressure(in kPa):\n", + "Cp = 14.307 #Cp of hydrogen(in kJ/kg-K):\n", + "Cv = 10.183 #Cv of volume(in kJ/kg-K):\n", + "\n", + "#Calculation:\n", + "v = math.pi*d**2*h/4 #Volume of the vessel(in m**3):\n", + "t2 = p2*t1/p1 #Final temperature(in K):\n", + "R = Cp-Cv #Gas constant for hydrogen:\n", + "m = round(p1*v/(R*t1),3) #Mass of hydrogen(in kg):\n", + "Q = m*Cv*(t2-t1) #Heat supplied at const. volume(in kJ):\n", + "\n", + "#Results:\n", + "print \"Heat to be supplied: \",round(Q,2),\"KJ\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat to be supplied: 193.99 KJ\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "v = 2+2 #Total volume(in m**3):\n", + "m1 = 20 #Mass of air in container 1(in kg):\n", + "m2 = 4 #Mass of air in container 2(in kg):\n", + "t = 300 #Temperature of the system(in K):\n", + "R = 287 #Gas constant for air(in J/kg-K):\n", + "\n", + "#Calculation:\n", + "m = m1+m2 #Total mass after the valve is opened(in kg):\n", + "p = m*R*t/v*10**-3 #Final pressure(in kPa):\n", + "\n", + "#Results:\n", + "print \"Final pressure: \" ,p,\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final pressure: 516.6 KPa\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "m = 5 #Mass of gas(in kg):\n", + "v = 2 #Volume of the container(in m**3):\n", + "t = 300 #Temperature in the container(in K):\n", + "R = 8.314 #Universal gas constant(in kJ/kg-K):\n", + "a = 3628.5*10**2 #Vander-Waals Constant(from table):\n", + "b = 3.14*10**-2 #Vander-Waals Constant(from table):\n", + "mw = 44.01 #Molecular weight of CO2:\n", + "\n", + "#Calculation:\n", + "Rp = R*10**3/mw #Gas constant for CO2(in j/kg-K):#Considering it as a perfect gas\n", + "pp = m*Rp*t/v #Pressure of the gas(in N/m**2):\n", + "v1 = v*mw/m #Molar specific volume(in m**3/kg.mol): #Considering it as a real gas:\n", + "pr = R*10**3*t/(v1-b)-a/(v1**2)\t#Vanderwall eqn:\n", + "\n", + "#Results:\n", + "print \"Pressure if considered perfect gas: \" ,round(pp/10**5,3),\"x 10^5 N/m^2\"\n", + "print \"Pressure if considered real gas: \",round(pr/10**5,3),\"x 10^5 N/m^2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure if considered perfect gas: 1.417 x 10^5 N/m^2\n", + "Pressure if considered real gas: 1.408 x 10^5 N/m^2\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p = 17672 #Pressure of steam(in kPa):\n", + "t = 712 #Temperature of steam(in K):\n", + "Pc = 22.09*10**3 #Critical pressure(in kPa):\n", + "Tc = 647.3 #Critical temperature(in K):\n", + "Rs = 0.4615 #Gas constant for steam(in kJ/kg-K):\n", + "\n", + "#Calculation:\n", + "vp = Rs*t/p #Specific volume(in m**3/kg) Considering perfect gas:\n", + "Rp = p/Pc #Reduced pressure: Considering real gas:\n", + "Rt = t/Tc #Reduced temperature:\n", + "Z = 0.785 #Value of compressibility factor(from chart for Rp & Rt):\n", + "vr = Z*vp #Specific volume(in m**3/kg):\n", + "\n", + "#Results:\n", + "print \"Specific volume considering perfect gas: \",round(vp,4),\"m**3/kg\"\n", + "print \"Specific volume considering real gas: \",round(vr,4),\"m**3/Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume considering perfect gas: 0.0186 m**3/kg\n", + "Specific volume considering real gas: 0.0146 m**3/Kg\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page no. 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math\n", + "\n", + "#Variable Declaration: \n", + "d = 5.0 #Diameter of the balloon(in m):\n", + "p = 1.013*10**5 #Atmospheric pressure(in N/m**2):\n", + "t = 17+273 #Temperature of the surroundings(in K):\n", + "R = 8.314*10**3 #Universal gas constant(in J/kg-K):\n", + "mw = 2 #Molecular weight of hydrogen:\n", + "Ra = 287 #Gas constant for air(in J/kg-K):\n", + "th = 273+27 #Temperature of Hydrogen (in K):\n", + "\n", + "#Calculation:\n", + "v = round(4.0/3.0*math.pi*(d/2)**3,2) #Volume of the balloon(in m**3):\n", + "Rh = R/mw #Gas constant for H2(in kJ/kg-K):\n", + "mh = p*v/(Rh*th) #Mass of H2 in balloon(in kg):\n", + "vd = v #Volume of air printlaced(in m**3):\n", + "ma = round(p*vd/(Ra*t),2) #Mass of air printlaced(in kg):\n", + "L = ma-mh #Load lifting capacity due to buoyant force(in kg):\n", + "\n", + "#Results:\n", + "print \"Load lifting capacity: \",round(L,3),\"Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load lifting capacity: 74.344 Kg\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page no. 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math as m\n", + "#Variable Declaration: \n", + "v = 20 #Volume of vessel(in m**3):\n", + "q = 0.25 #Rate at which air is drawn(in m**3/min):\n", + "Pr = 4 #Initial pressure/final pressure (ratio):\n", + "\n", + "#Calculation:\n", + "t = v/q*m.log(Pr) #Time required(in min):\n", + "\n", + "#Results:\n", + "print \"Time required: \",round(t,1),\"Minutes\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time required: 110.9 Minutes\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22, page no. 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "M = 5.0 #Total mass of system of gas(in kg):\n", + "n = 0.80 #Compostion of Nitrogen:\n", + "o = 0.18 #Compostion of Oxygen:\n", + "c = 0.02 #Composition of Carbon dioxide:\n", + "ro = 1.4 #Compression ratio for Oxygen:\n", + "rn = 1.4 #Compression ratio for Nitrogen:\n", + "rc = 1.3 #Compression ratio for Carbon dioxide:\n", + "R = 8314.0 #Universal gas constant(in J/kg-K):\n", + "mwn = 28.0 #Molecular weight of Nitrogen:\n", + "mwo = 32.0 #Molecular weight of Oxygen:\n", + "mwc = 44.0 #Molecular weight of Carbon dioxide:\n", + "\n", + "#Calculation:\n", + "Rn = round(R/mwn,1) #Gas constant for Nitrogen(in J/kg-K):\n", + "Ro = round(R/mwo,1) #Gas constant for Oxygen(in J/kg-K):\n", + "Rc = round(R/mwc,1) #Gas constant for Carbon dioxide(in J/kg-K):\n", + "Rm = round(n*Rn+o*Ro+c*Rc,2) #Gas constant for mixture(in J/kg-K):\n", + "Cpn = round((rn/(rn-1))*Rn,3) #Specific heat at constant pressure for Nitrogen(in kJ/kg-K):\n", + "Cpo = round((ro/(ro-1))*Ro,3) #Specific heat at constant pressure for Oxygen(in kJ/kg-K):\n", + "Cpc = round(rc/(rc-1)*Rc,3) #Specific heat at constant pressure for Carbon dioxide(in kJ/kg-K):\n", + "Cpm = round(n*Cpn+o*Cpo+c*Cpc,3) #Specific heat at constant pressure for the mixture(in kJ/kg-K):\n", + "nn = n*M/mwn #Number of moles of Nitrogen:\n", + "no = o*M/mwo #Number of moles of Oxygen:\n", + "nc = c*M/mwc #Number of moles of Carbon dioxide:\n", + "nt = nn+no+nc #Total number of moles:\n", + "xn = nn/nt #Mole fraction of Nitrogen:\n", + "xo = no/nt #Mole fraction of Oxygen:\n", + "xc = nc/nt #Mole fraction of Carbon dioxide:\n", + "mwm = xn*mwn+xo*mwo+xc*mwc #Molecular weight of the mixture\n", + "\n", + "#Results:\n", + "print \"Gas constant for Nitrogen: \",round(Rn,1),\"J/Kg-K\"\n", + "print \"Gas constant for Oxygen: \",round(Ro,1),\"J/Kg-K\"\n", + "print \"Gas constant for Carbon Diaoxide: \",round(Rc,1),\"J/Kg-K\"\n", + "print \"Gas constant for Mixture: \",round(Rm,2),\"J/Kg-K\"\n", + "print \"Specific heat at constant pressure for Nitrogen: \",round(Cpn/10**3,3),\"kJ/kg-K\"\n", + "print \"Specific heat at constant pressure for Oxygen: \",round(Cpo/10**3,3),\"kJ/kg-K\"\n", + "print \"Specific heat at constant pressure for Carbon Diaoxide: \",round(Cpc/10**3,3),\"kJ/kg-K\"\n", + "print \"Specific heat at constant pressure for Mixture: \",round(Cpm/10**3,3),\"kJ/kg-K\"\n", + "print \"The molecular weight of the mixture: \" ,round(mwm,2),\"Kg/Kmol\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gas constant for Nitrogen: 296.9 J/Kg-K\n", + "Gas constant for Oxygen: 259.8 J/Kg-K\n", + "Gas constant for Carbon Diaoxide: 189.0 J/Kg-K\n", + "Gas constant for Mixture: 288.06 J/Kg-K\n", + "Specific heat at constant pressure for Nitrogen: 1.039 kJ/kg-K\n", + "Specific heat at constant pressure for Oxygen: 0.909 kJ/kg-K\n", + "Specific heat at constant pressure for Carbon Diaoxide: 0.819 kJ/kg-K\n", + "Specific heat at constant pressure for Mixture: 1.011 kJ/kg-K\n", + "The molecular weight of the mixture: 28.86 Kg/Kmol\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23, page no. 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "o = 0.18 #Composition of Oxygen:\n", + "n = 0.75 #Composition of Nitrogen:\n", + "c = 0.07 #Composition of Carbon dioxide:\n", + "p = 0.5 #Pressure of mixture(in MPa):\n", + "t = 107+273 #Temperature of the mixture(in K):\n", + "m = 5 #Total mass of the mixture(in kg):\n", + "mwn = 28 #Molecular weight of Nitrogen:\n", + "mwo = 32 #Molecular weight of Oxygen:\n", + "mwc = 44 #Molecular weight of Carbon dioxide:\n", + "v = 1 #Total values of mixture(assume):\n", + "\n", + "#Calculation:\n", + "xvo = o/v #Mole fraction of Oxygen(by volume):\n", + "xvn = n/v #Mole fraction of Nitrogen(by volume):\n", + "xvc = c/v#Mole fraction of Carbon dioxide(by volume):\n", + "mwm = o*mwo+n*mwn+c*mwc #Molecular weight of the mixture(in kg/kmol):\n", + "xmn = n*mwn/mwm#Mole fraction of Nitrogen(by mass):\n", + "xmo = o*mwo/mwm#Mole fraction of Oxygen(by mass):\n", + "xmc = c*mwc/mwm#Mole fraction of Carbon dioxide(by mass):\n", + "po = o*p#Partial pressure of Oxygen:\n", + "pn = n*p#Partial pressure of Nitrogen:\n", + "pc = c*p#Partial pressure of Carbon dioxide:\n", + "\n", + "#Results:\n", + "print \"Mole fraction of Oxygen by mass: \",round(xmo,3)\n", + "print \"Mole fraction of Nitrogen by mass: \",round(xmn,3)\n", + "print \"Mole fraction of Carbon dioxide by mass: \",round(xmc,3)\n", + "print \"Partial pressure of Oxygen: \",round(po,2),\"MPa\"\n", + "print \"Partial pressure of Nitrogen: \",round(pn,3),\"MPa\"\n", + "print \"Partial pressure of Carbon dioxide: \",round(pc,3),\"MPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mole fraction of Oxygen by mass: 0.193\n", + "Mole fraction of Nitrogen by mass: 0.704\n", + "Mole fraction of Carbon dioxide by mass: 0.103\n", + "Partial pressure of Oxygen: 0.09 MPa\n", + "Partial pressure of Nitrogen: 0.375 MPa\n", + "Partial pressure of Carbon dioxide: 0.035 MPa\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24, page no. 34" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "V = 3.0 #Volume of gas in 1 chamber(in m**3):\n", + "pn = 800.0 #Partial pressure of Nitrogen(in kPa):\n", + "pc = 400.0 #Partial pressure of Carbon dioxide(in kPa):\n", + "tn = 480.0 #Temperature of Nitrogen(in K):\n", + "tc = 390.0 #Temperature of Carbon dioxide(in K):\n", + "rn = 1.4 #Compression ratio for Nitrogen:\n", + "rc = 1.3 #Compression ratio for Carbon dioxide:\n", + "R = 8314.0 #Universal gas constant(in J/kg-K):\n", + "mwn = 28.0 #Molecular weight of Nitrogen:\n", + "mwc = 44.0 #Molecular weight of Carbon dioxide:\n", + "\n", + "#Calculation:\n", + "nn = pn*V/(R*tn) #Moles of Nitrogen:\n", + "nc = pc*V/(R*tc) #Moles of Carbon dioxide:\n", + "nt = round(nn+nc,6) #Total no of moles:\n", + "cvn = (R/mwn)/(rn-1) #Specific heat for Nitrogen at constant volume(in J/kg-K):\n", + "cvc = (R/mwc)/(rc-1) #Specific heat for Carbon dioxide at constant volume(in J/kg-K):\n", + "mn = nn*mwn #Mass of Nitrogen(in kg):\n", + "mc = nc*mwc #Mass of Carbon dioxide(in kg):\n", + "t = (mn*cvn*tn+mc*cvc*tc)/(mn*cvn+mc*cvc) #Equilibrium temperature of the mixture(in K):\n", + "p = nt*R*round(t,1)/(V+V) #Equilibrium pressure of the mixture(kPa):\n", + "\n", + "#Results:\n", + "print \"Equilibrium temperature: \",round(t,1),\"K\"\n", + "print \"Equilibrium pressure: \",round(p,3),\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equilibrium temperature: 439.4 K\n", + "Equilibrium pressure: 591.205 KPa\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25, page no. 35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable Declaration: \n", + "mh = 2 #Mass of hydrogen taken(in kg):\n", + "mhe = 3 #Mass of helium taken(in kg):\n", + "Ch = 11.23 #Specific heat at constant pressure for hydrogen(in kJ/kg-K):\n", + "Che = 5.193 #Specific heat at constant pressure for helium(in kJ/kg-K):\n", + "\n", + "#Calculation:\n", + "mt = mh+mhe #Total mass of the mixture(in kg):\n", + "Cm = (Ch*mh+Che*mhe)/mt #Specific heat at constant pressure for the mixture(in kJ/kg-K):\n", + "\n", + "#Results:\n", + "print \"Specific heat at constant pressure for the mixture: \",round(Cm,3),\"KJ/Kg-K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific heat at constant pressure for the mixture: 7.608 KJ/Kg-K\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 26, page no. 36" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "mh = 18 #Mass of Hydrogen(in kg):\n", + "mn = 10 #Mass of Nitrogen(in kg):\n", + "mc = 2 #Mass of Carbon dioxide(in kg):\n", + "t1 = 27+273.15 #Initial temperature(in K):\n", + "t2 = 2*t1 #Final temperature(in K):\n", + "R = 8.314 #Universal gas constant(in kJ/kg-K):\n", + "mwh = 2 #Molecular weight of Hydrogen:\n", + "mwn = 28 #Molecular weight of Nitrogen:\n", + "mwc = 44 #Molecular weight of Carbon dioxide:\n", + "p1 = 101.325 #Initial pressure of the gases(in kPa)\n", + "\n", + "#Calculation:\n", + "Rh = R/mwh #Gas constant for Hydrogen(in kJ/kg-K):\n", + "Rn = R/mwn #Gas constant for Nitrogen(in kJ/kg-K):\n", + "Rc = R/mwc #Gas constant for Carbon dioxide(in kJ/kg-K):\n", + "Rm = (mh*Rh+mn*Rn+mc*Rc)/(mh+mn+mc) #Gas constant for the mixture(in kJ/kg-K):\n", + "V = (mh+mn+mc)*Rm*t1/p1 #Capacity of the vessel(in m**3):\n", + "p2 = p1*t2/t1 #Final pressure of the mixture(in kPa):\n", + "\n", + "#Results:\n", + "print \"Volume of the vessel: \",round(V,2),\"m**3\"\n", + "print \"Final pressure of the mixture\",round(p2,2),\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume of the vessel: 231.57 m**3\n", + "Final pressure of the mixture 202.65 KPa\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 27, page no. 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math as m\n", + "#Variable Declaration: \n", + "t1 = 27+273.15 #Temperature of entering air(in K):\n", + "t2 = 500 #Temperature to which it gets heated up to(in K):\n", + "\n", + "#Calculation:\n", + "R = m.sqrt(t2/t1) #Ratio of exit to inlet diameter:\n", + "\n", + "#Results:\n", + "print \"Ratio of exit to inlet diameter: \",round(R,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of exit to inlet diameter: 1.29\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 28, page no. 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "v = 2.0 #Volume of vessel(in m**3):\n", + "R = 8.314 #Univeresal gas constant(in kJ/kg-K):\n", + "mwh = 2.0 #Molecular weight of hydrogen:\n", + "\n", + "#Calculation:\n", + "p1 = 76/76*101.325 #Atmospheric pressure(in kPa):\n", + "t1 = 27+273.15 #Temperature of gas(in K):\n", + "t2 = t1\n", + "dp = 70.0/76*101.325 #Pressure difference(in kPa):\n", + "t3 = 10+273.15 #Temperature after cooling(in case 2)(in K):\n", + "Rh = R/mwh #Gas constant of hydrogen(in kJ/kg-K): #Case 1:\n", + "p2 = p1-dp #Final pressure of hydrogen(in kPa):\n", + "m = (p1-p2)*v/(Rh*t1) #Mass pumped out(in kg):\n", + "p3 = (t3/t2)*p2 #Pressure after cooling(in kPa): #Case 2:(temperature reduces till 10 degrees isochorically)\n", + "\n", + "#Results:\n", + "print \"Mass pumped out: \",round(m,2),\"Kg\"\n", + "print \"Final pressure fter cooling: \",round(p3,3),\"KPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass pumped out: 0.15 Kg\n", + "Final pressure fter cooling: 7.546 KPa\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter11.ipynb b/Applied_Thermodynamics/Chapter11.ipynb new file mode 100755 index 00000000..57bf66e3 --- /dev/null +++ b/Applied_Thermodynamics/Chapter11.ipynb @@ -0,0 +1,918 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6a2922d727738ae70604bae46fb35f03608e71a4b1a12c93dd485fb1323281a2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11: Boilers and Boiler Calculations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 481" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "H = 30 #Height of chimney(in m):\n", + "Ta = 27+273 #Ambient air temperature(in K):\n", + "m = 20 #Mass per kg of fuel required for complete combustion(in kg):\n", + "hw = 12 #Height in the water column(in mm):\n", + "\n", + "#Calculations:\n", + "Tg = (Ta*353*H)/(353*H-hw*Ta)*(m)/(m+1)#Temperature of burnt gases(in K):\n", + "\n", + "#Results:\n", + "print \"Temperature of the burnt gases: \",round(Tg,2),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the burnt gases: 432.86 K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 18 #Mass per kg of fuel required for complete combustion(in kg):\n", + "hw = 20 #Height in the water column(in mm):\n", + "Ta = 27+273 #Ambient air temperature(in K):\n", + "Tg = 300+273 #Temperature of burnt gases(in K):\n", + "\n", + "#Calculations:\n", + "H = hw/(353*(1/Ta-(m+1)/(m*Tg)))#Height of chimney(in m):\n", + "\n", + "#Results:\n", + "print \"Height of chimney: \",round(H,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of chimney: 37.99 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "H = 20 #Height of chimney(in m):\n", + "Tg = 380+273 #Temperature of burnt gases(in K):\n", + "Ta = 27+273 #Ambient air temperature(in K):\n", + "\n", + "#Calculations:\n", + "m = 2*Ta/(Tg-2*Ta) #Air supplied(in kg air per fuel):\n", + "\n", + "#Results:\n", + "print \"Air supplied:\",round(m,2),\"kg/kg of fuel\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air supplied: 11.32 kg/kg of fuel\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 482" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "H = 60 #Height of chimney(in m):\n", + "Ta = 17+273 #Ambient air temperature(in K):\n", + "Tg = 300+273 #Temperature of burnt gases(in K):\n", + "Tga = 150+273 #Temperature of the artificial burnt gases(in K):\n", + "m = 19 #Mass per kg of fuel required for complete combustion(in kg):\n", + "Cpg = 1.0032 #Specific heat of hot gases(in kJ/kg.K):\n", + "c = 32604 #Calorific value of burnt fuel(in kJ/kg):\n", + "\n", + "#Calculations:\n", + "hw = 353*H*(1/Ta-(m+1)/(m*Tg)) #Draught (in mm of water column):\n", + "n = 9.81*H*(m/(m+1)*Tg/Ta-1)/(Cpg*(Tg-Tga)*10**3)*100 #Chimney efficiency:\n", + "Q = (m+1)*Cpg*(Tg-Tga) #Extra heat carried away by flue gases(in kJ):\n", + "\n", + "#Results:\n", + "print \"Draught: \",round(hw,2),\" mm of water\"\n", + "print \"Chimney efficiency\",round(n,4),\"%\"\n", + "print \"Extra heat carried away by flue gases per kg of fuel burnt\",round(Q,1),\" kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Draught: 34.13 mm of water\n", + "Chimney efficiency 0.3431 %\n", + "Extra heat carried away by flue gases per kg of fuel burnt 3009.6 kJ\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 483" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "H = 80 #Height of chimney(in m):\n", + "Ta = 27+273 #Ambient air temperature(in K):\n", + "m = 20 #Mass per kg of fuel required for complete combustion(in kg):\n", + "Tga = 110+273 #Temperature of the artificial burnt gases(in K):\n", + "Cpg = 1.0032 #Specific heat of hot gases(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "Tg = Ta*2*(m+1)/m #Temperature of burnt gases(in K):\n", + "hw = 353*H*(1/Ta-(m+1)/(m*Tg)) #Draught in water column(in mm):\n", + "n = 9.81*H*(m/(m+1)*Tg/Ta-1)/(Cpg*(Tg-Tga)*10**3)*100 #Chimney efficiency:\n", + "\n", + "#Results:\n", + "print \"Hot gas temperature in chimney: \",round(Tg),\"K\"\n", + "print \"Natural draught: \",round(hw,2),\"mm of water\"\n", + "print \"Chimney efficiency: \",round(n,4),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hot gas temperature in chimney: 630.0 K\n", + "Natural draught: 47.07 mm of water\n", + "Chimney efficiency: 0.3167 %\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 484" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration: \n", + "R = 2.5*10**3 #Rate at which coal is burnt(in kg/hr):\n", + "m = 20 #Mass per kg of fuel required for complete combustion(in kg):\n", + "Tg = 327+273 #Temperature of burnt gases(in K):\n", + "Ta = 27+273 #Ambient air temperature(in K):\n", + "h = 7+6+3+2 #Pressure head(in mm):\n", + "na = 0.90 #Ratio of actual natural draught to theoretical draught:\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculations:\n", + "hw = h/na #Actual natural draught(in mm of water):\n", + "H = hw/(353*(1/Ta-(m+1)/(m*Tg))) #Height of chimney(in m):\n", + "dg = 353/Tg*(m+1)/m #Density of hot gases(in kg/m**3):\n", + "hg = H*((m+1)/m*Tg/Ta-1) #Height of hot gases column(in m):\n", + "Mg = R*hw/3600 #Mass flow rate of hot gases(in kg/s):\n", + "C = sqrt(2*g*hg) #Velocity of got gases(in m/s):\n", + "D = sqrt((4*Mg)/(pi*C*dg)) #Diameter of chimney(in m):\n", + "\n", + "#Results:\n", + "print \"Height of chimney:\",round(H,2),\"m\"\n", + "print \"Diameter of chimney:\",round(D,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of chimney: 35.78 m\n", + "Diameter of chimney: 1.01 m\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 485" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "hw = 50 #Draught in water column(in mm):\n", + "T = 300+273 #Temperature of burnt gases(in K):\n", + "m = 19 #Mass per kg of fuel required for complete combustion(in kg):\n", + "T1 = 27+273 #Ambient air temperature(in K):\n", + "T0 = 273 #Zero temperature(in K):\n", + "n = 0.90 #Mechanical efficiency:\n", + "d = 1.293 #Density of hot gases(in kg/m**3):\n", + "\n", + "#Calculations:\n", + "M = 2000/3600 #Rate at which coal is burnt(in kg/s):\n", + "P = hw*9.81 #Pressure applied by the draught water(in N/m**2):\n", + "PFD = P*m*M*T1/(d*T0*n*1000) #Power required in FD fan(kW):\n", + "P1D = P*m*M*T/(d*T0*n*1000) #Power required in 1D fan(kW):\n", + "\n", + "#Results:\n", + "print \"Power for FD fan:\",round(PFD,2),\"kW\"\n", + "print \"Power for 1D fan:\",round(P1D,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power for FD fan: 4.89 kW\n", + "Power for 1D fan: 9.34 kW\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "Cpg = 1.0032 #Specific heat of hot gases(in kJ/kg.K):\n", + "Tg = 177+273 #Temperature of burnt gases(in K):\n", + "Ta = 27+273 #Ambient air temperature(in K):\n", + "Tn = 327+273 #Natural draught temperature(in K):\n", + "mn = 25 #Mass per kg of fuel required for natural draught(in kg):\n", + "ma = 20 #Mass per kg of fuel required for artificial draught(in kg):\n", + "r = Tg/Ta #Ratio of brake power for induced draught to forced draught:\n", + "\n", + "#Calculations:\n", + "Qgad = (ma+1)*Cpg*(Tg-Ta) #Heat carried by hot flue gases in artificial draught(in per kg of fuel burnt):\n", + "Qgnd = (mn+1)*Cpg*(Tn-Ta) #Heat carried by hot flue gases in natural draught(in per kg of fuel burnt):\n", + "rh = Qgad/Qgnd #Ratio of heat carried away:\n", + "\n", + "#Results:\n", + "print \"Ratio of power required: \",round(r,1)\n", + "print \"Ratio of heat carried away: \",round(rh,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of power required: 1.5\n", + "Ratio of heat carried away: 0.404\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 486" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "T = 27+273 #Feed water supply temperature(in K):\n", + "P = 10 #Mean steam generation pressure(in bar):\n", + "x = 0.95 #Dryness fravtion of steam generated:\n", + "Q = 2500 #Feed water supplied(in kg/hr):\n", + "Q1 = 275 #Coal burnt(in kg/hr):\n", + "d = 300 #Difference in mass of water after trial:\n", + "hf = 762.81 #kJ/kg #From steam tables:\n", + "hg = 2778.1 #kJ/kg\n", + "hfg = 2015.29 #kJ/kg\n", + "\n", + "#Calculations:\n", + "h = hf+x*hfg #Enthalpy of steam generated(in kJ/kg):\n", + "mw = Q+d #Mass of water evaporator per hour(in kg/hr):\n", + "Ae = mw/Q1 #Actual evaporation(in per kg of coal):\n", + "Ee = Ae*h/2257 #Equivalent evaporation(in kg per kg of coal):\n", + "\n", + "#Results:\n", + "print \"Actual evaporation: \",round(Ae,2),\" kg per kg of coal\"\n", + "print \"Equivalent evaporation: \",round(Ee,2),\"kg per kg of coal\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual evaporation: 10.18 kg per kg of coal\n", + "Equivalent evaporation: 12.08 kg per kg of coal\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 487" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "p = 10 #Average pressure of the steam(in bar):\n", + "Ww = 15 #Weight of water consumed(in ton):\n", + "Wc = 1.5 #Weight of coal produced(in ton):\n", + "n = 1-0.03-0.04 #Percentage coal that caan be burnt:\n", + "nm = 0.03 #Composition of moisture in coal:\n", + "Tf = 35 #Temperature of feed water(in C):\n", + "hg = 2778.1 #From steam tables(kJ/kg) \n", + "\n", + "#Calculations:\n", + "h = hg-4.18*Tf #Enthalpy of steam generated(in kJ/kg):\n", + "m = Ww/Wc #Steam generated per kg of coal(in kg):\n", + "nb = m*h/(30.1*10**3)*100 #Boiler efficiency:\n", + "Ee = m*h/(2257*(1-nm)) #Equivalent evaporation per kg of dry coal(in kg:\n", + "Eea = Ee*(1-nm)/n #Equivalent evaporation per kg of combustible present in coal(in kg):\n", + "\n", + "#Results:\n", + "print \"Boiler efficiency: \",round(nb,2),\"%\"\n", + "print \"Equivalent evaporation per kg of dry coal: \",round(Ee,2),\"kg\"\n", + "print \"Equivalent evaporation per kg of combustible present in coal: \",round(Eea,2),\"kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Boiler efficiency: 87.44 %\n", + "Equivalent evaporation per kg of dry coal: 12.02 kg\n", + "Equivalent evaporation per kg of combustible present in coal: 12.54 kg\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 488" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "t = 24 #Time of trial(in hrs):\n", + "p = 16 #Pressure at which steam is generated(in bar):\n", + "c = 10000 #Coal consumed(in kg):\n", + "r = 2500 #Rate of steam generation(in kg/hr):\n", + "Tf = 27 #Feed water temperature(in C):\n", + "hsa = 3000 #Total heating surface area(in m**2):\n", + "ga = 4 #Total grate area(in m**2):\n", + "C = 28000 #Calorific value of coal(in kJ/kg):\n", + "hg = 2794 #From steam tables(kJ/kg)\n", + "L = 2257 #Latent heat at 100 C:\n", + "\n", + "#Calculations:\n", + "m = c/t #Coal burnt per hour(in kg/hr):\n", + "mg = m/ga #Coal burnt per m**2 of grate per hour:\n", + "r1 = r/m #Rate of steam generated per kg of coal(in kg steam/kg coal):\n", + "Q = r1*(hg-4.18*Tf) #Heat added to steam per kg of coal(in kJ):\n", + "Ee = Q/L #Equivalent evaporation from and at 100 C per kg of coal(in kg):\n", + "Eepm = Ee*m/hsa #Equivalent evaporation from and at 100 C per m**2 of total surface per hour(in kg):\n", + "n = Ee*L/C*100 #Boiler efficiency:\n", + "\n", + "#Results:\n", + "print \"Mass of coal burnt per m**2 of grate per hour: \",round(mg,2),\"kg\"\n", + "print \"Equivalent evaporation from and at 100 C per kg of coal: \",round(Ee,2),\"kg\"\n", + "print \"Equivalent evaporation from and at 100 C per m**2 of total surface per hour: \",round(Eepm,2),\"kg\"\n", + "print \"Boiler efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of coal burnt per m**2 of grate per hour: 104.17 kg\n", + "Equivalent evaporation from and at 100 C per kg of coal: 7.13 kg\n", + "Equivalent evaporation from and at 100 C per m**2 of total surface per hour: 0.99 kg\n", + "Boiler efficiency: 57.45 %\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p = 30 #Pressure at which steam is generated(in bar):\n", + "Ts = 300 #Temperature of steam(in C):\n", + "r = 11 #Rate at which feed water enters(in kg/s):\n", + "T1 = 100 #Temperature at which feed water enters the economiser(in C):\n", + "m = 5000 #Mass of fuel used(in kg):\n", + "C = 35000 #Calorific value of fuel(in kJ/kg.K):\n", + "T = 27 #Temperature of feed water(in C):\n", + "hg = 2993.5 #From steam tables:\n", + "L = 2257 #Latent heat at 100 C:\n", + "\n", + "#Calculations:\n", + "ms = r*3600/m #Mass of steam genrated per kg of fuel(in kg/kg fuel):\n", + "Q = hg-4.18*T #Heat added per kg of fuel(in kJ):\n", + "Ee = ms*Q/L #Equivalent evaporation from and at 100 C per kg of coal(in kg):\n", + "n = Ee*L/C*100 #Boiler efficiency:\n", + "Q1 = ms*4.18*(T1-T) #Heat utilised in economiser per kg of fuel(in kJ):\n", + "P = Q1/C*100 #Percentage of energy utilised in economiser:\n", + "\n", + "#Results:\n", + "print \"Equivalent evaporation per kg of fuel: \",round(Ee,2),\"kg\"\n", + "print \"Boiler efficiency: \",round(n,2),\"%\"\n", + "print \"Percentage of energy utilised in economiser: \",round(P,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Equivalent evaporation per kg of fuel: 10.11 kg\n", + "Boiler efficiency: 65.18 %\n", + "Percentage of energy utilised in economiser: 6.9 %\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 489" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 8 #Mass of steam genrated per kg of fuel:\n", + "Ts = 400 #Temperature of steam(in C):\n", + "p = 30 #Pressure of feed water(in bar):\n", + "T = 40 #Temperature of feed water(in C):\n", + "T1 = 150 #Temperature at which feed water leaves the economiser(in C):\n", + "x = 0.98 #Dryness fraction:\n", + "C = 29000 #Calorific value(in kJ/kg.K):\n", + "h = 3230.9 #Enthalpy of steam generated(in kJ/kg): #From steam tables:\n", + "hf = 1008.42 #kJ/kg\n", + "hfg = 1795.78 #kJ/kg\n", + "\n", + "#Calculations:\n", + "Q = h-4.18*T #Heat to be added(in kJ):\n", + "n = m*Q/C*100 #Boiler efficiency:\n", + "Q1 = 4.18*(T1-T) #Heat added in economiser per kg of steam generated(in kJ/kg):\n", + "r1 = Q1/Q*100 #Percentage fraction of heat in economiser:\n", + "Q2 = (hf+x*hfg)-4.18*T1 #Heat added in evaporator per kg of steam generated(in kJ/kg):\n", + "r2 = Q2/Q*100 #Percentage fraction of heat in economiser:\n", + "Q3 = Q-Q1-Q2 #Heat added in super heater per kg of steam generated by difference(in kJ/kg):\n", + "r3 = Q3/Q*100 #Percentage fraction of heat in economiser:\n", + "\n", + "#Results:\n", + "print \"Boiler efficiency: \",round(n,2),\"%\"\n", + "print \"Percentage fraction of heat in economiser: \",round(r1,2),\"%\"\n", + "print \"Percentage fraction of heat in evaporator: \",round(r2,2),\"%\"\n", + "print \"Percentage fraction of heat in superheater: \",round(r3,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Boiler efficiency: 84.52 %\n", + "Percentage fraction of heat in economiser: 15.01 %\n", + "Percentage fraction of heat in evaporator: 69.89 %\n", + "Percentage fraction of heat in superheater: 15.1 %\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 490" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "T1 = 20 #Temperature at which feed water enters and leaves the economiser(in C):\n", + "T2 = 125\n", + "r = 3 #Rate at which feed water leaves the economiser(in kg/s):\n", + "T3 = 425 #Temperature of flue gases at inlet and outlet of economiser(in C):\n", + "T4 = 300\n", + "r1 = 18 #Rate at which coal is supplied(in kg/min):\n", + "nc = 0.80 #% of C in coal:\n", + "Cpg = 1.05 #Specific heat of flue gases(in kJ/kg.K):\n", + "Ta = 15 #Atmospheric temperature(in C):\n", + "m1 = 23.65 #Mass of dry flue gases at inlet and exit of economiser(in kg):\t\t\t\t#From table:\n", + "m2 = 24.78\n", + "\n", + "#Calculations:\n", + "A = m2-m1 #Air leakage in economiser per kg of coal:\n", + "Q1 = m1*Cpg*T3+A*Cpg*Ta #Heat entering economiser with flue gases and leakage(in kJ):\n", + "Q2 = m2*Cpg*T4 #Heat entering economiser with flue gases and leakage(in kJ):\n", + "Q = Q1-Q2 #Heat lost in economiser per kg of coal(in kJ):\n", + "Q3 = (r*60/r1)*4.18*(T2-T1)\t#Heat picked up by feed water in economiser per kg of coal(in kJ):\n", + "\n", + "#Results:\n", + "print \"Heat released by the flue gases: \",round(Q,2),\"kJ per kg of coal\"\n", + "print \"Air leakage: \",round(A,2),\"kg per kg of coal\"\n", + "print \"Heat gained by feed water: \",round(Q3),\"kJ per kg of coal\"\n", + "print \"___Please check there is a calculation mistake in book in calculating Q3____\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat released by the flue gases: 2765.91 kJ per kg of coal\n", + "Air leakage: 1.13 kg per kg of coal\n", + "Heat gained by feed water: 4389.0 kJ per kg of coal\n", + "___Please check there is a calculation mistake in book in calculating Q3____\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 492" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "CpKg = 0.84 #Carbon present per kg:\n", + "CpKgDf = 0.0495 #Carbon present per kgof dry fluegas:\n", + "sg = 8 #Steam generated (kg per kg of coal):\n", + "mh = 0.04*9 #H2O produced during the combustion(kg per kg of coal):\n", + "ash = 0.05 #Ash produced duing cumbustion(kg per kg of coal):\n", + "M = 0.015 #Moisture in coal burnt per kg of coal:\n", + "h = 3213.6 #Enthalpy of heat generated at 40 bar 400\u00b0C (KJ/Kg):\n", + "C = 4.18 #Heat capacity of water (KJ/Kg.K):\n", + "Ti = 27 #Feed water temperature at inlet to economiser (\u00b0C):\n", + "Te = 137 #Feed water temperature at exit of economiser(\u00b0C):\n", + "Tfe = 300 #Flue gas temperature entering air heater(\u00b0C):\n", + "Tae = 120 #Temperature of air entering boiler furnace(\u00b0C):\n", + "Tatm = 15 #Atmospheric air temperature(\u00b0C):\n", + "Hs = 32600 #Heat supplied by the fuel(KJ/Kg coal):\n", + "cp = 1.0032 #Heat capacity of air and dry gas (KJ/Kg.K):\n", + "sp = 2.0064 #Specific pressure of vapour(KJ/Kg.K):\n", + "\n", + "#Calculations:\n", + "md = CpKg/CpKgDf #Mass of dry flue gas per kg of coal: #Specific pressure of vapour = 2.0064 kJ/kg K\t\t\t\t#Partial pressure of vapour in flue gas = 0.075 bar\t\t\t\t#For air and dry flue gas, cp = 1.0032 kJ/kg K\t\t\t\t#Calorific value of coal = 32600 kJ/kg\t\t\t\t#Datum temperature = 15C\t\t\t\t#Dry flue gas composition by volume = 12.5% CO2, 7.5% O2, 80% N2\t\t\t\t#Dry coal composition by mass = 84% C, 4% H2, 7% O2 and remainder ash\t\t\t\t#Temperature of air entering boiler furnace = 120C\t\t\t\t#Flue gas temperature leaving air heater and entering chimney = 150C\t\t\t\t#Flue gas temperature entering air heater = 300C\t\t\t\t#Moisture in coal burnt = 1.5%\t\t\t\t#Feed water temperature at exit of economiser = 137C\t\t\t\t#Feed water temperature at inlet to economiser = 27C\t\t\t\t#Steam generated per kg of coal = 8 kg\t\t\t\t#Steam generation: 40 bar, 400C\t\t\t\t#Atmospheric air temperature: 15C\n", + "ma = md-(1-ash-mh) #Amount of air supplied for combustion of one kg of dry coal(in kg):\n", + "m = M/(1-M) #Moisture per kg of dry coal(in kg):\n", + "mt = round(mh+m,4)#Total moisture per kg of coal(in kg):\n", + "sgd = sg/(1-M) #Steam generated per kg of dry coal(in kg steam):\n", + "H = sgd*(h-C*Ti) #Heat utilized by steam per kg of coal(KJ):\n", + "n = H/Hs*100 #Boiler efficiency:\n", + "Hu = ma*cp*(Tae-Tatm) #Heat utilized by air(KJ/Kg of coal)\n", + "Ha = (md*cp+mt*sp)*(Tfe-Te) #Heat available in air heater(KJ/Kg of coal):\n", + "na = Hu/Ha*100 #Efficiency of heat exchange in air heater:\n", + "\n", + "#Results:\n", + "print \"Boiler efficiency: \",round(n,2),\"%\"\n", + "print \"Efficiency of heat exchange in air heater: \",round(na,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Boiler efficiency: 77.25 %\n", + "Efficiency of heat exchange in air heater: 59.54 %\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 496" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p = 20 #Pressure at which steam is generated(in bar):\n", + "Ts = 300 #Temperature at which steam is generated(in C):\n", + "T1 = 50 #Temperature of feed water supplied to the boiler(in C):\n", + "C = 30000 #Calorific value of fuel(in kJ/kg):\n", + "r = 600 #Rate at which coal is used(in kg/hr):\n", + "r1 = 5000 #Rate at which steam is generated(in kg/hr):\n", + "T = 100 #Temperature of the boiler unit(in C):\n", + "L = 2257 #Latent heat(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "ms = r1/r #Steam generation per unit coal burnt per hour:\n", + "hfi = 3023.5 #Final enthalpy of the steam(in kJ/kg):\n", + "hfw = 209.33 #Enthalpy of feed water(in kJ/kg):\n", + "no = ms*(hfi-hfw)/C*100 #Overall efficiency of boiler:\n", + "Ee = ms*(hfi-hfw)/L #Equivalent evaporation of boiler unit(in kg steam per kg of coal):\n", + "Eea = Ee*r #Equivalent evaporation of boiler unit at 100 C(in kg/hr):\n", + "hfw1 = 313.93 #After fitting economiser the enthalp of feed water(in kJ/kg):\n", + "nom = no+5 #Modified overall efficiency of boiler unit:\n", + "mc = (hfi-hfw1)*r1*100/(C*nom) #Coal consumption(in kg/hr):\n", + "s = r-mc #Saving of coal(in kg/hr):\n", + "\n", + "#Results:\n", + "print \"Saving of coal: \",round(s,2),\"kg/hr\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Saving of coal: 57.03 kg/hr\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 497" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "r = 5000 #Rate at which steam is generated(in kg/hr):\n", + "p = 20 #Pressure of steam(in bar):\n", + "x = 0.98 #Dryness fraction:\n", + "T = 60 #Temperature of feed water(in \u00b0C):\n", + "r1 = 600 #Rate at which coal is supplied(in kg/hr):\n", + "r2 = 16 #Rate at which air is supplied(in kg per kg coal):\n", + "C = 30000 #Cslorific value of coal(in kJ/kg):\n", + "Tr = 20 #Temperature of boiler room(in \u00b0C):\n", + "nl = 0.86 #Fraction of heat losr with flue gases:\n", + "Cpg = 1.005 #Specific heat of flue gases(in kJ/kg.K):\n", + "#From steam tables:\n", + "hf = 908.79 #kJ/kg\n", + "hfg = 1890.7 #kJ/kg\n", + "\n", + "#Calculations:\n", + "ms = r/r1 #Mass of steam genrated per kg of coal:\n", + "hfi = hf+x*hfg #Enthalpy of final steam produced(in kJ/kg):\n", + "hfw = 251.13 #Enthalpy of feed water(in kJ/kg):\n", + "Q = ms*(hfi-hfw) #Heat used for steam generation(in kJ per kg of coal):\n", + "Ql = C-Q #Heat lost per kg of coal:\n", + "Qlf = nl*Ql #Heat lost with flue gases(in kJ per kg of coal):\n", + "Tgas = Tr+Qlf/((r2+1)*Cpg) #Temperature of flue gases(in \u00b0C):\n", + "\n", + "#Results:\n", + "print \"Temperature of flue gases: \",round(Tgas,2),\" \u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of flue gases: 476.99 \u00b0C\n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 498" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "Ta = 20+273 #Ambient temperature(in K):\n", + "V = 20 #Velocity(in m/s):\n", + "hw1 = 30 #Draught lost through grate(in mm of water column):\n", + "nm = 0.80 #Mechanical efficiency:\n", + "mf = 1000 #Rate at which coal is burnt(in kg/hr):\n", + "ma = 16 #Rate at which air is supplied(in kg/hr):\n", + "pa = 1.01325 #Ambient pressure(in bar):\n", + "d = 1.29 #Density of air(in kg/m**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "T0 = 273 #Zero temperature(in K):\n", + "\n", + "#Calculations:\n", + "P1 = d*V**2/2 #Pressure equivalent to velocity head(in N/m**2):\n", + "P = P1/g #mm of water column\n", + "hw = hw1+P #Total draught loss(in mm of water column):\n", + "p = hw*g #Pressure required(in N/m**2):\n", + "PFD = p*mf*ma*Ta/(d*T0*nm*3600) #F.D. fan power requirement(in W):\n", + "\n", + "#Results:\n", + "print \"F.D. fan power: \",round(PFD/10**3,2),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F.D. fan power: 2.55 KW\n" + ] + } + ], + "prompt_number": 40 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter12.ipynb b/Applied_Thermodynamics/Chapter12.ipynb new file mode 100755 index 00000000..f4ca6e3a --- /dev/null +++ b/Applied_Thermodynamics/Chapter12.ipynb @@ -0,0 +1,1023 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:03ceb37b3a4a8472aa1ee4a975815d12c81d178fb0d225989fe7ba93ade8f414" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12: Steam Engine" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 536" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 0.2 #Pressure at which steam is supplied(in MPa):\n", + "T = 250 #Temperature of steam(in C):\n", + "p2 = 0.3 #Pressure upto which steam is expanded(in bar):\n", + "p3 = 0.05 #Pressure at which it is finally released(in bar):\n", + "\n", + "#From steam tables:\n", + "h1 = 2971 #kJ/kg\n", + "s1 = 7.7086 #kJ/kg.K\n", + "s2 = s1\n", + "h2 = 2601.97 #kJ/kg\n", + "v2 = 5.1767 #m**3/kg\n", + "hf = 137.82 #kJ/kg\n", + "Tmax = 393.23 #K\n", + "Tmin = 305.88 #K\n", + "\n", + "#Calculations:\n", + "W = h1-h2+v2*(p2-p3)*10**2 #Work output from engine cycle per kg of steam(in kJ/kg):\n", + "Q = h1-hf #Heat input per kg of steam(in kJ/kg):\n", + "n = W/Q*100 #Efficiency of modified Rankine cycle:\n", + "nc = (1-Tmin/Tmax)*100 #Carnot efficiency:\n", + "\n", + "#Results:\n", + "print \"Modified Rankine cycle efficiency: \",round(n,2),\"%\"\n", + "print \"Carnot efficiency: \",round(nc,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Modified Rankine cycle efficiency: 17.59 %\n", + "Carnot efficiency: 22.21 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 537" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "p1 = 10 #Pressure at which steam is supplied(in bar):\n", + "d = 0.3 #Diameter of the cylinder(in m):\n", + "L = 0.6 #Length of stroke(in m):\n", + "p2 = 0.75 #Pressure to which steam is expanded(in bar):\n", + "p3 = 0.25 #Pressure at which steam is released in the condensor(in bar):\n", + "#From steam tables:\n", + "h1 = 2676.2 #kJ/kg\n", + "s1 = 7.3614 #kJ/kg.K\n", + "v2 = 2.1833 #m**3/kg\n", + "h2 = 2628.35 #kJ/kg\n", + "h4 = 271.93 #kJ/kg\n", + "h6 = 2459.38 #kJ/kg\n", + "s6 = 7.3614 #kJ/kg.K\n", + "v6 = 5.784 #m**3/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "s6 = s2\n", + "W = h1-h2+v2*(p2-p3)*10**2 #Work output from engine cycle per kg of steam(in kJ/kg):\n", + "Q = h1-h4 #Heat input per kg of steam(in kJ/kg):\n", + "n = W/Q*100 #Efficiency of modified Rankine cycle:\n", + "V = pi*d**2*L/4 #Volume of the cylinder(in m**3):\n", + "m = V/v2 #Mass of steam in a stroke(in kg):\n", + "V1 = m*v6 #Volume requiremnet at 6(in m**3):\n", + "L1 = V1*4/(pi*d**2) #New stroke length(in m):\n", + "\n", + "#Results:\n", + "print \"Modified Rankine cycle efficiency: \",round(n,2),\"%\"\n", + "print \"New stroke length:\",round(L1*100,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Modified Rankine cycle efficiency: 6.53 %\n", + "New stroke length: 158.95 cm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 538" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import log,pi\n", + "\n", + "#Variable Declaration: \n", + "d = 0.3 #Diameter of the bore(in m):\n", + "L = 0.6 #Length of the stroke(in m):\n", + "r1 = 0.4 #Occerance od cut-off:\n", + "p1 = 7.5 #Pressure at which steam enters(in bar):\n", + "p3 = 0.1 #Pressure at exhaust(in bar):\n", + "n = 180 #Rpm of the engine:\n", + "d1 = 0.6 #Diagram factor:\n", + "\n", + "#Calculations:\n", + "r = 1/r1 #Expansion ratio:\n", + "mep = p1/r*(1+log(r))-p3 #Hypothetical mean effective pressure(in bar):\n", + "mepa = mep*d1 #Actual mean effective pressure(in bar):\n", + "IP = mepa*L*pi*d**2*2*n*10**2/(4*60)#Indicated power(in kW):\n", + "\n", + "#Results:\n", + "print \"Indicated power: \",round(IP,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 86.25 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 539" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import log,pi\n", + "\n", + "#Variable Declaration: \n", + "p1 = 15 #Steam is admitted at pressure(in bar):\n", + "p3 = 0.75 #Pressure at which steam exhausts(in bar):\n", + "r1 = 0.25 #Cut-off occuring at:\n", + "P = 150 #Power produced by the engine(in hp):\n", + "n = 240 #Rpm of engine:\n", + "nm = 0.85#Mechanical efficiency:\n", + "d1 = 0.7 #Diagram factor:\n", + "nb = 0.2 #Brake thermal efficiency:\n", + "r2 = 1.5 #Stroke to bore ratio:\n", + "h15 = 2803.3 #From steam tables:\n", + "hf = 384.39\n", + "\n", + "#Calculations:\n", + "r = 1/r1 #Expansion ratio:\n", + "mep = p1/r*(1+log(r))-p3 #Hypothetical mean effective pressure(in bar):\n", + "mepa = mep*d1 #Actual mean effective pressure(in bar):\n", + "IP = P/nm #Indicated horse power(in kW):\n", + "d = ((IP*4*60*0.7457)/(mepa*10**2*r2*pi*n))**(1/3) #Diameter of bore(in m):\n", + "L = d*r2 #Stroke length(in m):\n", + "Q = h15-hf #Heat added per kg of steam(in kJ/kg):\n", + "m = 0.7457*3600/(nb*Q) #Specific steam consumption(in kg/hp.hr):\n", + "\n", + "#Results:\n", + "print \"Bore: \",round(d*100,2),\"cm\"\n", + "print \"Stroke: \",round(L*100,2),\"cm\"\n", + "print \"Specific steam consumption: \",round(m,2),\"kg/hp.hr\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bore: 36.51 cm\n", + "Stroke: 54.76 cm\n", + "Specific steam consumption: 5.55 kg/hp.hr\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 541" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import log,pi\n", + "\n", + "#Variable Declaration: \n", + "m = 18/60 #Steam consumption rate(in kg/a):\n", + "IP = 100 #Indicated power(in kW):\n", + "n = 240 #Rpm of engine:\n", + "d = 0.3 #Bore diameter(in m):\n", + "L = 0.4 #Stroke length(in m):\n", + "p1 = 10 #Pressure at which steam is admitted(in bar):\n", + "p3 = 0.75 #Exhaust pressure(in bar):\n", + "r1 = 0.25 #Occurance of cut-off:\n", + "h1 = 2875.3 #Enthalpy of steam(in kJ/kg):\n", + "hf = 384.39 \n", + "\n", + "#Calculations:\n", + "Q = h1-hf #Heat added per kg of steam(in kJ/kg):\n", + "r = 1/r1 #Expansion ratio:\n", + "mep = p1/r*(1+log(r))-p3 #Hypothetical mean effective pressure(in bar):\n", + "IPt = mep*L*pi*d**2*n*10**2/(60)#Theoretical indicated power(in kW):\n", + "d1 = IP/IPt #Diagarm factor:\n", + "n = IPt/(m*Q)*100 #Indicated thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Diagram factor: \",round(d1,4)\n", + "print \"Indicated thermal efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diagram factor: 0.4238\n", + "Indicated thermal efficiency: 31.58 %\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 542" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "p1 = 10 #Pressure at which steam is aupplied(in bar):\n", + "x = 0.9 #Dryness fraction:\n", + "p3 = 1 #Pressure at exhaust(in bar):\n", + "r1 = 0.6 #Occurence of cut-off:\n", + "#From steam tables:\n", + "h1 = 2576.58 #kJ/kg \n", + "v1 = 0.1751 #m**3/kg\n", + "hf = 417.46 #kJ/kg\n", + "\n", + "#Calculations:\n", + "Q = h1-hf #Heat added per kg of steam(in kJ/kg):\n", + "v2 = v1/r1 #Specific volume at state 2(inm**3/kg):\n", + "r = 1/r1 #Expansion ratio:\n", + "Wne = v1*(p1-p3)*10**2 #Net expansive work per kg of steam(in kJ/kg):\n", + "We = p1*v1*10**2*log(r)-p3*10**2*(v2-v1)#Expansive work per kg of steam(in kJ/kg):\n", + "Wt = Wne+We #Total work per kg of steam(in kJ/kg):\n", + "r2 = We/Wt*100 #Fraction of work obtained by expansive working:\n", + "n = Wt/Q*100 #Thermal efficiency of cycle:\n", + "\n", + "#Results:\n", + "print \"Fraction of expansive work: \",round(r2,2),\"% of total output\"\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fraction of expansive work: 33.04 % of total output\n", + "Thermal efficiency: 10.9 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 543" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import log,sqrt,pi\n", + "\n", + "#Variable Declaration: \n", + "P = 60 #Power produced(in bhp):\n", + "p1 = 12 #Pressure at which steam is admitted(in bar):\n", + "p3 = 1 #Pressure at exhaust(in bar):\n", + "n = 240 #Rpm of engine:\n", + "v = 2 #Piston speed(in m/s):\n", + "d = 0.04 #Diameter of piston(in m):\n", + "n = 0.60 #Occurence of cut-off:\n", + "r1 = 0.05 #Clearance volume to stroke volume ratio:\n", + "d1 = 0.8 #Diagram factor:\n", + "nm = 0.90 #Mechanical efficiency:\n", + "\n", + "#Calculations:\n", + "r = (1+r1)/n #Expansion ratio:\n", + "mep = (p1*12*(1+log(r))-1*21-(12-1))/(21-1) #Mean effective pressure(in bar):\n", + "mepa = mep*d1 #Actual mean effective pressure(in bar):\n", + "A = P*0.7457/(nm*mepa*10**2*v) #Effective area(in m**2):\n", + "D = sqrt((A-pi*d**2/4)*4/(2*pi)) #Bore diameter(in m):\n", + "\n", + "#Results:\n", + "print \"Bore: \",round(D*100,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bore: 14.05 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 545" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import pi,log\n", + "\n", + "#Variable Declaration: \n", + "D = 0.2 #Diameter of cylinder(in m):\n", + "L = 0.3 #Length of stroke(in m):\n", + "Vc = 2*10**3 #Clearance volume(in cm**3):\n", + "ms = 0.05 #Mass of steam used per stroke(in kg):\n", + "c = 0.80 #Point at which compression starts:\n", + "p4 = 1 #Pressure of steam when compression starts(in bar):\n", + "r1 = 0.10 #Cut-off point:\n", + "r2 = 0.90 #Release:\n", + "p1 = 15 #Pressure at states 1 & 2(in bar):\n", + "#From steam tables:\n", + "v4 = 1.6940 #m**3/kg\n", + "vg15 = 0.13177 #m**3/kg\n", + "vg3 = 0.6058 #m**3/kg\n", + "u1 = 1590.79 #kJ/kg\n", + "u2 = 1216.73 #kJ/kg\n", + "\n", + "#Calculations:\n", + "p2 = 3\n", + "V6 = Vc*10**(-6) #Clearance volume(in m**3):\n", + "V5 = V6\n", + "Vs = pi*D**2/4*L #Stroke volume(in m**3):\n", + "V3 = V6+Vs #Volume at state 3(in m**3):\n", + "V4 = V3-c*(V3-V6) #Volume at state 4(in m**3):\n", + "m4 = V4/v4 #Mass of steam at state 4(in kg):\n", + "m = m4+ms #Total mass of steam during expansion(in kg):\n", + "V1 = V6+r1*(V3-V6) #Volume at cut-off point(in m**3):\n", + "x1 = V1/(m*vg15) #Dryness fraction at cut-off point:\n", + "V2 = V6+r2*(V3-V6) #Volume at point of release(in m**3):\n", + "x2 = V2/(m*vg3) #Dryness fraction at point of release:\n", + "n = log(p1/p2)/log(V2/V1) #Index of expansion:\n", + "W = (p1*V1-p2*V2)/(n-1)*100 #Work done in a stroke(in kJ):\n", + "Ws = W/m #Work done per kg of steam(in kJ/kg):\n", + "du = u2-u1 #Change in internal energy(in kJ/kg):\n", + "dQ = du-Ws #Heat transfer(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Total mass of steam during expansion: \",round(m,6),\"kg\"\n", + "print \"Dryness fraction at cut-off and release: \",round(x1,4),round(x2,4)\n", + "print \"Heat leakage: \",round(-dQ,2),\"kJ/kg steam\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total mass of steam during expansion: 0.052293 kg\n", + "Dryness fraction at cut-off and release: 0.427 0.3309\n", + "Heat leakage: 465.0 kJ/kg steam\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 547" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import pi\n", + "#Variable Declaration: \n", + "r1 = 0.3 #Point of sut-off:\n", + "p4 = 4 #Pressure at state 4(in bar):\n", + "V4 = 0.15 #Volume at state 4(in m**3):\n", + "p1 = 12 #Pressure at state 1(in m**3):\n", + "p2 = 5 #Pressure at release(in bar):\n", + "V2 = 0.5 #Indicated volume at release(in m**3):\n", + "d = 0.6 #Bore diameter(in m):\n", + "L = 1.20 #Stroke length(in m):\n", + "c = 0.10 #Clearance volume ratio:\n", + "ms = 1.5 #Mass of steam admitted(in kg/stroke):\n", + "nw = 180*60 #Number of working strokes(per second):\n", + "#From steam tables:\n", + "vg4 = 0.4625 #m**3/kg\n", + "vg12 = 0.16333 #m**3/kg\n", + "vg5 = 0.3749 #m**3/kg\n", + "\n", + "#Calculations:\n", + "Vs = pi*d**2/4*L #Stroke volume(in m**3):\n", + "V5 = c*Vs #Clearance volume(in m**3):\n", + "V3 = V5+Vs #Total volume of cylinder(in m**3):\n", + "V1 = V5+r1*Vs #Volume at cut-off point(in m**3):\n", + "m4 = V4/vg4 #Mass of steam at state 4(in kg):\n", + "m = m4+ms #Total mass during steam expansion(in kg):\n", + "x1 = V1/(m*vg12) #Dryness fraction at cut-off point:\n", + "mq1 = (m-m*x1)*nw #Missing quantity per hour(in kg):\n", + "x2 = V2/(m*vg5) #Dryness fraction at point of release:\n", + "mq2 = (m-m*x2)*nw #Missing quantity per hour(in kg):\n", + "P = (mq1-mq2)/mq1*100 #Percentage re-evaporation during expansion:\n", + "\n", + "#Results:\n", + "print \"Dryness fraction at cut-off: \",round(x1,3)\n", + "print \"Dryness fraction at release: \",round(x2,3)\n", + "print \"Missing quanity at cut off: \",round(mq1,2),\"kg/hr\"\n", + "print \"Missing quanity at release: \",round(mq2,2),\"kg/hr\"\n", + "print \"Percentage re-evaporation: \",round(P,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction at cut-off: 0.455\n", + "Dryness fraction at release: 0.731\n", + "Missing quanity at cut off: 10728.59 kg/hr\n", + "Missing quanity at release: 5298.86 kg/hr\n", + "Percentage re-evaporation: 50.61 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 549" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import pi,log\n", + "#Variable Declaration: \n", + "p1 = 1.5*10**3 #Pressure at which steam is supplied(in kPa):\n", + "x1 = 0.9 #Dryness fraction:\n", + "p4 = 40 #Pressure at exhaust(in kPa):\n", + "d1LP = 0.8 #Diagram factor reffered to LP cylinder:\n", + "L = 0.38 #Stroke length(in m):\n", + "dHP = 0.20 #Bore of HP cylinder(in m):\n", + "dLP = 0.30 #Bore of LP cylinder(in m):\n", + "N = 240 #Rpm of engine:\n", + "\n", + "#Calculations:\n", + "AHP = pi*(dHP**2)/4 #Area of HP cylinder(in m**2):\n", + "ALP = pi*(dLP**2)/4 #Area of LP cylinder(in m**2):\n", + "p2 = 192 #Intermediate pressure(in kPa):\n", + "V2 = AHP*L #Volume at state 2(in m**3):\n", + "V1 = V2*p2/p1 #Volume at state 1(in m**3):\n", + "VLP = ALP*L #Volume of LP cylinder(in m**3):\n", + "r = VLP/V1 #Expansion ratio throughout the engine:\n", + "mep = p1/r*(1+log(r))-p4 #Mean effective pressure(in kPa):\n", + "mepa = mep*d1LP #Actual mep(in kPa):\n", + "IP = mepa*L*ALP*N/60*2 #Indicated power(in kW):\n", + "Vs = V1*N*2*60 #Volume of steam admitted per hour(in m**3):\n", + "v1 = 0.1187 #Specific volume of steam being admitted(in m**3/kg):\n", + "m = Vs/v1 #Steam consumption(in kg/hr):\n", + "\n", + "#Results:\n", + "print \"Intermidiate pressure: \",round(p2),\"kPa\"\n", + "print \"Indicated power: \",round(IP,2),\"kW\"\n", + "print \"Steam consumption: \",round(m,2),\"kg/hr\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intermidiate pressure: 192.0 kPa\n", + "Indicated power: 49.85 kW\n", + "Steam consumption: 370.75 kg/hr\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 550" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import pi,sqrt,log\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1.4*10**3 #Pressure at which steam is supplied(in kPa):\n", + "p4 = 25 #Pressure at exhaust(in kPa):\n", + "r = 8 #Expansion ratio:\n", + "N = 240 #Rpm of engine:\n", + "d = 0.60 #Bore diameter(in m):\n", + "L = 0.60 #Stroke length(in m):\n", + "d1 = 0.8 #Diagram factor:\n", + "\n", + "#Calculations:\n", + "A = pi*d**2/4 #Area of cylinder(in m**2):\n", + "mep = p1/r*(1+log(r))-p4 #Hypothetical mep(in kPa):\n", + "mepa = mep*d1 #Actual mep(in kPa):\n", + "IP = mepa*L*A*N/60*2 #Indicated power(in kW):\n", + "W = mepa*A*L/2 #Work done in HP cylinder(in kJ):\n", + "V1 = pi*d**2*L/(4*8) #Volume at state 1(in m**3):\n", + "V2 = 2.71**(W/(p1*V1))*V1 #Volume at state 2(in m**3):\n", + "D = sqrt(V2*4/(L*pi)) #Diameter of HP cylinder(in m):\n", + "p2 = p1*V1/V2 #Intermediate pressure(in kPa):\n", + "\n", + "#Results:\n", + "print \"Indicated power: \",round(IP,2),\"kW\"\n", + "print \"Diameter of HP cylinder: \",round(D*100,2),\"cm\"\n", + "print \"Intermediate pressure: \",round(p2,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 557.96 kW\n", + "Diameter of HP cylinder: 38.1 cm\n", + "Intermediate pressure: 434.06 kPa\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 552" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import pi, log,sqrt\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1.5*10**3 #Pressure at which steam is supplied(in kPa):\n", + "p4 = 25 #Pressure at exhaust(in kPa):\n", + "P = 250 #Power output(in kW):\n", + "r = 12 #Expansion ratio:\n", + "d = 0.40 #Diameter of LP cylinder(in m):\n", + "L = 0.60 #Stroke length(in m):\n", + "d1 = 0.75 #Diagram factor:\n", + "r1 = 2.5 #Expansion ratio in HP cylinder:\n", + "\n", + "#Calculations:\n", + "A = pi*d**2/4 #Area of cylinder(in m**2):\n", + "mep = p1/r*(1+log(r))-p4 #Hypothetical mep(in kPa):\n", + "mepa = mep*d1 #Actual mep(in kPa):\n", + "N = P/(mepa*L*A*2)*60 #Rpm of engine:\n", + "V3 = A*L #Volume of LP cylinder(in m**3):\n", + "V4 = V3\n", + "Vc = V4/r #Cut-off volume in HP cylinder(in m**3):\n", + "Vt = Vc*r1 #Total volume in HP cylinder(in m**3):\n", + "D = sqrt(Vt*4/(L*pi)) #Diameter of HP cylinder(in m):\n", + "\n", + "print \"Speed of engine: \",round(N),\"rpm\"\n", + "print \"Diameter of HP cylinder: \",round(D*100,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of engine: 323.0 rpm\n", + "Diameter of HP cylinder: 18.26 cm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 553" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import pi, log\n", + "\n", + "#Variable Declaration: \n", + "dhp = 0.25 #Diameter of HP, LP and IP cylinder(in m):\n", + "dip = 0.40\n", + "dlp = 0.85\n", + "mephp = 0.5*10**3 #MEPs of the cylinders(in kPa):\n", + "mepip = 0.3*10**3\n", + "meplp = 0.1*10**3\n", + "p1 = 1.5*10**3 #Pressure at which steam is supplied(in kPa):\n", + "p4 = 25 #Pressure at exhaust(in kPa):\n", + "r1 = 0.60 #Cut-off occurs at:\n", + "\n", + "#Calculations:\n", + "AHP = pi*dhp**2/4 #Area of HP cylinder(in m**2):\n", + "AIP = pi*dip**2/4 #Area of IP cylinder(in m**2):\n", + "ALP = pi*dlp**2/4 #Area of LP cylinder(in m**2):\n", + "mep1 = mephp*AHP/ALP #Mep of HP referred to LP cylinder(in kPa):\n", + "mep2 = mepip*AIP/ALP #Mep of IP referred to LP cylinder(in kPa):\n", + "mept = mep1+mep2+meplp #Overall mep referred to LP cylinder(in kPa):\n", + "r = ALP/(r1*AHP) #Overall expansion ratio:\n", + "mep = p1/r*(1+log(r))-p4 #Hypothetical mep(in kPa):\n", + "d1 = mept/mep #Overall diagram factor: \n", + "P1 = mep1/mept*100 #% of HP cylinder output:\n", + "P2 = mep2/mept*100 #% of HP cylinder output:\n", + "P3 = meplp/mept*100 #% of HP cylinder output:\n", + "\n", + "#Results:\n", + "print \"Actual mep referred to LP: \",round(mept,2),\"kPa\"\n", + "print \"Hypothetical mep referred to LP: \",round(mep,2),\"kPa\"\n", + "print \"Overall diagram factor: \",round(d1,3)\n", + "print \"Percentage of HP, IP and LP cylinder outputs: \",round(P1,2),\"%\",round(P2,2),\"%\",round(P3,2),\"% respectively\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual mep referred to LP: 209.69 kPa\n", + "Hypothetical mep referred to LP: 283.18 kPa\n", + "Overall diagram factor: 0.74\n", + "Percentage of HP, IP and LP cylinder outputs: 20.63 % 31.68 % 47.69 % respectively\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 555" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import pi, log\n", + "#Variable Declaration: \n", + "p1 = 7 #Pressure at which steam is supplied(in bars):\n", + "p5 = 0.25 #Pressure at exhaust(in bars):\n", + "dhp = 0.25 #Diameter of HP and LP cylinder(in m):\n", + "dlp = 0.50\n", + "r1 = 0.30 #Cut-off point of HP and LP cylinders:\n", + "r2 = 0.45\n", + "c1 = 0.10 #Clearance volume of HP and LP cylinders:\n", + "c2 = 0.05\n", + "d1hp = 0.8 #Diagram factors of HP and LP cylinders:\n", + "d1lp = 0.7\n", + "N = 100 #Rpm pf engine:\n", + "L = 1 #Let the length of stroke(in m):\n", + "\n", + "#Calculations:\n", + "VHP = pi*dhp**2/4*L #Volume of HP cylinder(in m**2):\n", + "VLP = pi*dlp**2/4*L #Volume of LP cylinder(in m**2):\n", + "V9 = c1*VHP #Clearance volume(in m**2):\n", + "V7 = c2*VLP\n", + "V2 = VHP+V9 #Total volume of cylinders(in m**3):\n", + "V5 = VLP+V7\n", + "V1 = V9+r1*VHP #Volume at cut-off in HP cylinder(in m**3):\n", + "V3 = V7+r2*VLP\n", + "rhp = V2/V1 #Expansion ratio:\n", + "rlp = V5/V3\n", + "p3 = p1*10**2*V1/V3 #Pressure at state 3(in kPa):\n", + "mepahp = d1hp*(p1*10**2*V1*(1+log(rhp))-p3*V2-(p1*10**2-p3)*V9)/VHP #Actual mep for HP cylinder(in kPa):\n", + "mepalp = 62.96 #Actual mep for LP cylinder(in kPa):\n", + "mepa = mepahp*VHP/VLP #Actual mep of HP reffered to LP cylinder:\n", + "mept = mepalp+mepa #Total mep(in kPa):\n", + "W = mept*VLP*100/60 #Total output(in kW):\n", + "\n", + "#Results:\n", + "print \"mep of Hp referred to LP: \",round(mepa,2),\"kPa\"\n", + "print \"mep of LP: \",round(mepalp,2),\"kPa\"\n", + "print \"Total output: \",round(W,2),\" x L kW where L is stroke length\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mep of Hp referred to LP: 70.65 kPa\n", + "mep of LP: 62.96 kPa\n", + "Total output: 43.72 x L kW where L is stroke length\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 557" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import pi\n", + "#Variable Declaration: \n", + "t = 15 #Duration of trial(in min):\n", + "d = 0.25 #Bore diameter(in m):\n", + "L = 0.30 #Stroke length(in m):\n", + "bd = 1.5 #Brake diameter(in m):\n", + "bl = 300 #Net brake load(in N):\n", + "N = 240 #Speed of engine:\n", + "p1 = 10 #Steam pressure(in bar):\n", + "x = 0.9 #Dryness fraction:\n", + "mep = 0.9#Mep at cover end(in bar):\n", + "m1 = 15 #Steam utilised(in kg):\n", + "\n", + "#Calculations:\n", + "m = m1/t*60 #Steam consumption per hour(in kg/hr):\n", + "IP = mep*10**2*L*pi*d**2*240*2/(4*0.7457*60)#Indicated horse power(in kW):\n", + "m2 = 60/IP #Steam used per(hp.hr):\n", + "\n", + "#Results:\n", + "print \"Steam used per ihp.hr: \",round(m2,2),\"kg/ihp.hr\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Steam used per ihp.hr: 4.22 kg/ihp.hr\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 558" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "d = 0.38 #Bore diameter(in m):\n", + "L = 0.50 #Stroke length(in m):\n", + "pd = 0.05#Piston rod diameter(in m):\n", + "N = 150 #Speed of engine(in rpm):\n", + "m = 36 #Steam consumption(in kg/min):\n", + "F = 7 #Brake load(in kN):\n", + "bd = 2 #Brake diameter(in m):\n", + "aco = 28 #Area of indicator diagram at cover end(in cm**2):\n", + "acr = 26 #Area of indicator diagram at crank end(in cm**2):\n", + "l = 0.07 #Length of indicator diagram(in m):\n", + "s = 15 #Spring scale(in kPa/mm):\n", + "\n", + "#Calculations:\n", + "mepcr = acr*100*s/(l*10**3) #Mep at crank end(in kPa):\n", + "mepco = aco*100*s/(l*10**3) #Mep at cover end(in kPa):\n", + "IPcr = mepcr*L*pi*(d**2-pd**2)/4*N/60 #IP at crank end(in kW):\n", + "IPco = mepco*L*pi*(d**2)/4*N/60\t #IP at cover end(in kW):\n", + "IP = IPcr+IPco #IP(in kW):\n", + "BP = 2*pi*N/60*F*1 #Brake power(in kW):\n", + "n = BP/IP #Mechanical efficiency:\n", + "ISFC = m*60/IP #ISFC(in kg/kW.h):\n", + "BSFC = m*60/BP #BSFC(in kg/kW.h):\n", + "\n", + "#Results:\n", + "print \"Indicated power: \",round(IP,2),\"kW\"\n", + "print \"Brake power: \",round(BP,2),\"kW\"\n", + "print \"Indicated specific steam consumption: \",round(ISFC,2),\"kg/kW.h\"\n", + "print \"Brake specific steam consumption: \",round(BSFC,2),\"kg/kW.h\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 162.67 kW\n", + "Brake power: 109.96 kW\n", + "Indicated specific steam consumption: 13.28 kg/kW.h\n", + "Brake specific steam consumption: 19.64 kg/kW.h\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 559" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "#From steam tables:\n", + "hf = 844.89 #kJ/kg\n", + "hfg = 1947.3 #kJ/kg\n", + "hcond = 209.33 #kJ/kg\n", + "\n", + "#Calculations:\n", + "BP = 2*pi*150*(120*9.81-100)*(100/2)*10**(-2)/(1000*60)#Brake power(in kW):\n", + "IPco = 1.8*10**2*0.34*pi/4*(0.24)**2*150/60#IP at cover end(in kW):\n", + "IPcr = 1.6*10**2*0.34*pi/4*(0.24**2-0.05**2)*150/60\t#IP at crank end(in kW):\n", + "IP = IPco+IPcr #Total IP(in kW):\n", + "n = BP/IP #Mechanical efficiency:\n", + "hs = hf+0.98*hfg #Enthalpy of steam at inlet(in kJ/kg):\n", + "E = hs-hcond #Energy supplied by the steam(in kJ/kg):\n", + "m = 4*60 #Steam consumption rate(in kg/hr):\n", + "nbth = 3600/((m/BP)*E)*100 #Brake thermal efficiency:\n", + "ISFC = m/IP #Indicated steam consumption(in kg/kW.h):\n", + "\n", + "#Results:\n", + "print \"Brake thermal efficiency: \",round(nbth,2),\"%\" \n", + "print \"Indicated specific steam consumption: \",round(ISFC,2),\"kg/kW.h\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Brake thermal efficiency: 4.99 %\n", + "Indicated specific steam consumption: 18.74 kg/kW.h\n" + ] + } + ], + "prompt_number": 17 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter13.ipynb b/Applied_Thermodynamics/Chapter13.ipynb new file mode 100755 index 00000000..1d963cc2 --- /dev/null +++ b/Applied_Thermodynamics/Chapter13.ipynb @@ -0,0 +1,916 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3c23e07bbff73d50716bb3f0344f5f19803ca8de755edfb991f464d2a6411a44" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13: Nozzles" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 584" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "p1 = 10 #Pressure of dry steam(in bar):\n", + "C1 = 100 #Velocity of steam entering(in m/s):\n", + "C2 = 300 #Velocity of steam leaving the nozzle(in m/s):\n", + "p2 = 5 #Pressure of steam at exit(in bar):\n", + "m = 16 #Mass flow rate(in kg/s):\n", + "q = 10 #Heat loss to surroundings(in kJ/kg):\n", + "#From steam tables:\n", + "h1 = 2778.1 #kJ/kg\n", + "hf = 640.23 #kJ/kg\n", + "hfg = 2108.5 #kJ/kg\n", + "\n", + "#Calculations:\n", + "dh = (q*10**3+(C1**2-C2**2)/2)/1000\t#Heat drop in the nozzle(in kJ/kg):\n", + "dQ = -dh*m #Total heat drop(in kJ/s):\n", + "h2 = h1+dh #Enthalpy at state 2(in kJ/kg):\n", + "x2 = (h2-hf)/hfg #Dryness fraction at state 2:\n", + "\n", + "#Results: \n", + "print \"Heat drop in the nozzle: \",round(-dh,2),\"kJ/kg\" \n", + "print \"Total heat drop: \",round(dQ,2),\"kJ/s\"\n", + "print \"Dryness fraction at exit: \",round(x2,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat drop in the nozzle: 30.0 kJ/kg\n", + "Total heat drop: 480.0 kJ/s\n", + "Dryness fraction at exit: 0.9997\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 585" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "p1 = 10 #Steam entering at pressure(in bar):\n", + "p2 = 6 #Pressure at which steam leaves(in bar):\n", + "A2 = 20 #Cross-section area of exit of nozzle(in cm**2):\n", + "#From steam tables:\n", + "h1 = 3478.5 #kJ/kg \n", + "s1 = 7.7622 #kJ/kg.K\n", + "T2 = 418.45 #C(by interpolation)\n", + "h2 = 3309.51 #kJ/kg\n", + "v2 = 0.5281 #m**3/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "C2 = sqrt(2*(h1-h2)*10**3) #Velocity at exit(in m/s):\n", + "m = A2*10**(-4)*C2/v2 #Mass flow rate(in kg/s):\n", + "\n", + "#Result: \n", + "print \"Mass flow rate: \",round(m,3),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate: 2.202 kg/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 587" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import sqrt \n", + "\n", + "#Variable Declaration: \n", + "p1 = 12 #Pressure of steam entering(in bar):\n", + "p2 = 6 #Pressure at exit(in bar):\n", + "m1 = 5 #Mass flow rate(in kg/s):\n", + "m2 = m1\n", + "m3 = m1\n", + "C3a = 500 #Exit velocity(in m/s):\n", + "#From steam tables:\n", + "h1 = 3045.8 #kJ/kg \n", + "h2 = 2900.05 #kJ/kg\n", + "s2 = 7.0317 #kJ/kg.K\n", + "v2 = 0.3466 #m**3/kg\n", + "h3 = 2882.55 #kJ/kg\n", + "v3 = 0.3647 #m**3/kg\n", + "n = 1.3 #For superheated steam:\n", + "\n", + "#Calculations:\n", + "s1 = s2\n", + "s3 = s2\n", + "p2 = p1*(2/(n+1))**(n/(n-1)) #Pressue at state 2(in bar):\n", + "C2 = sqrt(2*(h1-h2)*10**3) #Velocity at throat(in m/s):\n", + "A2 = m2*v2/C2 #Cross-sectional area at throat(in m**2):\n", + "C3 = sqrt(2*(h1-h3)*10**3) #Ideal velocity at exit(in m/s):\n", + "A3 = m3*v3/C3a #Cross-sectional area at exit(in m**2): \n", + "r = C3a/C3 #Coefficient of velocity:\n", + "\n", + "#Results: \n", + "print \"Cross-sectional area at throat: \",round(A2*10**3,3),\" x 10^-3 m^2\"\n", + "print \"Cross-sectional area at exit: \",round(A3*10**3,3),\" x 10^-3 m^2\"\n", + "print \"Coefficient of velocity: \",round(r,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cross-sectional area at throat: 3.21 x 10^-3 m^2\n", + "Cross-sectional area at exit: 3.647 x 10^-3 m^2\n", + "Coefficient of velocity: 0.875\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 588" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "p1 = 16 #Pressure of steam entering(in bar):\n", + "p3 = 5 #Pressure at exit(in bar):\n", + "m1 = 1 #Mass flow rate(in kg/s):\n", + "m2 = m1\n", + "m3 = m1\n", + "#From steam tables:\n", + "#For case 1:\n", + "h1 = 3034.8 #kJ/kg\n", + "s1 = 6.8844 #kJ/kg.K\n", + "v1 = 0.15862 #m**3/kg\n", + "n = 1.3\n", + "h2 = 2891.39 #kJ/kg\n", + "h3 = 2777 #kJ/kg\n", + "v2 = 0.2559 #m**3/kg\n", + "v3 = 0.3882 #m**3/kg\n", + "#For case 2:\n", + "h2a = 2905.73 #kJ/kg\n", + "v2a = 0.2598 #m**3/kg\n", + "v3a = 0.40023 #m**3/kg\n", + "\n", + "#Calculations:\n", + "p2 = p1*(2/(n+1))**(n/(n-1)) #Pressure at the throat of nozzle(in bar):\n", + "q12 = h1-h2 #Heat drop up to throat section(in kJ/kg):\n", + "C2 = sqrt(2*(h1-h2)*10**3) #Velocity at throat(in m/s):\n", + "q23 = h2-h3 #Heat drop from exit(in kJ/kg):\n", + "C3 = sqrt(2*(h2-h3)*10**3+C2**2) #Velocity at exit(in m/s):\n", + "A2 = m2*v2/C2 #Throat area(in m**2):\n", + "A3 = m3*v3/C3 #Exit area(in m**2):\n", + "q12a = 0.9*q12 #Considering expansion to have 10% friction loss:\n", + "C2a = sqrt(2*q12a*10**3) #Actual velocity at throat(in m/s):\n", + "A2a = m2*v2a/C2a #Actual throat area(in m**2):\n", + "q23a = 0.9*q23 #Actual drop at the exit of the nozzle(in kJ/kg):\n", + "h3a = h2a-q23a #Actual enthalpy at state 3(in kJ/kg):\n", + "C3a = sqrt(2*q23a*10**3+C2a**2) #Actual velocity at exit(in m/s):\n", + "A3a = m3*v3a/C3a #Actual area at exit(in m**2):\n", + "\n", + "#Results:\n", + "print \"Throat area, without friction consideration: \",round(A2*10**4,2),\"cm**2\"\n", + "print \"Exit area, without friction consideration: \",round(A3*10**4,2),\"cm**2\"\n", + "print \"Throat area, with friction consideration: \",round(A2a*10**4,2),\"cm**2\"\n", + "print \"Exit area, with friction consideration: \",round(A3a*10**4,3),\"cm**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Throat area, without friction consideration: 4.78 cm**2\n", + "Exit area, without friction consideration: 5.41 cm**2\n", + "Throat area, with friction consideration: 5.11 cm**2\n", + "Exit area, with friction consideration: 5.875 cm**2\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 590" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt,pi\n", + "#Variable Declaration: \n", + "P = 1 #Power of turbine(in MW):\n", + "p1 = 20 #Pressure of steam entering(in bar):\n", + "m = 8 #Steam consumption rate(in kg/kW.h):\n", + "p3 = 0.2 #Pressure at which steam leaves(in bar):\n", + "d = 0.01 #Throat diameter(in m):\n", + "#From Mollier diagram:\n", + "q12 = 142 #kJ/kg \n", + "v2 = 0.20 #m**3/kg\n", + "q13 = 807 #kJ/kg\n", + "v3 = 7.2 #m**3/kg\n", + "\n", + "#Calculations:\n", + "C2 = sqrt(2*q12*10**3) #Velocity at throat(in m/s):\n", + "m2 = pi*d**2/4*C2/v2 #Mass flow rate:\n", + "m3 = m2\n", + "n = 10**3*m/(3600*m2) #Number of nozzles:\n", + "q13a = 0.90*q13 #Useful heat drop:\n", + "C3 = sqrt(2*10**3*q13a)#Velocity at exit(in m/s):\n", + "A3 = m3*v3/C3 #Area at exit(in m**2):\n", + "\n", + "#Results: \n", + "print \"Number of nozzles required: \",round(n) \n", + "print \"Area at exit: \",round(A3*10**4,2),\"cm**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of nozzles required: 11.0\n", + "Area at exit: 12.5 cm**2\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 591" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi, atan, sqrt\n", + "#Variable Declaration: \n", + "p1 = 0.7 #Pressure at which steam is supplied(in MPa):\n", + "l = 0.06 #Length of diverging nozzle(in m):\n", + "d = 0.005 #Throat diameter(in mm):\n", + "p3 = 0.1 #Pressure at which steam leaves the nozzle(in MPa):\n", + "#From Mollier diagram:\n", + "q12 = 138 #kJ/kg\n", + "v2 = 0.58 #m**3/kg\n", + "T = 203 #\u00b0C\n", + "q23 = 247 #kJ/kg\n", + "q23a = 209.95 #kJ/kg\n", + "v3a = 1.7 #m**3/kg\n", + "\n", + "#Calculations:\n", + "C2 = sqrt(2*q12*10**3) #Velocity at throat(in m/s):\n", + "m1 = pi*d**2/4*C2/v2 #Mass flow rate(in kg/s):\n", + "m2 = m1\n", + "m3 = m1\n", + "q = q12+q23a #Total heat drop(in kJ/kg):\n", + "C3 = sqrt(2*10**3*q) #Velocity at exit(in m/s):\n", + "A3 = m3*v3a/C3 #Area at exit(in m**2):\n", + "d1 = (sqrt(A3*4/pi))*10**3 #Diameter at exit(in mm):\n", + "a = atan((d1-d*10**3)/(2*60))*180/pi\n", + "\n", + "#Results: \n", + "print \"With no losses, temperature at throat: \",round(T,2),\"\u00b0C\"\n", + "print \"Velocity at throat: \",round(C2,2),\"m/s\"\n", + "print \"With losses, cone angle: \",round(2*a,2),\"\u00b0\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "With no losses, temperature at throat: 203.0 \u00b0C\n", + "Velocity at throat: 525.36 m/s\n", + "With losses, cone angle: 1.71 \u00b0\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 593" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import sin,pi,sqrt\n", + "\n", + "#Variable Declaration:\n", + "P = 5000 #Power of the turbine(in hp):\n", + "m = P*6/3600 #Steam required(in kg of steam/hp-hr):\n", + "n = 0.90 #Efficiency of nozzle:\n", + "a = 12 #Nozzle angle:\n", + "p = 5 #Pitch(in cm):\n", + "t = 0.3 #Thickness(in cm):\n", + "#From steam tables:\n", + "h1 = 2794 #kJ/kg\n", + "s1 = 6.4218 #kJ/kg.K\n", + "x2 = 0.9478\n", + "h2 = 2662.2 #kJ/kg\n", + "x2a = 0.9542\n", + "v2a = 0.2294 #m**3/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "h12 = h1-h2 #Change in enthalpy(in kJ/kg):\n", + "h12a = n*h12 #Actual change(in kJ/kg):\n", + "C2 = sqrt(2*h12a*10**3) #Velocity at inlet(in m/s):\n", + "A2 = m*v2a/C2*10**4 #Area at exit of nozzle(in cm**2):\n", + "l = 60*pi/3 #Approximate length of the nozzle(in cm):\n", + "n = int(l/p)+1 #Number of nozzles:\n", + "l1 = n*p #Correct length of nozzle arc:\n", + "h = A2/((p*sin(a*pi/180)-t)*n)#Radial height of nozzle(in cm):\n", + "\n", + "#Results:\n", + "print \"Length of nozzle: \",round(l1,2),\"cm\"\n", + "print \"Radial height of nozzle: \",round(h,2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Length of nozzle: 65.0 cm\n", + "Radial height of nozzle: 4.08 cm\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 594" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "p1 = 13 #Pressure at which steam enters(in bar):\n", + "p2 = 6 #Pressure at which steam leaves(in bar):\n", + "T1 = 150+273 #Temperature of steam entering(in K):\n", + "r = 1.4 #Adibatic insex of compression:\n", + "\n", + "#Calculations:\n", + "T2 = T1*(p2/p1)**((r-1)/r) #Final temperature of steam(in K):\n", + "C2 = sqrt(2*1.005*(T1-T2)) #Exit velocity(in m/s):\n", + "\n", + "#Results: \n", + "print \"Exit velocity: \",round(C2,2),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit velocity: 12.98 m/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 595" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "F = 350 #Force on the plate(in N):\n", + "p1 = 8 #Initial pressure(in bar):\n", + "p3 = 1 #Final pressure(in bar):\n", + "A2 = 5*10**(-4) #Throat cross-sectional area(in m**2):\n", + "#From steam tables:\n", + "h1 = 2769.1 #kJ/kg\n", + "s1 = 6.6628 #kJ/kg.K\n", + "x2 = 0.9717\n", + "h2 = 2685.17 #kJ/kg\n", + "v2 = 0.3932 #m**3/kg\n", + "x3 = 0.8238\n", + "h3 = 2277.6 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "s3 = s1\n", + "h12 = h1-h2 #Enthalpy change(in kJ/kg):\n", + "C2 = sqrt(2*h12*10**3) #Velocity at throat(in m/s):\n", + "m = A2*C2/v2 #Discharge at throat(in kg/s):\n", + "C3a = F/m #Actual exit velocity(in m/s):\n", + "h23 = h2-h3 #Theoretical enthalpy drop(in kJ/kg):\n", + "n = C3a**2/(2*h23*10**3) #Nozzle efficiency:\n", + "\n", + "#Results:\n", + "print \"Discharge at throat: \",round(m,3),\"kg/s\"\n", + "print \"Nozzle efficiency: \",round(n*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge at throat: 0.521 kg/s\n", + "Nozzle efficiency: 55.37 %\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 597" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration: \n", + "m = 5/60 #Mass flow rate(in kg/s):\n", + "p3 = 1 #Pressure at which steam is discharged(in bar):\n", + "p1 = 10 #Initial pressure(in bar):\n", + "T1 = 200+273 #Initial temperature(in K)\n", + "n = 1.3 #Adiabatic index of compression:\n", + "\n", + "#From steam tables:\n", + "h1 = 2827.9 #kJ/kg\n", + "s1 = 6.6940 #kJ/kg.K\n", + "v1 = 0.2060 #m**3/kg\n", + "h2a = 2711.23 #kJ/kg\n", + "s2a = 6.6749 #kJ/kg.K\n", + "h3 = 2420.08 #kJ/kg\n", + "v3 = 1.5025 #m**3/kg\n", + "psat = 3.44 #bar (at T = 138.18 \u00b0C)\n", + "Tsat = 155.12 #C (at p = 5.45 bar)\n", + "\n", + "#Calculations:\n", + "s3 = s2a\n", + "p2 = p1*(2/(n+1))**(n/(n-1)) #Pressure at throat(in bar):\n", + "C3 = sqrt(2*(h1-h3)*10**3) #Velocity at exit(in m/s):\n", + "A3 = m*v3/C3 #Exit area(in m**2):\n", + "d = sqrt(A3*4/pi) #Diameter of nozzle at exit(in m):\n", + "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at throat(in K):\n", + "d1 = p2/psat #Degree of supersaturation:\n", + "u = Tsat-(T2-273) #Amount of undercooling(in \u00b0C):\n", + "\n", + "#Results: \n", + "print \"Degree of supersaturation: \",round(d1,2) \n", + "print \"Amount of undercooling: \",round(u,2),\"\u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degree of supersaturation: 1.59\n", + "Amount of undercooling: 16.82 \u00b0C\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 599" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "p1 = 4 #Initial pressure(in bar):\n", + "T1 = 180+273 #Initial temperature(in K):\n", + "p2 = 1.5 #Final pressure(in bar):\n", + "n = 1.3 #Index of compression:\n", + "nn = 0.95 #Efficiency due to heat loss:\n", + "C = 2.174 #Specific heat(in kJ/kg.K):\n", + "#From steam tables:\n", + "v1 = 0.5088 #m**3/kg \n", + "Tsat = 111.37+273 #K (at p = 1.5 bar)\n", + "\n", + "#Calculations:\n", + "h1 = p1*v1*10**2+2614 #Enthalpy at state 1(in kJ/kg):\n", + "v2 = v1*(p1/p2)**(1/n) #Specific volume at state 2(in m**3/kg):\n", + "h2 = p2*v2*10**2+2614 #Enthalpy at state 2(in kJ/kg):\n", + "dh = nn*(h1-h2) #Actual heat drop(in kJ/kg):\n", + "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n", + "dT = (1-nn)*(h1-h2)/C #Temperature rise due to supersaturation:\n", + "T2a = T2+dT #Actual temperature at state 2(in K):\n", + "u = Tsat-T2a #Amount of undercooling(in \u00b0C):\n", + "\n", + "#Results:\n", + "print \"Actual heat drop: \",round(dh,2),\"kJ/kg\"\n", + "print \"Amount of undercooling: \",round(u,2),\"\u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual heat drop: 39.16 kJ/kg\n", + "Amount of undercooling: 22.18 \u00b0C\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 600" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "p1 = 14 #Initial pressure(in bar):\n", + "T1 = 400+273 #Initial temperature(in K):\n", + "N = 16 #Number of nozzles:\n", + "p2 = 10 #Final pressure(in bar):\n", + "m = 5 #Discharge(in kg/s):\n", + "nn = 0.90 #Nozzle efficiency:\n", + "C1 = 100 #Inlet velocity(in m/s):\n", + "n = 1.3 #Insex of compression:\n", + "\n", + "#From steam tables:\n", + "h1 = 3257.5 #kJ/kg \n", + "s1 = 7.3026 #kJ/kg.K\n", + "T2 = 350.46 #\u00b0C\n", + "h2 = 3158.7 #kJ/kg\n", + "v2 = 0.2827 #m**3/kg\n", + "\n", + "#Calculations:\n", + "h12 = (h1-h2)*nn #Actual enthalpy change(inn kJ/kg):\n", + "C2 = sqrt(2*h12*10**3) #Velocity at exit(in m/s):\n", + "A2 = m*v2/(C2*N)*10**4 #Cross-sectional area at exit(in cm**2):\n", + "C2a = sqrt(2*h12*10**3+C1**2)#Modified velocity at nozzle exit(in m/s):\n", + "ma = 16*2.13*433.41*10**(-4)/0.2827#ma = A2*C2a*N/v2*10**(-4) \n", + "p = (ma-m)/m*100 #% increase in discharge:\n", + "\n", + "#Results: \n", + "print \"Cross-sectional area at exit of nozzle: \",round(A2,2),\"cm**2\"\n", + "print \"Percentage increase in discharge: \",round(p,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cross-sectional area at exit of nozzle: 2.09 cm**2\n", + "Percentage increase in discharge: 4.5 %\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 602" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 20 #Initial pressure(in bar):\n", + "p3 = 5 #Final pressure(in bar):\n", + "n = 1.3\n", + "#From steam tables:\n", + "T1 = 212.42+273 #K\n", + "Tsat = 186.43+273 #K (at 11.6 bar)\n", + "psat = 5.452 #bar (at 155.14 \u00b0C)\n", + "h1 = 2799.5 #kJ/kg\n", + "v1 = 0.009963 #m**3/kg\n", + "s1 = 6.3409 #kJ/kg.K\n", + "h2aa = 2693.98 #kJ/kg\n", + "s2a = 6.5484 #kJ/kg.K\n", + "h3a = 2632.76 #kJ/kg\n", + "h3 = 2544.21 #kJ/kg\n", + "p2 = p1*0.58 #Pressure at throat(in bar):\n", + "\n", + "#Calculations:\n", + "s2aa = s1\n", + "s3a = s2a\n", + "s3 = s1\n", + "T2 = T1*(p2/p1)**((n-1)/n)\t#Temperature at state 2(in K):\n", + "d = p2/psat #Degree of supersaturation:\n", + "d1 = Tsat-T2 #Degree of undercooling:\n", + "h12 = (n/(n-1))*p1*10**2*v1*(1-(T2/T1)) #Isentropic enthalpy drop:\n", + "h2 = h1-h12 #Enthalpy at state 2(in kJ/kg):\n", + "h12aa = h1-h2aa #Heat drop with no saturation(in kJ/kg):\n", + "L = h12aa-h12 #Loss of available heat drop(in kJ/kg):\n", + "s12a = L/Tsat #Increase in entropy(in kJ/kg.K):\n", + "L1 = h3a-h3 #Loss due to undercooling(in kJ/kg):\n", + "p = L1/(h1-h3)*100 #Percentage loss:\n", + "\n", + "#Results: \n", + "print \"Degree of supersaturation: \",round(d,2)\n", + "print \"Degree of undercooling: \",round(d1,2),\"\u00b0C\"\n", + "print \"Entropy change: \",round(s12a,4),\"kJ/kg.K\"\n", + "print \"Loss due to undercooling: \",round(L1,2),\"kJ/kg\"\n", + "print \"Percentage loss: \",round(p,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Degree of supersaturation: 2.13\n", + "Degree of undercooling: 31.35 \u00b0C\n", + "Entropy change: 0.2075 kJ/kg.K\n", + "Loss due to undercooling: 88.55 kJ/kg\n", + "Percentage loss: 34.69\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 604" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration: \n", + "m1 = 150/60 #Mass flow rate(in kg/s):\n", + "H = 5 #Height of water level from the axis of injector(in m):\n", + "p4 = 20 #Pressuer at which steam is injected(in bar):\n", + "Z4 = 0.8 #Water level in boiler from the injector(in m):\n", + "x1 = 0.95 #Dryness fraction at state 1:\n", + "C4 = 20 #Velocity in delivery pipe(in m/s):\n", + "p3 = 1.013 #Atmospheric pressure(in bar):\n", + "d = 10**3 #Density(in kg/m**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "Cps = 3.18 #Specific heat of steam(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "#From steam tables:\n", + "T1 = 212.42 #\u00b0C\n", + "Tw = 25 #\u00b0C\n", + "p2 = 0.7*p4\n", + "h1 = 2704.95 #kJ/kg\n", + "hfg1 = 1890.7 #kJ/kg\n", + "s1 = 6.1462 #kJ/kg.K\n", + "x2 = 0.923\n", + "h2 = 2639.10 #kJ/kg\n", + "v2 = 0.13 #m**3/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "C2 = sqrt(2*(h1-h2)*10**3) #Velocity of steam at throat(in m/s):\n", + "C3 = sqrt(2*(g*Z4+p4*10**5/d+C4**2/2-p3*10**5/d))#Velocity at state 3(in m/s):\n", + "m = (C2-C3)/(sqrt(2*g*H)+C3) #Mass of water pumped per kg of steam(in kg):\n", + "m3 = m1+m1/m #Mass of mixture passing through state 3(in kg/s):\n", + "A3 = m3/(d*C3)*10**4 #Area of throat of mixing nozzle(in cm**2):\n", + "d3 = sqrt(A3*4/pi) #Diameter of throat of the mixing nozzle(in cm):\n", + "ms = m1/m #Mass of steam required for given flow rate(in kg/s):\n", + "A2 = ms*v2/C2*10**4 #Area at state 2(in cm**2):\n", + "d2 = sqrt(A2*4/pi) #Diameter of throat of steam nozzle(in cm):\n", + "T3 = (x1*hfg1+Cps*T1+m*Cpw*Tw)/(m*Cpw+Cps)#Temperature of water coming out of the injector(in C):\n", + "\n", + "#Results: \n", + "print \"Mass of water pumped per kg of steam: \",round(m,2),\"kg\"\n", + "print \"Diameter of throat of the mixing nozzle: \",round(d3,3),\"cm\"\n", + "print \"Diameter of throat of steam nozzle: \",round(d2,2),\"cm\"\n", + "print \"Temperature of water coming out of the injector: \",round(T3,2),\"\u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of water pumped per kg of steam: 3.98 kg\n", + "Diameter of throat of the mixing nozzle: 0.783 cm\n", + "Diameter of throat of steam nozzle: 1.69 cm\n", + "Temperature of water coming out of the injector: 145.63 \u00b0C\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 607" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "p4 = 20 #Pressure at which steam is generated(in bar):\n", + "p1 = 1.5 #Pressure at inlet(in bar):\n", + "x1 = 0.9 #Dryness fraction:\n", + "M = 5000 #Mass of water taken from feed water tank(in kg/hr):\n", + "d = 10**3 #Density(in kg/m**3):\n", + "#From steam tables:\n", + "h1 = 2470.96 #kJ/kg \n", + "s1 = 6.6443 #kJ/kg.K\n", + "s2 = s1\n", + "x2 = 0.88\n", + "h2 = 2396.72 #kJ/kg\n", + "v2 = 1.7302 #m**3/kg\n", + "\n", + "#Calculations:\n", + "C2 = sqrt(2*(h1-h2)*10**3) #Steam velocity(in m/s):\n", + "C3 = sqrt(1.2*p4*2*10**5/d) #Velocity at 3(in m/s):\n", + "m = C2/C3-1 #Mass entrained per kg of steam:\n", + "ms = M/(3600*m) #Mass of steam supplied per second(in kg/s):\n", + "A2 = ms*v2/C2*10**4 #Area of steam nozzle(in cm**2):\n", + "D = M/3600+ms #Total discharge from injector(in kg/s):\n", + "A = D/(C3*d)*10**4 #Area of discharge orifice(in cm**2):\n", + "\n", + "#Results: \n", + "print \"Mass of water pumped per kg of steam: \",round(m,2),\"kg water/kg of steam\"\n", + "print \"Area of steam nozzle: \",round(A2,2),\"cm**2\"\n", + "print \"Area of discharge orifice: \",round(A,3),\"cm**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of water pumped per kg of steam: 4.56 kg water/kg of steam\n", + "Area of steam nozzle: 13.67 cm**2\n", + "Area of discharge orifice: 0.244 cm**2\n" + ] + } + ], + "prompt_number": 29 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter15.ipynb b/Applied_Thermodynamics/Chapter15.ipynb new file mode 100755 index 00000000..4c14a1a7 --- /dev/null +++ b/Applied_Thermodynamics/Chapter15.ipynb @@ -0,0 +1,591 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f7a19d25377671432cfde9f9d56148d23c8e97851f20fd5f765a471e71e2f5a2" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15: Steam Condenser" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "h = 71 #Height of mercury column in condenser(in mm of Hg):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "mw = 800 #Rate at which cooling water is circulated(in kg/min):\n", + "ms = 25 #Condensate available at(in kg/min):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "#From steam tables:\n", + "ps = 5.62 #kPa\n", + "hf = 146.68 #kJ/kg\n", + "hfg = 2418.6 #kJ/kg\n", + "\n", + "#Calculations:\n", + "pt = (76-h)*10**(-2)*d*10**6*9.81*10**(-3)#Absolute pressure in the condenser(in kPa):\n", + "pa = pt-ps #Partial pressure of air(in kPa):\n", + "ma = pa/((273+35)*R) #Mass of air per m**3 of condenser volume:\n", + "hs = mw/ms*Cpw*(25-15)+Cpw*30#Enthalpy of steam(in kJ/kg):\n", + "x = (hs-hf)/hfg#Dryness fraction of the steam entering:\n", + "n = h*d*10**4*g/(76*d*10**4*g-ps*10**3)*100#Vacuum efficiency:\n", + "\n", + "#Results: \n", + "print \"Mass of air of condenser volume: \",round(ma,3),\"kg/m**3\"\n", + "print \"Dryness fraction of steam entering: \",round(x,4)\n", + "print \"Vacuum efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of air of condenser volume: 0.012 kg/m**3\n", + "Dryness fraction of steam entering: 0.5442\n", + "Vacuum efficiency: 98.9 %\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 695" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "h = 70 #Height of mercury column in condenser(in mm of Hg):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "r = 2500 #Leakage of air in condenser:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "#From steam tables:\n", + "ps = 4.246 #kPa \n", + "vg = 32.89 #m**3/kg\n", + "\n", + "#Calculations:\n", + "pt = (76-h)*10**(-2)*d*10**6*9.81*10**(-3)#Absolute pressure in the condenser(in kPa):\n", + "pa = pt-ps #Partial pressure of air(in kPa):\n", + "m = 1/r #Mass of air accoumpanying per kg of steam due to leakage(in kg):\n", + "v = m*R*(273+30)/pa #Volume of air per kg of steam(in m**3/kg):\n", + "m1 = v/vg #Mass of water vapour accompanying air:\n", + "\n", + "#Results: \n", + "print \"Capacity of air pump: \",round(v*10**3,2),\" x 10^-3 m**3 per kg steam\"\n", + "print \"Mass of water vapour accompanying air: \",round(m1*10**4,2),\" x 10^-4 kg/kg of steam\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of air pump: 9.26 x 10^-3 m**3 per kg steam\n", + "Mass of water vapour accompanying air: 2.82 x 10^-4 kg/kg of steam\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 696" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "h = 67 #Height in mercury column in condenser(in cm):\n", + "pt = 10.67 #Absolute pressure in the condenser(in kPa):\n", + "ps = 7.384 #Partial pressure of steam(in kPa):\n", + "ms = 50 #Mass flow rate of steam(in kg/min):\n", + "mw = 1000 #Mass flow rate of water(in kg/min):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "#From steam tables:\n", + "hf = 167.57 #kJ/kg \n", + "hfg = 2406.7 #kJ/kg\n", + "vg = 19.52 #m**3/kg\n", + "\n", + "#Calculations:\n", + "cv = 76-(75-h) #Corrected vacuum(in cm):\n", + "pa = pt-ps #Partial pressure of air(in kPa):\n", + "n = h*d*10**4*g/(75*d*10**4*g-ps*10**3)*100\t#VAcuum efficiency:\n", + "u = 40-35 #Undercooling of condensate(in C):\n", + "n1 = (25-10)/(46.9-10)*100 #Condenser efficiency:\n", + "h = mw/ms*Cpw*(25-10)+Cpw*40 #Enthalpy of steam(in kJ/kg):\n", + "x = (h-hf)/hfg #Dryness fraction:\n", + "m = pa/(R*(273+40)) #Mass of air per m**3 of condenser volume(in kg/m**3):\n", + "m1 = pa*vg/(R*(273+40)) #Mass of air in 1kg of uncondensate steam(in kg):\n", + "\n", + "#Results:\n", + "print \"Corrected vacuum: \",round(cv,2),\"cm of Hg\"\n", + "print \"Vacuum efficiency: \",round(n,2),\"%\"\n", + "print \"Undercooling: \",round(u,2),\"\u00b0C\"\n", + "print \"Dryness fraction of steam entering: \",round(x,4)\n", + "print \"Mass of air/m**3 of condenser volume: \",round(m,4),\"kg/m**3\"\n", + "print \"Mass of air in per kg of uncondensate steam: \",round(m1,3),\"kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Corrected vacuum: 68.0 cm of Hg\n", + "Vacuum efficiency: 96.45 %\n", + "Undercooling: 5.0 \u00b0C\n", + "Dryness fraction of steam entering: 0.5209\n", + "Mass of air/m**3 of condenser volume: 0.0366 kg/m**3\n", + "Mass of air in per kg of uncondensate steam: 0.714 kg\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 697" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "h = 69 #Height in mercury column in condenser(in cm):\n", + "T1 = 30 #Inlet temperature(in \u00b0C):\n", + "L = 60 #Leakage(in kg/hr):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "n = 240 #Rpm of engine:\n", + "r = 1.5 #L/D ratio:\n", + "#From steam tables:\n", + "ps = 4.246 #kPa \n", + "vg = 32.89 #m**3/kg\n", + "pt = (76-h)*d*10**4*g #Absolute pressure at inlet to air pump(in kPa):\n", + "pa = 5.09 #Partial pressure of air(in kPa):\n", + "V = L*R*(273+T1)/pa #Volume of 60 kg air(in m**3/hr):\n", + "D = ((V*4)/(pi*r*n*60))**(1/3)*100 #Bore diameter(in cm):\n", + "l = D*r #Stroke length(in cm):\n", + "m = V/vg #Mass of water vapour extracted with air(in kg/hr):\n", + "\n", + "#Results: \n", + "print \"Capacity of air pump: \",round(V,1),\"m**3/hr\"\n", + "print \"Bore: \",round(D,2),\"cm\"\n", + "print \"Stroke: \",round(l,2),\"cm\"\n", + "print \"Mass of water vapour extracted with air: \",round(m,2),\"kg/hr\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of air pump: 1025.1 m**3/hr\n", + "Bore: 39.24 cm\n", + "Stroke: 58.86 cm\n", + "Mass of water vapour extracted with air: 31.17 kg/hr\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 698" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "h = 70 #Height in mercury column in condenser(in cm):\n", + "T = 30+273 #Inlet temperature(in K):\n", + "m = 5*10**(-4) #Leakage(in kg/kg of steam):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "dT = 15 #Increase in temperature of cooling water(in K):\n", + "x = 0.90 #Dryness fraction:\n", + "#From steam tables:\n", + "hf = 125.79 #kJ/kg\n", + "hfg = 2430.5 #kJ/kg\n", + "vg = 32.89 #m**3/kg\n", + "ps = 4.246 #kPa\n", + "\n", + "#Calculations:\n", + "pt = (77-h)*d*10**4*g #Absolute pressure in condenser(in kPa):\n", + "pa = 5.094 #Partial pressure of air(in kPa):\n", + "V = m*10**3*R*T/pa #Volume of air extracted per minute(in m**3/min):\n", + "ms = V/vg #Mass of steam extracted in maixture(in kg/min):\n", + "mt = m*10**3+ms #Mass handled by air extraction pump(in kg/min):\n", + "h = hf+x*hfg #Enthalpy of steam entering(in kJ/kg):\n", + "mw = 1000*(h-Cpw*T)/(Cpw*dT) #Water circulation rate(in kg/min):\n", + "\n", + "#Results: \n", + "print \"Mass handled by air pump: \",round(mt,4),\"kg/min\"\n", + "print \"Water circulation rate: \",round(mw,2),\"kg/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass handled by air pump: 0.7595 kg/min\n", + "Water circulation rate: 16693.78 kg/min\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 699" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "h = 70 #Height in mercury column in condenser(in cm):\n", + "T = 30+273 #Inlet temperature(in K):\n", + "x = 0.85 #Dryness fraction:\n", + "m = 300 #Rate at which steam enters(in kg/min):\n", + "v = 50 #Velocity of water flow:\n", + "ph = 5 #Pressure head(in m):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "#From steam tables:\n", + "ps = 4.246 #kPa \n", + "mw = 7415 #kg/min\n", + "A = 24.79 #Cooling surface area required(in m**2):\n", + "\n", + "#Calculations:\n", + "pt = (76-h)*d*10**4*g #Absolute pressure in condenser(in kPa):\n", + "pa = pt-ps #Partial pressure of air(in kPa):\n", + "V = mw/1000 #Volume flow of water(in m**3/min):\n", + "a = V/v #Flow surface area required(in m**2):\n", + "vh = 1/2*(v/60)**2/g #Velocity head present(in m):\n", + "th = ph+vh #Total head required(in m):\n", + "\n", + "#Results:\n", + "print \"Flow surface area required: \",round(a,4),\"m**2\" \n", + "print \"Cooling surface area required: \",round(A,2),\"m**2\"\n", + "print \"Head required: \",round(th,4),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Flow surface area required: 0.1483 m**2\n", + "Cooling surface area required: 24.79 m**2\n", + "Head required: 5.0354 m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 700" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "m1 = 350 #Mass of steam entering(in kg/min):\n", + "v = 0.02 #Volume of water required(in m**3 per kg steam):\n", + "r = 0.05/100 #Amount of air mass going into condenser:\n", + "r1 = 5/100 #Volume of air dissolved in the water injected:\n", + "h = 68 #Height in mercury column in condenser(in cm):\n", + "T = 20+273 #Inlet temperature(in K):\n", + "p = 101.3 #Atmospheric pressure(in kPa):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "n = 0.90 #Volumetric efficiency:\n", + "#From steam tables:\n", + "ps = 4.246 #kPa \n", + "vf = 0.001004 #m**3/kg\n", + "\n", + "#Calculations:\n", + "pt = (76-h)*d*10**4*g*10**(-3)#Absolute pressure in condenser(in kPa):\n", + "pa = pt-ps #Partial pressure of air(in kPa):\n", + "V1 = m1*v #Volume of cooling water required per minute(in m**3/min):\n", + "m2 = m1*r #Mass of air going into condenser(in kg/min):\n", + "V = V1*r1 #Volume of air entering per minute with cooling water(in m**3/min):\n", + "m = p*V/(R*T) #Mass of air with cooling water(in kg):\n", + "mt = m+m2 #Total mass of air inside condenser(in kg):\n", + "V2 = mt*R*(273+30)/pa #Volume of air corresponding:\n", + "V3 = m1*vf #Volume of steam condensed(in m**3/min):\n", + "Vt = V3+V2+V1 #Total volume(in m**3/min):\n", + "C = Vt/n #Actual capacity of air pump(in m**3/min):\n", + "\n", + "#Results: \n", + "print \"Capacity of air pump: \",round(C,2),\"m**3/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of air pump: 17.14 m**3/min\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 701" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "H = 65 #Height in mercury column in condenser(in cm):\n", + "ms = 20 #Rate at which steam enters(in kg/min):\n", + "m = 12 #Mass of cooling water per kg of steam:\n", + "H1 = 66 #Height in mercury column in air pump(in cm):\n", + "p = 101.3 #Atmospheric pressure(in kPa):\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "#From steam tables:\n", + "ps = 7.384 #kPa\n", + "ps1 = 5.628 #kPa\n", + "hf = 167.57 #kJ/kg\n", + "hfg = 2406.7 #kJ/kg\n", + "\n", + "#Calculations:\n", + "pt = (76-H)*d*10**4*g*10**(-3) #Absolute pressure in condenser(in kPa):\n", + "pa = pt-ps #Partial pressure of air(in kPa):\n", + "mw = m*ms #Cooling water required(in kg/min):\n", + "h = ((ms+mw)*Cpw*40-mw*Cpw*20)/ms #Enthalpy of steam entering:\n", + "x = (h-hf)/hfg #Dryness fraction of steam entering:\n", + "pt1 = (76-H1)*d*10**4*g*10**(-3) #Absolute partial pressure at suction in air pump(in kPa): \n", + "pa1 = pt1-ps1 #Partial pressure of air(in kPa):\n", + "V = 2 #Volume of mixture(in m**3):\n", + "m1 = pa1*V/(R*(273+35)) #Mass of air entering(in kg/min):\n", + "H2 = (p-pt)/(g*d*10**3) #Head(in m):\n", + "\n", + "#Results: \n", + "print \"Dryness fraction of steam entering: \",round(x,3)\n", + "print \"Mass of air entering: \",round(m1,4),\"kg/min\"\n", + "print \"Head: \",round(H2,4),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of steam entering: 0.417\n", + "Mass of air entering: 0.1744 kg/min\n", + "Head: 0.6496 m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 702" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 3 #Leakage(in kg/min):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "#From steam tables:\n", + "ps = 5.628 #kPa\n", + "ps1 = 5.075 #kPa\n", + "ps2 = 5.352 #kPa\n", + "pt = ps #Absolute pressure in condenser(in kPa):\n", + "\n", + "#Calculations:\n", + "pa1 = pt-ps1 #Partial pressure of air(in kPa):\n", + "V1 = m*R*(273+33)/pa1 #Volume of air handled by air pump(in m**3/hr):\n", + "pa2 = pt-ps2 #Partial pressure of air(in kPa):\n", + "V2 = m*R*(273+34)/pa2 #Volume of mixture handled(in m**3/hr):\n", + "\n", + "#Results: \n", + "print \"Volume of air handled: \",round(V1,2),\"m**3/hr\"\n", + "print \"Volume of mixture handled: \",round(V2,2),\"m**3/hr\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume of air handled: 476.43 m**3/hr\n", + "Volume of mixture handled: 957.71 m**3/hr\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 703" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "H1 = 72 #Height in mercury column at inlet in condenser(in cm):\n", + "H2 = 73 #Height in mercury column at outlet in condenser(in cm):\n", + "x = 0.92 #Dryness fraction:\n", + "d = 0.0135951 #Density of mercury(in kg/cm**3):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "#From steam tables:\n", + "hf = 141.97 #kJ/kg\n", + "hfg = 2421.33 #kJ/kg\n", + "Tsat1 = 33.87 #\u00b0C\n", + "Tsat2 = 28.96 #\u00b0C\n", + "\n", + "#Calculations:\n", + "p1 = (76-H1)*d*10**4*g*10**(-3) #Inlet pressure in condenser(in kPa):\n", + "p2 = (76-H2)*d*10**4*g*10**(-3) #Outlet pressure in the condenser(in kPa):\n", + "u = Tsat1-Tsat2 #Undercooling(in C):\n", + "h = hf+x*hfg #Enthalpy of steam entering(in kJ/kg):\n", + "m = (h-Cpw*Tsat2)/(Cpw*13.87) #Cooling water requirement(in kg/kg steam):\n", + "\n", + "#Results: \n", + "print \"Undercooling: \",round(u,2),\"\u00b0C\"\n", + "print \"Cooling water requirement: \",round(m,2),\"kg/kg steam\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Undercooling: 4.91 \u00b0C\n", + "Cooling water requirement: 38.78 kg/kg steam\n" + ] + } + ], + "prompt_number": 21 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter16.ipynb b/Applied_Thermodynamics/Chapter16.ipynb new file mode 100755 index 00000000..d678e85b --- /dev/null +++ b/Applied_Thermodynamics/Chapter16.ipynb @@ -0,0 +1,899 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:989996224965b46a7f7acf7a19fb2013a5188045b934aa862e6400be6d28d97c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16: Reciprocating and Rotary Compressor" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 742" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import log,pi\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1*10**2 #Pressure of air entering(in kPa):\n", + "n = 1.2 #Index of compression:\n", + "p2 = 12*10**2 #Delivery pressure(in kPa):\n", + "N = 240 #Speed(in rpm):\n", + "T1 = 20+273 #Initial temperature(in K):\n", + "r1 = 1.8 #L/D ratio:\n", + "nm = 0.88 #Mechanical efficiency:\n", + "V1 = 1 #m**3\n", + "R = 0.287#Gas constant(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "m = p1*V1/(R*T1) Mass of air delivered per minute:\n", + "T2 = T1*(p2/p1)**((n-1)/n)#Temperature at the end of compression(in K)\n", + "W = (n/(n-1))*m*R*(T2-T1)#Work required during compression process(in kJ/min):\n", + "Whp = W/60/0.7457 #Work required during compression process(hp): \n", + "C = Whp/nm#Capacity of drive required to run compressor(in hp):\n", + "Wiso = m*R*T1*log(p2/p1) #Isothermal work required for same compression(in kJ/min):\n", + "niso = Wiso/W*100#Isothermal efficiency:\n", + "v = 1/N#Volume of aur entering per cycle:\n", + "D = (v*4/(pi*r1))**(1/3)*100#Bore diameter(in cm):\n", + "L = r1*D#Stroke length(in cm):\n", + "\n", + "#Results: \n", + "print \"Isothermal efficiency: \",round(niso,2),\"%\"\n", + "print \"Cylinder dimension, D: \",round(D,2),\"cm\"\n", + "print \" L: \",round(L,3),\"cm\"\n", + "print \"Rating of drive: \",round(C,2),\"hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Isothermal efficiency: 80.72 %\n", + "Cylinder dimension, D: 14.34 cm\n", + " L: 25.808 cm\n", + "Rating of drive: 7.82 hp\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 745" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi,log\n", + "\n", + "#Variable Declaration: \n", + "r = 7 #Compression ratio:\n", + "r1 = 1.2 #L/D ratio:\n", + "N = 240 #Speed(in rpm):\n", + "p1 = 0.97 #Pressure(in bar):\n", + "T1 = 35+273 #Temperature(in K):\n", + "V = 20 #Volume(in m**3):\n", + "V3 = 0.05\n", + "V1 = 1.05\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "n = 1.25 #Index of compression:\n", + "\n", + "#Calculations:\n", + "p2 = r*p1\n", + "m = 10**2*V/(R*300) #Mass of air delivered(in kg/min):\n", + "T2 = T1*r**((n-1)/n) #Temperature at state 2(in K):\n", + "V4 = V3*r**(1/n) #Volume at state 4(in m**3):\n", + "nv = p1*300/T1*(V1-V4)*100 #Volumetric efficiency:\n", + "Vs = V/(4*N) #Swept volume(in m**3/cycle):\n", + "D = (Vs*4/(pi*r1))**(1/3) #Bore(in m):\n", + "L = r1*D #Stroke(in m):\n", + "W = n/(n-1)*m*R*(T2-T1)/(60*0.7457) #Work required in reciprocating compressor(in hp):\n", + "Wiso = m*R*T1*log(r)/(60*0.7457) #Work done in isothermal process(in hp):\n", + "ni = Wiso/W*100 #Isothermal efficiency:\n", + "\n", + "#Results: \n", + "print \"Volumetric efficiency: \",round(nv,2),\"%\"\n", + "print \"Bore: \",round(D*100,2),\"cm\"\n", + "print \"Stroke: \",round(L*100,2),\"cm\"\n", + "print \"Isothermal efficiency: \",round(ni,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric efficiency: 76.8 %\n", + "Bore: 28.06 cm\n", + "Stroke: 33.68 cm\n", + "Isothermal efficiency: 81.8 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 749" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "p = 10**2 #Atmospheric pressure(in kPa):\n", + "p1 = 1\n", + "p3 = 8\n", + "Ta = 300 #Temperature(in K):\n", + "Va = 4\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "n = 1.2 #Index of compression:\n", + "\n", + "#Calculations:\n", + "T1 = Ta\n", + "T2a = 273+30\n", + "V1 = Va\n", + "m = p*Va/(R*Ta) #Mass of air compressed(in kg/min):\n", + "Wi = n/(n-1)*p1*10**2*Va*((p3/p1)**((n-1)/n)-1)/(60*0.7457)#Work input(in hp):\n", + "p2 = sqrt(p1*p3) #Optimum intercooling pressure(in bar):\n", + "Wii = 2*n/(n-1)*p1*10**2*Va*((p3/p1)**((n-1)/(2*n))-1)/(60*0.7457)#Work input for 2nd stage compression(in hp):\n", + "Wii = 20.29\n", + "V2a = p1*V1/T1*T2a/p2 #Volume of air inlet of HP cylinder(in m**3/min):\n", + "W2 = n/(n-1)*p1*10**2*V1*((p2/p1)**((n-1)/n)-1)/(60*0.7457)+n/(n-1)*p2*10**2*V2a*((p3/p2)**((n-1)/n)-1)/(60*0.7457)\t\t\t\t#Work required(in hp):\n", + "W2 = 20.42\n", + "ps = (Wi-Wii)/Wi*100 #Percentage saving in work:\n", + "pe = (W2-Wii)/W2*100 #% excess work to be done:\n", + "\n", + "#Results: \n", + "print \"Percentage saving in work: \",round(ps,2),\"%\"\n", + "print \"Percentage excess work to be done: \",round(pe,3),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage saving in work: 8.68 %\n", + "Percentage excess work to be done: 0.637 %\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 750" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 2 #Rate at which air is delivered(in m**3/min):\n", + "p1 = 1 #Initial pressure(in bar):\n", + "T1 = 300 #K\n", + "p = 150 #bar\n", + "n = 1.25 #Polytropic index of compression:\n", + "p2 = 3.5\n", + "p3 = 12.25\n", + "p4 = 42.87\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T = T1*(p2/p1)**((n-1)/n) #Temperature at the end of fourth stage(in K):\n", + "m = p*10**2*2/(R*T) #Mass of air(in kg):\n", + "W = n/(n-1)*m*R*T1*((p2/p1)**((n-1)/n)-1)*4/(60*0.7457) #Work required(in kW):\n", + "\n", + "print \"Intermediate pressure: \",round(p2,2),\"bar\",round(p3,2),\"bar\",round(p4,2),\"bar respectively\"\n", + "print \"Work input: \",round(W,2),\"hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intermediate pressure: 3.5 bar 12.25 bar 42.87 bar respectively\n", + "Work input: 2972.1 hp\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 751" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1 #Pressures(in bar):\n", + "p2 = 4\n", + "p3 = 16\n", + "n = 1.3 #Index of compression:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "T1 = 17+273 #Temperature(in K):\n", + "nv = 0.90 #Volumetric efficiency:\n", + "Dhp = 0.06 #Bore diameters(in m):\n", + "Dlp = 0.12\n", + "\n", + "#Calculations:\n", + "W = n/(n-1)*R*T1*((p2/p1)**((n-1)/n)+(p3/p2)**((n-1)/n)-2) #Work required(in kJ/kg):\n", + "\n", + "#Results: \n", + "print \"Work: \",round(W,2),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work: 271.95 kJ/kg\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 752" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import sqrt,log\n", + "\n", + "#Variable Declaration: \n", + "N = 200 #Speed(in rpm):\n", + "m = 4 #Mass flow rate(in kg/min):\n", + "p1 = 1 #Pressure(in bar):\n", + "p6 = 25\n", + "T1 = 17+273 #Temperatures(in K):\n", + "Clp = 0.04 #Clearance volumes:\n", + "Chp = 0.05\n", + "n = 1.25 #Index of compression:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T5 = T1\n", + "r = sqrt(p6/p1) #Pressure ratio:\n", + "T2 = T1*r**((n-1)/n) #Temperature at state 2(in K):\n", + "T6 = T5*r**((n-1)/n) #Temperature at state 6(in K):\n", + "W = 2*n/(n-1)*m*R*T1*(r**((n-1)/n)-1) #Actual compression work requirement(in kJ/min):\n", + "Wi = m*R*T1*log(p6/p1) #Work required if process is isothermal(in kJ/min):\n", + "ni = Wi/W #Isothermal efficiency:\n", + "Vf = m*R*T1/(p1*10**2)#Free air delivered(in m**3/min):\n", + "Q = W/2-m*Cp*(T2-T1) #Heat transferred in HP & LP cylinder(in kJ/min):\n", + "nvhp = 1+Chp-Chp*r**(1/n) #Volumetric efficiency of HP cylinder:\n", + "nvlp = 1+Clp-Clp*r**(1/n) #Volumetric efficiency of LP cylinder:\n", + "Vshp = Vf/(r*N*nvhp) #Stroke volume of HP cylinder(in m**3):\n", + "Vchp = Chp*Vshp #Clearance volume Of HP cylinder(in m**3):\n", + "Vthp = Vshp+Vchp #Total HP cylinder volume(in m**3):\n", + "Vslp = Vf/(N*nvlp) #Stroke volume of LP cylinder(in m**3):\n", + "Vclp = Clp*Vslp #Clearance volume of LP cylinder(in m**3):\n", + "Vtlp = Vslp+Vclp #Total LP cylinder volume(in m**3):\n", + "\n", + "#Results: \n", + "print \"Power required: \",round(W/(60*0.7457),2),\"hp\"\n", + "print \"Isothermal efficiency: \",round(ni*100,2),\"%\"\n", + "print \"Free air delivered: \",round(Vf,2),\"m^3/min\"\n", + "print \"Heat transferred in HP & LP cylinder: \",round(Q,2),\"kJ/min\"\n", + "print \"HP cylinder volume: \",round(Vthp*10**3,3),\" x 10^-3 m^3\"\n", + "print \"LP cylinder volume: \",round(Vtlp,6),\"m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required: 28.26 hp\n", + "Isothermal efficiency: 84.77 %\n", + "Free air delivered: 3.33 m^3/min\n", + "Heat transferred in HP & LP cylinder: 190.2 kJ/min\n", + "HP cylinder volume: 4.024 x 10^-3 m^3\n", + "LP cylinder volume: 0.019342 m**3\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 755" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration: \n", + "N = 200 #Speed(in rpm):\n", + "n = 1.2 #Index of compression:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n", + "D = 0.30 #Bore(in m):\n", + "L = 0.40 #Stroke(in m):\n", + "C = 0.05 #Clearance volume:\n", + "p1 = 1 #Pressure(in bar):\n", + "p5 = 2.9\n", + "p6 = 9\n", + "T1 = 25+273 #Temperatures(in K):\n", + "\n", + "#Calculations:\n", + "T5 = T1\n", + "p2 = sqrt(p6/p1) #Optimum intercooling pressure(in bar):\n", + "Vlp = pi*D**2/4*L*N*2 #Volume of LP cylinder(in m**3/min):\n", + "nvlp = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency:\n", + "V1 = Vlp*nvlp #Volume of air inhaled in LP stage(in m**3/min):\n", + "m = p1*10**2*V1/(R*T1) #Mass of air per minute(in kg/min):\n", + "T2 = T1*(p2/p1)**((n-1)/n) #Temperature after compression(in K):\n", + "V5 = m*R*T5/(p5*10**2) #Volume of air going into HP cylinder(in m**3/min):\n", + "nvhp = nvlp\n", + "Vhp = V5/nvhp #Volume of HP cylinder(in m**3/min):\n", + "Dhp = sqrt(Vhp*4/(pi*L*2*N)) #Diameter of bore(in m):\n", + "Q = m*Cp*(T2-T5) #Heat rejected in intercooler(in kJ/min):\n", + "T6 = T5*(p6/p5)**((n-1)/n) #Temperature at state 6(in K):\n", + "Whp = n/(n-1)*m*R*(T6-T5)/(60*0.7457)#Work input required for HP stage(in kJ/min):\n", + "\n", + "#Results: \n", + "print \"Heat rejected in intercooler: \",round(Q,2),\"kJ/min\"\n", + "print \"Bore of HP cylinder: \",round(Dhp*100,2),\"cm\"\n", + "print \"Horse power required to drive HP stage: \",round(Whp,2),\"hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat rejected in intercooler: 734.86 kJ/min\n", + "Bore of HP cylinder: 17.62 cm\n", + "Horse power required to drive HP stage: 29.15 hp\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 757" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi, sqrt\n", + "\n", + "#Variable Declaration: \n", + "h = 75.6 #Barometer reading(in cm):\n", + "d = 0.013591 #Density of mercury(in kg/cm**3):\n", + "d1 = 15*10**(-3) #Diameter of orifice(in m):\n", + "r1 = 0.65 #Coefficient of discharge:\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "T = 25+273 #Atmospheric temperature(in K):\n", + "h1 = 13 #Manometer reading(in cm):\n", + "R = 0.287\n", + "\n", + "#Calculations:\n", + "A = pi*d1**2/4 #Cross-sectional area of orifice(in m**2):\n", + "p = h*d*g*10 #Atmospheric pressure(in kPa):\n", + "v = (R*T)/p #Specific volume at atmospheric conditions(in m**3/kg):\n", + "da = 1/v #Density of air(in kg/m**3):\n", + "pd = h1*d*g*10 #Pressure difference across orifice(in kPa):\n", + "ha = pd*10**3/(da*g) #Height of air column(in m):\n", + "f = r1*A*sqrt(2*g*ha)*60 #Free air delivery(in m**3/min):\n", + "\n", + "#Results: \n", + "print \"Free air delivery: \",round(f,3),\"m**3/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Free air delivery: 1.182 m**3/min\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 757" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import pi\n", + "#Variable Declaration: \n", + "D = 0.10 #Bore(in m):\n", + "L = 0.08 #Stroke(in m):\n", + "N = 500 #Speed(in rpm):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "T = 27+273 #Atmospheric temperature(in K):\n", + "r = 0.30 #Radius of arm of spring balance(in m):\n", + "nm = 0.90 #Mechanical efficiency:\n", + "f = 15/60 #Free air delivery(in m**3/min):\n", + "\n", + "#Calculations:\n", + "V = pi*D**2*L/4 #Volume of cylinder(in m**3):\n", + "nv = f/(V*N)*100 #Volumetric efficiency:\n", + "W = 2*pi*N*100*g*r*10**(-3)/(60*0.7457) #Shaft output(in hp):\n", + "W1 = W/f #Shaft output per m**3 of free air per min:\n", + "\n", + "#Results: \n", + "print \"Volumetric efficiency: \",round(nv,2),\"%\"\n", + "print \"Shaft output per m**3 of free air: \",round(W1,2),\"hp per m**3 of free air per minute\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric efficiency: 79.58 %\n", + "Shaft output per m**3 of free air: 82.66 hp per m**3 of free air per minute\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 758" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "p2 = 180 #Pressures(in bar):\n", + "p1 = 1\n", + "T1 = 300 #Temperatures(in K):\n", + "T2 = 273+150\n", + "n = 1.25 #Index of polytropic compression:\n", + "\n", + "#Calculations:\n", + "i = (n-1)/n*log(p2/p1)/log(T2/T1) #Number of stages:\n", + "\n", + "#Results: \n", + "print \"Number of stages: \",round(i) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Number of stages: 3.0\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 759" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1 #Pressures(in bar):\n", + "p10 = 20\n", + "T1 = 300 #Temperatures(in K):\n", + "C = 0.04 #Clearance:\n", + "D = 0.30 #Bore(in m):\n", + "L = 0.20 #Stroke(in m):\n", + "n = 1.25 #Index of compression:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T5 = T1\n", + "T9 = T1\n", + "p2 = p1*(20)**(1/3) #Pressure at stage 2(in bar):\n", + "p6 = p10/(20**(1/3))\n", + "nvlp = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency of LP stage:\n", + "Vs = pi*D**2/4*L #LP swept volume(in m**3):\n", + "Vsa = nvlp*Vs #Effective swept volume(in m**3):\n", + "T10 = T9*(p10/p6)**((n-1)/n) #Temperature of air delivered(in K):\n", + "Vd = p1/p10*Vsa*T10/T1 #Volume of air delivered(in m**3):\n", + "W = 3*(n/(n-1))*R*T1*((p2/p1)**((n-1)/n)-1) #Total work done(in kJ/kg of air):\n", + "\n", + "#Results:\n", + "print \"Intermediate pressure: \",round(p2,3),\"bar\",round(p6,3),\"bar\"\n", + "print \"Effective swept volume of LP cylinder: \",round(Vsa,5),\"m**3\"\n", + "print \"Temperature of air delivered: \",round(T10,2),\"K\"\n", + "print \"Volume of air delivered: \",round(Vd*10**4,4),\" x 10^-4 m**3\"\n", + "print \"Work done: \",round(W,2),\"kJ/kg of air\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intermediate pressure: 2.714 bar 7.368 bar\n", + "Effective swept volume of LP cylinder: 0.01345 m**3\n", + "Temperature of air delivered: 366.32 K\n", + "Volume of air delivered: 8.2089 x 10^-4 m**3\n", + "Work done: 285.49 kJ/kg of air\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 760" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1 #Pressures(in bar):\n", + "p2 = 6\n", + "p6 = 30\n", + "T6 = 273+150 #Temperatures(in K):\n", + "T5 = 273+35\n", + "T1 = 300\n", + "Clp = 0.05 #Clearance volumes:\n", + "Chp = 0.07\n", + "m = 2 #Mass flow rate(in kg/s):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cp = 1.0032 #Specific heat(in kJ/kg.K):\n", + "Cv = 0.72\n", + "r = 1.4 #Adiabatic index of compression:\n", + "\n", + "#Calculations:\n", + "p5 = p2\n", + "n = 1/(1-log(T6/T5)/log(p6/p5)) #Index of compression:\n", + "nvlp = 1+Clp-Clp*(p2/p1)**(1/n) #Volumetric efficiency of LP cylinder:\n", + "nvhp = 1+Chp-Chp*(p6/p5)**(1/n) #Volumetric efficiency of HP cylinder:\n", + "Vslp = m*R*T1*60/(p1*10**2*nvlp) #Swept volume of LP cylinder(in m**3/min):\n", + "Vshp = m*R*T5*60/(p2*10**2*nvhp) #Swept volume of HP cylinder(in m**3/min):\n", + "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n", + "Q = m*Cp*(T2-T5)#Cooling required in intercooler(in kW):\n", + "W = n/(n-1)*m*R*((T1*((p2/p1)**((n-1)/n)-1))+(T5*((p6/p5)**((n-1)/n)-1)))#Work input required(in kW):\n", + "Qlp = m*(r-n)/(n-1)*Cv*(T2-T1)#Heat transferred in LP cylinder(in kW):\n", + "Qhp = m*(r-n)/(n-1)*Cv*(T6-T5) #Heat transferred in HP cylinder(in kW):\n", + "\n", + "#Results: \n", + "print \"Swept volume of LP cylinder: \",round(Vslp,2),\"m**3/min\"\n", + "print \"Swept volume of HP cylinder: \",round(Vshp,2),\"m**3/min\"\n", + "print \"Heat picked up in the intercooler: \",round(Q,2),\"kW\"\n", + "print \"Total work required: \",round(W,2),\"kW\"\n", + "print \"Amount of cooling required in LP cylinder: \",round(Qlp,2),\"kW\"\n", + "print \"Amount of cooling required in HP cylinder: \",round(Qhp,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Swept volume of LP cylinder: 123.11 m**3/min\n", + "Swept volume of HP cylinder: 21.69 m**3/min\n", + "Heat picked up in the intercooler: 238.94 kW\n", + "Total work required: 704.91 kW\n", + "Amount of cooling required in LP cylinder: 115.13 kW\n", + "Amount of cooling required in HP cylinder: 104.18 kW\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 763" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "p2 = 2 #Pressures(in bar):\n", + "p1 = 1\n", + "V1 = 0.5 #Volume(in m**3):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "\n", + "#Calculations:\n", + "Wr = (p2-p1)*10**2*V1 #IP required(in kW):\n", + "Wi = r/(r-1)*p1*10**2*V1*((p2/p1)**((r-1)/r)-1)#IP when isentropic compression occurs(in kW):\n", + "ni = Wi/Wr*100 #Isentropic efficiency:\n", + "\n", + "#Results: \n", + "print \"Indicated power of roots blower: \",round(Wr/0.7457,2),\"hp\"\n", + "print \"Isentropic efficiency: \",round(ni,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power of roots blower: 67.05 hp\n", + "Isentropic efficiency: 76.65 %\n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 764" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "V1 = 0.6 #Volume flow rate(in m**3/kg):\n", + "p1 = 1 #Pressures(in bar):\n", + "p2a = 2.3\n", + "r = 1.4\n", + "r1 = 0.7#Ratio of V1/V2:\n", + "\n", + "#Calculations: \n", + "p2 = p1*(1/r1)**r #Pressure at state 2(in bar):\n", + "Wv = (r/(r-1)*p1*10**2*V1*((p2/p1)**((r-1)/r)-1)+(p2a-p2)*10**2*V1*r1)/0.7457#IP required for vaned compressor(in hp):\n", + "Wi = (r/(r-1)*p1*10**2*V1*((p2a/p1)**((r-1)/r)-1))/0.7457 #Power requirement when compression occurs isentropically(in hp):\n", + "ni = Wi/Wv*100 #Isentropic efficiency:\n", + "\n", + "#Results: \n", + "print \"Indicated power required: \",round(Wv,3),\"hp\"\n", + "print \"Isentropic efficiency: \",round(ni,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power required: 79.928 hp\n", + "Isentropic efficiency: 94.66 %\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 765" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "T0 = 300 #Temperature(in K):\n", + "V1 = 50 #Velocity(in m/s):\n", + "m = 18 #Mass flow rate(in kg/min):\n", + "Cp = 1.0032 #Specifc heat(in kJ/kg.K):\n", + "nm = 0.90 #Mechanical efficiency:\n", + "ni = 0.75 #Isentropic efficiency:\n", + "r1 = 4 #Pressure ratio:\n", + "r = 1.4 #Adiabatic index of compression:\n", + "\n", + "#Calculations:\n", + "T1 = T0+V1**2/(2*Cp*10**3) #Stagnation temperature(in K):\n", + "T2a = T1*r1**((r-1)/r)\n", + "T2 = (T2a-T1)/ni+T1\n", + "BP = m*Cp*(T2-T1)/(60*nm*0.7457) #Brake power required(in hp):\n", + " \n", + "#Results: \n", + "print \"Total head temperature at exit: \",round(T2,2),\"K\"\n", + "print \"Brake power required: \",round(BP,2),\"hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total head temperature at exit: 496.45 K\n", + "Brake power required: 87.54 hp\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 766" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "V = 0.015 #Piston printlacement per revolution(in m**3/rev):\n", + "N = 500 #Speed(in rpm):\n", + "C = 0.05 #Clearance:\n", + "p2 = 6 #Pressures(in bar):\n", + "n = 1.3 #Index of compression:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "T1 = 20+273 #Temperature(in K):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "Cv = 0.718 #Value of Cv(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "p1 = 1\n", + "nv = 1+C-C*(p2/p1)**(1/n) #Volumetric efficiency:\n", + "Vs = V*2*N #Swept volume(in m**3/min):\n", + "V1 = Vs*0.85 #Actual air inhaled(in m**3/min):\n", + "m = p1*10**2*V1/(R*T1) #Mass of air entering(in kg/min):\n", + "P = n/(n-1)*p1*10**2*V1*((p2/p1)**((n-1)/n)-1)#Power required(in kJ/min):\n", + "T2 = 298*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n", + "Q = m*Cv*(r-n)/(n-1)*(T2-T1) #Heat transferred during compression(in kJ/min):\n", + "\n", + "#Results: \n", + "print \"Volumetric efficiency: \",round(nv*100,2),\"%\"\n", + "print \"Power required: \",round(P,2),\"kJ/min\"\n", + "print \"Heat rejected during compression: \",round(Q,2),\"kJ/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric efficiency: 85.16 %\n", + "Power required: 2829.21 kJ/min\n", + "Heat rejected during compression: 571.89 kJ/min\n" + ] + } + ], + "prompt_number": 39 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter17.ipynb b/Applied_Thermodynamics/Chapter17.ipynb new file mode 100755 index 00000000..897d24a0 --- /dev/null +++ b/Applied_Thermodynamics/Chapter17.ipynb @@ -0,0 +1,591 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1c2e3038adc30a476d490492d6ffb75ea411a368f94f9012a25719b295c63337" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 17: Introduction to Internal Combustion Engines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 790" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "r1 = 1.2 #L/D ratio:\n", + "D = 0.12 #Cylinder diameter(in m):\n", + "A = 30*10**(-4) #Area of indicated diagram(in m**2):\n", + "k = 20*10**3 #Spring constant(in kN/m**2):\n", + "N = 2000 #Rpm of engine:\n", + "r = 0.10 #Percentage power lost:\n", + "\n", + "#Calculations:\n", + "L = r1*D #Stroke length(in m):\n", + "l = L/2 #Length of indicator diagram(in m):\n", + "mep = A*k*10**3/l #Mep(in N/m**2):\n", + "A2 = pi*D**2/4 #Cross-sectional area of piston(in m**2):\n", + "IP = 4*mep*A2*L*N/(2*60) #Total indicated power for 4 cylinders(in W):\n", + "FP = r*IP #Fricitional loss(in W):\n", + "BP = IP-FP #Brake power available(in W):\n", + "nm = BP/IP*100 #Mechanical efficiency:\n", + "\n", + "#Results: \n", + "print \"Indicated power: \",round(IP,1),\"W\"\n", + "print \"Mechanical efficiency: \",round(nm,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 90477.9 W\n", + "Mechanical efficiency: 90.0 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 791" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "A = 40*10**(-4) #Indicator diagram area & length(in m**2 & m):\n", + "l = 0.08\n", + "D = 0.15 #Bore(in m):\n", + "L = 0.20 #Stroke(in m):\n", + "N = 100 #Rpm of motor:\n", + "\n", + "#Calculations:\n", + "k = 1.5*10**8 #Spring constant(in Pa/m):\n", + "mep = A*k/l #Mep(in Pa):\n", + "IP = (pi*D**2/4*L*mep*N/60*2)/10**3 #Indicated power(in kW):\n", + "\n", + "#Results: \n", + "print \"Power required to drive: \",round(IP,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required to drive: 88.36 kW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 791" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "nm = 0.90 #Mechanical efficiency:\n", + "BP = 38 #Rating(in kW):\n", + "\n", + "#Calculations:\n", + "IP = BP/nm #Indicated power(in kW):\n", + "FP = IP-BP #Fricitional loss(in kW):\n", + "BP1 = 0.25*BP #Brake power at quater load(in kW):\n", + "nm1 = BP1/(BP1+FP)*100 #Mechanical efficiency:\n", + "\n", + "#Results: \n", + "print \"Indicated power: \",round(IP,2),\"W\"\n", + "print \"Fricitonal power loss: \",round(FP,2),\"kw\"\n", + "print \"Mechanical efficiency: \",round(nm1,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 42.22 W\n", + "Fricitonal power loss: 4.22 kw\n", + "Mechanical efficiency: 69.23 %\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 792" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "m1 = 0.25 #Specific fuel consumption(in kg/kW.h):\n", + "pbmep = 1.5*10**3 #Brake mean effective pressure(in kPa):\n", + "N = 100 #Speed of engine(in rpm):\n", + "D = 0.85 #Bore of cylinder(in m):\n", + "L = 2.20 #Stroke(in m):\n", + "C = 43*10**3 #Calorific value of diesel(in kJ/kg):\n", + "BP = pbmep*L*(pi*D**2/4)*N/60 #Brake power of engine(in kW):\n", + "m = m1*BP #Fuel consumption(in kg/hr):\n", + "q = m*C/3600 #Heat from fuel(in kJ/s):\n", + "nb = BP/q*100 #Brake thermal efficiency:\n", + "\n", + "#Results: \n", + "print \"Brake power: \",round(BP/100,2),\"MW\"\n", + "print \"Fuel consumption rate: \",round(m,2),\"kg/hr\"\n", + "print \"Brake thermal efficiency: \",round(nb,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Brake power: 31.21 MW\n", + "Fuel consumption rate: 780.24 kg/hr\n", + "Brake thermal efficiency: 33.49 %\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 792" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "pb = 6*10**2 #Effective pressure(in kPa):\n", + "N = 600 #Speed:\n", + "m1 = 0.25 #Specific fuel consumption(in kg/kW.h)\n", + "D = 0.20 #BOre(in m):\n", + "L = 0.30 #Stroke length(in m):\n", + "r = 26 #Air fuel ratio:\n", + "C = 43*10**3 #Calorific value(in kJ/kg):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "p = 1*10**2 #kPa #Ambient conditions:\n", + "T = 300 #K\n", + "\n", + "#Calculation:\n", + "nb = 3600/(m1*C)*100 #Brake thermal efficiency:\n", + "BP = 4*pb*L*(pi*D**2/4)*N/60 #Brake power(in kW):\n", + "ma = m1*BP*r/60 #Air consumption rate(in kg/min):\n", + "Va = ma*R*T/p #Volume(in m**3/min):\n", + "Vs = pi*(0.3)**2*0.4/4 #Swept volume(in m**3):\n", + "nv = Va/(Vs*N/2*4)*100 #Volumetric efficiency:\n", + "\n", + "#Results: \n", + "print \"Brake thermal efficiency: \",round(nb,2),\"%\"\n", + "print \"Brake power: \",round(BP,2),\"kW\"\n", + "print \"Volumetric efficiency: \",round(nv,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Brake thermal efficiency: 33.49 %\n", + "Brake power: 226.19 kW\n", + "Volumetric efficiency: 62.18 %\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 793" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi,sqrt\n", + "\n", + "#Variable Declaration: \n", + "n = 0.7 #Volumetric efficiency\n", + "r = 19 #Air fuel ratio:\n", + "N = 3000 #Speed(in rpm):\n", + "m = 5 #Fuel consumption rate(in litres/hr):\n", + "sg = 0.7 #Specific gravity:\n", + "s = 500 #Piston speed(in m/min):\n", + "p = 6*10**2 #Mep(in kPa):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "nm = 0.8 #Mechanical efficiency:\n", + "\n", + "#Calculations:\n", + "L = s/(2*N) #Stroke length(in m):\n", + "ma = r*m*sg/60 #Air requirement(in kg/min):\n", + "Va = ma*R*288/(1.013*10**2) #Volume of air sucked(in m**3/min):\n", + "D = sqrt(Va*4/(pi*L*N*2*n)) #Bore diameter(in m):\n", + "IP = p*L*(pi*D**2/4*N*2)/60 #Indicated power(in kW):\n", + "BP = IP*nm #Brake power(in kW):\n", + "\n", + "#Results: \n", + "print \"Brake power: \",round(BP,2),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Brake power: 10.34 KW\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 794" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "FP = 5 #Friction power(in kW):\n", + "N = 3000 #Rpm:\n", + "D = 0.20 #Bore(in m):\n", + "L = 0.30 #Stroke(in m):\n", + "m = 0.15 #Fuel supplied at rate(in kg/min):\n", + "F = 20 #Load(in kg):\n", + "r = 0.5 #Radius(in m):\n", + "C = 43000 #Calorific value of fuel(in kJ/kg):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculations:\n", + "BP = 2*pi*N*(F*g*r*10**(-3))/60 #Brake power(in kW):\n", + "IP = BP+FP #Indicated power(in kW):\n", + "nm = BP/IP #Mechanical efficiency:\n", + "BSFC = m*60/BP #BSFC(in kg/kW.hr):\n", + "nbth = 3600/(BSFC*C)*100 #Brake thermal efficiency:\n", + "nith = nbth/nm #Indicated thermal efficiency:\n", + "Pimep = IP/(L*(pi*D**2/4)*N/60) #Indicated mep(in kPa):\n", + "Pbmep = Pimep*nm #Brake mep(in kPa):\n", + "\n", + "#Results: \n", + "print \"Brake power: \",round(BP,2),\"KW\"\n", + "print \"Indicated power: \",round(IP,2),\"KW\"\n", + "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"\n", + "print \"Brake thermal efficiency: \",round(nbth,2),\"%\"\n", + "print \"Indicated thermal efficiency: \",round(nith,2),\"%\"\n", + "print \"Brake mean effective pressure: \",round(Pbmep,2),\"kPa\"\n", + "print \"Indicated mean effective pressure: \",round(Pimep,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Brake power: 30.82 KW\n", + "Indicated power: 35.82 KW\n", + "Mechanical efficiency: 86.04 %\n", + "Brake thermal efficiency: 28.67 %\n", + "Indicated thermal efficiency: 33.32 %\n", + "Brake mean effective pressure: 65.4 kPa\n", + "Indicated mean effective pressure: 76.01 kPa\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 795" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "N = 300 #Speed(in rpm):\n", + "BP = 250 #Brake power(in kW):\n", + "D = 0.30 #Bore diameter(in m):\n", + "L = 0.25 #Stroke length(in m):\n", + "m = 1 #Fuel consumption rate(in kg/min):\n", + "r = 10 #Air fuel ratio:\n", + "C = 43000 #Calorific value of fuel(in kJ/kg):\n", + "\n", + "#Calculations:\n", + "Pimep = 0.8*10**3 #Indicated mep(in kPa):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "IP = Pimep*L*(pi*D**2/4)*N*4/60\t#Indicated power(in kW):\n", + "nm = BP/IP #Mechanical efficiency:\n", + "BSFC = m*60/BP #BSFC(in kg/kW.hr):\n", + "nbth = 3600/(BSFC*C)*100 #Brake thermal efficiency:\n", + "Vs = pi*D**2*L/4 #Swept volume(in m**3):\n", + "ma = round(1.013*10**2*Vs/(R*300),2)#Mass of air(in kg):\n", + "nv = m*r/(ma*4*N/2)*100\t#Volumetric efficiency:\n", + "\n", + "#Results: \n", + "print \"Indicated power: \",round(IP,2),\"kW\"\n", + "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"\n", + "print \"Brake thermal efficiency: \",round(nbth,2),\"%\"\n", + "print \"Volumetric efficiency: \",round(nv,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 282.74 kW\n", + "Mechanical efficiency: 88.42 %\n", + "Brake thermal efficiency: 34.88 %\n", + "Volumetric efficiency: 83.33 %\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 796" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "k = 25 #Indicator constant(in kN/m**2):\n", + "N = 300 #Rpm:\n", + "Vs = 1.5*10**(-2) #Swept volume(in m**3):\n", + "F = 60 #Load(in kg):\n", + "r = 0.5 #Radius(in m):\n", + "C = 43000 #Calorific value of fuel(in kJ/kg):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "m = 0.12 #Fuel supplied at rate(in kg/min):\n", + "Pimep = 10*k #Indicatedmep(in kPa):\n", + "IP = Pimep*Vs*N/(2*60) #Indicated power(in kW):\n", + "BP = 2*pi*N/(2*60)*(F*g*r)*10**(-3)\t#Brake power(in kW):\n", + "nm = BP/IP #Mechanical efficiency:\n", + "\n", + "#Results:\n", + "print \"Indicated power: \",round(IP,2),\"kW\"\n", + "print \"Brake power: \",round(BP,2),\"W\"\n", + "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 9.38 kW\n", + "Brake power: 4.62 W\n", + "Mechanical efficiency: 49.31 %\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 796" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "k = 25 #Indicator constant(in kN/m**2):\n", + "N = 300 #Rpm:\n", + "Vs = 1.5*10**(-2) #Swept volume(in m**3):\n", + "F = 60 #Load(in kg):\n", + "r = 0.5 #Radius(in m):\n", + "C = 43000 #Calorific value of fuel(in kJ/kg):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "m = 0.12 #Fuel supplied at rate(in kg/min):\n", + "Pimep = 10*k #Indicatedmep(in kPa):\n", + "IP = Pimep*Vs*N/(2*60) #Indicated power(in kW):\n", + "BP = 2*pi*N/(2*60)*(F*g*r)*10**(-3)\t#Brake power(in kW):\n", + "nm = BP/IP #Mechanical efficiency:\n", + "\n", + "#Results:\n", + "print \"Indicated power: \",round(IP,2),\"kW\"\n", + "print \"Brake power: \",round(BP,2),\"W\"\n", + "print \"Mechanical efficiency: \",round(nm*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Indicated power: 9.38 kW\n", + "Brake power: 4.62 W\n", + "Mechanical efficiency: 49.31 %\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 797" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import pi\n", + "\n", + "#Variable Declaration: \n", + "N = 1500 #Speed of engine(in rpm):\n", + "T = 300 #Brake torque(in Nm):\n", + "m = 4 #Fuel consumed(in kg):\n", + "m1 = 15 #Cooling water circulated(in kg/min):\n", + "C = 42000 #Calorific value of fuel(in kJ/kg):\n", + "nm = 0.90 #Mechanical efficiency:\n", + "\n", + "#Calculations:\n", + "BP = 2*pi*N*T/(60*10**3) #Brake power(in kW):\n", + "BSFC = m*60/(m1*BP) #BSFC(in kg/kW.hr):\n", + "IP = BP/nm #Indicated power(in kW):\n", + "nith = IP/(m*C/(m1*60))*100#Indicated thermal efficiency:\n", + "\n", + "#Results: \n", + "print \"Brake power: \",round(BP,2),\"W\"\n", + "print \"Brake specific fuel consumption: \",round(BSFC,2),\"kg/kW.hr\"\n", + "print \"Indicated thermal efficiency: \",round(nith,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Brake power: 47.12 W\n", + "Brake specific fuel consumption: 0.34 kg/kW.hr\n", + "Indicated thermal efficiency: 28.05 %\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter18.ipynb b/Applied_Thermodynamics/Chapter18.ipynb new file mode 100755 index 00000000..a243ce8d --- /dev/null +++ b/Applied_Thermodynamics/Chapter18.ipynb @@ -0,0 +1,830 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:59b1fc8c8d34f6daf41da52caf7a93f8b68598a246de207d874cbeb5751e9b6d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 18: Introduction to Refrigeration and Airconditioning" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 838" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "Q1 = 500 #Heat extracted by carnot cycle(in kJ/min):\n", + "T1 = -16+273 #Temperature of refrigerated space(in K):\n", + "T2 = 27+273 #Atmospheric temperature(in K):\n", + "\n", + "#Calculations:\n", + "Q2 = Q1*(T2/T1) #Heat rejected(in kJ/min):\n", + "W = Q2-Q1 #Work input required(in kJ/min):\n", + "\n", + "#Results: \n", + "print \"Work input: \",round(W,2),\"kJ/min\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work input: 83.66 kJ/min\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 838" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "T1 = -5+273 #Operating temperature(in K):\n", + "T2 = 27+273\n", + "Cpw = 4.18 #Specific heats(in kJ/kg.K):\n", + "L = 335 #Latent heat(in kJ/kg):\n", + "C = 800 #Capacity(in tons):\n", + "\n", + "#Calculations:\n", + "q = C*3.5 #Heat extraction rate(in kJ/s):\n", + "q1 = Cpw*(27-0)+L #Heat to be removed per kg of water(in kJ/kg):\n", + "m = q/q1 #Ice formation rate(in kg/s):\n", + "COP = (T1/(T2-T1)) #COP:\n", + "W = q/COP/0.7457 #Work done(in hp):\n", + "\n", + "\n", + "print \"Mass rate of ice formation: \",round(m,2),\"kg/s\"\n", + "print \"HP required: \",round(W,2),\"hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass rate of ice formation: 6.25 kg/s\n", + "HP required: 448.34 hp\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 839" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "W = 3 #Work done(in hp):\n", + "T1 = -27+273 #Temperature to be maintained(in K):\n", + "\n", + "#Calculations:\n", + "COP = 1*3.5/(W*0.7457)#COP:\n", + "T2 = T1+T1/COP #Temperature of surroundings(in K):\n", + "\n", + "#Results: \n", + "print \"COP: \",round(COP,2)\n", + "print \"Temperature of surroundings: \",round(T2,2),\"K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "COP: 1.56\n", + "Temperature of surroundings: 403.24 K\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 839" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "r1 = 8 #Pressure ratio:\n", + "T1 = -33+273 #Operating temperatures(in K)\n", + "T3 = 27+273\n", + "nic = 0.85 #Isentropic efficiency of compression:\n", + "nie = 0.90 #Isentropic efficiency of expansion:\n", + "Cp = 1.005 #Specific heat(in kJ/kg):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "m = 1 #Air flow rate(in kg/s):\n", + "\n", + "#Calculations:\n", + "T2a = T1*(r1)**((r-1)/r) #Temperature at state 2'(in K):\n", + "T2 = (T2a-T1)/nic+T1 #Temperature at state 2(in K):\n", + "T4a = T3*(1/r1)**((r-1)/r) #Temperature at state 4'(in K):\n", + "T4 = T3-(T3-T4a)*nie #Temperature at state 2'(in K):\n", + "Wc = Cp*(T2-T1) #Work during compression(in kJ/s):\n", + "Wt = Cp*(T3-T4) #Work during expansion(in kJ/s):\n", + "Qref = Cp*(T1-T4) #Refrigeration effect(in kJ/s):\n", + "W = Wc-Wt #Net work required(in kJ/s):\n", + "COP = Qref/W #COP:\n", + "\n", + "#Results: \n", + "print \"Refrigeration capacity: \",round(Qref,2),\"kJ/s\"\n", + "print \"COP: \",round(COP,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refrigeration capacity: 61.25 kJ/s\n", + "COP: 0.56\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 840" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "T1 = 7+273 #Operating temperatures(in K)\n", + "T3 = 27+273\n", + "p1 = 1 #Pressures(in bar):\n", + "p2 = 5\n", + "r = 1.4 #Adiabatic index of compression:\n", + "Cp = 1.005 #Specific heat(in kJ/kg):\n", + "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n", + "T4 = T3/((p2/p1)**((r-1)/r)) #Temperature at state 4(in K):\n", + "Q23 = Cp*(T2-T3) #Heat rejected in process 2-3(in kJ/kg):\n", + "Q41 = Cp*(T1-T4) #Heat picked during process 4-1(in kJ/kg):\n", + "W = Q23-Q41 #Net work(in kJ/kg):\n", + "COP = Q41/W #COP:\n", + "\n", + "#Results: \n", + "print \"COP: \",round(COP,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "COP: 1.71\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 841" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "p1 = 1 #Pressure(in bar):\n", + "p2 = 5.5\n", + "T1 = -10+273 #Operating temperatures(in K):\n", + "T3 = 27+273\n", + "m = 0.8 #Air flow rate(in kg/s):\n", + "Cp = 1.005 #Specific heat(in kJ/kg):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n", + "T4 = T3/((p2/p1)**((r-1)/r)) #Temperature at state 4(in K):\n", + "C = m*Cp*(T1-T4) #Refrigeration capacity(in kJ/s):\n", + "Wc = m*r/(r-1)*R*(T2-T1) #Work required to run the comoressor(in kJ/s):\n", + "W = m*Cp*((T2-T3)-(T1-T4)) #Net work input(in kJ/s):\n", + "COP = C/W #COP:\n", + "\n", + "#Results: \n", + "print \"Refrigeration capacity: \",round(C,2),\"kJ/s\"\n", + "print \"HP required to run compressor: \",round(Wc/0.7457,2),\"hp\"\n", + "print \"COP: \",round(COP,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Refrigeration capacity: 63.25 kJ/s\n", + "HP required to run compressor: 177.86 hp\n", + "COP: 1.59\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 843" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "p1 = 1.2 #Pressure(in bar):\n", + "p6 = p1\n", + "p3 = 4\n", + "p2 = p3\n", + "p4 = 1\n", + "p7 = 0.9\n", + "T1 = 288 #Temperatures(in K):\n", + "T6 = T1\n", + "T5 = 25+273\n", + "T3 = 323\n", + "T8 = 30+273\n", + "n = 1.45\n", + "n1 = 1.3\n", + "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n", + "T2 = 418.47\n", + "Cp = 1.005\n", + "\n", + "#Calculations: \n", + "T4 = T3*(p4/p3)**((n1-1)/n1) #Temperature at state 4(in K):\n", + "T4 = 234.57\n", + "m = 10*3.5/(Cp*(T5-T4)) #Refrigeration effect(in kg/s):\n", + "T7 = T6*(p7/p6)**((n1-1)/n1) #Temperature at state 7(in K):\n", + "rm = m*(T2-T3)/(T8-T7)+m #Ram air mass flow rate(in kg/s):\n", + "W = m*Cp*(T2-T1) #Work input to the compressor(in kJ/s):\n", + "COP = 10*3.5/W #COP:\n", + "\n", + "#Results: \n", + "print \"Air mass flow rate in cabin: \",round(m,2),\"kg/s\"\n", + "print \"Ram air mass flow rate: \",round(rm,2),\"kg/s\"\n", + "print \"COP: \",round(COP,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air mass flow rate in cabin: 0.55 kg/s\n", + "Ram air mass flow rate: 2.11 kg/s\n", + "COP: 0.486\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 844" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p0 = 0.9 #Pressures(in bar):\n", + "p1 = 1\n", + "p2 = 4\n", + "p3 = p2\n", + "p4 = p3\n", + "p5 = 1.03\n", + "T6 = 298 #Temperatures(in K):\n", + "T0 = 276\n", + "Cp = 1.005 #Specific heat(in kJ/kg):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "C = 15 #Refrigeration capacity:\n", + "nic = 0.9 #Isentropic efficiency for compressor:\n", + "nit = 0.8 #Isentropic efficiency for turbine:\n", + "\n", + "#Calculations:\n", + "T1 = T0*(p1/p0)**((r-1)/r) #Temperature at state 1(in K):\n", + "T2a = T1*(p2/p1)**((r-1)/r) #Temperature at state 2'(in K):\n", + "T2 = T1+(T2a-T1)/nic #Temperature at state 2(in K):\n", + "T3 = 0.34*T2 #Temperature at state 3(in K):\n", + "T4 = T3-10 #Temperature at state 4(in K):\n", + "T5a = T4*(p5/p4)**((r-1)/r) #Temperature at state 5'(in K):\n", + "T5 = T4-(T4-T5a)*nit #Temperature at state 5(in K):\n", + "m = C*3.5/(Cp*(T6-T5)) #Mass flow rate(in kg/s):\n", + "W = m*Cp*(T2-T1) #Work input(in kJ/s):\n", + "COP = C*3.5/W #COP:\n", + "\n", + "#Results: \n", + "print \"COP: \",round(COP,2)\n", + "print \"HP required: \",round(W/0.7457,2),\"hp\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "COP: 1.27\n", + "HP required: 55.51 hp\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 846" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "T1 = -15+273\t\t #Operating temperatures(in K):\n", + "T2 = 25+273\n", + "h2 = 1317.95 #kJ/kg \n", + "s2 = 4.4809 #kJ/kg.K\n", + "h3 = 99.94 #kJ/kg\n", + "s3 = 0.3386 #kJ/kg.K\n", + "h9 = -54.51 #kJ/kg\n", + "s9 = -0.2132 #kJ/kg.K\n", + "s4 = 0.3855 #kJ/kg.K\n", + "\n", + "#Calculations:\n", + "h4 = h3\n", + "s8 = s3\n", + "s1 = s2\n", + "C = T1*(s1-s4)\t\t\t\t #Refrigeration effect(in kJ/kg):\n", + "W = h3-h9-T1*(s3-s9)+(T2-T1)*(s1-s8)\t#Work done(in kJ/kg):\n", + "COP = C/W\t\t\t\t #COP:\n", + "\n", + "#Results: \n", + "print \"COP: \",round(COP,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "COP: 5.94\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 848" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import e\n", + "\n", + "#Variable Declaration: \n", + "T1 = -20+273\t\t\t#Operating temperature(in K):\n", + "T3 = 40+273\n", + "p2 = 9.61\t\t\t\t#Pressures(in bar):\n", + "p1 = 1.51\n", + "n = 1.13\n", + "N = 1200\t\t\t\t#Speed(in rpm):\n", + "h1 = 178.61 #kJ/kg\n", + "h3 = 73.53 #kJ/kg\n", + "h4 = h3\n", + "s1 = 0.7082 #kJ/kg.K\n", + "s2 = s1\n", + "sg = 0.682 #kJ/kg.K\n", + "Cpg = 0.747 #kJ/kg.K\n", + "hg = 203.05 #kJ/kg\n", + "vg = 0.1088 #m**3/kg\n", + "m1 = 2.86 #ton\n", + "C = 0.02\t\t\t #Clearance volume:\n", + "\n", + "#Calculations:\n", + "T2 = T3*(e)**((s1-sg)/Cpg)\t#Temperature of state 2(in K):\n", + "h2 = hg+Cpg*(T2-T3)\t\t#Enthalpy after compression(in kJ/kg):\n", + "Wc = h2-h1\t\t\t\t#Compression work(in kJ/kg):\n", + "r = h1-h4\t\t\t\t#Refrigeration effect(in kJ/kg):\n", + "m = m1*3.5/r\t\t\t#Mass flow rate(in kg/s):\n", + "COP = r/Wc\t\t\t\t#COP:\n", + "nv = 1+C-C*(p2/p1)**(1/n)\t\t\t\t#Volumetric efficiency:\n", + "V = m*60*vg/(nv*N)\t\t\t\t#Piston printlacement(in m**3):\n", + "\n", + "#Results: \n", + "print \"COP: \",round(COP,3)\n", + "print \"Piston printlacement: \",round(V*10**6,2),\"cm**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "COP: 3.205\n", + "Piston printlacement: 565.05 cm**3\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 850" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "#From steam tables:\n", + "h1 = 322.28 #kJ/kg\t\t\t\t\n", + "h2 = 342.32 #kJ/kg\n", + "s2 = 1.1937 #kJ/kg.K\n", + "x1 = 0.961\n", + "h1 = 312.08 #kJ/kg\n", + "h3 = 144.11 #kJ/kg\n", + "h4 = 115.22 #kJ/kg\n", + "m1 = 2\t\t\t\t#Refrigeration effect(in kW):\n", + "\n", + "#Calculations:\n", + "s1 = s2\n", + "h5 = h4\n", + "r = h1-h5\t\t\t\t#Refrigeration effect(in kJ/kg):\n", + "m = m1/r\t\t\t\t#Refrigerant flow rate(in kg/s):\n", + "Wc = h2-h1\t\t\t\t#Compressor work(in kJ/kg):\n", + "COP = r/Wc\t\t\t\t#COP:\n", + "\n", + "#Results: \n", + "print \"COP: \",round(COP,2)\n", + "print \"Mass flow rate: \",round(m,4),\"kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "COP: 6.51\n", + "Mass flow rate: 0.0102 kg/s\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 851" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "w = 0.016\t\t\t\t#Specific humidity(in gm/kg):\n", + "pvsat = 0.03098\t\t\t#Saturated partial pressure of vapour(in bar):\n", + "pv = w/0.622*1.013/(1+w/0.622)#Partial pressure of vapour(in bar):\n", + "r = pv/pvsat*100\t\t\t#Relative humidity:\n", + "\n", + "#Calculations:\n", + "print \"Partial pressure of vapour: \",round(pv,4)\n", + "print \"Relative humidity: \",round(r,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Partial pressure of vapour: 0.0254\n", + "Relative humidity: 82.0 %\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 852" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "r = 0.6\t\t\t\t#Relavite humidity\n", + "pvsat = 0.0425\t\t\t#Saturation pressure(in bar):\n", + "R = 0.287\t\t\t\t#Gas constant(in kJ/kg.K):\n", + "Ta = 303\t\t\t\t#Surrounding temperature(in K):\n", + "hg = 2504.1 #kJ/kg\n", + "Cp = 1.005\t\t\t\t#Specific heat(in kJ/kg.K):\n", + "T = 21.4 \t\t\t\t#Dew point temperature(in C) from steam table:\n", + "pv = 0.0255 #partial pressure of vapour(bar) from steam table:\n", + "#Calculations:\n", + "pa = 1.013-r*pvsat\t\t#Partial pressure of air(in bar):\n", + "w = 0.622*(pv/(1.013-pv))\t#Humidity ratio:\n", + "d = 1.013*10**2*(1+w)/(R*Ta)\t#Density of mixture(in kg/m**3):\n", + "h = Cp*30+w*(hg+1.860*(30-T))#Enthalpy of mixture(in kJ/kg of dry air):\n", + "\n", + "#Results: \n", + "print \"Partial pressure of air: \",round(pa,4),\"bar\"\n", + "print \"Humidity ratio: \",round(w,5),\"jg/kg of dry air\"\n", + "print \"Dew point temperature: \",round(T,1),\"\u00b0C\"\n", + "print \"Density: \",round(d,4),\"kg/m**3\"\n", + "print \"Enthalpy of mixture: \",round(h,1),\"kJ/kg of air\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Partial pressure of air: 0.9875 bar\n", + "Humidity ratio: 0.01606 jg/kg of dry air\n", + "Dew point temperature: 21.4 \u00b0C\n", + "Density: 1.1836 kg/m**3\n", + "Enthalpy of mixture: 70.6 kJ/kg of air\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 852" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "r = 0.80\t\t\t\t#Relavite humidity\n", + "#From pyschometric chart:\n", + "w1 = 0.0086 #kg/kg of air\t\t\t\t\n", + "w2 = 0.01 #kg/kg of air\n", + "h1 = 37 #kJ/kg\n", + "h2 = 50 #kJ/kg\n", + "v2 = 0.854 #m**3/kg\n", + "\n", + "#Calculations:\n", + "m = w2-w1\t\t\t\t#Mass of water added between states 1 and 2:\n", + "ma = r/v2\t\t\t\t#Mass flow rate:\n", + "m1 = m*ma\t\t\t\t#Total mass of water added(in kg/s):\n", + "q = ma*(h2-h1)\t\t\t\t#Heat transferred(in kJ/s):\n", + "\n", + "#Results: \n", + "print \"Mass of water added: \",round(m1,6),\"kg/s\"\n", + "print \"Heat transferred: \",round(q,2),\"kJ/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of water added: 0.001311 kg/s\n", + "Heat transferred: 12.18 kJ/s\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 853" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "m1 = 3\t\t\t\t#Mass flow rate(in kg/s):\n", + "m2 = 2\n", + "Cp = 1.005\t\t\t\t#Specific heat(in kJ/kg.K):\n", + "Cps = 1.86\t\t\t\t#Specofoc heat of stream(in kJ/kg.K):\n", + "r1 = 0.30\t\t\t\t#Relative humidity:\n", + "r2 = 0.85\n", + "#From psychometric chart:\n", + "pvsat1 = 0.04246 #bar\t\t\t\t\n", + "pvsat2 = 0.005628\n", + "hg1 = 2520.7 #kJ/kg\n", + "hg2 = 2559.9 #kJ/kg\n", + "T1 = 30 #\u00b0C\n", + "Tdp1 = 10.5\n", + "T2 = 35 \n", + "Tdp2 = 32\n", + "\n", + "#Calculations:\n", + "pv1 = pvsat1*r1\t\t\t\t#Partial pressure of vapour at 1(in bar):\n", + "w1 = 0.622*pv1/(1.013-pv1)\t\t#Specific humidity:\n", + "h1 = Cp*T1+w1*(hg1-Cps*(T1-Tdp1))\t#Enthalpy at state 1(in kJ/kg):\n", + "pv2 = pvsat2*r2\t\t\t\t#Partial pressure at state 2(in bar):\n", + "w2 = 0.622*pv2/(1.013-pv2)\t\t#Specific humidity:\n", + "h1 = Cp*T2+w2*(hg2-Cps*(T2-Tdp2))\t#Enthalpy at state 1(in kJ/kg):\n", + "mmix = 1/(m1+m2)*(w1*m1/(1+w1)+w2*m2/(1+w2))\t#Mass of vapour:\n", + "wmix = mmix/(1-mmix)\t\t\t#Specific humidity of mixture:\n", + "pv = 1.013*wmix/0.622/(1+w1/0.622)\t#Partial pressure of water vapour(in bar):\n", + "\n", + "#Results: \n", + "print \"Specific humidity of mixture: \",round(wmix,5),\"kg/kg of dry air\"\n", + "print \"Partial pressure of water vapour in mixture: \",round(pv,5),\"bar\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific humidity of mixture: 0.00593 kg/kg of dry air\n", + "Partial pressure of water vapour in mixture: 0.00953 bar\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 855" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "r = 3\t\t\t\t#Rate at which air enters(in m**3/s):\n", + "h1 = 36.4 #kJ/kg\t\t\t\t#From steam tables:\n", + "h2 = 52 #kJ/kg\n", + "v1 = 0.825 #m**3/kg\n", + "\n", + "#Calculations:\n", + "m = 3/v1\t\t\t\t#Mass of air(in kg/s):\n", + "q = m*(h2-h1)\t\t\t\t#Amount of heat added(in kJ/s):\n", + "\n", + "#Results: \n", + "print \"Heat added: \",round(q,2),\"kJ/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat added: 56.73 kJ/s\n" + ] + } + ], + "prompt_number": 35 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter19.ipynb b/Applied_Thermodynamics/Chapter19.ipynb new file mode 100755 index 00000000..250882b3 --- /dev/null +++ b/Applied_Thermodynamics/Chapter19.ipynb @@ -0,0 +1,644 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f1f13cd9c3fdcfa7b8b8c8379d6bf486b07b707956742ab81238144bdac12268" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 19: Jet Propulsion and Rocket Engines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 873" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "Cpg = 1.13 #Specific heat of gases(in kJ/kg.K):\n", + "Cpa = 1.005 \n", + "rg = 1.33\n", + "ra = 1.4\n", + "C = 41.84*10**3 #kJ/kg of fuel\n", + "T1 = 272 #Temperatures(in K):\n", + "T3 = 1000\n", + "nc = 0.84 #Compression efficiency:\n", + "p3 = 3\n", + "p2 = 3\n", + "p1 = 0.5\n", + "p5 = 0.4\n", + "nt = 0.82 #Turbine efficiency:\n", + "nn = 0.92 #Nozzle efficiency:\n", + "Ca = 200 #Speed(in m/s):\n", + "T2 = T1*(p2/p1)**((ra-1)/ra) #Temperature at state 2(in K):\n", + "T2a = T1+(T2-T1)/nc #Temperature at state 2'(in K):\n", + "Wc = Cpa*(T2a-T1) #Compressive work(in kW):\n", + "r = (C-Cpg*T3)/(Cpg*T3-Cpa*T2a) #Air fuel ratio:\n", + "T4a = T3-Cpa/Cpg*(T2a-T1)/(1+r) #Temperature at state 4'(in K):\n", + "T4a = 810.46\n", + "T4 = T3-(T3-T4a)/nt\n", + "p4 = p3*(T4/T3)**(rg/(rg-1)) #Pressure of gas leaving turbine(in bar):\n", + "T5 = T4a*(p5/p4)**((rg-1)/rg) #Temperature at state 5(in K):\n", + "T5a = T4a-nn*(T4a-T5) #Temperature at state 5'(in K):\n", + "C5a = sqrt(2*Cpg*(T4a-T5a)*10**3) #Exit jet velocity(in m/s):\n", + "Ce = C5a\n", + "T = (1+1/r)*Ce-Ca #Thrust per kg of air per second:\n", + "\n", + "#Results: \n", + "print \"Power required for compressor: \",round(Wc,2),\"kW/kg\"\n", + "print \"Air fuel ratio: \",round(r,2)\n", + "print \"Pressure of gas leaving turbine: \",round(p4,2),\"bar\"\n", + "print \"Thrust: \",round(T,2),\"N/kg/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required for compressor: 217.55 kW/kg\n", + "Air fuel ratio: 63.7\n", + "Pressure of gas leaving turbine: 1.04 bar\n", + "Thrust: 405.75 N/kg/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 876" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "T1 = 285 #K\n", + "p1 = 1 #bar\n", + "T3 = 773 #K\n", + "p2 = 4 #bar\n", + "r = 1.4\n", + "Cpa = 1.005 #kJ/kg.K\n", + "CV = 43100 #kJ/kg.K\n", + "T3 = 273+500 #K\n", + "\n", + "#Calculations:\n", + "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n", + "T2a = T1+1.1*(T2-T1) #Temperature at state 2'(in K):\n", + "Wc = Cpa*(T2a-T1) #Work required in compressor(in kJ/kg of air):\n", + "qa = Cpa*(T3-T2a) #Heat added in combustion chamber(in kJ/kg of air):\n", + "r1 = CV/qa #Air fuel ratio:\n", + "T5 = T3*(p1/p2)**((r-1)/r) #Temperature at state 5(in K):\n", + "hd = Cpa*(T3-T5-T2a+T1) #Enthalpy drop in the nozzle(in kJ/kg of air):\n", + "Ce = sqrt(2*hd*10**3) #Velocity of exit gas from nozzle(in m/s):\n", + "T = (1+1/r)*Ce #Thrust(in N/kg/s):\n", + "\n", + "#Results: \n", + "print \"Power required to drive compressor: \",round(Wc,2),\"kW/kg of air\"\n", + "print \"Air-fuel ratio: \",round(r1,2)\n", + "print \"Thrust: \",round(Ce,2),\"N/kg of air/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required to drive compressor: 153.12 kW/kg of air\n", + "Air-fuel ratio: 127.77\n", + "Thrust: 449.34 N/kg of air/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 877" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "Cpg = 1.14 #kJ/kg.K,Specific heat of gases(in kJ/kg.K):\n", + "Cpa = 1.005 #kJ/kg.K,Specific heat of gases(in kJ/kg.K):\n", + "nm = 0.96 #Mechanical efficiency:\n", + "nc = 0.87 #Polytropic efficiency of compressor:\n", + "nt = 0.90 #Turbine efficiency:\n", + "nn = 0.95 #Nozzle efficiency:\n", + "B = 5.5 #By pass ratio:\n", + "ma = 200 #Mass flow rate of air(in kg/s):\n", + "p2 = 1.5 #Pressures(in bar):\n", + "p1 = 1\n", + "p3 = 28\n", + "pa = p1\n", + "T1 = 288 #Temperatures(in K):\n", + "rg = 1.33\n", + "ra = 1.4\n", + "CV = 43100 #kJ/kg\n", + "T4 = 1573 #K\n", + "\n", + "#Calculations:\n", + "a1 = 1/nc*(ra-1)/ra #For compression:a1 = ((ne-1)/ne)\n", + "a1 = 0.328\n", + "a2 = nt*(rg-1)/rg #For expansion:a2 = (nt-1)/nt\n", + "a2 = 0.223\n", + "T2a = T1*(p2/p1)**a1 #Temperature at state 2'(in K):\n", + "T3a = T2a*(p3/p2)**a2 #Temperature at state 3'(in K):\n", + "dT = nn*T2a*(1-(pa/p2)**((ra-1)/ra))#Using nozzle efficiency:\n", + "C8 = sqrt(2*Cpa*10**3*dT) #Velocity at exit of nozzle(in m/s):\n", + "mab = ma*B/(B+1) #Mass flow rate of bypass air(in kg/s):\n", + "mca = ma-mab #Mass flow rate of hot gases(in kg/s):\n", + "Tb = mab*C8/10**3 #Thrust available due to by pass air(in kN):\n", + "r1 = (Cpg*T4-Cpa*T3a)/(CV-Cpg*T4) #Air fuel ratio:\n", + "T5a = T4-(Cpa*(T3a-T2a)/(nm*(1+r1)*Cpg))#Temperature at state 5'(in K):\n", + "T6a = (Cpg*nm*T5a-(1+B)*Cpa*(T2a-T1))/(Cpg*nm)#Temperature at state 6'(in K):\n", + "p4 = p3-p2 #Pressure at state 4(in bar):\n", + "p5 = p4*(T5a/T4)**(1/a2) #Pressure at state 5(in bar):\n", + "p6 = p5*(T6a/T5a)**(1/a2)#Pressure at state 6(in bar):\n", + "c = ((rg+1)/2)**(rg/(rg #Pressure at state 7(in bar):\n", + "dT1 = nn*T6a*(1-(p7/p6)**((rg-1)/rg))#For exit nozzle(in K):\n", + "C7 = sqrt(2*Cpg*10**3*dT1) #Velocity at exit of nozzle(in m/s):\n", + "Tg = mca*C7/10**3 #Thrust due to hot gases(in kN):\n", + "Tt = Tg+Tb #Total thrust(in kN):\n", + "st = Tt/ma #Specific thrust(in kN/kg/s):\n", + "sfc = r1*mca*3600/(Tt*10**3) #Specific fuel consumption(in kg/h.N):\n", + "\n", + "#Results: \n", + "print \"Specific thrust: \",round(st,3),\"kN/kg/s\"\n", + "print \"Specific fuel consumption: \",round(sfc,2),\"kg/h.N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific thrust: 0.309 kN/kg/s\n", + "Specific fuel consumption: 0.05 kg/h.N\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 881" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "Ca = 277.78 #Velociy of turbojet plane(in m/s):\n", + "r1 = 0.5 #Thrust to velocity ratio:\n", + "m = 50 #Rate at which air enters(in kg/s):\n", + "r = 52 #Air fuel ratio:\n", + "LCV = 43100 #Lower calorific value of fuel:\n", + "\n", + "#Calculations:\n", + "Ce = Ca/r1 #Jet velocity(in m/s):\n", + "T = (m+m/r)*Ce-m*Ca #Thrust(in N):\n", + "St = T/m #Specific thrust(in N/kg/s):\n", + "P = T*Ca/10**3 #Thrust power(in kW):\n", + "np = 2/(1+1/r1)*100 #Propulsive efficiency:\n", + "nt = ((1+1/r)*Ce**2-Ca**2)/(2*1/r*LCV)/10 #Thermal efficiency:\n", + "no = np*nt/100 #Overall efficiency:\n", + "sfc = m/r*3600/(T) #Specific fuel consumption(in kg/h.N):\n", + "\n", + "#Results: \n", + "print \"Jet velocity: \",round(Ce,2),\"m/s\"\n", + "print \"Thrust: \",round(T/10**3,2),\"kN\"\n", + "print \"Specific thrust: \",round(St,2),\"N/kg/s\"\n", + "print \"Thrust power: \",round(P,2),\"kW\"\n", + "print \"Propulsive efficiency: \",round(np,2),\"%\"\n", + "print \"Thermal efficiency: \",round(nt,2),\"%\"\n", + "print \"Overall efficiency: \",round(no,2),\"%\"\n", + "print \"Specific fuel consumption: \",round(sfc,4),\"kg/h.N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Jet velocity: 555.56 m/s\n", + "Thrust: 14.42 kN\n", + "Specific thrust: 288.46 N/kg/s\n", + "Thrust power: 4006.47 kW\n", + "Propulsive efficiency: 66.67 %\n", + "Thermal efficiency: 14.32 %\n", + "Overall efficiency: 9.55 %\n", + "Specific fuel consumption: 0.24 kg/h.N\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 882" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "p1 = 2.2 #Pressures(in bar):\n", + "T1 = 220 #Temperatures(in K):\n", + "T4 = 1273\n", + "C1 = 260 #Velocities(in m/s):\n", + "nn = 0.85 #Nozzle efficiency:\n", + "nt = 0.88 #Turbine efficiency:\n", + "nd = 0.90 #Diffuser efficiency:\n", + "Cp = 1.005#Specific heat(in kJ/kg.K):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "r1 = 12 #Pressure ratio:\n", + "T3a = 568.635\n", + "p6 = 2.2\n", + "\n", + "#Calculations:\n", + "T2 = T1+ C1**2/(2*Cp*1000) #Temperature at state 2(in K):\n", + "p2 = p1*(T2/T1)**(r/(r-1)) #Pressure at state 2(in bar):\n", + "p3 = p2*r1\n", + "p4 = p3\n", + "T3 = T2*(p3/p2)**((r-1)/r)#Temperature at state 3(in K):\n", + "T3a = T2+(T3-T2)/nn #Temperature at state 3'(in K):\n", + "T5a = T4-(T3a-T2) #Temperature at state 5'(in K):\n", + "T4 = T3a -T2 +T5a\n", + "T5 = T4-(T4-T5a)/nt #Temperature of state 5(in K):\n", + "p5 = p4*(T5/T4)**(r/(r-1)) #Pressure at state 5(in bar):\n", + "T6 = T5*(p6/p5)**((r-1)/r)\n", + "T2a = T1+(T2-T1)/nd #Temperature at state 2'(in K):\n", + "C6 = sqrt(2*(T5-T6)*Cp*10**3) #Velocity at exit of nozzle(in m/s):\n", + "\n", + "#Results: \n", + "print \"Velocity of exit of nozzle: \",round(C6,2),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of exit of nozzle: 873.41 m/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 885" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "CV = 45000 #Calorific value(in kJ/kg):\n", + "T1 = 1000 #Inlet temperature(in C):\n", + "T4 = T1\n", + "nn = 0.9 #Nozzle efficiency:\n", + "nd = 0.9 #Diffuser efficiency:\n", + "nc = 0.8 #Compressive efficiency:\n", + "nt = 0.8 #Turbine efficiency:\n", + "Cp = 1.005 #Specific heat(in kJ/kg.K):\n", + "p3 = 7.248 #bar\n", + "r = 1.4\n", + "p6 = 0.7\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "T2a = 282.11 #Temperature at state 2(in K):\n", + "T3a = 568.635\n", + "\n", + "#Calculations:\n", + "p4 = p3-0.15\n", + "r1 = (CV-T1*Cp)/(Cp*T1-Cp*T3a) #Air fuel ratio:\n", + "T5a = T4-(T3a-T2a) #Temperature at state 5'(in K):\n", + "T5 = T4-(T4-T5a)/nt #Temperature at state 5(in K):\n", + "p5 = p4*(T5/T4)**(r/(r-1))\n", + "T6 = T5a*(p6/p5)**((r-1)/r) #Temperature at state 6(in K):\n", + "T6a = T5a-(T5a-T6)*nn #Temperature at state 6'(in K):\n", + "C6 = sqrt(2*Cp*(T5a-T6a)*10**3) #Velocity at exit of nozzle(in m/s):\n", + "v = 200/10 #Volume flow rate of air(in m**3/s):\n", + "m = 0.7*10**2*v/(R*260) #Mass flow rate(in kg/s):\n", + "St = (1+1/r1)*C6 #Specific thrust(in N/kg of air/s):\n", + "Tt = m*St #Total thrust(in N):\n", + "\n", + "#Results: \n", + "print \"Specific thrust: \",round(St,2),\"N/kg of air/s\"\n", + "print \"Total thrust: \",round(Tt,2),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific thrust: 508.22 N/kg of air/s\n", + "Total thrust: 9535.07 N\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 886" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "Cpa = 1.005 #Specific heat(in kJ/kg.K):\n", + "Cpg = 1.087\n", + "ra = 1.4\n", + "rg = 1.33\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "C0 = 250 #Speed of aeroplane(in m/s):\n", + "C4a = 180 #Velocity at exit of turbine(in m/s):\n", + "CV = 43000 #kJ/kg\n", + "P = 800 #Thrust power(in kW):\n", + "T0 = -20+273 #Temperatures(in K):\n", + "T2 = 474.25 \n", + "T3 = 973\n", + "p0 = 0.3 #Pressures(in bar):\n", + "p1 = 0.31\n", + "nc = 0.85 #Compressor efficiency:\n", + "nj = 0.90 #Jet engine efficiency:\n", + "r1 = 6 #Pressure ratio:\n", + "\n", + "#Calculations:\n", + "p5 = p0\n", + "T1 = T0+C0**2/(2*Cpa*10**3)\t#Temperature at state 2(in K):\n", + "T2a = T1+(T2-T1)/nc\n", + "p2 = p1*r1 #Pressure at state 2(in bar):\n", + "p3 = p2\n", + "FA = (Cpa*T3-Cpg*T2a)/(CV-Cpa*T3) #Fuel air ratio:\n", + "T4a = T3-Cpa/Cpg*(T2a-T1)/(1+FA) #Temperature at state 4'(in K):\n", + "T4 = T3-(T3-T4a)/nc #Temperature at state 4(in K):\n", + "p4 = p3*(T4/T3)**(rg/(rg-1)) #Pressure at state 4(in bar):\n", + "T5 = T4a*(p5/p4)**((rg-1)/rg) #Temperature at state 5(in K):\n", + "C5 = sqrt(2*nj*(Cpg*10**3*(T4a-T5)+C4a**2/2)) #Nozzle exit velocity(in m/s):\n", + "no = (((1+FA)*C5-C0)*C0)/(FA*CV*10**3)*100 #Overall efficiency:\n", + "ma = P*10**3/(((1+FA)*C5-C0)*C0) #Rate of air consumption(in kg/s):\n", + "Pt = ma*(1+FA)*Cpg*(T3-T4a) #Power produced by the turbine(in kW):\n", + "T5a = T4a-((C5**2-C4a**2)/(2*Cpg*10**3)) #Temperature at state 5'(in K):\n", + "d5a = p5*10**2/(R*T5a) #Density of exhaust gases(in m**3/kg):\n", + "Aj = ma*(1+FA)/(C5*d5a) #Jet exit area(in m**2):\n", + "\n", + "#Results: \n", + "print \"Air-fuel ratio: \",round(1/FA,2),\":1\"\n", + "print \"Rate of air consumption: \",round(ma,2),\"kg/s\"\n", + "print \"Power produced by turbine: \",round(Pt,2),\"kW\"\n", + "print \"Jet exit area: \",round(Aj,2),\"m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air-fuel ratio: 98.67 :1\n", + "Rate of air consumption: 11.99 kg/s\n", + "Power produced by turbine: 2694.84 kW\n", + "Jet exit area: 0.15 m**2\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 889" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt,pi\n", + "\n", + "#Variable Declaration: \n", + "Ca = 250 #Speed of jet plane(in m/s):\n", + "d = 0.15 #Density of air(in kg/m**3):\n", + "D = 6800 #Drag(in kW):\n", + "np = 0.56 #Propulsive efficiency:\n", + "\n", + "#Calculations:\n", + "Ce = 2*Ca/np-Ca #Relative velocity(in m/s):\n", + "C = Ce-Ca #Absolute velocity of jet(in m/s):\n", + "ma = D/(Ce-Ca) #Mass flow rate(in kg/s):\n", + "v = ma/d #Volume flow rate(in m**3/s):\n", + "dj = sqrt(v*4/(2*pi*Ce)) #Jet diameter(in m):\n", + " \n", + "#Results: \n", + "print \"Jet diamter: \",round(dj*100,1),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Jet diamter: 33.8 cm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 889" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "r1 = 0.4 #Density ratio:\n", + "Cp = 1.005 #Specific heat(in kJ/kg.K):\n", + "d = 0.018 #Drag coefficient:\n", + "Ce = 550 #Jet velocity(in m/s):\n", + "A = 20 #Wing area(in m**2):\n", + "Ca = 900*1000/3600 #Speed of aeroplane(in m/s):\n", + "d1 = 1.01325*10**2/(R*288) #Density of STP(in kg/m**3):\n", + "d2 = r1*d1 #Density of air at altitude(in kg/m**3):\n", + "T = d*A*d2*Ca**2/2 #Thrust on aeroplane:\n", + "ma = T/(Ce-Ca) #Mass flow rate(in kg/s):\n", + "St = T/ma #Specific thrust(in N/kg of air):\n", + "\n", + "#Results: \n", + "print \"Specific thrust: \",round(St),\"N/kg of air\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific thrust: 300.0 N/kg of air\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 890" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "from math import sqrt\n", + "\n", + "#Variable Declaration: \n", + "Ca = 250 #Speed of air craft(in m/s):\n", + "m = 55 #Mass flow rate(in kg/s):\n", + "r = 85 #Air fuel ratio:\n", + "nc = 0.96 #Combustion efficiency:\n", + "CV = 43000 #Lower calorific value(in kJ/kg):\n", + "dh = 220 #Isentropic enthalpy change(in kJ/kg):\n", + "n = 0.95 #Velocity coefficient:\n", + "\n", + "#Calculations:\n", + "Ce = n*sqrt(2*dh*10**3)#Jet velocity(in m/s):\n", + "Ce = 615.67\n", + "St = 400.67 #Specific thrust per kg of air(in N/kg air):\n", + "r1 = 1/r*3600*m #Fuel flow rate(in kg/hr):\n", + "sfc = r1/(St*m) #Specific fuel consumption(in kg/N.hr):\n", + "P = m*(Ce-Ca)*Ca/10**3 #Thrust power(in kW):\n", + "Pp = m*(Ce**2-Ca**2)/2/10**3 #Propulsive power(in kW):\n", + "np = P/Pp*100 #Propulsive efficiency:\n", + "no = P/(m/r*CV*nc)*100 #Overall efficiency:\n", + "\n", + "#Results: \n", + "print \"Propulsive power: \",round(Pp,2),\"kW\"\n", + "print \"Propulsive efficiency: \",round(np,2),\"%\"\n", + "print \"Overall efficiency: \",round(no,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Propulsive power: 8705.11 kW\n", + "Propulsive efficiency: 57.76 %\n", + "Overall efficiency: 18.82 %\n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter2.ipynb b/Applied_Thermodynamics/Chapter2.ipynb new file mode 100755 index 00000000..f774f7a6 --- /dev/null +++ b/Applied_Thermodynamics/Chapter2.ipynb @@ -0,0 +1,227 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1c6a10e6b876d2730bb167805af2fccb3104db62a9988f5aa3ef9c4c86e9b481" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2: Zeroth Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "Tf = 98.6 #Temperature of human body in degree Fahrenheit:\n", + "\n", + "#Calculation:\n", + "Tc = (Tf-32)/1.8 #Temperature of the body in degree Celcius:\n", + "\n", + "#Results:\n", + "print \"Temperature of the human body \",Tc,\"\u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the human body 37.0 \u00b0C\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import math as m\n", + "import numpy as n\n", + "\n", + "#Variable Declaration: \n", + "p0 = 3.0 #Thermodynamic property at T = 0:\n", + "p100 = 8.0 #Thermodynamic property at T = 100:\n", + "p = 6.5 #Thermodynamic property at which t is to be found\n", + "\n", + "#Calculation:\n", + "#Solving two linear equation by linear Algebra using matrices AX = B\n", + "A = n.matrix([[m.log(p0),0.5],[m.log(p100),0.5]])\n", + "B = n.matrix([[0],[100]])\n", + "X = n.matrix.getI(A)*B\n", + "a = round(X[0],2) #Thermodynamic constant a from matrix solution\n", + "b = round(X[1]) #Thermodynamic constant b from matrix solution\n", + "t = a*m.log(p)-b/2 #At thermodynamic property p = 6.5:\n", + "\n", + "#Results:\n", + "print \"Temperature at the value of thermodynamic property (p = 6.5)\" ,round(t,2),\"\u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at the value of thermodynamic property (p = 6.5) 302.83 \u00b0C\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration:\n", + "T0 = 0 #Ice point (\u00b0C)\n", + "T100 = 100 #Steam Poiont (\u00b0C)\n", + "def E(t): #Function definition for above expression of EMF\n", + " return 0.003*t - 5*10**-7*t**2 + 0.5 *10**-3\n", + "\n", + "#Calculation:\n", + "t = (E(30)-E(0))/(E(100)-E(0))*(T100-T0) #Temperature shown by the thermometer at T = 30:\n", + "\n", + "#Results:\n", + "print \"!--Please check that there are calculation mistake done in the book \\nhence there is heavy difference in answer of book and the code--!\\n\"\n", + "print \"The temperature shown by thermometer: \",round(t,2),\"\u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "!--Please check that there are calculation mistake done in the book \n", + "hence there is heavy difference in answer of book and the code--!\n", + "\n", + "The temperature shown by thermometer: 30.36 \u00b0C\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "t1 = 50 #Temperature of gas using gas thermometer:\n", + "def E(t): #Function Definition as per question:\n", + " return 0.18*t - 5.2*10**-4*t**2\n", + " \n", + "#Calculation:\n", + "t = (100-0)*E(t1)/(E(100)-E(0))\t#Temperature at EMF = E50:\n", + "p = (t-t1)/t1*100\n", + "\n", + "#Results:\n", + "print \"Percentage variation: \",round(p,2),\"%\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage variation: 20.31 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "import numpy as n\n", + "\n", + "#Variable Declaration: \n", + "#Solving the conversion relation X = aC + b using matrices and finding a and b\n", + "B = n.matrix([[0],[1000]])\n", + "A = n.matrix([[0,1],[100,1]])\n", + "\n", + "#Calculations:\n", + "X = n.matrix.getI(A)*B\n", + "a = round(X[0]) #Value of a of equation X = aC + B\n", + "b = round(X[1]) #Value of b of equation X = aC + B\n", + "X = a*-273.15+b #Absolute temperature in new temperature scale:\n", + "\n", + "#Results:\n", + "print \"Absolute temperature in new scale: \",X,\"\u00b0X\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute temperature in new scale: -2731.5 \u00b0X\n" + ] + } + ], + "prompt_number": 5 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter3.ipynb b/Applied_Thermodynamics/Chapter3.ipynb new file mode 100755 index 00000000..c0f77975 --- /dev/null +++ b/Applied_Thermodynamics/Chapter3.ipynb @@ -0,0 +1,1090 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8d4c3e3e1406cca57fa7a5e5be30daeeb95ae0c1a8fcd1dccf25d2f1f8ce833d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 3: First Law of Thermodynyamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "#Pressure in the gas cylinder(in kPa):\n", + "p=689\n", + "#Final volume(in m**3):\n", + "v2=0.045\n", + "#Initial volume(in m**3):\n", + "v1=0.04\n", + "#Work done by the paddle(in kJ):\n", + "Pw=-4.88\n", + "\n", + "#Calculation:\n", + "#Work done by the system on the piston(in kJ):\n", + "w=p*(v2-v1)\n", + "#Net Work of the system(in kJ):\n", + "wn=w+Pw\n", + "\n", + "#Results:\n", + "print \"Work done on the piston in kJ: \",w\n", + "print \"Work done on the system in kJ: \",-wn" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done on the piston in kJ: 3.445\n", + "Work done on the system in kJ: 1.435\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "#Mass of the gas(in kg):\n", + "m=0.5\n", + "#Initial internal energy(in kJ/kg):\n", + "u1=26.6\n", + "#Final internal energy(in kJ/kg):\n", + "u2=37.8\n", + "\n", + "#Calculation:\n", + "#Heat required(in kJ):\n", + "Q=(u2-u1)*m\n", + "\n", + "#Results: \n", + "print \"Heat required (kJ): \",Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat required (kJ): 5.6\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "#Mass flow rate(in kg/hr):\n", + "m=50\n", + "#Initial temp(in C):\n", + "t1=800\n", + "#Final temp(in C):\n", + "t2=50\n", + "#Heat capacity at const pressure(in kJ/kg.K):\n", + "Cp=1.08\n", + "\n", + "#Calculation:\n", + "#Heat to be removed(in kJ/hr):\n", + "Q=m*Cp*(t2-t1)\n", + "\n", + "#Results: \n", + "print \"Heat should be removed at (kJ/hr): \",-Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat should be removed at (kJ/hr): 40500.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "#Volume of the cylinnder(in m**3):\n", + "v=0.78\n", + "#Atmospheric pressure(in kPa):\n", + "p=101.325\n", + "\n", + "#Calculation:\n", + "#Work done(in kJ):\n", + "w=round(p*v,2)\n", + "\n", + "#Results: \n", + "print \"Work done by air (KJ): \",-w\n", + "print \"Work done by surroundings (KJ): \",w" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done by air (KJ): -79.03\n", + "Work done by surroundings (KJ): 79.03\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "#Mass of the gas(in kg):\n", + "m=5\n", + "#Value of n in P*(V**n)=const:\n", + "n=1.3\n", + "#Initial pressure(in MPa):\n", + "p1=1\n", + "#Initial volume(in m**3):\n", + "v1=0.5\n", + "#Final pressure(in MPa):\n", + "p2=0.5\n", + "\n", + "#Calculation:\n", + "#Final volume(in m**3):\n", + "v2=round(v1*((p1/p2)**(1/n)),3)\n", + "#Work done(in kJ):\n", + "w=(p2*v2-p1*v1)*10**3/(1-n)\n", + "#Change in internal energy(in kJ/kg):\n", + "du=1.8*(p2*v2-p1*v1)*10**3\n", + "#Heat interaction(in kJ):\n", + "Q=du+w\n", + "\n", + "#Results: \n", + "print \"Heat interaction (kJ): \",round(Q,1)\n", + "print \"Work interaction (kJ): \",round(w,1)\n", + "print \"Change in internal energy (kJ): \",round(du,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat interaction (kJ): 113.5\n", + "Work interaction (kJ): 246.7\n", + "Change in internal energy (kJ): -133.2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "#Initial pressure(in MPa):\n", + "p1=1.0\n", + "#Final pressure(in MPa):\n", + "p2=2.0\n", + "#Initial volume(in m**3):\n", + "v1=0.05\n", + "#Value of n:\n", + "n=1.4\n", + "\n", + "#Calculation:\n", + "#Final volume(in m**3):\n", + "v2=round(v1*((p1/p2)**(1/n)),2)\n", + "\n", + "#Change in internal energy(in kJ/kg):\n", + "du=7.5*(p2*v2-p1*v1)*10**3\n", + "#Work done(in kJ):\n", + "w=(p2*v2-p1*v1)*10**3/(1-n)\n", + "#Heat interaction(in kJ):\n", + "Q=du+w\n", + "\n", + "#Results: \n", + "print \"Heat interaction (kJ): \",Q\n", + "print \"Work interaction (kJ): \",w\n", + "print \"Change in internal energy (kJ): \",du\n", + "\n", + "#If 180 kJ heat transfer takes place:\n", + "#Work done(in kJ):\n", + "w2=180-du\n", + "print \"New work (kJ): \",w2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat interaction (kJ): 50.0\n", + "Work interaction (kJ): -25.0\n", + "Change in internal energy (kJ): 75.0\n", + "New work (kJ): 105.0\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration:\n", + "#Universal Gas Constant (in KJ.mol/Kg.K):\n", + "r=8.3143\n", + "#Molecular weight of perfect gas:\n", + "M=16\n", + "#Molar specific heat at constant pressure for perfect gas(KJ/Kg.K):\n", + "Cp=1.7\n", + "#Initial pressure (Kpa):\n", + "p1=101.3\n", + "#Final pressure (Kpa):\n", + "p2 = 600\n", + "#Initial tempreture (K):\n", + "T1 = 273+20\n", + "#Polytripic index from PV^1.3 = const\n", + "n = 1.3\n", + "\n", + "#Calculations:\n", + "#Characterstic Gas Constant (KJ/Kg.K):\n", + "R=r/M\n", + "#Molar specific heat at constant volume for perfect gas(KJ/Kg.K):\n", + "Cv=Cp-R\n", + "#Specific heat ratio:\n", + "y = Cp/Cv\n", + "#Final Tempreture (K):\n", + "T2 = T1*(p2/p1)**((n-1)/n)\n", + "#Polytropic work (KJ/Kg):\n", + "W = R*(T1-T2)/(n-1)\n", + "#Polytropic process heat (KJ/Kg):\n", + "Q = W*(y-n)/(y-1)\n", + "\n", + "#Results:\n", + "print \"Heat transfered (KJ/Kg): \",round(Q,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfered (KJ/Kg): -82.06\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math as m\n", + "\n", + "#Variable Declaration: \n", + "#Initial temperature(in K):\n", + "t1=627+273\n", + "#Final temperature(in K):\n", + "t2=27+273\n", + "#Specific heat at const pressure(in kJ/kg.K):\n", + "Cp=1.005\n", + "\n", + "#Calculation\n", + "#Exit velocity(in m/s):\n", + "c2=m.sqrt(2*Cp*10**3*(t1-t2))\n", + "\n", + "#Results: \n", + "print \"Exit Velocity (m/s): \" ,round(c2,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit Velocity (m/s): 1098.2\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "#Work interaction(in kJ):\n", + "w=-200\n", + "#Increase in enthalpy(in kJ/kg):\n", + "dh=100\n", + "#Heat picked up by the cooling water(in kJ/kg):\n", + "qc=-90\n", + "\n", + "#Calculation:\n", + "#Heat flow(in kJ/kg):\n", + "Q=dh+w\n", + "#Heat transferred to atmosphere(in kJ/kg):\n", + "Qa=Q-qc\n", + "\n", + "#Results: \n", + "print \"Heat transferred to atmosphere (kJ/kg): \",Qa" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred to atmosphere (kJ/kg): -10\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "c=500 #Seating capacity:\n", + "q=50 #Heat requirement per person(in kcal/hr):\n", + "h1=80 #Enthalpy of water entering the pipe(in kcal/kg):\n", + "h2=45 #Enthalpy of water leaving the pipe(in kcal/kg):\n", + "z=10 #Difference in elevation of inlet and exit pipe(in m):\n", + "g=9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "Q=c*q #Heat to be supplied(in kcal/hr):\n", + "Ql=-Q #Heat lost by water(in kcal/kg):\n", + "m=(Ql*10**3*4.18)/(g*z+(h2-h1)*10**3*4.18) #Quantity of water circulated(in kg/hr):\n", + "\n", + "\n", + "#Results: \n", + "print \"Water circulation rate (kg/min):\",round(m/60,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Water circulation rate (kg/min): 11.91\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "h1=720.0 #Enthalpy of steam entering the injector(in kcal/kg):\n", + "h2=24.6 #Enthalpy of water entering(in kcal/kg):\n", + "h3=100.0 #Enthalpy of water and steam mixture leaving the injector(in kcal/kg):\n", + "z=2.0 #Depth of water injector from steam injector(in m):\n", + "v1=50.0 #Velocity of steam entering the injector(in m/s):\n", + "v3=25.0 #Velocity of mixture leaving the injector(in m/s):\n", + "q=12.0 #Heat loss from injector to surroundings(in kcal/kg):\n", + "g=9.8 #Acceleration due to gravity (m/s^2):\n", + "\n", + "\n", + "#Calculation:\n", + "m=(((v3**2)/2+h3*10**3*4.18)-(h2*10**3*4.18+g*z))/(((v1**2)/2+h1*10**3*4.18)-((v3**2)/2+h3*10**3*4.18)-(q*10**3*4.18))\n", + "\n", + "#Results: \n", + "print \"Steam supply rate (kg/s): \",round(m,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Steam supply rate (kg/s): 0.124\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Variable Declaration: \n", + "p=1.013 #Atmospheric pressure(in bar):\n", + "v=0.4 #Volume to which the baloon is inflated(in m**3):\n", + "w1=0 #Work done by cylinder(in kJ):\n", + "\n", + "#Calculation:\n", + "w2=p*10**5*v #Work done by the balloon(in kJ):\n", + "w=w1+w2 #Total work(in kJ):\n", + "\n", + "\n", + "#Results: \n", + "print \"Work done by the system upon atmoshere (KJ): \",w/(10**3)\n", + "print \"Work done by the atmoshere (KJ): \",-w/(10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done by the system upon atmoshere (KJ): 40.52\n", + "Work done by the atmoshere (KJ): -40.52\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 82" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Qa=5000 #Heat added(in J/s):\n", + "\n", + "#Calculation:\n", + "Wt=0.25*Qa #Turbine work(in J/s):\n", + "Qr=0.75*Qa #Heat rejected(in J/s):\n", + "Wp=0.002*Qa #Work by feed pump(in J/s):\n", + "C=Wt-Wp #Capacity of generator(in W):\n", + "\n", + "#Results: \n", + "print \"Capacity of generator (KW): \",C/(10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of generator (KW): 1.24\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math as m\n", + "\n", + "#Variable Declaration: \n", + "T1=27+273 #Ambient temperature(in K):\n", + "T2=750+273 #Temperature of air inside heat exchanger(in K):\n", + "T3=600+273 #Temperature of air leaving turbine(in K):\n", + "T4=500+273 #Temperature of air leaving turbine(in K):\n", + "c2=50 #Velocity of air entering turbine(in m/s):\n", + "c3=60 #Velocity of air entering the nozzle(in m/s):\n", + "Cp=1.005#Specific heat at constant pressure(in kj?kg.K):\n", + "\n", + "\n", + "#Calculation:\n", + "Q12=Cp*(T2-T1) #Heat transfer to air in heat exchanger(in kJ):\n", + "Wt=Cp*(T2-T3)+(c2**2-c3**2)*10**(-3)/2 #Power output from turbine(in kJ/s):\n", + "c4=m.sqrt(2*(Cp*(T3-T4)+(c3**2)*10**(-3)/2))#Velocity at exit of the nozzle(in m/s):\n", + "\n", + "#Results: \n", + "print \"Heat transfer to air in heat exchanger (KJ): \",round(Q12,2)\n", + "print \"Power output from turbine (KJ/s): \",Wt\n", + "print \"Velocity at exit of the nozzle (m/s): \",round(c4,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer to air in heat exchanger (KJ): 726.61\n", + "Power output from turbine (KJ/s): 150.2\n", + "Velocity at exit of the nozzle (m/s): 14.3\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math as m\n", + "\n", + "#Variable Declaration: \n", + "p1=0.5 #Initial pressure(in MPa):\n", + "T1=400 #Initial temperature(in K):\n", + "r1=2 #Ratio of v2 to v1:\n", + "r2=6 #Ratio of v3 to v1:\n", + "R=8.314 #Universal gas constant(in kJ/kg):\n", + "\n", + "#Calculation:\n", + "Wa=R*T1 #Work from state 1 to 2(in kJ):\n", + "T2=2*T1 #Temperature at point 2(in K):\n", + "Wb=R*T2*m.log(r2/r1) #Work done from state 2 to 3(in kJ):\n", + "W=Wa+Wb#Total work done by air(in kJ):\n", + "\n", + "#Results: \n", + "print \"Work done (KJ): \",round(W,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done (KJ): 10632.69\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "pi=0.5*10**6 #Initial pressure(in Pa):\n", + "vi=0.5 #Initial volume(in m**3):\n", + "pf=1*10**6 #Final pressure(in Pa):\n", + "patm=1.013*10**5 #Atmospheric pressure(in Pa):\n", + "\n", + "#Calculation:\n", + "vf=3*vi #Final volume(in m**3):\n", + "W=(vf-vi)*(pi+pf)/2 #Work done(in J):\n", + "\n", + "#Results: \n", + "print \"Work done (MJ): \",W/10**6" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done (MJ): 0.75\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p1=0.5*10**6 #Initial pressure(in Pa):\n", + "pf=1*10**6 #Final pressure(in Pa):\n", + "v1=0.5 #Initial volume(in m**3):\n", + "v2=0.25 #Final volume(in m**3):\n", + "vN2=0.75#Final Nitrogen volume(in m**3):\n", + "T1=273+27#Initial Tempereature (K):\n", + "patm=1.013*10**5 #Atmospheric pressure(in Pa):\n", + "CpH2=14.307 #Cp of hydrogen (KJ/Kg)\n", + "CpN2=1.039 #Cp of hydrogen (KJ/Kg)\n", + "RN2=0.2968\n", + "RH2=4.1240 \n", + "\n", + "#Calculations:\n", + "rH2=CpH2/(CpH2-RH2) #Adiabatic index of compression for H2:\n", + "rN2=CpN2/(CpN2-RN2) #Adiabatic index of compression for N2:\n", + "p2=p1*(v1/v2)**rH2 #Final pressure of hydrogen(in Pa):\n", + "Pw=0 #Partition work:\n", + "WH2=(p1*v1-p2*v2)/(rH2-1) #Work done upon H2(in J):\n", + "WN2=-WH2 #Work done by nitrogen(in J):\n", + "mN2=round(p1*v1/(RN2*10**3*T1),1) #Mass of N2(in kg):\n", + "T2=p2*vN2*T1/(p1*v1) #Final temperature of N2(in K):\n", + "CvN2=CpN2-RN2 #Cv of N2(in kJ/kg):\n", + "QN2=mN2*CvN2*10**3*(T2-T1)+WN2 #Heat added to N2(in kJ):\n", + "\n", + "#Results: \n", + "print \"Final pressure of hydrogen (MPa): \",round(p2/(10**6),3)\n", + "print \"Partition work (KJ): \",Pw\n", + "print \"Work done by hyrogen (10^5 J): \",round(WH2/10**5)\n", + "print \"Work done by nitrogen (10^5 J): \",round(WN2/10**5)\n", + "print \"Heat added to nitrogen (kJ): \",round(QN2/(10**3),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final pressure of hydrogen (MPa): 1.324\n", + "Partition work (KJ): 0\n", + "Work done by hyrogen (10^5 J): -2.0\n", + "Work done by nitrogen (10^5 J): 2.0\n", + "Heat added to nitrogen (kJ): 2053.09\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "v1=2 #Volume of the cylinder(in m**3):\n", + "p1=0.5*10**6 #Pressure in the cylinder(in Pa):\n", + "T1=375 #Temperature of the cylinder(in K):\n", + "Cp=1.003 #Specific heat at const pressure(in kJ/kg.K):\n", + "Cv=0.716 #Specific heat at const volume(in kJ/kg.K):\n", + "Ra=0.287 #Gas constant for air(in kJ/kg.K):\n", + "patm=1.013*10**5 #Atmospheric pressure(in Pa):\n", + "r=1.4 #Compression ratio:\n", + "\n", + "#Calculation:\n", + "m1=p1*v1/(Ra*T1) #Initial mass of air(in kg):\n", + "T2=T1*(patm/p1)**((r-1)/r) #Final temperature(in K):\n", + "m2=patm*v1/(Ra*T2) #Final mass of air left in tank(in kg):\n", + "KE=m1*Cv*T1-m2*Cv*T2-(m1-m2)*Cp*T2 #Kinetic energy available(in kJ):\n", + "\n", + "#Results: \n", + "print \"Amount of work available (KJ): \",round(KE/10**3,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amount of work available (KJ): 482.67\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 89" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p1=0.5*10**6 #Pressure in the vessel(in Pa):\n", + "v1=0.5 #Volume of 1st chamber(in m**3):\n", + "T1=300 #Temperature in the vessel(in K):\n", + "p2=10**6 #Final pressure(in Pa):\n", + "v2=0.5 #Volume of 2nd chamber(in m**3):\n", + "T2=500 #Final temperature(in K):\n", + "R=8314 #Universal gas constant(in J/kg.K):\n", + "\n", + "#Calculation:\n", + "n1=p1*v1/(R*T1) #Moles in chamber 1:\n", + "n2=p2*v2/(R*T2) #Moles in chamber 2:\n", + "T3=(n1*T1+n2*T2)/(n1+n2) #Temperature of the mixture(in K):\n", + "p3=(n1+n2)*R*T3/(v1+v2) #Final pressure(in MPa):\n", + "\n", + "\n", + "#Results: \n", + "print \"Final pressure (MPa): \",p3/(10**6)\n", + "print \"Final temperature (K): \",round(T3,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final pressure (MPa): 0.75\n", + "Final temperature (K): 409.09\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page no. 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "#Variable Declaration: \n", + "v=0.5 #Volume of the bottle(in m**3):\n", + "p=1.0135 #Pressure in the bottle(in Bar):\n", + "\n", + "#Calculation:\n", + "W=p*10**5*(0-v) #Displacement work(in N-m):\n", + "Q=-W #Heat transfer(in N-m):\n", + "\n", + "#Results: \n", + "print \"Heat transferred (N-m): \",Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred (N-m): 50675.0\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page no. 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "v1=0.3 #Volume of bottle(in m**3):\n", + "p1=35.0 #Pressure in the bottle(in bar):\n", + "T1=40.0+273.0 #Temperature in the bottle(in K):\n", + "w1=5.0 #Turbo generator's actual output(in kJ/s):\n", + "p2=1.0 #Final prssure(in bar):\n", + "v2=v1 #Final volume(in m**3):\n", + "Ra=0.287 #Gas constant for air(in kJ/kg.K):\n", + "r=1.4 #Compression ratio:\n", + "Cv=0.718 #Specific heat at const volume(in kJ/kg):\n", + "Cp=1.005 #Specific heat at const pressure(in kJ/kg):\n", + "\n", + "#Calculation:\n", + "T2=T1*(p2/p1)**((r-1)/r) #Final temperature(in K):\n", + "m1=p1*10**2*v1/(Ra*T1) #Initial mass in the bottle(in kg):\n", + "m2=p2*10**2*v2/(Ra*T2) #Final mass in the bottle(in kg):\n", + "W=(m1*Cv*T1-m2*Cv*T2)-(m1-m2)*Cp*T2 #Maximum work that can be obtained(in kJ):\n", + "i=w1/0.6 #Input to the turbo generator(in kJ/s):\n", + "t=W/round(i,2) #Time duration(in s):\n", + "\n", + "#Results: \n", + "print \"Duration (Seconds): \",round(t,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Duration (Seconds): 159.11\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22, page no. 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math as M\n", + "#Variable Declaration: \n", + "p1=1.5 #Pressure at state 1(in bar):\n", + "T1=77+273 #Temperature at state 1(in K):\n", + "p2=7.5 #Pressure at state 2(in bar):\n", + "m=3 #Mass of the air(in kg):\n", + "n=1.2 #Value of n:\n", + "Ra=0.287 \n", + "\n", + "#Calculation:\n", + "T2=T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n", + "v1=m*Ra*T1/(p1*10**2) #Initial volume(in m**3):\n", + "v2=(p1*(v1**n)/p2)**(1/n) #Volume at state 2(in m**3):\n", + "T3=T1 #Temperature at state 3(in K):\n", + "v3=v2*T3/T2 #Volume at state 3(in m**3):\n", + "p3=7.5 #Pressure at state 3(in bar):\n", + "W12=m*Ra*(T2-T1)/(1-n) #Compression work during process 1-2(in kJ):\n", + "W23=p2*(10**2)*(v3-v2) #Work during process 2-3(in kJ):\n", + "W31=p3*10**2*v3*M.log(v1/v3) #Work during process 3-1(in kJ):\n", + "Wn=W12+W23+W31 #Net work(in kJ):\n", + "\n", + "#Results: \n", + "print \"Heat transferred from the system (kJ): \",round(-Wn,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred from the system (kJ): 71.28\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23, page no. 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "v1=0.15 #Volume of air bottle(in m**3):\n", + "p1=40 #Initial pressure(in bar):\n", + "T1=27+273 #Initial temperature(in K):\n", + "p2=2.0 #Final presure(in bar):\n", + "Ra=0.287 #Gas constant for air(in kJ/kg):\n", + "Cp=1.005 #Specific heat at const pressure(in kJ/kg):\n", + "Cv=0.718 #Specific heat at const volume(in kJ/kg):\n", + "r=1.4 #Compression ratio:\n", + "\n", + "#Calculation:\n", + "v2=v1 #Final volume(in m**3):\n", + "m1=p1*10**2*v1/(Ra*T1) #Initial mass of air in bottle(in kg):\n", + "T2=T1*(p2/p1)**((r-1)/r) #Final temperature(in K):\n", + "m2=p2*10**2*v2/(Ra*T2) #Final mass of air in bottle(in kg):\n", + "E=m1*Cv*T1-m2*Cv*T2-(m1-m2)*Cp*T2 #Energy available for running of turbine due to emptying of bottle(in kJ):\n", + "\n", + "#Results: \n", + "print \"Work available from turbine(KJ):\",round(E,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work available from turbine(KJ): 638.33\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter4.ipynb b/Applied_Thermodynamics/Chapter4.ipynb new file mode 100755 index 00000000..bac8596d --- /dev/null +++ b/Applied_Thermodynamics/Chapter4.ipynb @@ -0,0 +1,765 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:e33e7b5760e325e5ce218821a1f69234bfd752dae7d88964f3e66dde5271fa8e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 4: Second Law of Thermodynamics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 114" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T1 = 400+273.0 #Highest temperature(in K):\n", + "T2 = 15+273.0 #Lowest temperature(in K):\n", + "w = 200 #Work produced(in kJ):\n", + "\n", + "#Calculation:\n", + "Q1 = w/(1-T2/T1) #Heat to be supplied(in kJ): #Ratio of Q1 to Q2 is same as T1 to T2\n", + "#Results:\n", + "print \"Heat to be supplied: \",round(Q1,1),\"KJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat to be supplied: 349.6 KJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "#Variable Declaration: \n", + "T1 = 42+273.0 #Upper temperature(in K):\n", + "T2 = 4+273.0 #Lower temperature(in K):\n", + "Q2 = 2.0 #Rate at which heat is extracted(in kJ/s):\n", + "\n", + "#Calculation:\n", + "Q1 = T1/T2*Q2 #Heat to be supplied(in kJ/s):\n", + "P = Q1-Q2 #Power required(in kW):\n", + "\n", + "#Results:\n", + "print \"Power required for driving the refrigerator: \",round(P,3),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required for driving the refrigerator: 0.274 KW\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "T1 = 827+273.0 #Source temperature(in K):\n", + "T2 = 27+273.0 #Sink temperature(in K):\n", + "T3 = -13+273.0 #Temperature in the refrigerator(in K):\n", + "Q1 = 2000.0 #Heat input(in kJ):\n", + "W = 300.0 #Net work available(in kJ):\n", + "\n", + "#Calculation:\n", + "Q2 = Q1*T2/T1 #Rate at which heat is extracted(in kJ):\n", + "We = Q1-Q2 #Work in the engine(in kJ):\n", + "Wr = We-W #Work in the refrigerator(in kJ):\n", + "Q3 = Wr/(T2/T3-1) #Heat transferred to the refrigerant(in kJ):\n", + "Q4 = Q3+Wr #Heat transferred to reservoir by refrigerant(in kJ):\n", + "Wt = Q2+Q4 #Total heat transferred to low temperature reservoir(in kJ):\n", + "\n", + "#Results:\n", + "print \"Heat transferred to refrigerant: \",round(Q3,2),\"KJ\"\n", + "print \"Total heat transferred to low temperature reservoir: \",round(Wt,2),\"KJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred to refrigerant: 7504.55 KJ\n", + "Total heat transferred to low temperature reservoir: 9204.55 KJ\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T1 = 25+273.15 #Temperature inside the house(in K):\n", + "T2 = -1+273.15 #Temperature outside the house(in K):\n", + "Q1 = 125.0 #Heating load(in MJ/h):\n", + "\n", + "#Calculation:\n", + "COP = 1/(1-T2/T1) #COP:\n", + "W = Q1/COP #Minimum power required(in MJ/h):\n", + "\n", + "#Results:\n", + "print \"Minimum power required: \",round(W,2), \"MJ/h\"\n", + "print \"Minimum power required: \",round(W*10**3/3600,2), \"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum power required: 10.9 MJ/h\n", + "Minimum power required: 3.03 KW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T1 = -15+273.16 #Inside temperature(in K):\n", + "T2 = 35+273 #Atmospheric temperature(in K):\n", + "Q2 = 140.8 #Heat to be extracted (in kW):\n", + "\n", + "#Calculation:\n", + "COP1 = 1/(T2/T1-1) #Carnot COP of plant:\n", + "COP = COP1/4 #Actual COP:\n", + "W = Q2/COP #Power required(in kW):\n", + "\n", + "#Results:\n", + "print \"Power required: \",round(W,2),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required: 108.73 KW\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T1 = 1150+273.0 #Maximum temperature(in K):\n", + "T2 = 27+273.0 #Minimum temperature(in K):\n", + "\n", + "#Calculation:\n", + "n = 1-(T2/T1) #Efficiency:\n", + "\n", + "#Results:\n", + "print \"Efficiency: \",round(n*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency: 78.92 %\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T1 = 27+273 #Maximum temperature(in K):\n", + "T2 = -8+273 #Minimum temperature(in K):\n", + "Q = 7.5/60 #Leakage(in kJ/s):\n", + "\n", + "#Calculation:\n", + "W = (T1-T2)*Q/T2 #Power required(in kW):\n", + "\n", + "#Results:\n", + "print \"Power required: \" ,round(W,4),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power required: 0.0165 KW\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from sympy import *\n", + "from sympy import symbols,simplify,numer,denom,collect,Wild\n", + "from sympy.solvers import solve\n", + "\n", + "#Variable Declaration:\n", + "Tso = 1100 #Temperature of Source (K):\n", + "Ts = 300 #Temperature of Sink (K):\n", + "W1,Q1,T1,W2,Q2,T2,W3,Q3,T3 = symbols('W1,Q1,T1,W2,Q2,T2,W3,Q3,T3') #Creating symbolic Variables required:\n", + "p = Wild('p')\n", + "q = Wild('q')\n", + "\n", + "#Calculations:\n", + "HE1 = 1-T2/Tso #Engine 1 Efficiency:\n", + "Q1 = W1/HE1\n", + "Q2 = Q1 - W1 #Energy balance equation:\n", + "#W2byW1 = simplify((Q2*(1-(T3/T2)))/W1)\n", + "W2byW1 = (T2-T3)/(1100-T2)\n", + "EQ1 = 3*numer(W2byW1)-2*denom(W2byW1) #Creating EQ1 using above symbolic manipulation and given W1:W2 ratio of 3:2\n", + "HE2 = simplify(1 - T3/T2) #Engine 2 Efficiency:\n", + "Q2 = W2 + Q3 #Energy balance equation:\n", + "\n", + "\n", + "expr = W2*denom(HE2)-Q2*numer(HE2)\n", + "a = collect(simplify(expr),[W2,Q3]).match(-p*Q3+q)\n", + "\n", + "Q3 = a[q]/a[p]\n", + "HE3 = simplify(1-Ts/T3)\n", + "#W3byW2 = HE3*Q3/W2\n", + "W3byW2 = (T3/(T2-T3))*((T3-300)/T3)\n", + "EQ2 = 2*numer(W3byW2)-1*denom(W3byW2) #Creating EQ1 using above symbolic manipulation and given W2:W3 ratio of 2:1\n", + "Sol = solve([EQ1,EQ2],[T2,T3]) #Solving the two generated symbolic equations:\n", + "\n", + "#Results:\n", + "print \"Intermediate Temperature, T2: \",Sol[T2],\"K\"\n", + "print \"Intermediate Temperature, T3: \",round(Sol[T3],2),\"K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Intermediate Temperature, T2: 700 K\n", + "Intermediate Temperature, T3: 433.33 K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "#Variable Declaration: \n", + "T1 = 800.0 #Temperature at which heat is receieved (in K):\n", + "T2 = 280.0 #Temperature maintained by the carnot engine(in K):\n", + "\n", + "#Calculation:\n", + "T = 2*T1*T2/(T1+T2) #Temperature at which heat is rejected(in K):\n", + "n = (T1-T)/T1 #Efficiency:\n", + "COP = T2/(T-T2) #COP of refrigerator:\n", + "\n", + "#Results:\n", + "print \"Efficiency: \",round(n,4)\n", + "print \"COP of refrigerator: \" ,round(COP,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Efficiency: 0.4815\n", + "COP of refrigerator: 2.077\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 120" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "#Variable Declaration: \n", + "n = 0.5 #Efficiency of carnot cycle:\n", + "m = 0.5 #Mass of air(in kg):\n", + "p2 = 7*10**5 #Initial pressure(in Pa):\n", + "v2 = 0.12 #Initial volume(in m**3):\n", + "Q23 = 40 #Heat transferred during the process 2-3(in kJ):\n", + "Cp = 1.008 #Specific heat at const pressure(in kJ/kg):\n", + "Cv = 0.721 #Specific heat at const volume(in kJ/kg):\n", + "Ra = 287 #Gas constant for air:\n", + "Q12 = 0 #Heat transfer in process 1-2(in kJ):\n", + "Q34 = 0 #Heat transfer in process 3-4(in kJ):\n", + "\n", + "#Calculation:\n", + "T2 = p2*v2/(m*Ra) #Maximum temperature of the cycle(in K):\n", + "T1 = T2/2 #Minimum temperature(in K):\n", + "v3 = v2*(math.e**(Q23/(m*Ra*10**(-3)*T2))) #Volume at state 3(in m**3):\n", + "r = Cp/Cv #Compression factor:\n", + "p1 = p2/((T2/T1)**(r/(r-1))) #Pressure at point 1(in Pa):\n", + "v1 = m*Ra*T1/p1 #Volume at point 1(in m**3):\n", + "T3 = T2 #Temperature at state 3(in K):\n", + "T4 = T1 #Temperature at state 4(in K):\n", + "W12 = -m*Cv*(T2-T1) #During process 1-2, work done(in kJ):\n", + "W23 = Q23 #Work done in process 2-3(in kJ):\n", + "W34 = -m*Cv*(T4-T3) #During process 3-4, work done(in kJ):\n", + "W41 = -W23 #During process 4-1, work done(in kJ):\n", + "Q41 = -Q23 #Heat transfer in process 4-1(in kJ):\n", + "\n", + "#Results:\n", + "print \"Process Heat transfer Work interaction\"\n", + "print \" 1-2 \",Q12,\"KJ \",round(W12,2)\n", + "print \" 2-3 \",Q23,\"KJ \",W23\n", + "print \" 3-4 \",Q34,\"KJ \",round(W34,2)\n", + "print \" 4-1 \",Q41,\"KJ \",W41\n", + "print \"Maximum temperature of the cycle: \",round(T2,2),\"KJ\"\n", + "print \"Minimum temperature of the cycle: \",round(T1,2),\"KJ\"\n", + "print \"Volume at the end of the expansion:\",round(v3,4),\"m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Process Heat transfer Work interaction\n", + " 1-2 0 KJ -105.51\n", + " 2-3 40 KJ 40\n", + " 3-4 0 KJ 105.51\n", + " 4-1 -40 KJ -40\n", + "Maximum temperature of the cycle: 585.37 KJ\n", + "Minimum temperature of the cycle: 292.68 KJ\n", + "Volume at the end of the expansion: 0.1932 m**3\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Q1 = 5000 #Heat drawn from 400 K reservoir(in kJ):\n", + "W = 840 #Work output(in kJ):\n", + "\n", + "#Calculation:\n", + "Q2 = 3*(Q1/2-W) #Value of heat from heat engine(in kJ):\n", + "Q3 = Q1-W-Q2 #Value of heat to heat engine(in kJ):\n", + "\n", + "#Results:\n", + "print \"Q2 =\",Q2,\"kJ from heat engine\"\n", + "print \"Q3 =\",-Q3,\"kJ to heat engine\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q2 = 4980 kJ from heat engine\n", + "Q3 = 820 kJ to heat engine\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 123" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T3 = 3+273 #Temperature of the reservoir(in K):\n", + "T1 = 77+273 #Lower temperature limit(in K):\n", + "T2 = 1077+273 #Higher temperature limit(in K):\n", + "E = 100 #Energy supplied to the reservoir(in kJ/s):\n", + "\n", + "#Calculation:\n", + "n = 1-T1/T2 #Efficiency:\n", + "Q1 = 26.71 #Solving all the equations, we get: #It is given that Q2+Q4 = E #We get Q4 = 1.27*Q3\t\t\n", + "#COP for heat pump = Q4/(Q4-Q3) = T1/(T1-T3)\t\t\t\t#We get Q2 = 0.2593*Q1\t\t\t\t#n = 1-Q2/Q1\t\t\t\t\n", + "#Energy taken from the reservoir Q1 can be found by solving the simultaneous equations\n", + "\n", + "#Results:\n", + "print \"Energy taken from reservoir at 1077\u00baC: \",round(Q1,2),\"KJ\"\t\t\t\t#Results: " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy taken from reservoir at 1077\u00baC: 26.71 KJ\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Qs = 2000.0 #Heat supplied(in kJ/s):\n", + "Tso = 1500 #Temperature of source(in K):\n", + "Tr = 15+273 #Temperature at which heat is rejected(in K):\n", + "Qt = 3000 #Total heat received(in kJ/s):\n", + "\n", + "#Calculation:\n", + "Qr = Qt-Qs #Heat rejected(in kJ/s):\n", + "Ts = Qt/(Qs/Tso+Qr/Tr) #Temperature of the sink(in K):\n", + "\n", + "#Results: \n", + "print \"Temperature of the sink: \",round(Ts,2),\"K\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the sink: 624.28 K\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 124" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "T1 = 500+273.0 #Maximum temperature(in K):\n", + "T2 = 200+273.0 #Minimum temperature(in K):\n", + "T3 = 450+273.0 #Temperature of the body(in K):\n", + "\n", + "#Calculation:\n", + "n = 1-T2/T1 #Efficiency:\n", + "r1 = n #Ratio of W to Q1:\n", + "COP = T3/(T3-T2) #COP of pump:\n", + "r2 = COP*2/3 #Ratio of Q3 to W:\n", + "r3 = r1*r2 #Ratio of Q3 to Q1:\n", + "\n", + "#Results:\n", + "print \"Ratio of heat rejected to body at 450C to the heat supplied by the reservoir: \",round(r3,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of heat rejected to body at 450C to the heat supplied by the reservoir: 0.7483\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from sympy import *\n", + "\n", + "#Variable Declaration:\n", + "W,Q1,Q2,Q3,T1,T2,T3 = symbols('W,Q1,Q2,Q3,T1,T2,T3') #Creating symbolic variables:\n", + "\n", + "#Calculations:\n", + "n = 1 - T3/T1 #Efficiency of heat engine:\n", + "COP = T2/(T3-T2) #COP of refrigerator:\n", + "r = 1/(n*COP) #Ratio of Q1:Q3 :\n", + "\n", + "#Results:\n", + "print \"Ratio of heat supplied from source to heat absorbed from cold body: \",(simplify(r))" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of heat supplied from source to heat absorbed from cold body: " + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "-T1*(T2 - T3)/(T2*(T1 - T3))\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T1 = 900+273.0 #Maximum temperature(in K):\n", + "T2 = 50+273.0 #Minimum temperature(in K):\n", + "T3 = 50+273.0 #Temperature of the 3rd reservoir(in K):\n", + "T4 = 10+273.0 #Temperature of the 4th reservoir(in K):\n", + "Q3 = 15.0 #Heat picked up by Carnot cycle(in kW):\n", + "E = 25.0 #Energy required to run a machine(in kW):\n", + "\n", + "#Calculation:\n", + "n = 1-T2/T1 #Efficiency:\n", + "Q4 = Q3*T3/T4 #From the relation of COP:\n", + "Whp = Q4-Q3 #Work by heat pump(in kW):\n", + "Whe = Whp+E #Work in the heat engine(in kW):\n", + "Q1 = Whe/n #Heat from source at 1173 K(in kW):\n", + "Q2 = Q1-Whe #Heat rejected to the reservoir from engine 1(in kW):\n", + "Qt = Q2+Q4 #Total heat rejected to the reservoir(in kW):\n", + "\n", + "#Results:\n", + "print \"Heat rejected to the reservoir: \",round(Qt,3),\"KW\" \n", + "print \"Heat received from the highest temperature reservoir: \",round(Q1,3),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat rejected to the reservoir: 27.426 KW\n", + "Heat received from the highest temperature reservoir: 37.426 KW\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "\n", + "#Variable Declaration: \n", + "v1 = 1.8 #Volume of 1st tank(in m**3):\n", + "v2 = 3.6 #Volume of 2nd tank(in m**3):\n", + "p1 = 12 #Initial pressure(in bar):\n", + "T1 = 40+273 #Initial temperature(in K):\n", + "R = 0.208 #Gas constant for argon(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "pf = p1*v1/(v1+v2) #By gas law for final and initial state:\n", + "\n", + "#Results:\n", + "print \"Final pressure: \",round(pf),\"bar\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final pressure: 4.0 bar\n" + ] + } + ], + "prompt_number": 18 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter5.ipynb b/Applied_Thermodynamics/Chapter5.ipynb new file mode 100755 index 00000000..0c11c57f --- /dev/null +++ b/Applied_Thermodynamics/Chapter5.ipynb @@ -0,0 +1,879 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c0f28306b8717687dd43e0cba515058fc2c63cfc2e10a436e8c618a282c7ae33" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5: Entropy" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "p1 = 5 #Initial pressure(in bar):\n", + "T1 = 300 #Initial temperature(in K):\n", + "p2 = 2 #Final pressure(in bar):\n", + "Cp = 1.004 #Cp for air(in kJ/kg.K):\n", + "R = 0.287 #Gas constant for air(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "T2 = T1 #As it is a throttling process:\n", + "dS = Cp*log(T2/T1)-R*log(p2/p1)\t#Change in entropy(in kJ/kg.K):\n", + "\n", + "#Results:\n", + "print \"Change in entropy: \",round(dS,3),\"KJ/Kg.K\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy: 0.263 KJ/Kg.K\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable Declaration: \n", + "m = 5 #Mass of water(in kg):\n", + "T1 = 27+273.16 #Atmospheric temperature(in K):\n", + "T2 = 100+273.16 #Temperature of evaporation(in K):\n", + "T3 = 400+273.16 #Temperature at which steam is generated(in K):\n", + "Cp = 4.2 #Specific heat of water(in kJ/kg.K):\n", + "q2 = 2260 #Heat of vaporisation(in kJ/kg):\n", + "T = symbols('T') #Symbolic variable for Temperature:\n", + "R = 8.314 #Universal gas constant:\n", + "ms = 18 #Molar mass of steam (in g):\n", + "\n", + "#Calculation:\n", + "Q1 = m*Cp*(T2-T1) #Heat added for increasing water temperature from 27C to 100C(in kJ):\t\t\t\t\n", + "dS1 = Q1/T1 #Entropy change during water temperature rise(in kJ/K):\n", + "Q2 = m*q2 #Heat of vaporization(in kJ):\n", + "dS2 = Q2/T2 #Entropy change during water to steam change(in kJ/K):\n", + "Rs = round(R/ms,3) #Value of R for steam (KJ/Kg.K)\n", + "CP = Rs*(3.5+1.2*T+0.14*T**2) #Molar heat capacity at constant pressure for steam(J/Kg.K)\n", + "dQ = m*10**-3*CP\n", + "dS3 = round(integrate(apart(dQ/T),(T,T2,T3)),2)\n", + "dS = dS1+dS2+dS3 #Total entropy change(in kJ/K):\n", + "\n", + "#Results:\n", + "print \"!--- Small differences in error is due to integration approximation in coding ---!\"\n", + "print \"Total change in entropy of universe: \",round(dS,2),\"KJ/K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "!--- Small differences in error is due to integration approximation in coding ---!\n", + "Total change in entropy of universe: 86.98 KJ/K\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "p1 = 125 #Initial pressure(in kPa):\n", + "p2 = 375 #Final pressure(in kPa):\n", + "T1 = 27+273 #Intial temperature(in K):\n", + "R = 8.314/32 #Gas constant for oxygen(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "dS = -R*log(p2/p1) #Change in entropy(in kJ/kg.K):\n", + "\n", + "#Results:\n", + "print \"Change in entropy: \",round(dS,3),\"KJ/Kg.K\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy: -0.285 KJ/Kg.K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 147" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "m = 1 #Mass of the block(in kg):\n", + "T1 = 150+273.15 #Temperature of the block(in K):\n", + "T2 = 25+273.15 #Temperature of the sea(in K):\n", + "C = 0.393 #Heat capacity of copper(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "dSb = m*C*log(T2/T1) #Change in entropy of block(in kJ/K):\n", + "Q = m*C*(T1-T2) #Heat lost by water(in kJ): #Heat lost by the block will be equal to heat gained by the water\n", + "dSw = round(Q/T2,3) #Change in entropy of water(in kJ/K):\n", + "dSu = dSb+dSw #Entropy change of universe(in kJ/K):\n", + "\n", + "#Results:\n", + "print \"Change in entropy of universe: \",round(dSu*10**3,1),\"J/K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy of universe: 27.4 J/K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 1 #Mass of the block(in kg):\n", + "T = 27+273 #Temperature of the block(in K):\n", + "h = 200 #Height(in m):\n", + "s = 0.393 #Heat capacity for copper(in kJ/kg.K):\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "PE = m*g*h #Change in potential energy(in J):\n", + "Q = PE #In this case:\n", + "dSu = Q/T #Change in entropy of universe(in J/kg.K):\n", + "\n", + "#Results:\n", + "print \"Change in entropy of universe: \" ,round(dSu,2),\"J/kg.K\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy of universe: 6.54 J/kg.K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "m1 = 1 #Mass(in kg) of Block 1:\n", + "T1 = 150+273 #Temperature(in K):\n", + "C1 = 0.393 #Specific heat(in kJ/kg.K):\n", + "m2 = 0.5 #Mass(in kg) of Block 2:\n", + "T2 = 0+273 #Temperature(in K):\n", + "C2 = 0.381 #Specific heat(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "Tf = (m1*C1*T1+m2*C2*T2)/(m1*C1+m2*C2) #Final temperature(in K):\n", + "dS1 = m1*C1*log(Tf/T1) #Entropy change in block 1(in kJ/K):\n", + "dS2 = m2*C2*log(Tf/T2) #Entropy change in block 2(in kJ/K):\n", + "dS = dS1+dS2 #Total entropy change(in kJ/K):\n", + "\n", + "#Results:\n", + "print \"Change in entropy of universe: \",round(dS,4),\"J/K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy of universe: 0.0116 J/K\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 149" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "T1 = 1800 #Maximum temperature(in K):\n", + "T2 = 300 #Minimum temperature(in K):\n", + "Q1 = 5 #Rate at which heat is added(in MW):\n", + "W = 2 #Work output(in MW):\n", + "\n", + "#Calculation:\n", + "Q2 = Q1-W #Heat rejected(in MW):\n", + "dSg = (-Q1/T1+Q2/T2) #Entropy generated(in MW/K):\n", + "w = T2*dSg #Work lost(in MW):\n", + "\n", + "#Results:\n", + "print \"Work lost: \",round(w,2),\"MW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work lost: 2.17 MW\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable Declaration: \n", + "T1 = 500 #Temperature of the system(in K):\n", + "T2 = 300 #Temperature of the reservoir(in K):\n", + "T = symbols('T') #Symbolic representation of tempreture:\n", + "\n", + "#Calculation:\n", + "C = 0.05*T**2 + 0.10*T + 0.085 #Heat Capacity:\n", + "Q1 = integrate(C,(T,T2,T1)) #Maximum heat(in J):\n", + "dSs =integrate(apart(C/T),(T,T1,T2)) #Entropy change of the system(in J/K):\n", + "W = (Q1/T2+dSs)*T2 #Maximum work available(in kJ):\n", + "\n", + "#Results:\n", + "print \"Maximum work: \",round(W/(10**3),2),\"KJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum work: 435.34 KJ\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 151" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "from sympy import *\n", + "\n", + "#Variable Declaration: \n", + "p1 = 3000 #Initial pressure(in kPa):\n", + "v1 = 0.05 #Initial volume(in m**3):\n", + "v2 = 0.3 #Final volume(in m**3):\n", + "n = 1.4 #Value of n:\n", + "dS = 0 #Entropy change:\n", + "T,P = symbols('T,P') #Symbolic expressions for T and P respectively\n", + "\n", + "#Calculation:\n", + "p2 = round(p1*((v1/v2)**n)) #Final pressure(in MPa):\n", + "V = (p1*v1**n/P)**(1/n)\n", + "dH = integrate(V,(P,p2,p1)) #Change in enthalpy(in kJ):\n", + "\n", + "#Results:\n", + "print \"Enthalpy change: \",round(dH,1),\"KJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy change: 268.7 KJ\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "m = 2 #Mass of air(in kg):\n", + "v1 = 1 #Initial volume(in m**3):\n", + "v2 = 10 #Final volume(in m**3):\n", + "R = 287 #Gas const(in J/kg.K):\n", + "\n", + "#Calculation:\n", + "dSa = m*R*log(v2/v1) #Change in entropy of air(in J/K):\n", + "dSs = 0 #During free expansion, entropy change of surroundings(in J/K):\n", + "dSu = dSa+dSs #Entropy change of universe(in J/K):\n", + "\n", + "#Results:\n", + "print \"Entropy change of air: \",round(dSa,2),\"J/K\" \n", + "print \"Entropy change of surroundings: \",round(dSs),\"J/K\"\n", + "print \"Entropy change of universe: \",round(dSu,2),\"J/K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change of air: 1321.68 J/K\n", + "Entropy change of surroundings: 0.0 J/K\n", + "Entropy change of universe: 1321.68 J/K\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 152" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "m = 0.5 #Mass of air(in kg):\n", + "p1 = 1.013*10**5 #Initial pressure(in Pa):\n", + "p2 = 0.8*10**6 #Final pressure(in Pa):\n", + "T1 = 800 #Initial temperature(in K):\n", + "n = 1.2 #Index of compression:\n", + "r = 1.4 #Adiabatic index of compression:\n", + "Cv = 0.71*10**3 #Value of Cv(in J/kg.K):\n", + "\n", + "#Calculation:\n", + "T2 = T1*((p2/p1)**((n-1)/n)) #Final temperature(in K):\n", + "dS = m*Cv*((n-r)/(n-1))*log(T2/T1) #Total entropy change(in J/K):\n", + "\n", + "#Results:\n", + "print \"Entropy change: \",abs(round(dS,2)),\"J/K\"\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change: 122.27 J/K\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration:\n", + "Q1 = 500 #Heat supplied by source (Kcal/s)\n", + "T1 = 600 #Temperature of source(K):\n", + "T2 = 300 #Temperature of sink(K):\n", + "def feasibility(Q2):\n", + " Y = Q1/T1 - Q2/T2\n", + " if(Y>0):\n", + " return \"Under this condition engine is not possible\"\n", + " elif (Y<0):\n", + " return \"Engine is feasible and cycle is irreversible\"\n", + " elif (Y==0):\n", + " return \"Engine is feasible and cycle is reversible\"\n", + "\n", + "#Results:\n", + "print \"(i) If heat rejected at 200 Kcal/s then \",feasibility(200)\n", + "print \"(ii) If heat rejected at 400 Kcal/s then \",feasibility(400)\n", + "print \"(iii) If heat rejected at 250 Kcal/s then \",feasibility(250) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) If heat rejected at 200 Kcal/s then Under this condition engine is not possible\n", + "(ii) If heat rejected at 400 Kcal/s then Engine is feasible and cycle is irreversible\n", + "(iii) If heat rejected at 250 Kcal/s then Engine is feasible and cycle is reversible\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 154" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "p1 = 0.5 #Pressure at point 1(in MPa):\n", + "T1 = 400 #Temperature at point 1(in K):\n", + "p2 = 0.3 #Pressure at point 2(in MPa):\n", + "T2 = 350 #Temperature at point 2(in K):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cp = 1.004 #Value of Cp(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "ds = Cp*log(T1/T2)-R*log(p1/p2) #Entropy change(in kJ/kg.K):\n", + "\n", + "#Results:\n", + "print \"Change in entropy: \",round(ds,5),\"KJ/Kg.K\"\n", + "print \"Hence flow occurs from 1 to 2 i.e. from 0.5 MPa, 400 K to 0.3 MPa & 350 K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy: -0.01254 KJ/Kg.K\n", + "Hence flow occurs from 1 to 2 i.e. from 0.5 MPa, 400 K to 0.3 MPa & 350 K\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "Q12 = 1000 #Heat added in process 1-2(in kJ):\n", + "Q34 = 800 #Heat added in process 3-4(in kJ):\n", + "T1 = 500 #Temperature at point 1(in K):\n", + "T3 = 400 #Temperature at point 3(in K):\n", + "T5 = 300 #Temperature at point 5(in K):\n", + "\n", + "#Calculation:\n", + "Qt = Q12+Q34 #Total heat added(in kJ):\n", + "S12 = Q12/T1 #Entropy change from state 1-2(in kJ/K):\n", + "S34 = Q34/T3 #Entropy change from state 3-4(in kJ/K):\n", + "S56 = S12+S34 #Entropy change from state 5-6(in kJ/K):\n", + "Q56 = T5*S56 #Heat rejected in process 5-6(in kJ):\n", + "W = Q12+Q34-Q56 #Net work done(in kJ):\n", + "n = W/Qt #Thermal efficiency of the cycle:\n", + "\n", + "#Results:\n", + "print \"Work done: \",round(W),\"KJ\" \n", + "print \"Thermal efficiency: \",round(n*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done: 600.0 KJ\n", + "Thermal efficiency: 33.33 %\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 156" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "from sympy import *\n", + "#Variable Declaration: \n", + "T1 = 800 #Temperature of the reservoirs(in K):\n", + "T2 = 700\n", + "T3 = 600\n", + "T4 = 320 #Temperature of the sink(in K):\n", + "Q2 = 10 #Total heat rejected to the heat sink(in kJ/s):\n", + "W = 20 #Work done(in kW):\n", + "Q11,Q12,Q13 = symbols('Q11,Q12,Q13')\n", + "\n", + "#Calculation:\n", + "Q1 = Q2+W #Total heat added(in kJ/s):\n", + "EQ1 = 0.7*Q12 - Q11 #Heat from reservoir 1(in kJ/s) formed as equation:\n", + "EQ2 = Q1-1.7*Q12 - Q13 #Heat from reservoir 3(in kJ/s) formed as equation:\n", + "EQ3 = Q11/T1 + Q12/T2 +Q13/T3 - Q2/T4 #For reversible engine\n", + "result = solve([EQ1,EQ2,EQ3],[Q11,Q12,Q13])\n", + "\n", + "#Results:\n", + "print \"!!!--There are some error in calculations in the book --!\"\n", + "print \"Heat supplied by reservoir at 800 K: \",round(result[Q11],2),\"KJ/s\" \n", + "print \"Heat supplied by reservoir at 700 K: \",round(result[Q12],2),\"KJ/s\"\n", + "print \"Heat supplied by reservoir at 600 K: \",round(result[Q13],2),\"KJ/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "!!!--There are some error in calculations in the book --!\n", + "Heat supplied by reservoir at 800 K: 24.78 KJ/s\n", + "Heat supplied by reservoir at 700 K: 35.39 KJ/s\n", + "Heat supplied by reservoir at 600 K: -30.17 KJ/s\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 157" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from math import log\n", + "#Variable Declaration: \n", + "v1 = 0.04 #Volume of the chamber(in m**3):\n", + "p1 = 10 #Initial pressure(in bar):\n", + "T1 = 25+273 #Initial temperature(in K):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cv = 0.71 #Value of Cv(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "T2 = T1 #Final temperature(in K):\n", + "v2 = 2*v1 #Final volume(in m**3):\n", + "p2 = p1*v1/v2 #Final pressure(in bar):\n", + "m = p1*10**2*v1/(R*T1) #Initial mass(in kg):\n", + "dS = m*R*log(v2/v1)+m*Cv*log(T2/T1)\t#Change in entropy(in kJ/K):\n", + "\n", + "#Results:\n", + "print \"Entropy change: \",round(dS,5), \"KJ/K\" \n", + "print \"The process is irreversible\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change: 0.09304 KJ/K\n", + "The process is irreversible\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page no. 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "ma = 0.6 #Mass in tank A(in kg):\n", + "mb = 1 #Mass in tank B(in kg):\n", + "Ta = 90+273 #Temperature in tank A(in K):\n", + "Tb = 45+273 #Temperature in tank B(in K):\n", + "pa = 1 #Pressure in tank A(in bar):\n", + "pb = 2 #Pressure in tank B(in bar):\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "Tf = (ma*Ta+mb*Tb)/(ma+mb) #Final temperature(in K):\n", + "va = ma*R*Ta/pa #Volume of tank A(in m**3):\n", + "vb = mb*R*Tb/pb #Volume of tank B(in m**3):\n", + "pf = (ma+mb)*R*Tf/(va+vb) #Final pressure(in kPa):\n", + "dS = ma*(Cp*log(Tf/Ta)-R*log(pf/pa))+mb*(Cp*log(Tf/Tb)-R*log(pf/pb)) #Entropy change(in kJ/K):\n", + "\n", + "#Results:\n", + "print \"Final Pressure: \",round(pf,2),\"KPa\"\n", + "print \"Entropy produced: \",round(dS,5),\"KJ/K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final Pressure: 1.42 KPa\n", + "Entropy produced: 0.04061 KJ/K\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page no. 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "va = 4 #Volume of the tanks(in m**3):\n", + "vb = 4\n", + "vc = 4\n", + "pa = 6 #Pressure in tank A(in bar):\n", + "Ta = 90+273 #Temperature in tank A(in K):\n", + "pb = 3 #Pressure in tank B(in bar):\n", + "Tb = 300+273 #Temperature in tank B(in K):\n", + "pc = 12 #Pressure in tank C(in bar):\n", + "Tc = 50+273 #Temperature in tank C(in K):\n", + "Ra = 0.287 #Gas constant for air(in kJ/kg.K):\n", + "Rn = 0.297 #Gas constant for nitrogen(in kJ/kg.K):\n", + "ra = 1.4 #Adiabatic index of compression for air:\n", + "rn = 1.4 #Adiabatic index of compression for nitrogen:\n", + "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n", + "Cv = 0.718 #Value of Cv(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "ma = pa*10**2*va/(Ra*Ta) #Mass in tank A(in kg): #Part (i)\n", + "mb = pb*10**2*vb/(Ra*Tb) #Mass in tank B(in kg):\n", + "Td = (ma*Ta+mb*Tb)/(ma+mb) #Final temperature(in K):\n", + "pd = Ra*Td*(ma+mb)/((va+vb)*10**2) #Final pressure(in bar):\n", + "dS1 = ma*Cp*log(Td/Ta)-ma*Ra*log(pd/pa)+mb*Cp*log(Td/Tb)-mb*Ra*log(pd/pb) #Entropy change(in kJ/K):\n", + "mc = pc*10**2*vc/(Rn*Tc) #Mass in tank C(in kg): #Part (ii)\n", + "md = ma+mb #Mass in tank D(in kg):\n", + "Cvn = Rn/(rn-1) #Value of Cv for nitrogen(in kJ/kg.K):\n", + "Cpn = rn*Cvn #Value of Cp for nitrogen(in kJ/kg.K):\n", + "mf = md+mc #Total mass(in kg):\n", + "CvF = (md*Cv+mc*Cvn)/mf #Final Cv(in kJ/kg.K):\n", + "RF = (md*Ra+mc*Rn)/mf #Final gas constant(in kJ/kg.K):\n", + "TF = (md*Cv*Td+mc*Cvn*Tc)/(mf*CvF) #Final temperature(in K):\n", + "VF = va+vb+vc #Final volume(in m**3):\n", + "pF = mf*RF*TF/VF #Final pressure(in kPa):\n", + "dS2 = md*(Cp*log(TF/Td)-Ra*log(pF/(pd*10**2)))+mc*(Cpn*log(TF/Tc)-Rn*log(pF/(pc*10**2))) #Change in entropy(in kJ/K):\n", + "\n", + "#Results:\n", + "print \"Entropy change in case 1: \",round(dS1,3),\"KJ/K\"\n", + "print \"Entropy change in case 2: \",round(dS2,3),\"KJ/K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy change in case 1: 1.677 KJ/K\n", + "Entropy change in case 2: 4.761 KJ/K\n" + ] + } + ], + "prompt_number": 24 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter6.ipynb b/Applied_Thermodynamics/Chapter6.ipynb new file mode 100755 index 00000000..d100fbbe --- /dev/null +++ b/Applied_Thermodynamics/Chapter6.ipynb @@ -0,0 +1,1088 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4c5adc7ff722a4bfcaaad47e052db064cf85c767ab3f0fe6ba8aa04ddc1a515a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Thermodynamic Properties of Pure Substance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p1 = 10 #Pressure at which steam is entering(in MPa):\n", + "p2 = 0.05 #Pressure at which steam is coming out(in MPa):\n", + "T = 100 #Temperature of the steam(inC):\n", + "h2 = 2682.5 #Enthalpy of superheated steam at 0.05 MPa and 100 C(in kJ/kg): #From steam tables:\n", + "hf10 = 1407.56\n", + "hfg10 = 1317.1\n", + "\n", + "#Calculation:\n", + "h1 = h2 #Due to throttling:\n", + "x1 = (h1-hf10)/hfg10 #Dryness fraction:\n", + "\n", + "#Results:\n", + "print \"Dryness fraction: \",round(x1,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction: 0.968\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p = 12 #Pressure(in MPa):\n", + "v = 0.017 #Specific volume(in m**3/kg):\n", + "h = 2848 #Enthaply(in kJ/kg):\n", + "\n", + "#Calculation:\n", + "u = h-p*10**3*v #Internal energy(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Internal energy: \",round(u),\"KJ/Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal energy: 2644.0 KJ/Kg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "m = 5 #Mass of steam(in kg):\n", + "p = 2 #Pressure(in MPa):\n", + "Tss = 300+273.15 #Temperature of superheated steam(in K):\n", + "Cps = 2.1 #Specific heat of super heated steam(in kJ/kg.K):\n", + "Cpw = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "hfg = 1890.7 #From steam tables:\n", + "\n", + "#Calculations:\n", + "Tsat = 212.42+273.15 #Saturation temperature(in K):\n", + "s = Cpw*log(Tsat/273.15)+hfg/Tsat+Cps*log(Tss/Tsat) #Entropy of unit mass of superheated steam with reference to absolute zero(in kJ/kg.K):\n", + "S = m*s #Entropy of 5 kg of steam(in kJ/K):\n", + "\n", + "#Result:\n", + "print \"Entropy of steam: \",round(S,2),\"KJ/K\"\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entropy of steam: 33.23 KJ/K\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration:\n", + "Tb = 110 #Boiling point(in\u00c2\u00b0C):\n", + "p = 143.27 #Pressure at which it boils(in kPa): #From steam table:\n", + "Tsat = 108.866 #From steam table this temperature(in \u00c2\u00b0C): #Boiling point at this depth = Tsat at 138.365\n", + "\n", + "#Calculation:\n", + "p1 = p-9.81*0.50 #Pressure at 50 cm depth(in kPa):\n", + "\n", + "#Result:\n", + "print \"Boiling point :\",round(Tsat,2),\"\u00b0C\"\t\t\t\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Boiling point : 108.87 \u00b0C\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T = 100 #Temperature of the water vapor mixture(in \u00c2\u00b0C):\n", + "V = 0.5 #Volume of the rigid vessel(in m**3):\n", + "v2 = 0.003155 #Specific volume at state 2(in m**3/kg): #From steam tables:\n", + "vf = 0.001044\n", + "vg = 1.6729\n", + "\n", + "#Calculations:\n", + "v1 = v2 #Specific volume at state 1(in m**3/kg):\n", + "x1 = (v1-vf)/vg #Dryness fraction:\n", + "m = V/v2 #Total mass of fluid(in kg):\n", + "v = m*vf #Volume of water(in m**3):\n", + "\n", + "#Results:\n", + "print \"Mass of water :\",round(m,2),\"Kg\" \n", + "print \"Volume of water :\",round(v,4),\"m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of water : 158.48 Kg\n", + "Volume of water : 0.1655 m**3\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p = 2 #Pressure(in MPa):\n", + "T = 500+273.15 #Temperature(in K):\n", + "\n", + "#Calculation:\n", + "s = T #Slope of isobar:(dh/ds)at constant pressure = T:\n", + "\n", + "#Result:\n", + "print \"Slope :\",s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slope : 773.15\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "x = 0.10 #Dryness fraction:\n", + "p = 0.15 #Pressure(in MPa):\n", + "hf = 467.11 #From steam tables:(at 0.15 MPa):\n", + "hg = 2693.6\n", + "vf = 0.001053\n", + "vg = 1.1593\n", + "sf = 1.4336\n", + "sg = 7.2233\n", + "\n", + "#Calculations:\n", + "h = hf+x*(hg-hf) #Enthalpy(in kJ/kg):\n", + "v = vf+x*(vg-vf) #Specific volume(in m**3/kg):\n", + "s = sf+x*(sg-sf) #Entropy(in kJ/kg.K):\n", + "\n", + "#Results:\n", + "print \"Enthalpy :\",h,\"KJ/Kg\"\n", + "print \"Specific volume :\",v,\"m**3/kg\"\n", + "print \"Entropy :\",s,\"KJ/Kg.K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy : 689.759 KJ/Kg\n", + "Specific volume : 0.1168777 m**3/kg\n", + "Entropy : 2.01257 KJ/Kg.K\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "#Initial State:\n", + "p1 = 1 #Pressure(in MPa):\n", + "V1 = 0.05 #Volume(in m**3):\n", + "x1 = 0.80 #Dryness fraction:\n", + "#Final state:\n", + "p2 = 1 #Pressure(in MPa):\n", + "V2 = 0.2 #Volume(in m**3):\n", + "\n", + "#From steam table:(at state 1):\n", + "vf = 0.001127 #(m3/kg) \n", + "vg = 0.19444 #(m3/kg)\n", + "uf = 761.68 #(kJ/kg)\n", + "ufg = 1822 #(kJ/kg)\n", + "\n", + "#Calculations:\n", + "W = p1*10**3*(V2-V1) #Work done(in kJ):\n", + "v1 = vf+x1*(vg-vf) #Specific volume at state 1(in m**3/kg):\n", + "m = V1/v1 #Mass of system(in kg):\n", + "v2 = V2/m #Specific volume at state 2(in m**3/kg):\n", + "Tf = 1077.61 #Temperature at final state(in C):\n", + "u2 = 4209.6 #Internal energy at final state(at 1077.61 C):\n", + "u1 = uf+x1*ufg #Internal energy at initial state(in kJ/kg):\n", + "Q = m*(u2-u1)+W #Heat added(in kJ):\n", + "\n", + "#Results:\n", + "print \"Heat added :\",round(Q,2),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat added : 788.83 kJ\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p1 = 800 #Presure of the steam(in kPa):\n", + "T = 200 #Temperature(in \u00b0C)\n", + "Tsat = 170.43 #Saturation temp(in \u00b0C): \n", + "#From steam tables:\n", + "v1 = 0.2404 #Specific volume(in m**3/kg):\n", + "vgI = 0.2168\n", + "vgII = 0.2428\n", + "TI = 175\n", + "TII = 170\n", + "PI = 892\n", + "PII = 791.7\n", + "\n", + "#Calculations:\n", + "T2 = TI - (TI-TII)*(v1-vgI)/(vgII-vgI) #Final temperature after interpolation (in \u00b0C):\n", + "p2 = PI - (PI-PII)*(v1-vgI)/(vgII-vgI) #Final pressure after interpolation (in kPa):\n", + "\n", + "#Results:\n", + "print \"Pressure :\",round(p2,2),\"kPa\"\n", + "print \"Temperature :\",round(T2,2),\"\u00b0C\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure : 800.96 kPa\n", + "Temperature : 170.46 \u00b0C\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "T = 30 #Temperature of water(in C):\n", + "p = 200 #Pressure(in kPa):\n", + "p1 = 4.25 #Corresponding pressure at 30 C(in kPa): #From steam tables:\n", + "v1 = 0.001004 #Specific volume(in m**3):\n", + "\n", + "#Calculations:\n", + "dh = v1*(p-p1) #Enthalpy change(in kJ/kg):\n", + "\n", + "#Result:\n", + "print \"Enthalpy change :\",dh,\"KJ/Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Enthalpy change : 0.196533 KJ/Kg\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "V1 = 3./5*2 #Volume occupied by water(in m**3):\n", + "V2 = 2./5*2 #Volume occupied by steam(in m**3):\n", + "#From steam table\n", + "vf = 0.001091 #(m**3/kg) \n", + "vg = 0.3928 #(m**3/kg)\n", + "\n", + "#Calculations:\n", + "mf = V1/vf #Mass of water(in kg):\n", + "mg = V2/vg #Mass of steam(in kg):\n", + "mt = mf+mg #Total mass(in kg):\n", + "x = mg/mt #Dryness fraction:\n", + "\n", + "#Results:\n", + "print \"Mass :\",round(mt,2),\"kg\"\n", + "print \"Quality :\",round(x,6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass : 1101.95 kg\n", + "Quality : 0.001848\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p = 4 #Pressure of the steam(in MPa):\n", + "T1 = 300 #Temperature of steam entering(in \u00b0C):\n", + "T2 = 50 #Temperature of steam at turbine exit(in \u00b0C):\n", + "#From steam tables:\n", + "h1 = 2886.2 #kJ/kg \n", + "s1 = 6.2285 #kJ/kg.K\n", + "hf = 209.33 #kJ/kg\n", + "sf = 0.7038 #kJ/kg.K\n", + "hfg = 2382.7 #kJ/kg\n", + "sfg = 7.3725 #kJ/kg.K\n", + "\n", + "#Calculation:\n", + "s2 = s1 #Assumed\n", + "x2 = round((s2-sf)/sfg,4) #Dryness fraction:\n", + "h2 = hf+x2*hfg #Enthalpy at state 2(in kJ/kg):\n", + "W = h1-h2 #Turbine work(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Turbine output: \",round(W,2),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Turbine output: 891.27 kJ/kg\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "m1 = 100 #Mass of steam(in kg):\n", + "p1 = 100 #Initial pressure(in kPa):\n", + "p2 = 1000 #Final pressure(in kPa):\n", + "x1 = 0.5 #Dryness fraction:\n", + "p3 = 2000 #Pressure of dry saturated steam(in kPa):\n", + "\n", + "#From steam tables:\n", + "hf100kPa = 417.46 #kJ/kg \n", + "uf100kPa = 417.36 #kJ/kg\n", + "vf100kPa = 0.001043 #m**3/kg\n", + "hfg100kPa = 2258 #kJ/kg\n", + "ufg100kPa = 2088.7 #kJ/kg\n", + "vg100kPa = 1.6940 #m**3/kg\n", + "vg2000kPa = 0.09963 #m**3/kg\n", + "ug2000kPa = 2600.3 #kJ/kg\n", + "hg2000kPa = 2799.5 #kJ/kg\n", + "hf1000kPa = 762.81 #kJ/kg,\n", + "hfg1000kPa = 2015.3 #kJ/kg \n", + "vf1000kPa = 0.001127 #m3/kg\n", + "vg1000kPa = 0.19444 #m3/kg\n", + "\n", + "#Calculations:\n", + "v1 = vf100kPa+x1*(vg100kPa-vf100kPa) #Initial specific volume(in m**3/kg):\n", + "h1 = hf100kPa+x1*hfg100kPa #Enthalpy at 1(in kJ/kg):\n", + "V = m1*x1*v1 #Volume of vessel(in m**3):\n", + "v2 = vg2000kPa*v1/(vg2000kPa+v1) #Final specific volume(in m**3/kg):\n", + "x2 = (v2-vf1000kPa)/(vg1000kPa-vf1000kPa)#Final dryness fraction:\n", + "h2 = hf1000kPa+x2*hfg1000kPa #Final enthalpy(in kJ/kg):\n", + "m = m1*(h1-h2)/(h2-hg2000kPa) #Mass of dry steam at 2000kPa(in kg):\n", + "U1 = m*(uf100kPa+x1*ufg100kPa) #Internal energy in the beginning(in kJ):\n", + "\n", + "#Results:\n", + "print \"Mass of dry steam at 2000 kPa to be added: \",round(m,2),\"kg\" \n", + "print \"Quality of final mixture: \",round(x2,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of dry steam at 2000 kPa to be added: 11.97 kg\n", + "Quality of final mixture: 0.455\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 190" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "r = 71.5 #Recorded condenser vacuum(cm of Mercury)\n", + "br = 76.8 #Barometer reading(cm of Mercury) \n", + "Tc = 35 #Temperature of condensation(\u00b0C)\n", + "Thw = 27.6 #Temperature of hot well(\u00b0C)\n", + "mc = 1930 #Mass of condensate per hour()Kg\n", + "mcw = 62000 #Mass of cooling water per hour(Kg)\n", + "Ti = 8.51 #Inlet temperature (\u00b0C)\n", + "To = 26.24 #Outlet temperature(\u00b0C)\n", + "#From steam tables:\n", + "hf = 146.68 #kJ/kg\n", + "hfg = 2418.6 #kJ/kg\n", + "\n", + "#Calculations:\n", + "pc = (br-r)/73.55*101.325 #Condensor pressure(in kPa):\n", + "ps = 5.628 #Partial pressure of steam corresponding to 35\u00c2\u00b0C from steam table(in kPa):\n", + "x = (mcw*(To-Ti)*4.18-mc*hf+mc*4.18*To)/(mc*hfg) #Dryness fraction:\n", + "\n", + "#Results:\n", + "print \"Dryness fraction of the steam entering:\",round(x,2) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of the steam entering: 0.97\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 191" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import pi\n", + "#Variable Declaration: \n", + "D = 0.2 #Diameter of the vessel(in m):\n", + "d = 0.02 #Depth(in m):\n", + "T = 150 #Temperature(in \u00b0C):\n", + "F = 10 #Force applied(in kN):\n", + "Q = 600 #Heat supplied(in kJ):\n", + "#From steam tables:\n", + "hf = 612.1 \n", + "hfg = 2128.7\n", + "vg = 0.4435\n", + "h2 = 1582.8\n", + "\n", + "#Calculations:\n", + "p = F/(pi*D**2)*4+101.3 #Pressure at which process is taking place(in kPa):\n", + "V1 = pi*D**2*d/4 #Volume of water contained(in m**3):\n", + "m = V1*1000 #Mass of water(in kg):\n", + "x = (Q-hf*m+4.18*T*m)/(hfg*m) #Dryness fraction:\n", + "U1 = m*4.18*T-p*V1 #Internal energy of water initially(in kJ):\n", + "V2 = m*x*vg #Final volume(in m**3):\n", + "U2 = m*h2-p*V2 #Internal energy at state 2(in kJ):\n", + "dU = U2-U1 #Change in internal energy(in kJ):\n", + "W = p*(V2-V1) #Work done(in kJ):\n", + "\n", + "#Results:\n", + "print \"Dryness fraction of the steam produced: \" ,round(x,3) \n", + "print \"Change in internal energy: \",round(dU,2), \"kJ\"\n", + "print \"Work done: \",round(W,2),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of the steam produced: 0.456\n", + "Change in internal energy: 547.54 kJ\n", + "Work done: 53.01 kJ\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "ms = 40 #Mass of steam passed(in kg):\n", + "mw = 2.2 #Mass of water passed(in kg):\n", + "p1 = 1.47 #Initial pressure of steam(in MPa):\n", + "T = 120 #Temperature after throttling(in C):\n", + "p2 = 107.88 #Pressure after throttling(in kPa):\n", + "s = 2.09 #Specific heat of superheated steam(in kJ/kg.K):\n", + "hf = 840.513 #From steam tables:\n", + "hfg = 1951.02\n", + "h1 = 2673.95\n", + "\n", + "#Calculations:\n", + "ds = T-101.8 #Degree of superheat(in C):\n", + "h2 = h1+ds*s #Enthalpy of superheated steam(in kJ/kg):\n", + "x2 = (h2-hf)/hfg #Dryness fraction after throttling:\n", + "x1 = (ms-mw)/ms #Dryness fraction before throttling:\n", + "x = x1*x2 #Overall dryness fraction:\n", + "\n", + "#Results:\n", + "print \"Dryness fraction \",round(x,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction 0.9065\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "Va = 0.4 #Initial volume in part A(in m**3):\n", + "pa = 10 #Pressure(in bar):\n", + "V = 0.4 #Initial volume in part B(in m**3):\n", + "p1 = 10 #Pressure in part B(in bar):\n", + "p2 = 15 #Final pressure in part B(in bar):\n", + "#From steam tables:\n", + "hf = 762.83 \n", + "hfg = 2015.3\n", + "h2 = 2792.2\n", + "\n", + "#Calculations:\n", + "Q = V*(p2-p1)*10**2 #Heat added(in kJ):\n", + "x1 = (h2-Q-hf)/hfg #Dryness fraction:\n", + "\n", + "#Results:\n", + "print \"Heat added: \",round(Q),\"kJ\" \n", + "print \"Initial quality: \",round(x1,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat added: 200.0 kJ\n", + "Initial quality: 0.908\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 193" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "m = 3 #Mass of wet steam(in kg):\n", + "p1 = 1.4 #Initial pressure(in bar):\n", + "V1 = 2.25 #Initial volume(in m**3):\n", + "T = 400 #Final temperature of steam(in \u00b0C):\n", + "V2 = 4.65 #At 400 \u00b0C,volume of steam(in m**3):\n", + "#From steam tables:\n", + "vg = 1.2455 \n", + "hf = 457.99\n", + "hfg = 2232.3\n", + "h2 = 3276.6\n", + "uf = 457.84\n", + "ufg = 2059.34\n", + "u2 = 2966.7\n", + "\n", + "#Calculations:\n", + "v1 = V1/m #Specific volume of wer steam in cylinder(in m**3/kg):\n", + "x1 = v1/vg #Dryness fraction of initial steam:\n", + "h1 = hf+x1*hfg #Initial enthalpy of wet steam(in kJ/kg):\n", + "v2 = V2/m #At 400\u00b0C specific volume of steam(in m**3/kg):\n", + "p2 = 0.20 #Actual pressure(from steam table)(in MPa):\n", + "ds = T-120.23 #Finally the degree of superheat(in \u00b0C): #Saturation temp at this pressure = 120.23\u00c2\u00b0C\n", + "Q = m*(h2-h1) #Heat added during the process(in kJ):\n", + "u1 = uf+x1*ufg #Internal energy of initial wet steam(in kJ/kg):\n", + "dU = m*(u2-u1) #Change in internal energy(in kJ):\n", + "W = Q-dU #Work done(in kJ):\n", + "\n", + "#Results:\n", + "print \"Heat transfer: \",round(Q,2),\"kJ\" \n", + "print \"Work transfer : \",round(W,2),\"kJ\"\n", + "print \"____Note: Please check the value of x1 calculated and used: (calculated is 0.602 and used is 0.607 hence there is a difference in answer)____\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transfer: 4423.17 kJ\n", + "Work transfer : 616.8 kJ\n", + "____Note: Please check the value of x1 calculated and used: (calculated is 0.602 and used is 0.607 hence there is a difference in answer)____\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page no. 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "p1 = 10 #Pressure of the steam(in bar):\n", + "T = 500 #Temperature(in \u00b0C):\n", + "p2 = 1 #Final pressure(in bar):\n", + "#From steam tables:\n", + "h10bar500 = 3478.5 #kJ/kg \n", + "s10bar500 = 7.7622 #kJ/kg.K\n", + "v10bar500 = 0.3541 #m**3/kg\n", + "h1bar400 = 3278.2 #kJ/kg\n", + "h1bar500 = 3488.1 #kJ/kg\n", + "v1bar500 = 3.565 #m**3/kg\n", + "v1bar400 = 3.103 #m**3/kg\n", + "s1bar500 = 8.8342 #kJ/kg.K\n", + "s1bar400 = 8.5435 #kJ/kg.K\n", + "h2 = h10bar500\n", + "\n", + "#Calculations:\n", + "T2 = (h2-h1bar400)*(T-400)/(h1bar500-h1bar400)+400 #Final temperature(in \u00b0C):\n", + "s2 = s1bar400+(s1bar500-s1bar400)/(T-400)*(T2-400) #Final entropy(in kJ/kg.K):\n", + "ds = s2-s10bar500 #Change in entropy(in kJ/kg.K):\n", + "v2 = v1bar400+(v1bar500-v1bar400)/(T-400)*(T2-400) #Final specific volume(in m**3/kg):\n", + "p = v10bar500/v2*100 #Percentage volume occupied by steam:\n", + "\n", + "#Results:\n", + "print \"Final temperature: \",round(T2,2),\"\u00b0C\" \n", + "print \"Change in entropy: \",round(ds,4),\"kJ/Kg K\"\n", + "print \"Percentage of vessel volume initially occupied by steam: \",round(p,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final temperature: 495.43 \u00b0C\n", + "Change in entropy: 1.0587 kJ/Kg K\n", + "Percentage of vessel volume initially occupied by steam: 9.99 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page no. 195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "#Steam entering:\n", + "p1 = 2.5 #Pressure(in MPa): \n", + "T1 = 350 #Temperature(in \u00b0C):\n", + "#Steam rejected:\n", + "p2 = 20 #Pressure(in kPa):\n", + "x2 = 0.92 #Dryness fraction:\n", + "p3 = 30 #Pressure of one quater of intial steam(in kPa):\n", + "T0 = 30+273 #Temperature(in K):\n", + "m1 = 1\n", + "m2 = 0.25\n", + "m3 = 0.75\n", + "Q = -10 #Heat lost during expansion(in kJ):\n", + "#From steam tables:\n", + "h1 = 3126.3 #kJ/kg\n", + "s1 = 6.8403 #kJ/kg.K\n", + "h2 = 2878.6 #kJ/kg\n", + "s2 = 8.5309 #kJ/kg.K\n", + "h3 = 2421.04 #kJ/kg\n", + "s3 = 7.3425 #kJ/kg.K\n", + "hf = 251.40 #kJ/kg\n", + "hg = 2609.7 #kJ/kg\n", + "sf = 0.8320 #kJ/kg.K\n", + "sfg = 7.0766 #kJ/kg.K\n", + "h0 = 125.79 \n", + "s0 = 0.4369\n", + "\n", + "#Calculations:\n", + "A1 = (h1-h0)-T0*(s1-s0) #Availability of steam entering turbine(in kJ/kg):\n", + "A2 = (h2-h0)-T0*(s2-s0) #Availability of steam leaving turbine at state 2(in kJ/kg):\n", + "A3 = (h3-h0)-T0*(s3-s0) #Availability of steam leaving turbine at state 3(in kJ/kg):\n", + "Wmax = m1*A1-m2*A2-m3*A3 #Maximum work per kg of steam entering turbine(in kJ/kg):\n", + "I = T0*(m2*s2+m3*s3-m1*s1)-Q#Irreversibilty(in kJ/s):\n", + "\n", + "#Results:\n", + "print \"Maximum work\",round(Wmax,2),\"kJ/kg\" \n", + "print \"Irreversibility\",round(I,2),\"kJ/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum work 833.06 kJ/kg\n", + "Irreversibility 252.19 kJ/s\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22, page no. 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration: \n", + "p1 = 6 #Initial pressure(in MPa):\n", + "p2 = 5 #Final pressure(in MPa):\n", + "T1 = 400 #Initial temperature(in \u00b0C):\n", + "patm = 100 #Atmospheric pressure(in kPa):\n", + "Ta = 20+273 #Atmospheric temperature(in \u00b0K):\n", + "#From steam tables:\n", + "h1 = 3177.2 #kJ/kg \n", + "s1 = 6.5408 #kJ/kg.K\n", + "h2 = h1\n", + "T2 = 392.7 #\u00b0C(by interpolation)\n", + "s2 = 6.6172 #kJ/kg.K(#By interpolation Entropy)\n", + "h0 = 83.96 #kJ/kg\n", + "s0 = 0.2966 #kJ/kg\n", + "\n", + "#Calculations:\n", + "A1 = (h1-h0)-Ta*(s1-s0) #Availability at state 1(in kJ/kg):\n", + "A2 = (h2-h0)-Ta*(s2-s0) #Availability at state 2(in kJ/kg):\n", + "dA = A2-A1 #Change in availibilty(in kJ/kg):\n", + "\n", + "print \"Change in availability: \",round(-dA,1),\"kJ/kg decrease\"," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in availability: 22.4 kJ/kg decrease\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23, page no. 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#Variable Declaration:\n", + "TH1 = 95 #Temperature of the hot water entering(in \u00c2\u00b0C):\n", + "TH2 = 50 #Temperature of the hot water at exit(in \u00c2\u00b0C): \n", + "mH = 0.8 #Mass flow rate(in kg/s):\n", + "TC1 = 15+273 #Temperature of cooling water entering(in \u00c2\u00b0K):\n", + "TC2 = 45+273 #Temperature of cooling water at exit(in \u00c2\u00b0K):\n", + "T0 = 25+273 #Temperature of dead state(in K):\n", + "#From steam tables:\n", + "h0 = 104.89 #kJ/kg\n", + "s0 = 0.3674 #kJ/kg.K\n", + "hH1 = 397.96 #kJ/kg\n", + "sH1 = 1.2500 #kJ/kg.K\n", + "hH2 = 209.33 #kJ/kg.K\n", + "sH2 = 0.7038 #kJ/kg.K\n", + "hC2 = 188.45 #kJ/kg.K\n", + "sC2 = 0.6387 #kJ/kg.K\n", + "hC1 = 62.99 #kJ/kg.K\n", + "sC1 = 0.2245 #kJ/kg.K\n", + "\n", + "#Calculations:\n", + "mC = mH*(TH1-TH2)/(TC2-TC1)\t#Mass flow rate of cooling water(in kg/s):\n", + "AH1 = mH*((hH1-h0)-T0*(sH1-s0))\t#Exergy entering through hot water stream(in kJ/s):\n", + "dAc = mC*((hC2-hC1)-T0*(sC2-sC1))#Rate of exergy increase in cold stream(in kJ/s):\n", + "n = dAc/AH1*100 #Second law efficiency:\n", + "dAh = mH*((hH1-hH2)-T0*(sH1-sH2))#Rate of exergy loss in hot stream(in kJ/s):\n", + "dA = dAh-dAc #Exergy destruction(in kJ/s):\n", + "\n", + "#Results:\n", + "print \"Second law efficincy: \",round(n,2),\"%\" \n", + "print \"Exergy destruction: \",round(dA,2),\"kJ/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Second law efficincy: 10.12 %\n", + "Exergy destruction: 18.26 kJ/s\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter7.ipynb b/Applied_Thermodynamics/Chapter7.ipynb new file mode 100755 index 00000000..8e346868 --- /dev/null +++ b/Applied_Thermodynamics/Chapter7.ipynb @@ -0,0 +1,952 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4f8260f1b2df9e05157c56dfea1a72ed7a44f559ce07767048b00c505967ad51" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7: Availability and General Thermodynamic Relations" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 230" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1.6 #Pressure of entering steam(in MPa):\n", + "T1 = 300+273 #Temperature of entering steam(in K):\n", + "p2 = 0.1 #Pressure of leaving steam(in MPa):\n", + "T2 = 150+273 #Temperature of leaving steam(in K):\n", + "c2 = 150 #Velocity of the leaving steam(in m/s):\n", + "m = 2.5 #Mass flow rate(in kg/s):\n", + "#From steam tables:\n", + "h1 = 3034.8 #kJ/kg\n", + "s1 = 6.8844 #kJ/kg.K\n", + "h2 = 2776.4 #kJ/kg\n", + "s2 = 7.6134 #kJ/kg.K\n", + "\n", + "#Calculations:\n", + "T0 = 15+273 #Surrounding temperature(in K):\n", + "Wmax = (h1-h2)-T0*(s1-s2)-(c2**2)/2*10**(-3) #Maxiimum work possible(in kW):\n", + "\n", + "#Results:\n", + "print \"Maximum work possible: \",round(m*Wmax,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum work possible: 1142.76 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 231" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "pa = 1 #Pressure of air(in bar) for tank A:\n", + "m = 1 #Mass of air(in kg):\n", + "Cv = 0.717 #Value of Cv(in kJ/kg.K):\n", + "T = 50+273 #Temperature(in K):\n", + "R = 0.287 #Gas costant(in kJ/kg.K):\n", + "p0 = 1 #Atmospheric pressure(in bar):\n", + "T0 = 15+273 #Atmosphere temperature(in K):\n", + "Cp = 1.004 #Value of Cp(in kJ/kg.K):\n", + "pb = 3 #Pressure(in bar) for tank B:\n", + "\n", + "#Calculations:\n", + "AA = m*(Cv*(T-T0)+R*(p0/pa*T-T0)-T0*Cp*log(T/T0)+T0*R*log(pa/p0)) #Availability of air in tank A(in kJ):\n", + "AB = m*(Cv*(T-T0)+R*(p0/pb*T-T0)-T0*Cp*log(T/T0)+T0*R*log(pb/p0)) #Availability of air in tank B(in kJ):\n", + "\n", + "#Results:\n", + "print \"Availabiltiy of air in tank A: \",round(AA,2),\"kJ\"\n", + "print \"Availability of air in tank B: \",round(AB,2),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Availabiltiy of air in tank A: 1.98 kJ\n", + "Availability of air in tank B: 30.98 kJ\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 232" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 15 #Mass of steam(in kg):\n", + "p1 = 10 #Pressure of entering steam(in bar):\n", + "T1 = 300+273 #Temperature(in K):\n", + "p2 = 0.05 #Pressure of leaving steam(in bar): \n", + "x = 0.95 #Dryness fraction:\n", + "v2 = 160 #Velocity(in m/s):\n", + "p0 = 1 #Atmosheric pressure(in bar):\n", + "T0 = 15+273 #Atmospheric temperature(in K):\n", + "#From steam tables:\n", + "h1 = 3051.2 #kJ/kg\n", + "s1 = 7.1229 #kJ/kg.K\n", + "sf = 0.4764 #kJ/kg.K\n", + "sfg = 7.9187 #kJ/kg.K\n", + "hf = 137.82 #kJ/kg\n", + "hfg = 2423.7 #kJ/kg\n", + "h0 = 62.99 #kJ/kg\n", + "s0 = 0.2245 #kJ/kg.K\n", + "\n", + "#Calculations:\n", + "h2 = hf+x*hfg #Enthalpy at exit of turbine(in kJ/kg):\n", + "s2 = sf+x*sfg #Entropy at exit of turbine(in kJ/kg.K):\n", + "W = (h1-h2)-v2**2/2*10**(-3) #Work output(in kJ/kg):\n", + "pW = m*W #Power output(in kW):\n", + "Wmax = (h1-T0*s1)-(h2+v2**2/2*10**(-3)-T0*s2) #Maximum work given end states(in kW):\n", + "Ae = (h2-h0)+v2**2/2*10**(-3)-T0*(s2-s0) #Maximum wor kavailable from exhaust steam(in kJ/kg):\n", + "Wme = m*Ae #Maximum power that could be obtained from exhaust steam(in kW):\n", + "\n", + "#Results:\n", + "print \"Power output: \",round(pW,1), \"kW\" \n", + "print \"Maximum power output: \" ,round(m*Wmax,1), \"kW\"\n", + "print \"Maximum power from exhaust steam: \",round(Wme,1), \"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power output: 8971.0 kW\n", + "Maximum power output: 12756.4 kW\n", + "Maximum power from exhaust steam: 2265.6 kW\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "m = 5 #Mass of steam(in kg):\n", + "z1 = 10 #Initial elevation(in m):\n", + "V1 = 25 #Initial velocity(in m/s):\n", + "z2 = 2 #Final elevation(in m):\n", + "V2 = 10 #Final velocity(in m/s):\n", + "#Dead state of water\n", + "u0 = 104.86 #kJ/kg \n", + "v0 = 1.0029*10**(-3)#m3/kg\n", + "s0 = 0.3673 #kJ/kg\u00b7K\n", + "p0 = 100 #kPa\n", + "T0 = 25+273 #K\n", + "#Initial state\n", + "u1 = 2550 #kJ/kg \n", + "v1 = 0.5089 #m3/kg\n", + "s1 = 6.93 #kJ/kg\u00b7K\n", + "#Final state\n", + "u2 = 83.94 #kJ/kg \n", + "v2 = 1.0018*10**(-3)#m3/kg\n", + "s2 = 0.2966 #kJ/kg\u00b7K\n", + "g = 9.81 #Acceleration due to gravity(in m/s**2):\n", + "\n", + "#Calculation:\n", + "A1 = m*((u1-u0)*10**3+p0*10**3*(v1-v0)-T0*(s1-s0)*10**3+V1**2/2+g*z1)#Availability at initial state(in kJ):\n", + "A2 = m*((u2-u0)*10**3+p0*10**3*(v2-v0)-T0*(s2-s0)*10**3+V2**2/2+g*z2)#Availability at final state(in kJ):\n", + "dA = A2-A1 #Change in availability(in kJ)\n", + "\n", + "#Results:\n", + "print \"Initial availabilty: \",round(A1/10**3,2), \"kJ\"\n", + "print \"Final availabilty:\",round(A2/10**3,2),\"kJ\"\n", + "print \"Availability decreases by: \",round(-dA/10**3,2), \"kJ\"\t\t\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial availabilty: 2703.28 kJ\n", + "Final availabilty: 1.09 kJ\n", + "Availability decreases by: 2702.19 kJ\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "T1 = 800+273 #Temperature of IC engine(in K):\n", + "W = 1050 #Work per kg of gas in engine(in kJ/kg):\n", + "Cp = 1.1 #Cp of gas(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T0 = 30+273 #Temperature of the surroundings(in K):\n", + "dSsys = W/T1 #Change in entropy of system(in kJ/kg.K):\n", + "dSsurr = -Cp*(T1-T0)/T0 #Change in entropy of surroundings(in kJ/kg.K):\n", + "L = -T0*(dSsys+dSsurr) #Loss of available energy(in kJ/kg):\n", + "r = L/W #Ratio of lost available exhaust energy to engine work:\n", + "\n", + "#Results:\n", + "print \"Ratio of available exhaust energy to engine work: \",round(r,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ratio of available exhaust energy to engine work: 0.524\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 10 #Mass of water(in kg):\n", + "T1 = 150+273 #Initial temperature(in K):\n", + "V1 = 25 #Initial velocity(in m/s):\n", + "z1 = 10 #Initial elevation(in m):\n", + "T2 = 20+273 #Final temperature(in K):\n", + "V2 = 10 #Final velocity(in m/s):\n", + "z2 = 3 #Final elevation(in m):\n", + "p0 = 0.1 #Pressure of environment(in MPa):\n", + "T0 = 25+273.13 #Temperature of environment(in K):\n", + "g = 9.8 #Acceleration due to gravity(in m/s**2):\n", + "#Dead state of water, From steam tables:\n", + "u0 = 104.88 #kJ/kg\n", + "v0 = 1.003*10**(-3) #m3/kg\n", + "s0 = 0.3674 #kJ/kg\u00b7K\n", + "u1 = 2559.5 #kJ/kg\n", + "v1 = 0.3928 #m3/kg\n", + "s1 = 6.8379 #kJ/kg\u00b7K\n", + "u2 = 83.95 #kJ/kg\n", + "v2 = 0.001002 #m3/kg\n", + "s2 = 0.2966 #kJ/kg\u00b7K\n", + "A1 = m*((u1-u0)+p0*10**3*(v1-v0)-T0*(s1-s0)+(V1**2/2+g*z1)*10**-3)#Availability at initial state(in kJ):\n", + "A2 = m*((u2-u0)+p0*10**3*(v2-v0)-T0*(s2-s0)+(V2**2/2+g*z2)*10**-3)#Availability at final state(in kJ):\n", + "dA = A2-A1 #Change in availability(in kJ):\n", + "\n", + "#Results:\n", + "print \"Initial availabilty: \",round(A1,2),\"kJ\"\n", + "print \"Final availabilty: \",round(A2,2),\"kJ\"\n", + "print \"Availability decreases: \",round(-dA,2),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Initial availabilty: 5651.6 kJ\n", + "Final availabilty: 2.57 kJ\n", + "Availability decreases: 5649.03 kJ\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 237" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 5 #Mass flow rate(in kg/s):\n", + "#At inlet to turbine,\n", + "p1 = 5 #MPa \n", + "T1 = 500+273.15 #K\n", + "h1 = 3433.8 #kJ/kg\n", + "s1 = 6.9759 #kJ/kg.K\n", + "#At exit from turbine.\n", + "p2 = 0.2 #MPa\n", + "T2 = 140+273.15 #K\n", + "h2 = 2748 #kJ/kg\n", + "s2 = 7.228 #kJ/kg\u00b7K\n", + "#At dead state,\n", + "p0 = 101.3 #kPa\n", + "T0 = 25+273.15 #K\n", + "h0 = 104.96 #kJ/kg\n", + "s0 = 0.3673 #kJ/kg\u00b7K\n", + "Q = 600 #Heat loss(in kJ/s):\n", + "\n", + "#Calculation:\n", + "A1 = m*((h1-h0)-T0*(s1-s0))\t#Availablity of steam at inlet(in kJ):\n", + "W = m*(h1-h2)-Q #Turbine output(in kW):\n", + "Wmax = m*((h1-h2)-T0*(s1-s2)) #Maximum output(in kW):\n", + "I = Wmax-W #Irreversibilty(in kW):\n", + "\n", + "#Results:\n", + "print \"Availability of steam at inlet: \",round(A1,2),\"kJ\"\n", + "print \"Turbine output: \",round(W),\"kW\"\n", + "print \"Maximum output: \",round(Wmax,2),\"kW\"\n", + "print \"Irreversibility: \",round(I,2),\"kW\"\n", + "print \"_____Please Check there is a calculation mistake in Wmax hence answer differs_____\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Availability of steam at inlet: 6792.43 kJ\n", + "Turbine output: 2829.0 kW\n", + "Maximum output: 3804.82 kW\n", + "Irreversibility: 975.82 kW\n", + "_____Please Check there is a calculation mistake in Wmax hence answer differs_____\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "Q = 500 #Heat removed(in kJ):\n", + "T1 = 835 #Temperature of the heat reservoir(in K):\n", + "T2 = 720 #Temperature of the system(in K):\n", + "T0 = 280 #Temperature of surroundings(in K):\n", + "\n", + "#Calculation:\n", + "A1 = T0*Q/T1 #Availability for heat reservoir(in kJ/kg.K):\n", + "A2 = T0*Q/T2 #Availability for system(in kJ/kg.K):\n", + "Anet = A1-A2 #Net loss of available energy(in kJ/kg.K):\n", + "\n", + "#Results:\n", + "print \"Loss of available energy: \",round(-Anet,2),\"kJ/kg.K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of available energy: 26.78 kJ/kg.K\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "h1 = 4142 #Enthalpy at entrance(in kJ/kg):\n", + "h2 = 2585 #Enthalpy at exit(in kJ/kg):\n", + "A1 = 1787 #Availability of steam at entrance(in kJ/kg):\n", + "A2 = 140 #Availability of steam at exit(in kJ):\n", + "\n", + "#Calculation:\n", + "Wmax = A1-A2 #Maximum work possible(in kJ/kg):\n", + "Wact = h1-h2 #Actual work from turbine(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Actual work: \",round(Wact),\"kJ/kg\" \n", + "print \"Maximum possible work: \",round(Wmax),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual work: 1557.0 kJ/kg\n", + "Maximum possible work: 1647.0 kJ/kg\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "Tmin = 20+273 #Minimum temperature(in K):\n", + "Tmax = 500+273 #Maximum temperature(in K):\n", + "n = 0.25 #Efficiency of heat engine:\n", + "\n", + "#Calculations:\n", + "nrev = 1-Tmin/Tmax #Reversible engine efficiency:\n", + "n2 = n/nrev #Second law efficiency:\n", + "\n", + "#Result:\n", + "print \"Second law efficiency: \",round(n2*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Second law efficiency: 40.26 %\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "from math import log\n", + "#Variable Declaration: \n", + "Va = 6 #Volume of compartment A(in m**3):\n", + "Vb = 4 #Volume of compartment B(in m**3):\n", + "p1 = 6 #Pressure in compartment A(in bar):\n", + "T1 = 600 #Temperature in compartment A(in K):\n", + "p0 = 1 #Atmosheric pressure(in bar):\n", + "T0 = 300 #Atmosheric temperature(in K):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "R = 0.287 #Gas constant(in J/kg.K):\n", + "Cv = 0.718 #Value of Cv(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "V2 = Va+Vb #Final volume(in m**3):\n", + "T2 = T1*(Va/V2)**(r-1) #Final temperature(in K):\n", + "m = p1*10**5*Va/(R*10**3*T1) #Mass of air(in kg):\n", + "dSs = round(m*(Cv*log(T2/T1)+R*log(V2/Va)),3)#Change in entropy of control system(in kJ/kg.K):\n", + "I = T0*dSs #Loss of available energy or irreversibilty(in kJ):\n", + "\n", + "#Results:\n", + "print \"Loss of available energy: \",round(-I,3),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of available energy: 0.6 kJ\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "Tmin = 30+273 #Minimum temperature(in K):\n", + "Tmax = 700+273 #Maximum temperature(in K):\n", + "T0 = 17+273 #Temperature of surroundings(in K):\n", + "Q1 = 2*10**4 #Rate at which engine receives heat(in kJ/min):\n", + "Wu = 0.13*10**3 #Measured output of the engine(in kW):\n", + "\n", + "#Calculation:\n", + "nrev = 1-Tmin/Tmax #Efficiency:\n", + "Wrev = nrev*Q1/60 #Availability or reversible work(in kJ/s):\n", + "I = Wrev-Wu #Rate of irreversibility(in kJ/s):\n", + "n2 = Wu/Wrev #Second law efficiency:\n", + "\n", + "#Results:\n", + "print \"Availability: \",round(Wrev*60/10**4,2),\" x 10^4 kJ/min\"\n", + "print \"Rate of irreversibility: \",round(I,2),\"kW\"\n", + "print \"Second Law Efficiency: \",round(n2*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Availability: 1.38 x 10^4 kJ/min\n", + "Rate of irreversibility: 99.53 kW\n", + "Second Law Efficiency: 56.64 %\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 242" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "p1 = 1.5 #Initial pressure(in bar):\n", + "T1 = 60+273 #Initial temperature(in K):\n", + "p2 = 2.5 #Final pressure(in bar):\n", + "Tres = 400+273\t \t#Temperature of the reservoir(in K):\n", + "T0 = 27+273\t\t#Temperature of surroundings(in K):\n", + "Cp = 1.005\t\t#Cp of air(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T2 = T1*p2/p1\t\t#Final temperature(in K):\n", + "Q = Cp*(T2-T1)\t\t#Heat addition to air in the tank(in kJ/kg):\n", + "dSs = Q/T1\t\t#Change in entropy of the system(in kJ/kg.K):\n", + "dSe = -Q/Tres\t\t#Change in entropy of environment(in kJ/kg.K):\n", + "dS = dSs+dSe\t\t#Total change in entropy(in kJ/kg.K):\n", + "L = T0*dS\t\t#Loss of available energy(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Loss of available energy:\",round(L,1),\"kJ/kg.K\"\t\t\t\t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of available energy: 101.5 kJ/kg.K\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "#From steam tables:\n", + "vg = 0.12736\t\t\t\t\n", + "vf = 0.001157\n", + "p205 = 1.7230\n", + "p195 = 1.3978\n", + "T = 200+273\n", + "hfga = 1940.7\n", + "\n", + "#Calculation:\n", + "vfg = vg-vf\t\t\t\t#Value of vfg(in m**3/kg):\n", + "r = (p205-p195)/(205-195)\t\t#Value of dp/dT(in MPa/K):\n", + "hfg = T*vfg*r*10**3\t\t\t#By Clapeyron equation(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Calculated enthalpy of vaporization: \",round(hfg,2),\"kJ/kg\"\t\t\t\t\n", + "print \"Enthalpy of vaporization from steam table:\",round(hfga,1),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Calculated enthalpy of vaporization: 1941.25 kJ/kg\n", + "Enthalpy of vaporization from steam table: 1940.7 kJ/kg\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page no. 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from math import log\n", + "#Variable Declaration: \n", + "#From steam tables:\n", + "p5 = 260.96 #kPa\t\t\t\t\n", + "p15 = 182.60 #kPa\n", + "vg10 = 0.07665 #m**3/kg\n", + "vf10 = 0.00070 #m**3/kg\n", + "R = 0.06876 #kJ/kg.K\n", + "hfg10 = 156.3 #kJ/kg\n", + "\n", + "#Calculation:\n", + "T = -5+273\n", + "T1 = -15+273\n", + "T2 = -5+273\n", + "hfg = T*(vg10-vf10)*(p5-p15)/(15-5)\t#Value of hfg, by Clapeyron equation:\n", + "hfg1 = log(p5/p15)*R*(T1*T2)/((T2-T1))\t#By Clapeyron-Clausius equation:\n", + "d = (hfg1-hfg)/hfg*100\t\t\t#Deviation:\n", + "\n", + "#Results:\n", + "print \"hfg by Clapeyron equation: \",round(hfg,2),\"kJ/kg\"\t\t\t\t\n", + "print \"hfg by Clapeyron-Clausius equation: \",round(hfg1,2),\"kJ/kg\"\n", + "print \"Percentage deviation in hfg value by Clapeyron-Clausius equation compared to the value from Clapeyron equation: \",round(d,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hfg by Clapeyron equation: 159.5 kJ/kg\n", + "hfg by Clapeyron-Clausius equation: 169.76 kJ/kg\n", + "Percentage deviation in hfg value by Clapeyron-Clausius equation compared to the value from Clapeyron equation: 6.44 %\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page no. 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "#From steam tables:\n", + "v350 = 0.9534\t \n", + "v250 = 0.7964\n", + "v300 = 0.8753\n", + "v350kPa = 0.76505\n", + "v250kPa = 1.09575\n", + "\n", + "#Calculation:\n", + "ve = (v350-v250)/(v300*(350-250))\t#Volume expansivity(in 1/K):\n", + "ic = -(v350kPa-v250kPa)/(v300*(350-250))#Isothermal compressibility(in 1/kPa):\n", + "\n", + "#Results:\n", + "print \"Volume expansivity: \",round(ve*10**3,4),\"x 10^-3 K^-1\"\t\t\t\t\n", + "print \"Isothermal compressibility: \",round(ic*10**3,3),\"x 10^-3 kPa^-1\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume expansivity: 1.7937 x 10^-3 K^-1\n", + "Isothermal compressibility: 3.778 x 10^-3 kPa^-1\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22, page no. 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "#Variable Declaration: \n", + "V = 0.5\t\t\t\t#Volume of tank(in m**3):\n", + "p0 = 1\t\t\t\t#Atmospheric pressure(in bar):\n", + "T0 = 25+273\t\t\t#Atmospheric temperature(in K):\n", + "Cp = 1.005\t\t\t#Cp of gas(in kJ/kg.K):\n", + "Cv = 0.718\t\t\t#Cv of gas(in kJ/kg.K):\n", + "Ti = T0\t\t\t\t#Initial temperature(in K):\n", + "\n", + "#Calculations:\n", + "Tf = Cp/Cv*Ti\t\t\t#Inside final temperature(in K):\n", + "dSgen = Cp*log(Tf/Ti)\t\t#Change in entropy(in kJ/kg.K):\n", + "I = T0*dSgen\t\t\t#Irreversibility(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Inside final temperature\",round(Tf,2),\"K\"\t\t\t\t\n", + "print \"Change in entropy: \",round(dSgen,4),\"kJ/kg.K\"\n", + "print \"Irreversibility\",round(I,2),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inside final temperature 417.12 K\n", + "Change in entropy: 0.338 kJ/kg.K\n", + "Irreversibility 100.71 kJ/kg\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23, page no. 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "#Variable Declaration: \n", + "m = 75\t\t\t\t#Mass of water(in kg):\n", + "T1 = 400+273\t\t\t#Temperature of hot water(in K):\n", + "T2 = 300\t\t\t#Final temperature(in K):\n", + "T0 = 27+273\t\t\t#Temperature of the environment(in K):\n", + "Cp = 4.18\t\t\t#Specific heat of water(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "Wmax = m*Cp*(T1-T2-T0*log(T1/T2))#Maximum work(in kJ):\n", + "\n", + "#Results:\n", + "print \"Maximum work: \",round(Wmax,1),\"kJ\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum work: 40946.6 kJ\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24, page no. 247" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 50\t\t #Pressure at which steam enters(in bar):\n", + "T1 = 600+273\t #Temperature at which steam enters(in K):\n", + "c1 = 150\t #Velocity at which steam enters(in m/s):\n", + "p2 = 0.1\t #Pressure at which steam leaves(in bar):\n", + "c2 = 50\t\t #Velocity at which steam leaves(in m/s):\n", + "W = 1000\t #Work delivered(in kJ/kg):\n", + "T0 = 25+273\t #Dead state temperature(in K):\n", + "#From steam tables:\n", + "h1 = 3666.5 #kJ/kg\t\t\t\t\n", + "s1 = 7.2589 #kJ/kg.K\n", + "h2 = 2584.7 #kJ/kg\n", + "s2 = 8.1502 #kJ/kg.K\n", + "\n", + "#Calculations:\n", + "A1 = h1+c1**2/2*10**(-3)-T0*s1\t#Inlet stream availability(in kJ/kg):\n", + "A2 = h2+c2**2/2*10**(-3)-T0*s2\t#Exit stream availability(in kJ/kg):\n", + "Wrev = A1-A2\t\t\t#Reversible work(in kJ/kg):\n", + "I = Wrev-W\t\t\t#Irreversibility(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Inlet stream availability: \",round(A1,2),\"kJ/kg\"\t\t\t\t\n", + "print \"Exit stream availability: \",round(A2,2),\"kJ/kg\"\n", + "print \"Irreversibility: \",round(I,1),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Inlet stream availability: 1514.6 kJ/kg\n", + "Exit stream availability: 157.19 kJ/kg\n", + "Irreversibility: 357.4 kJ/kg\n" + ] + } + ], + "prompt_number": 59 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter8.ipynb b/Applied_Thermodynamics/Chapter8.ipynb new file mode 100755 index 00000000..c026b231 --- /dev/null +++ b/Applied_Thermodynamics/Chapter8.ipynb @@ -0,0 +1,1667 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:ff76720b6d591e09d5857c774c4d9dbfbab10ecbdd3710baee1b7c89ef730620" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8: Vapor Power Cycle" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "p1 = 7 #Lower pressure limit(in kPa):\n", + "p2 = 7 #Higher pressure limit(in MPa):\n", + "h2 = 2772.1 #Enthalpy at state 2(in kJ/kg): \n", + "s2 = 5.8133 #Entropy at state 2(in kJ/kg.K):\n", + "h3 = 1267 #Enthalpy at state 3(in kJ/kg):\n", + "s3 = 3.1211 #Entropy at state 3(in kJ/kg.K):\n", + "sf1 = 0.5564 #Value of sf at 7 kPa(in kJ/kg.K):\n", + "sfg1 = 7.7237 #Value of sfg at 7 kPa(in kJ/kg.K):\n", + "hf1 = 162.60 #Value of hf at 7 kPa(in kJ/kg):\n", + "hfg1 = 2409.54 #Value of hfg at 7 kPa(in kJ/kg):\n", + "s1 = s2 #Entropy at state 1(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "x1 = (s1-sf1)/sfg1 #Dryness fraction at state 1:\n", + "h1 = hf1+x1*hfg1 #Enthalpy at state 1(in kJ/kg):\n", + "s4 = s3 #Entropy at state 4(in kJ/kg.K):\n", + "x4 = (s4-sf1)/sfg1 #Dryness fraction for state 4:\n", + "h4 = hf1+x4*hfg1 #Enthalpy at state 4(in kJ/kg):\n", + "W1 = h2-h1 #Expansion work per kg(in kJ/kg):\n", + "W2 = h3-h4 #Compression work per kg(in kJ/kg):\n", + "H = h2-h3 #Heat added per kg(in kJ/kg):\n", + "W = W1-W2 #Net work done(in kJ/kg):\n", + "n = W/H #Thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Thermal Efficiency: \",round(n*100,2),\"%\"\n", + "print \"Turbine work: \",round(W1,2),\"KJ/Kg\"\n", + "print \"Compression work: \",round(W2,2),\"KJ/Kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal Efficiency: 44.2 %\n", + "Turbine work: 969.52 KJ/Kg\n", + "Compression work: 304.3 KJ/Kg\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 276" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 5 #Lower pressure limit(in kPa):\n", + "p2 = 5000 #Higher pressure limit(in kPa):\n", + "#From gas tables:\n", + "hf5M = 1154.23 #Value of hf at 5 MPa(in kJ/kg): \n", + "sf5M = 2.92 #Value of sf at 5 MPa(in kJ/kg.K):\n", + "hg5M = 2794.3 #Value of hg at 5 MPa(in kJ/kg):\n", + "sg5M = 5.97 #Value of sg at 5 MPa(in kJ/kg.K):\n", + "hf5k = 137.82 #Value of hf at 5 kPa(in kJ/kg):\n", + "sf5k = 0.4764 #Value of sf at 5 kPa(in kJ/kg.K):\n", + "hg5k = 2561.5 #Value of hg at 5 kPa(in kJ/kg):\n", + "sg5k = 8.3961 #Value of sg at 5 kPa(in kJ/kg.K):\n", + "vf5k = 0.001005 #/Value of vf at 5 kPa(in m**3/kg):\n", + "\n", + "#Calculation:\n", + "sfg5k = sg5k-sf5k #Value of sfg at 5 kPa(in kJ/kg.K):\n", + "hfg5k = hg5k-hf5k #Value of hfg at 5 kPa(in kJ/kg.K):\n", + "s2 = sg5M #Entropy at point 2(in kJ/kg.K): \n", + "s3 = s2 #As process 2-3 is isentropic:\n", + "x3 = (s3-sf5k)/sfg5k #Dryness fraction at point 3:\n", + "h3 = hf5k+x3*hfg5k #Enthalpy at point 3(in kJ/kg):\n", + "h2 = hg5M #Enthalpy at point 2(in kJ/kg):\n", + "s1 = sf5M #Entropy at point 1(in kJ/kg.K):\n", + "s4 = s1 #Process 1-4 is isentropic:\n", + "x4 = (s4-sf5k)/sfg5k #Dryness fraction at point 4:\n", + "h4 = hf5k+x4*hfg5k #Enthalpy at point 4(in kJ/kg):\n", + "h1 = hf5M #Enthalpy at point 1(in kJ/kg):\n", + "n = ((h2-h3)-(h1-h4))/(h2-h1) #Carnot efficiency:\n", + "Pw = vf5k*(p2-p1) #Pump work: \n", + "h5 = hf5k #Enthalpy at point 5(in kJ/kg):\n", + "h6 = h5+Pw #Enthalpy at point 6(in kJ/kg):\n", + "Nw = (h2-h3)-(h6-h5) #Net work in the cycle:\n", + "Ha = h2-h6 #Heat added:\n", + "nr = Nw/Ha #Rankine efficiency:\n", + "\n", + "#Results:\n", + "print \"Carnot cycle efficiency: \",round(n*100,2)\n", + "print \"Rankine cycle efficiency: \",round(nr*100,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Carnot cycle efficiency: 43.09\n", + "Rankine cycle efficiency: 36.59\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "p1 = 40 #Pressure of steam entering(in bar):\n", + "T1 = 350+273 #Temperature(in K):\n", + "p4 = 0.05 #Pressure of steam leaving(in bar):\n", + "#From steam tables:\n", + "h2 = 3092.5 #kJ/kg\n", + "s2 = 6.5821 #kJ/kg.K\n", + "h4 = 137.82 #kJ/kg\n", + "s4 = 0.4764 #kJ/kg.K\n", + "v4 = 0.001005 #m**3/kg\n", + "sf = 0.4764 #kJ/kg.K\n", + "sfg = 7.9187 #kJ/kg.K\n", + "hf = 137.82 #kJ/kg\n", + "hfg = 2423.7 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s3 = s2 #Entropy at state 3:\n", + "x3 = (s3-sf)/sfg #Dryness fraction at state 3:\n", + "h3 = hf+x3*hfg #Enthalpy at state 3(in kJ/kg):\n", + "h1 = h4+v4*(p1-p4)*10**2 #Enthalpy at state 1(in kJ/kg):\n", + "Wp = h1-h4 #Pump work(in kJ/kg):\n", + "Wnet = h2-h3-Wp #Net work(in kJ/kg):\n", + "Q = h2-h1 #Heat added(in kJ/kg):\n", + "n = Wnet/Q*100 #Cycle efficiency(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Net work per kg of steam: \",round(Wnet,2),\"kJ/kg\"\n", + "print \"Cycle efficiency: \",round(n,2),\"%\"\n", + "print \"Pump work per kg of steam: \",round(Wp,2),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net work per kg of steam: 1081.88 kJ/kg\n", + "Cycle efficiency: 36.67 %\n", + "Pump work per kg of steam: 4.01 kJ/kg\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "p1 = 20 #Pressure of the steam entering(in MPa):\n", + "T1 = 500+273 #Temperature(in K):\n", + "x = 0.90 #Dryness fraction of the steam leaving:\n", + "p6 = 0.005 #Condensor pressure(in MPa):\n", + "#From steam tables:\n", + "h2 = 3238.2 #kJ/kg\n", + "s2 = 6.1401 #kJ/kg.K\n", + "s3 = s2\n", + "hf = 137.82 #kJ/kg\n", + "hfg = 2423.7 #kJ/kg.K\n", + "sf = 0.4764 #kJ/kg.K\n", + "sfg = 7.9187 #kJ/kg.K\n", + "h6 = 137.82 #kJ/kg\n", + "h4 = 3474.1 #kJ/kg\n", + "sf1 = 2.2842 #kJ/kg.K\n", + "sfg1 = 4.1850 #kJ/kg.K\n", + "hf1 = 830.3 #kJ/kg\n", + "hfg1 = 1959.7 #kJ/kg\n", + "v6 = 0.001005 #m**3/kg\n", + "\n", + "#Calculations:\n", + "h5 = hf+x*hfg #Enthalpy at state 5(in kJ/kg):\n", + "s5 = sf+x*sfg\n", + "p4 = 1.4 #By interpolation, pressure at state 4(in bar):\n", + "x3 = (s3-sf1)/sfg1 #Dryness fraction at state 3:\n", + "h3 = hf1+x3*hfg1 #Enthalpy at state 3(in kJ/kg):\n", + "h1 = h6+v6*(p1-p6)*10**3 #Enthalpy at state 1(in kJ/kg):\n", + "Wnet = (h2-h3)+(h4-h5)-(h1-h6) #Net work per kg of steam(in kJ/kg):\n", + "Q = h2-h1 #Heat added per kg of steam(in kJ/kg):\n", + "n = Wnet/Q*100 #Thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Pressure of steam leaving HP turbine: \",round(p4,2),\"MPa\"\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure of steam leaving HP turbine: 1.4 MPa\n", + "Thermal efficiency: 56.4 %\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration:\n", + "p1 = 10 #Pressure of steam leaving the boiler(in MPa):\n", + "T1 = 700+273 #Temperature(in K):\n", + "p4 = 0.005 #Pressure of steam leaving the turbine(in MPa):\n", + "W = 50 #Output of the plant(in MW):\n", + "Twin = 15+273 #Temperature of the cooling water entering and leaving the condensor(in K):\n", + "Twout = 30+273\n", + "#From steam tables:\n", + "h2 = 3870.5 #kJ/kg \n", + "s2 = 7.1687 #kJ/kg.K\n", + "sf = 0.4764 #kJ/kg.K\n", + "sfg = 7.9187 #kJ/kg.K\n", + "hf = 137.82 #kJ/kg\n", + "hfg = 2423.7 #kJ/kg\n", + "v4 = 0.001005 #m**3/kg\n", + "Cp = 4.18 #Specific heat of water(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "s3 = s2\n", + "h4 = hf\n", + "x3 = (s3-sf)/sfg #Dryness fraction at state 3:\n", + "h3 = hf+x3*hfg #Enthalpy at state 3(in kJ/kg):\n", + "h1 = h4+v4*(p1-p4) #Enthalpy at state 1(in kJ/kg):\n", + "Wnet = (h2-h3)-(h1-h4) #Net output per kg of steam(in kJ/kg):\n", + "ms = W*10**3/Wnet #Mass flow rate of steam(in kg/s):\n", + "mw = (h3-h4)*ms/(Cp*(Twout-Twin))#Mass flow rate of water(in kg/s):\n", + "Q = h2-h1 #Heat added per kg of steam(in kJ/kg):\n", + "n = Wnet/Q #Thermal efficiency:\n", + "r = (h2-h1)/(h3-h4)\t#Ratio of heat supplied:\n", + "\n", + "print \"Mass flow rate of steam: \",round(ms,2),\"kg/s\"\n", + "print \"Mass flow rate of condensor cooling water: \",round(mw,2),\"kg/s\"\n", + "print \"Thermal efficiency: \",round(n*100,2),\"%\"\n", + "print \"Ratio of heat supplied and rejected: \",round(r,3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass flow rate of steam: 29.69 kg/s\n", + "Mass flow rate of condensor cooling water: 969.78 kg/s\n", + "Thermal efficiency: 45.12 %\n", + "Ratio of heat supplied and rejected: 1.822\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "p1 = 200 #Pressure of steam leaving the boiler(in MPa):\n", + "T1 = 650+273 #Temperature(in K):\n", + "p4 = 0.05 #Pressure of steam leaving the turbine(in MPa):\n", + "#From steam tables:\n", + "h2 = 3675.3 #kJ/kg\n", + "s2 = 6.6582 #kJ/kg.K\n", + "h4 = 137.82 #kJ/kg\n", + "v4 = 0.001005 #m**3/kg\n", + "sf = 0.4764 #kJ/kg.K\n", + "sfg = 7.9187 #kJ/kg.K\n", + "hf = 137.82 #kJ/kg\n", + "hfg = 2423.7 #kJ/kg\n", + "hf8 = 721.11 #kJ/kg\n", + "hfg8 = 2048 #kJ/kg\n", + "vf8 = 0.001115 #m**3/kg\n", + "sf8 = 2.0462 #kJ/kg.K\n", + "sfg8 = 4.6166 #kJ/kg.K\n", + "T10 = 370.36+273 #K(by interpolation)\n", + "h10 = 3141.81 #kJ/kg\n", + "sf4 = 1.7766 #kJ/kg.K\n", + "sfg4 = 5.1193 #kJ/kg.K\n", + "hf4 = 604.74 #kJ/kg\n", + "hfg4 = 2133.8 #kJ/kg\n", + "s3 = s2\n", + "s6 = s2 #For case b:\n", + "s10 = s2 #For case c:\n", + "s9 = s2\n", + "h11 = hf4\n", + "h13 = 1087.31 #kJ/kg\n", + "v11 = 0.001084 #m**3/kg\n", + "v13 = 0.001252 #m**3/kg\n", + "p10 = 40 #bar\n", + "p9 = 4 #bar\n", + "\n", + "#Calculations:\n", + "#Case a:\n", + "x3 = (s3-sf)/sfg #Dryness farction at state 3:\n", + "h3 = hf+x3*hfg #Enthalpy at state 3(in kJ/kg):\n", + "h1 = h4+v4*(p1-p4) #Enthalpy at state 1(in kJ/kg):\n", + "Wnet = (h2-h3)-(h1-h4) #Net output per kg of steam(in kJ/kg):\n", + "Q = h2-h1 #Heat added(in kJ/kg):\n", + "na = Wnet/Q*100 #Thermal efficiency:\n", + "#Case b:\n", + "x6 = (s6-sf8)/sfg8 #Dryness fraction at state 6(in kJ/kg.K): \n", + "h6 = hf8+x6*hfg8 #Enthalpy at state 6(in kJ/kg):\n", + "h7 = hf8 #Enthalpy at state 7(in kJ/kg):\n", + "h5 = h4+v4*(p1-p4)*10**2 #Enthalpy at state 5(in kJ/kg):\n", + "m = (h7-h5)/(h6-h5)\t #Mass of steam(in kg):\n", + "h1 = h7+vf8*(p1-p4)*10**2 #Enthalpy at state 1(in kJ/kg):\n", + "nb = ((h2-h6)+(1-m)*(h6-h3)-((1-m)*(h5-h4)+(h1-h7)))/(h2-h1)*100 #Thermal efficiency:\n", + "#Case c:\n", + "x9 = (s9-sf4)/sfg4 #Dryness fraction at state 9:\n", + "h9 = hf4+x9*hfg4 #Enthalpy at state 9(in kJ/kg):\n", + "h8 = h4+v4*(p9-p4)*10**2 #Enthalpy at state 8(in kJ/kg):\n", + "h12 = h11+v11*(p10-p9)*10**2#Enthalpy at state 12(in kJ/kg):\n", + "h1a = h13+v13*(p1-p10)*10**2#Enthalpy at state 1'(in kJ/kg):\n", + "m1 = (h13-h12)/(h10-h12) #Mass of steam flowing through first heater:\n", + "m2 = ((1-m1)*h11-(1-m1)*h8)/(h9-h8)#Mass of steam flowing through second heater:\n", + "Wcep = (1-m1-m2)*(h8-h4) #Work done by Condensate extraction pump(in kJ/kg):\n", + "WFP1 = h1a-h13 #Work done by feed pump 1(in kJ/kg):\n", + "WFP2 = (1-m1)*(h12-h11) #Work done by feed pump 2(in kJ/kg):\n", + "nc = ((h2-h10)+(1-m1)*(h10-h9)+(1-m1-m2)*(h9-h3)-(Wcep+WFP1+WFP2))/(h2-h1a)*100\t#Thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Thermal efficiency in case a: \",round(na,2),\"%\"\n", + "print \"Thermal efficiency in case b: \",round(nb,2),\"%\"\n", + "print \"Thermal efficiency in case c: \",round(nc,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal efficiency in case a: 46.51 %\n", + "Thermal efficiency in case b: 49.4 %\n", + "Thermal efficiency in case c: 51.39 %\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 50 #Pressure at which steam is generated(in bar):\n", + "T1 = 500+273 #Temperature of the steam(in K):\n", + "p3 = 5 #Pressure upto which steam is expanded(in bar):\n", + "T3 = 400+273 #Temperature(in K):\n", + "p5 = 0.05 #Final pressure(in bar):\n", + "#From steam tables:\n", + "h2 = 3433.8 #kJ/kg \n", + "s2 = 6.9759 #kJ/kg.K\n", + "s3 = s2\n", + "T3 = 183.14+273 #K(by interpolation)\n", + "h3 = 2818.03 #kJ/kg\n", + "h4 = 3271.9 #kJ/kg\n", + "s4 = 7.7938 #kJ/kg.K\n", + "s5 = s4\n", + "sf = 0.4764 #kJ/kg.K\n", + "sfg = 7.9187 #kJ/kg.K\n", + "hf = 137.82 #kJ/kg\n", + "hfg = 2423.7 #kJ/kg\n", + "h6 = hf\n", + "v6 = 0.001005 #m**3/kg\n", + "\n", + "#Calculations:\n", + "x5 = (s5-sf)/sfg #Dryness fraction at state 5:\n", + "h5 = hf+x5*hfg #Enthalpy at state 5(in kJ/kg):\n", + "h1 = h6+v6*(p1-p5)*10**2#Enthalpy at state 1(in kJ/kg):\n", + "Wt = (h2-h3)+(h4-h5) #Turbine work(in kJ/kg):\n", + "Wp = h1-h6 #Pump work(in kJ/kg):\n", + "Wnet = Wt-Wp #Net output per kg of steam(in kJ/kg):\n", + "Q = h2-h1 #Heat added per kg of steam(in kJ/kg):\n", + "n = Wnet/Q #Cycle efficiency:\n", + "ssc = 0.7457*3600/Wnet #Specific steam consumption(in kg/hp.hr):\n", + "r = Wnet/Wt #Work ratio:\n", + "\n", + "#Results:\n", + "print \"Cycle efficiency: \",round(n*100,2),\"%\"\n", + "print \"Specific steam consumption: \",round(ssc,2),\"kg/hp.hr\"\n", + "print \"Work ratio: \",round(r,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cycle efficiency: 45.74 %\n", + "Specific steam consumption: 1.78 kg/hp.hr\n", + "Work ratio: 0.9967\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8, page no. 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 0.144 #Mass of steam entering the feed pump(in kg):\n", + "p1 = 60 #Pressure of steam fed in HP turbine(in bar):\n", + "T1 = 450+273 #Temperature of the steam(in K):\n", + "p3 = 3 #Pressure of steam entering LP turbine(in bar):\n", + "p4 = 0.05 #Pressure of steam leaving the LP turbine(in bar):\n", + "T3 = 115 #Condensate temperature(in C):\n", + "W = 30 #Alternator output(in MW):\n", + "nb = 0.90 #Boiler efficiency:\n", + "na = 0.98 #Alternator efficiency:\n", + "#From steam tables:\n", + "h2 = 3301.8 #kJ/kg \n", + "s2 = 6.7198 #kJ/kg.K\n", + "hf = 137.82 #kJ/kg\n", + "hfg = 2423.7 #kJ/kg\n", + "vf = 0.001005 #m**3/kg\n", + "h8 = 561.47 #kJ/kg\n", + "sf3 = 1.6718 #kJ/kg.K\n", + "sfg3 = 5.3201 #kJ/kg.K\n", + "hf3 = 561.47 #kJ/kg\n", + "hfg3 = 2163.8 #kJ/kg\n", + "sf = 0.4764 #kJ/kg.K\n", + "sfg = 7.9187 #kJ/kg.K\n", + "\n", + "#Calculations:\n", + "h5 = hf\n", + "v5 = vf\n", + "s3 = s2\n", + "s4 = s2\n", + "h9 = h8\n", + "v6 = v5\n", + "x3 = (s3-sf3)/sfg3 #Dryness fraction at state 3:\n", + "x4 = (s4-sf)/sfg #Dryness fraction at state 4:\n", + "h3 = hf3+x3*hfg3 #Enthalpy at state 3(in kJ/kg): \n", + "h4 = hf+x4*hfg #Enthalpy at state 4(in kJ/kg): \n", + "h1 = 4.18*T3 #Enthalpy at state 1(in kJ/kg):\n", + "Wp = v5*(p1-p4)*10**2 #Pumping work(in kJ/kg) also equal to h7-h6:\n", + "Wnet = (h2-h3)+(1-m)*(h3-h4)-(1-m)*Wp#Net output(in kJ/kg):\n", + "ms = W*10**3/(na*Wnet) #Mass of steam required to be generated(in kg/hr):\n", + "Q = (h2-h1)/nb #Heat added(in kJ/kg):\n", + "no = Wnet/Q*100 #Overall thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Steam bled for feed heating: \",round(m,3),\"kg\"\n", + "print \"Capacity of boiler: \",round(ms,2)*3600,\"kg/hr\"\n", + "print \"Overall thermal efficiency: \",round(no,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Steam bled for feed heating: 0.144 kg\n", + "Capacity of boiler: 94464.0 kg/hr\n", + "Overall thermal efficiency: 37.21 %\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 30 #Pressure of steam entering(in bar):\n", + "T1 = 300 #Temperature(in C):\n", + "p3 = 6 #Pressure of steam leaving the first stage(in bar):\n", + "p4 = 1 #Steam leaving second stage at pressure(in bar):\n", + "p5 = 0.075 #Pressure of steam leaving the third stage(in bar):\n", + "T = 38 #Condenstate temperature(in C):\n", + "T8 = 150 #Temperature of water after leaving first and second heater(in C):\n", + "T13 = 95\n", + "n = 0.8 #Efficiency of turbine:\n", + "W = 15 #Turbine output(in MW):\n", + "#From steam tables:\n", + "h2 = 3230.9 #kJ/kg\n", + "s2 = 6.9212 #kJ/kg.K\n", + "T3 = 190.97 #K(by interpolation)\n", + "h3 = 2829.63 #kJ/kg\n", + "s3a = 7.1075 #kJ/kg.K\n", + "sf1 = 1.3026 #kJ/kg.K\n", + "sfg1 = 6.0568 #kJ/kg.K\n", + "hf1 = 417.46 #kJ/kg\n", + "hfg1 = 2258 #kJ/kg\n", + "h5 = 234.64 #kJ/kg\n", + "hf6 = 670.56 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s3 = s2\n", + "s4 = s3a\n", + "h11 = hf6\n", + "h3a = round(h2-n*(h2-h3),2) #Actual enthalpy at state 3(in kJ/kg):\n", + "x4 = round((s4-sf1)/sfg1,3) #Dryness fraaction at state 4:\n", + "h4 = hf1+x4*hfg1 #Enthalpy at state 4(in kJ/kg):\n", + "h4a = round(h3a-n*(h3a-h4),2) #Actual enthaly at state 4(in kJ/kg):\n", + "x4a = (h4a-hf1)/hfg1 #Actual dryness fraction at state 4:\n", + "s4a = sf1+x4a*sfg1 #Actual entropy at state 4(in kJ/kg.K):\n", + "s5 = s4a #Entropy at state 5(in kJ/kg.K):\n", + "x5 = 0.8735 #Dryness fraction:\n", + "h5 = 2270.43 #Enthalpy at state 5(in kJ/kg):\n", + "h5a = h4a-n*(h4a-h5) #Actual enthalpy at state 5(in kJ/kg):\n", + "m1 = 0.1293 \n", + "m2 = 0.1059 \n", + "Wt = (h2-h3a)+(1-m1)*(h3a-h4a)+(1-m1-m2)*(h4a-h5a) #Turbine output(in kJ/kg):\n", + "r = W*10**3/Wt*3600 #Rate of steam generation required(in kg/hr):\n", + "c = (m1+m2)*r #Capacity of drain pump(in kg/hr):\n", + "\n", + "#Results:\n", + "print \"Capacity of drain pump: \",round(c,2),\"kg/hr\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Capacity of drain pump: 16273.8 kg/hr\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 70 #Pressure of the steam entering(in bar):\n", + "T1 = 450 #Temperature of the steam entering the HP turbine(in C):\n", + "p3 = 30 #Pressure at which steam is extracted(in bar):\n", + "T4 = 400 #Temperature at which it is reheated(in C):\n", + "p6 = 0.075 #Pressure of steam after expanding(in bar):\n", + "T = 140 #Temperature at which steam is bled(in C):\n", + "nh = 0.80 #Efficiency of HP turbine:\n", + "nl = 0.85 #Efficiency of LP turbine:\n", + "#From steam tables:\n", + "h2 = 3287.1 #kJ/kg \n", + "s2 = 6.6327 #kJ/kg.K\n", + "h3 = 3049.48 #kJ/kg\n", + "h4 = 3230.9 #kJ/kg\n", + "s4 = 6.9212 #kJ/kg.K\n", + "h6 = 2158.55 #kJ/kg\n", + "p5 = 3.61 #bar\n", + "h5 = 2712.38 #kJ/kg\n", + "h9 = 1008.42 #kJ/kg\n", + "v7 = 0.001008 #m**3/kg\n", + "h7 = 168.79 #kJ/kg\n", + "h8 = 169.15 #kJ/kg\n", + "v9 = 0.00108 #m**3/kg\n", + "\n", + "#Calculations:\n", + "s6 = s4\n", + "s5 = s4\n", + "h3a = h2-nh*(h2-h3) #Actual enthalpy at state 3(in kJ/kg):\n", + "h6a = h4-nl*(h4-h6) #Actual enthaly at state 6(in kJ/kg):\n", + "h5a = h4-nl*(h4-h5) #Actual enthaly at state 5(in kJ/kg):\n", + "h8 = h7+v7*(p5-p6)*10**2 #Enthalpy at state 8(in kJ/kg):\n", + "m = (h9-h8)/(h5a-h8) #Mass of bled steam per kg of steam generated(in kg/kg steam generated):\n", + "h1 = h9+v9*(p1-p5)*10**2 #Enthalpy at state 1(in kJ/kg):\n", + "Wnet = (h2-h3a)+(h4-h5a)+(1-m)*(h5a-h6a)-((1-m)*(h8-h7)+(h1-h9))#Net work per kg of steam generated(in kJ/kg):\n", + "Q = (h2-h1)+(h4-h3a) #Heat added per kg of steam generated(in kJ/kg):\n", + "n = Wnet/Q*100 #Thermal efficiency:\n", + "\n", + "#Result:\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"\n", + "print \"___There is a calculation mistake in calculating h2-h1 in book hence difference in answer_____\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal efficiency: 39.22 %\n", + "___There is a calculation mistake in calculating h2-h1 in book hence difference in answer_____\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 150 #Pressure of the steam entering the boiler(in bar):\n", + "T1 = 450 #Temperature of the steam entering the turbine(in C):\n", + "p6 = 0.05 #Condensor pressure(in bar):\n", + "p3 = 10 #Pressure of steam bled out between 1st & 2nd stage and 2nd & 3rd(in bar):\n", + "p4 = 1.5\n", + "T11 = 150 #Temperature of feed water leaving closed water heater(in C):\n", + "m = 300 #Mass flow rate(in kg/s):\n", + "#From steam tables:\n", + "h2 = 3308.6 #kJ/kg \n", + "s2 = 6.3443 #kJ/kg.K\n", + "h3 = 2667.26 #kJ/kg\n", + "h4 = 2355.18 #kJ/kg\n", + "h5 = 1928.93 #kJ/kg\n", + "h6 = 137.82 #kJ/kg\n", + "v6 = 0.001005 #m**3/kg\n", + "h8 = 467.11 #kJ/kg\n", + "v8 = 0.001053 #m**3/kg\n", + "h10 = 1610.5 #kJ/kg\n", + "v10 = 0.001658 #m**3/kg\n", + "\n", + "#Calculations:\n", + "s3 = s2\n", + "s4 = s2\n", + "s5 = s2\n", + "h7 = h6+v6*(p4-p6)*10**2 #Enthalpy at state 7(in kJ/kg):\n", + "h9 = round(h8+v8*(p1-p4)*10**2,2) #Enthalpy at state 9(in kJ/kg):\n", + "h12 = round(h10+v10*(p1-p3)*10**2,2) #Enthalpy at state 12(in kJ/kg):\n", + "m1 = round((4.18*T11-h9)/(h3-h9+4.18*T11-h10),2)#Mass of steam bled out in closed feed water heater(in kg/kg of steam generated):\n", + "m2 = round(((1-m1)*(h8-h7))/(h4-h7),2)\n", + "h1 = (4.18*T11)*(1-m1)+m1*h12 #Enthalpy at state 1(in kJ/kg):\n", + "Wnet = (h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(1-m1)*(h9-h8)+m1*(h12-h10))\t#Net work output per kg of steam generated(in kJ/kg):\n", + "Q = h2-h1 #Heat added(in kJ/kg):\n", + "n = Wnet/Q*100 #Cycle thermal efficiency:\n", + "P = Wnet*m #Net power developed(KW)\n", + "\n", + "#Results:\n", + "print \"Cycle thermal efficiency: \",round(n,1),\"%\"\n", + "print \"Net power developed: \",round(P),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cycle thermal efficiency: 47.6 %\n", + "Net power developed: 365700.0 kW\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "p1 = 100 #Pressure of the steam entering the boiler(in bar):\n", + "T1 = 500 #Temperature of the steam entering the turbine(in \u00baC):\n", + "p6 = 0.075 #Condensor pressure(in bar):\n", + "p3 = 20 #Pressure at which steam is extracted at exit of HPT(in bar):\n", + "p4 = 4 #Pressure at which steam is extracted at exit of IPT(in bar):\n", + "T = 200 #Temperature at which feed water leaves closed feed warere heater(in C):\n", + "W = 100 #Net power output(in MW):\n", + "#From steam tables:\n", + "h2 = 3373.7 #kJ/kg\n", + "s2 = 6.5966 #kJ/kg.K\n", + "T3 = 261.6 #C(by interpolation)\n", + "h3 = 2930.57 #kJ/kg\n", + "h4 = 2612.65 #kJ/kg\n", + "h5 = 2055.09 #kJ/kg\n", + "h10 = 908.79 #kJ/kg\n", + "h8 = 604.74 #kJ/kg\n", + "v6 = 0.001008 #m**3/kg\n", + "h6 = 168.79 #kJ/kg\n", + "h8 = 604.74 #kJ/kg\n", + "v8 = 0.001084 #m**3/kg\n", + "#For modified part:\n", + "h3a = 3247.6 #kJ/kg \n", + "s3a = 7.1271 #kJ/kg.K\n", + "T4 = 190.96 #C(by interpolation)\n", + "h4a = 2841.2 #kJ/kg\n", + "h5a = 2221.11 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s3 = s2\n", + "s4 = s2\n", + "s5 = s2\n", + "h1 = 4.18*T\n", + "h11 = h10\n", + "s4a = s3a\n", + "s5a = s3a\n", + "h7 = h6+v6*(p4-p6)*10**2 #Enthalpy at state 7(in kJ/kg):\n", + "h9 = h8+v8*(p3-p4)*10**2 #Enthalpy at state 9(in kJ/kg):\n", + "m1 = (h1-h9)/(h3-h10) #Mass of steam bled out in closed feed water heater(in kg/kg of steam generated):\n", + "m2 = ((h8-h7)-m1*(h11-h7))/(h4-h7)\n", + "Wnet = (h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-((1-m1-m2)*(h7-h6)+(h9-h8)) #Net work per steam generated(in kJ/kg):\n", + "Q = h2-h1 #Heat added(in kJ/kg):\n", + "n = Wnet/Q*100 #Thermal efficiency:\n", + "sgc = W*10**3/Wnet #Steam genration rate(in kg/s):\n", + "m2a = ((h8-h7)-m1*(h11-h7))/(h4a-h7)#Mass of steam bled out in closed feed water heater(in kg/kg of steam generated):\t\t\t\t#For modified part:\n", + "Wneta = (h2-h3)+(1-m1)*(h3a-h4a)+(1-m1-m2a)*(h4a-h5a)-((1-m1-m2a)*(h7-h6)+(h9-h8)) #Net work per steam generated(in kJ/kg):\n", + "Qa = h2-h1+(1-m1)*(h3a-h3) #Heat added(in kJ/kg):\n", + "na = Wneta/Qa*100 #Thermal efficiency:\n", + "I = (na-n)/n*100 #% Increase in thermal efficiency due to reheating:\n", + "\n", + "#Results:\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"\n", + "print \"Steam generation rate: \",round(sgc,2),\"kg/s\"\n", + "print \"Thermal efficiency: \",round(na,2),\"%\"\n", + "print \"Percentage increase in efficiency due to reheating: \",round(I,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal efficiency: 44.8 %\n", + "Steam generation rate: 87.95 kg/s\n", + "Thermal efficiency: 45.04 %\n", + "Percentage increase in efficiency due to reheating: 0.52 %\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "hd = 349 #Enthalpy of dry saturated vapour at 8.45 bar(KJ/Kg)\n", + "hi = 234.5 #Enthalpy after isentropic expansion to 0.07 bar(KJ/Kg)\n", + "hs = 35 #Enthalpy of saturated liquid at 0.07 bar (KJ/Kg)\n", + "n1 = 0.85 #Capability:\n", + "Cpw = 4.18 #Specific heat of water:\n", + "#From steam tables:\n", + "h1 = 2767.13 #kJ/kg \n", + "h2 = 3330.3 #kJ/kg\n", + "s2 = 6.9363 #kJ/kg.K\n", + "h3 = 2899.23 #kJ/kg\n", + "x4 = 0.93\n", + "h4 = 2517.4 #kJ/kg\n", + "x5 = 0.828\n", + "h5 = 2160.958 #kJ/kg\n", + "h6 = 168.79 #kJ/kg\n", + "v6 = 0.001008 #m**3/kg\n", + "h7 = 168.88 #kJ/kg\n", + "h9 = 417.46 #kJ/kg\n", + "h13 = 721.11 #kJ/kg\n", + "v13 = 0.001252 #m**3/kg\n", + "T1 = 150 #\u00baC\n", + "h10 = 418.19 #kJ/kg\n", + "m1 = 0.102\n", + "m2 = 0.073\n", + "\n", + "#Calculations:\n", + "s3 = s2\n", + "s4 = s2\n", + "s5 = s2\n", + "qd = hd-hi #For mercury cycle,Isentropic heat drop: \n", + "qda = n1*qd#Actual heat drop:\n", + "qre = hd-qda-hs #Heat rejected in condenser(in kJ/kg):\n", + "qa = hd-hs #Heat added in the boiler(in kJ/kg):\n", + "qam = h1-Cpw*T1 #Heat added in the condenser of mercury cycle(in kJ/kg):\n", + "m = qam/qre #Mercury per steam required per kg of steam:\n", + "Wp = v13*(40-8)*10**2 #Pump work(in kJ/kg):\n", + "qt = m*qa+h2-h1 #Total heat supplied(in kJ/kg steam):\n", + "Wm = m*qda #Work done in mercury cycle(in kJ/kg):\n", + "Ws = (h2-h3)+(1-m1)*(h3-h4)+(1-m1-m2)*(h4-h5)-(1-m1-m2)*(h7-h6)-m2*(h10-h9)-m1*Wp#Work done in steam cycle(in kJ/hr):\n", + "Wt = Wm+Ws #Total work done(in kJ/kg):\n", + "n = Wt/qt*100 #Thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal efficiency: 55.36 %\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14, page no. 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from sympy import symbols,solve\n", + "\n", + "#Variable Declaration: \n", + "h1 = 3023.5 #KJ/Kg\n", + "s1 = 6.7664 #KJ/Kg.K\n", + "n = 0.8 #Efficiency ratio of HP and LP\n", + "W = 0.1 #Steam consumption at no load\n", + "P = 2500 #Pressure turbine output\n", + "mHP,cHP,mLP,cLP = symbols('mHp cHP mLP cLP') #Symbolic expressions for mHP,cHP,mLP,cLP respectively \n", + "LPavail = 1.5 #LP steam available(Kg/s) for getting 1000hp \n", + "DhLP = 387.49 #Actual enthalpy drop in LP(KJ/Kg)\n", + "\n", + "#From Table 3\n", + "sf = 0.5764\n", + "sfg = 7.6752\n", + "hf = 168.79\n", + "hfg = 2406.0\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "x3 = round((s2 - sf)/sfg,3)\n", + "h3HP = hf + x3*hfg\n", + "DhHP = n*(h1-h3HP) #Actual enthalpy drop in HP(KJ/Kg)\n", + "x3a = (7.1271-sf)/sfg\n", + "h3LP = hf+ x3a*hfg #Enthalpy at exit(KJ/Kg)\n", + "HPfull = P*0.7457/DhHP #HP steam consumption at full load(Kg/s)\n", + "HPNL = W*HPfull #HP steam consumption at no load(Kg/s)\n", + "LPfull = P*0.7457/DhLP #LP steam consumption at full load(Kg/s)\n", + "LPNL = W*LPfull ##LP steam consumption at no load(Kg/s)\n", + "HP = solve([mHP*P+cHP-HPfull,mHP*0+cHP-HPNL],[mHP,cHP])\n", + "LP = solve([mLP*P+cLP-LPfull,mLP*0+cLP-LPNL],[mLP,cLP])\n", + "xLP = (LPavail-LP[cLP])/LP[mLP]\n", + "xHP = 1000-xLP\n", + "yHP = HP[mHP]*xHP + HP[cHP]\n", + "\n", + "#Results:\n", + "print 'HP steam required:',round(yHP,2),'Kg/s'" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HP steam required: 0.63 Kg/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 304" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "Cpw = 4.18 #Specific heat of water:\n", + "#From steam tables:\n", + "h2 = 2960.7 #kJ/kg \n", + "s2 = 6.3615 #kJ/kg\n", + "x3 = 0.863\n", + "h3 = 2404.94 #kJ/kg\n", + "h7 = 358.59 #kJ/kg\n", + "x10 = 0.754\n", + "h10 = 1982.91 #kJ/kg\n", + "\n", + "#Calculation:\n", + "s3 = s2\n", + "s10 = s3\n", + "m1 = (1-x3)*0.5 #Mass pf moisture in separator(in kg):\n", + "m2 = 0.5-m1 #Mass of steam entering LPT(in kg):\n", + "m3 = 0.5+m1 #Mass of water entering the hot well(in kg):\n", + "T = (m3*90+m2*40) #Temperature of water leaving hotwell(in C):\n", + "Q = 0.5*(h3-h7) #Heat transferred per kg steam generated:\n", + "Wnet = (h2-h3)*1+m2*(h3-h10) #Net work output(in kJ/kg):\n", + "Qa = h2-Cpw*T #Heat added(in kJ/kg):\n", + "n = Wnet/Qa*100 #Thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Temperature of water leaving hotwell: \",round(T,3),\"\u00b0C\"\n", + "print \"Heat transferred per kg steam generated: \",round(Q,3),\"kJ/kg steam\"\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of water leaving hotwell: 68.425 \u00b0C\n", + "Heat transferred per kg steam generated: 1023.175 kJ/kg steam\n", + "Thermal efficiency: 27.59 %\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "m = 35 #Steam flow rate(in kg/s):\n", + "#From steam tables:\n", + "h1 = 3530.9 #kJ/kg \n", + "s1 = 6.9486 #kJ/kg.K\n", + "x2 = 0.864\n", + "h2 = 2288.97 #kJ/kg\n", + "v3 = 0.001017 #m**3/kg\n", + "h3 = 251.40 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "Wp = v3*(70-0.20)*10**2 #Pump work(in kJ/kg):\n", + "Wt = h1-h2 #Turbine work(in kJ/kg):\n", + "Wnet = Wt-Wp #Net work(in kJ/kg):\n", + "P = m*Wnet/10**3 #Power produced(in MW):\n", + "h4 = h3+Wp #Enthalpy at state 4(in kJ/kg):\n", + "Q = m*(h1-h4) #Total heat supplied to the boiler(in kJ/s):\n", + "n = Wnet*m/Q*100 #Thermal efficiency:\n", + "\n", + "#results:\n", + "print \"Net power: \",round(P,2),\"MW\"\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net power: 43.22 MW\n", + "Thermal efficiency: 37.73 %\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 17, page no. 307" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "P = 10 #Output(in MW):\n", + "#From steam tables:\n", + "h1 = 3625.3 #kJ/kg \n", + "s1 = 6.9029 #kJ/kg.K\n", + "h2 = 3105.08 #kJ/kg\n", + "x3 = 0.834\n", + "h3 = 2187.43 #kJ/kg\n", + "h6 = 908.79 #kJ/kg\n", + "h5 = 191.83 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "s3 = s2\n", + "h4 = h5\n", + "h7 = h6\n", + "mb = (h6-h5)/(h2-h5) #Steam bled per kg of steam passing through HP stage:\n", + "m = round(P*10**3/((h1-h2)+(1-mb)*(h2-h3)),2) #Mass of steam leaving boiler(in kg/s):\n", + "Q = m*(h1-h7) #Heat supplied to the boiler(in kJ/s):\n", + "\n", + "#Results:\n", + "print \"Steam bled per kg of steam passing through HP stage: \",round(mb,3),\"kg\"\n", + "print \"Heat added: \",round(Q,2),\"kJ/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Steam bled per kg of steam passing through HP stage: 0.246 kg\n", + "Heat added: 22411.21 kJ/s\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 18, page no. 309" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "P = 50 #Net output(in MW):\n", + "#From steam tables:\n", + "h1 = 3373.7 #kJ/kg\n", + "s1 = 6.5966 #kJ/kg.K\n", + "s3 = 7.7622 #kJ/kg.K\n", + "h6 = 2930.572 #kJ/kg\n", + "h3 = 3478.5 #kJ/kg\n", + "T2 = 181.8 #C\n", + "h2 = 2782.8 #kJ/kg\n", + "T8 = 358.98 #C\n", + "h8 = 3188.7 #kJ/kg\n", + "x4 = 0.95\n", + "h4 = 2462.99 #kJ/kg\n", + "h11 = 856.8 #kJ/kg\n", + "h9 = 604.74 #kJ/kg\n", + "h7 = 908.79 #kJ/kg\n", + "h4a = 191.83 #kJ/kg\n", + "v4a = 0.001010 #m**3/kg\n", + "v9 = 0.001084 #m**3/kg\n", + "\n", + "#Calculations:\n", + "s6 = s1\n", + "s2 = s1\n", + "s8 = s3\n", + "s4 = s3\n", + "h7a = h7\n", + "h5 = h4a+v4a*(4-0.1)*10**2 #Enthalpy at state 5(in kJ/kg):\n", + "h10 = h9+v9*(100-4)*10**2 #Enthalpy at state 10(in kJ/kg):\n", + "m6 = (h11-h10)/(h6-h7) #Mass per kg of steam from boiler(in kg):\n", + "m8 = (h9-(1-m6)*h5-m6*h7a)/(h8-h5)\n", + "m6 = 0.135\n", + "m8 = 0.105\n", + "Whpt = (h1-h6)+(1-m6)*(h6-h2) #Work in turbines(in kJ/kg):\n", + "Wlpt = (1-m6)*(h3-h8)+(1-m6-m8)*(h8-h4)\n", + "Wcep = (1-m6-m8)*(h5-h4a) #Pump works(in kJ/kg)\n", + "Wfp = h10-h9\n", + "m = P*10**3/(Whpt+Wlpt-Wcep-Wfp)#Mass of steam entering first stage of turbine(in kg/s):\n", + "Q = m*(h1-h11) #Heat supplied in the boiler(in kJ/s):\n", + "n = P*10**3/Q*100 #Thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Mass of steam bled at 20 bar: \",round(m6,3),\" kg per kg of steam entering first stage\"\n", + "print \"Mass of steam bled at 4 bar: \",round(m8,3),\" kg per kg of steam entering first stage\"\n", + "print \"Mass of steam entering first stage: \",round(m,2),\" kg/s\"\n", + "print \"Thermal efficiency: \",round(n,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of steam bled at 20 bar: 0.135 kg per kg of steam entering first stage\n", + "Mass of steam bled at 4 bar: 0.105 kg per kg of steam entering first stage\n", + "Mass of steam entering first stage: 36.7 kg/s\n", + "Thermal efficiency: 54.13 %\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 19, page no. 312" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "nt = 0.85 #Turbine efficiency:\n", + "ng = 0.90 #Generator efficiency:\n", + "nm = 0.95 #Mechanical efficiency:\n", + "Cpw = 4.18 #Specific heat of water:\n", + "#From steam tables:\n", + "h1 = 3450.02 #kJ/kg\n", + "s1 = 6.6923 #kJ/kg.K\n", + "h3 = 3576.99 #kJ/kg\n", + "s3 = 7.52411 #kJ/kg.K\n", + "h2 = 3010 #kJ/kg\n", + "h9 = 3175 #kJ/kg\n", + "h4 = 2300 #kJ/kg\n", + "h5 = 137.82 #kJ/kg\n", + "v5 = 0.001005 #m**3/kg\n", + "h8 = 962.11 #kJ/kg\n", + "h12 = 1407.56 #kJ/kg\n", + "h10 = 670.56 #kJ/kg\n", + "v10 = 0.001101 #m**3/kg\n", + "PO = 120 #Plant output(MW)\n", + "\n", + "#Calculations:\n", + "h2a = h1-(h1-h2)*nt #Enthalpy at state 2'(in kJ/kg):\n", + "h9a = h3-(h3-h9)*nt #Enthalpy at state 9'(in kJ/kg):\n", + "h4a = h3-(h3-h4)*nt #Enthalpy at state 4'(in kJ/kg):\n", + "h6 = h5+v5*(6-0.05)*10**2 #Enthalpy at state 6(in kJ/kg):\n", + "h6a = h5+(h6-h5)/ng #Enthalpy at state 6'(in kJ/kg):\n", + "h11 = h10+v10*(100-6)*10**2 #Enthalpy at state 11(in kJ/kg):\n", + "h11a = h10+(h11-h10)/ng #Enthalpy at state 11'(in kJ/kg):\n", + "m1 = round((h11a-h12)/(h8-h2a),3) #Mass flow rate(in kg/kg steam):\n", + "m2 = round((h10-m1*h8-(1-m1)*h6a)/(h9-h6a),3)\n", + "Whp = h1-h2a #Work from HP turbine(in kJ/kg):\n", + "Wlp = (1-m1)*(h3-h9a)+(1-m1-m2)*(h9a-h4a)#Work from LP turbine(in kJ/kg):\n", + "Wp = (1-m1-m2)*(h6a-h5)+(h11a-h10) #Pump work:\n", + "Wnet = Whp+Wlp-Wp #Net work(in kJ/kg):\n", + "ssc = 3600/(Wnet*ng*nm) #Specific steam consumption(in kg/kw.h):\n", + "ssc = 3.93\n", + "no = Wnet*nm*ng/((h1-h12)+(1-m1)*(h3-h2a))*100 #Overall thermal efficiency:\n", + "m = ssc*PO*10**3 #Mass of steam required(in kg/hr):\n", + "\n", + "#Results:\n", + "print \"Specific steam consumption: \",round(ssc,2),\"kg/kw.h\"\n", + "print \"Overall efficiency: \",round(no,2),\"%\"\n", + "print \"Mass of steam held from HP turbine: \",round(m1*m,1),\"kg/hr\"\n", + "print \"Mass of steam held from LP turbine: \",round(m2*m,1),\"kg/hr\"\n", + "\n", + "print m1, m2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific steam consumption: 3.93 kg/kw.h\n", + "Overall efficiency: 36.57 %\n", + "Mass of steam held from HP turbine: 161758.8 kg/hr\n", + "Mass of steam held from LP turbine: 38671.2 kg/hr\n", + "0.343 0.082\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 20, page no. 316" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "P = 14000 #Power required(in kW):\n", + "r = 0.75 #Efficiency ratio of turbine:\n", + "#From steam tables:\n", + "h1 = 3137 #kJ/kg \n", + "s1 = 6.9563 #kJ/kg.K\n", + "x2 = 0.765\n", + "h2 = 2170.38 #kJ/kg\n", + "hf = 467.11 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s2 = s1\n", + "h2a = h1-(h1-h2)*r #Enthalpy at state 2'(in kJ/kg):\n", + "m = P/(h2a-hf) #Mass of steam required(in kg/s):\n", + "P1 = m*(h1-h2a) #Power available to the generator(in kW):\n", + "\n", + "#Results:\n", + "print \"Power available to the generator: \",round(P1,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power available to the generator: 5218.46 kW\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 21, page no. 317" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "nt = 0.80 #Turbine efficiency:\n", + "nb = 0.80 #Boiler efficiency:\n", + "P = 9000 #Power required(in kW):\n", + "h1 = 3137 #kJ/kg #From steam tables:\n", + "s1 = 6.9563 #kJ/kg.K\n", + "s2 = s1\n", + "x2 = 0.960\n", + "h2 = 2638.34 #kJ/kg\n", + "hf = 503.71 #kJ/kg\n", + "\n", + "#Calculations:\n", + "h2a = h1-(h1-h2)*nt #Enthalpy at state 2'(in kJ/kg):\n", + "ms = P/(h2a-hf) #Mass flow rate(in kg/s):\n", + "P1 = ms*(h1-h2a) #Power developed(in kW):\n", + "pt = (h1-hf)*ms #Total heat consumption in the bolier(in kW):\n", + "pa = pt/nb #Actual heat consumption(in kJ/s):\n", + "\n", + "#Results:\n", + "print \"Power developed: \",round(P1,2),\"kW\"\n", + "print \"Actual heat consumption: \",round(pa,2),\"kJ/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power developed: 1606.88 kW\n", + "Actual heat consumption: 13258.6 kJ/s\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 22, page no. 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "#Variable Declaration: \n", + "P = 4500 #Total power required(in kW):\n", + "Q = 15000 #Heat load(in kW):\n", + "n = 0.80 #Efficiency of turbines:\n", + "m = 10 #Steam consumption rate(in kg/s):\n", + "#From steam tables:\n", + "h1 = 3137 #kJ/kg\n", + "s1 = 6.9563 #kJ/kg.K\n", + "T2 = 179.18 #C\n", + "h2 = 2813.41 #kJ/kg\n", + "hf = 640.23 #kJ/kg\n", + "#For case 1:\n", + "T2a = 213.34 #C \n", + "s2a = 7.125 #kJ/kg.K\n", + "x3 = 0.853\n", + "h3 = 2221.11 #kJ/kg\n", + "#For case 2:\n", + "h2a = 2878.13 #kJ/kg\n", + "T3aa = 210.04 #C\n", + "s3aa = 7.138 #kJ/kg.K\n", + "x4 = 0.855\n", + "h4 = 2225.92 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s3 = s2a\n", + "h3aa = h2a\n", + "s4 = s3aa\n", + "h2a = h1-(h1-h2)*n #Enthalpy at state 2'(in kJ/kg):\n", + "q = h2a-hf #Heat available for process heating(in kJ/kg):\n", + "msh = Q/q #Mass flow rate(in kg/s):\n", + "h3a = h2-(h2a-h3)*n #Enthalpy at state 3'(in kJ/kg):\n", + "mshp = (P+msh*(h2a-h3a))/((h1-h2a)+(h2a-h3a)) #Mass of steam produced:\n", + "#For case 2:\n", + "mshpn = 10 \n", + "mshn = 6.7\n", + "Pn = mshpn*(h1-h2a) #Power produced by HP turbine(in kW):\n", + "M3aa = mshpn-mshn\n", + "h4a = h3aa-(h3aa-h4)*n #Enthalpy at state 4'(in kJ/kg):\n", + "Pn1 = M3aa*(h3aa-h4a) #Power produced by LP turbine(in kW):\n", + "Pt = Pn+Pn1 #Total power produced(in kW):\n", + "\n", + "#Results:\n", + "print \"Total power produced: \",round(Pt,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total power produced: 4310.55 kW\n" + ] + } + ], + "prompt_number": 51 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 23, page no. 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "na = 0.975 #Alternator efficiency:\n", + "nt = 0.80 #Turbine efficiency:\n", + "L = 50 #Turbine's losses(in kW):\n", + "p = 8 #Electric power developed(in mW):\n", + "m = 8 #Condenser discharge(in kg/s):\n", + "#From steam tables:\n", + "h1 = 3137 #kJ/kg\n", + "s1 = 6.9563 #kJ/kg.K\n", + "s1a = 7 #kJ/kg.K\n", + "h2 = 2830 #kJ/kg\n", + "h4 = 2210 #kJ/kg\n", + "hf = 376.92 #kJ/kg\n", + "\n", + "#Calculations:\n", + "h1a = h1\n", + "s2 = s1a\n", + "h2a = h1a-(h1a-h2)*nt #Enthalpy at state 2'(in kJ/kg):\n", + "h3 = h2a\n", + "h4a = h3-(h3-h4)*nt #Enthalpy at state 4'(in kJ/kg):\n", + "P = m/na #Power available to the alternator(in MW):\n", + "Pt = P*10**3+L #Total power produced(in kW):\n", + "plp = m*(h3-h4) #Power produced by LP turbine(in kW):\n", + "php = Pt-plp #Power produced by LP turbine(in kW):\n", + "m1 = round(php/(h1a-h2a),2) #Mass flow rate through HP turbine(in kg/s):\n", + "ph = (m1-m)*(h2-hf) #Heat available for process heating(in kW):\n", + "\n", + "#Results:\n", + "print \"Heat available for process heating: \",round(ph,2),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat available for process heating: 8389.53 kW\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 24, page no. 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "nt = 0.80 #Turbine efficiency:\n", + "nm = 0.90 #Mechanical efficiency:\n", + "p = 720 #Power delivered by turbine(in kW):\n", + "#From steam tables:\n", + "h1 = 3045.8 #kJ/kg\n", + "s1 = 7.0317 #kJ/kg.K\n", + "x4 = 0.841\n", + "h4 = 2192.24 #kJ/kg.K\n", + "h2 = 2706.7 #kJ/kg\n", + "s2 = 7.1271 #kJ/kg.K\n", + "x3 = 0.854\n", + "h3 = 2223.51 #kJ/kg\n", + "\n", + "#Calculation:\n", + "s4 = s1\n", + "s3 = s2\n", + "h4a = h1-(h1-h4)*nt #Enthalpy at state 4'(in kJ/kg):\n", + "h3a = h2-(h2-h3)*nt #Enthalpy at state 3'(in kJ/kg):\n", + "P = p/nm #Power developed in the turbine(in kW):\n", + "m1 = 3600/(h1-h4a) #HP steam consumption(in kg/kW.h):\n", + "m2 = 3600/(h2-h3a) #LP steam consumption(in kg/kW.h):\n", + "\n", + "#Results:\n", + "print \"HP steam consumption: \",round(m1,2),\"kg/kW.h\"\n", + "print \"LP steam consumption: \",round(m2,2),\"kg/kW.h\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "HP steam consumption: 5.27 kg/kW.h\n", + "LP steam consumption: 9.31 kg/kW.h\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 25, page no. 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "mhp = 2 #Mass flow rate(in kg/s):\n", + "mlp = 1.5\n", + "n = 0.90 #Expansion efficiency:\n", + "P = 3000 #Power developed by the turbine(in kW):\n", + "#From steam tables:\n", + "h1 = 3034.8 #kJ/kg\n", + "s1 = 6.8844 #kJ/kg.K\n", + "x3 = 0.9566\n", + "h3 = 2611.04 #kJ/kg\n", + "h2 = 2706.7 #kJ/kg\n", + "xout = 0.8535\n", + "hout = 2222.31 #kJ/kg\n", + "h4 = 2676.25 #kJ/kg\n", + "h5 = 2290 #kJ/kg\n", + "\n", + "#Calculations:\n", + "s3 = s1\n", + "hin = h2\n", + "h3a = h1-(h1-h3)*n #Enthalpy at state 3'(in kJ/kg):\n", + "houta = hin-(hin-hout)*n #Enthalpy of steam going out(in kJ/kg):\n", + "ms = P/(hin-hout) #Mass flow rate of steam(in kg/s):\n", + "h5a = h4-(h4-h5)*n #Enthalpy at state 5'(in kJ/kg):\n", + "p = mhp*(h1-h3a)+(mhp+mlp)*(h4-h5a)#Power output from mixed pressure turbine(in kW):\n", + "\n", + "#Results:\n", + "print \"Power: \",round(p,2),\"KW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power: 1979.46 KW\n" + ] + } + ], + "prompt_number": 60 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/Chapter9.ipynb b/Applied_Thermodynamics/Chapter9.ipynb new file mode 100755 index 00000000..f6236e83 --- /dev/null +++ b/Applied_Thermodynamics/Chapter9.ipynb @@ -0,0 +1,841 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f569d6ccce789a93a823a5990b85a631168b660aee672ad7f9fe51c0887b2c5a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9: Gas Power Cycles " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1, page no. 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "from math import log\n", + "#Variable Declaration: \n", + "r = 6 #Compression ratio:\n", + "v = 0.15 #Swept volume(in m**3):\n", + "p1 = 98 #Pressure at the beginning of compression(in kPa):\n", + "T1 = 60+273.15 #Temperature at the beginning of compression(in K):\n", + "Q23 = 150 #Heat supplied(in kJ/kg):\n", + "Cp = 1 #Value of Cp(in kJ/kg):\n", + "Cv = 0.71 #Value of Cv(in kJ/kg):\n", + "\n", + "#Calculations:\n", + "n = round(Cp/Cv,1) #Adiabatic compression factor:\n", + "R = Cp-Cv #Gas constant(in kJ/kg.K):\n", + "v2 = v/(r-1) #Volume at point 2(in m**3):\n", + "v1 = r*v2 #Total cylinder volume(in m**3):\n", + "m = p1*v1/(R*T1) #Mass(in kg):\n", + "p2 = p1*(v1/v2)**n #Pressure at point 2(in kPa):\n", + "T2 = p2*v2*T1/(p1*v1) #Temperature at state 2(in K):\n", + "T3 = Q23/(m*Cv)+T2 #Temperature at state 3(in K):\n", + "v3 = v2\n", + "p3 = p2*v2*T3/(v3*T2) #Pressure at point 3(in kPa):\n", + "v4 = v1\n", + "p4 = p3*(v3/v4)**n #Pressure at point 4(in kPa):\n", + "T4 = p4*v4*T3/(p3*v3) #Temperature at point 4(in K):\n", + "dS = m*Cv*log(T4/T1) #Entropy change(in kJ/K):\n", + "Q41 = m*Cv*(T4-T1) #Heat rejected(in kJ):\n", + "W = Q23-Q41 #Net work done(in kJ):\n", + "e = W/Q23 #Efficiency:\n", + "mep = W/v #Mean effective pressure(in kPa):\n", + "\n", + "#Results:\n", + "print \"Thermal efficiency: \",round(e*100,2),\"%\" \n", + "print \"Mean effective pressure: \",round(mep,2),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Thermal efficiency: 51.16 %\n", + "Mean effective pressure: 511.64 kPa\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2, page no. 367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + " \n", + "#Variable Declaration: \n", + "pa = 138 #Pressure at A(in kPa):\n", + "pb = 1380 #Pressure at B(in kPa):\n", + "nt = 0.5 #Thermal efficiency:\n", + "nm = 0.8 #Mechanical efficiency:\n", + "c = 41800 #Calorific value of fuel(in kJ/kg):\n", + "n = 1.4 #Adiabatic compressive index:\n", + "\n", + "#Calculations:\n", + "r1 = (pb/pa)**(1/n) #Ratio of va to vb:\n", + "r = (7/8*r1-1/8)/(7/8-r1/8) #Compression ratio:\n", + "p = (r-1)/15+1 #Cut off ratio:\n", + "nd = 1-1/(r**(n-1)*n)*(p**n-1)/(p-1) #Air standard efficiency for Diesel cycle:\n", + "no = nd*nt*nm #Overall efficiency:\n", + "fc = 75*60*60/(no*c*10**2) #Fuel consumption,bhp/hr(in kg):\n", + "\n", + "#Results:\n", + "print \"Compression ratio: \",round(r,2)\n", + "print \"Air standard efficiency: \",round(nd*100,2),\"%\"\n", + "print \"Fuel consumption,bhp/hr: \",round(fc,3),\"kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compression ratio: 19.37\n", + "Air standard efficiency: 63.22 %\n", + "Fuel consumption,bhp/hr: 0.255 kg\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3, page no. 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "Q = 1700 #Total heat added(in kJ/kg):\n", + "p3 = 5000 #Maximum pressure(in kPa):\n", + "T1 = 100+273.15 #Temperature at the beginning of compression(in K):\n", + "p1 = 103 #Pressureat beginning of compression(in kPa):\n", + "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n", + "Cv = 0.71 #Value of Cv(in kJ/kg.K):\n", + "n = 1.4 #Adiabatic index of compression: #For Otto cycle:\n", + "R = Cp-Cv #Gas constant(in kJ/kg.K):\n", + "m = 1 #Considernig 1 kg of air, volume at 1(in m**3):\n", + "\n", + "#Calculations:\n", + "V1 = m*R*T1/p1\n", + "V2 = 0.18 #By solving, volume at 2(in m**3):\n", + "r = V1/V2 #Compression ratio:\n", + "no = 1-1/(r**(n-1)) #Otto cycle efficiency:\n", + "V21 = 0.122 #By calculating, volume at state 2': #For mixed cycle:\n", + "p21 = 2124.75 #kPa \n", + "T31 = 2082 #K\n", + "T21 = 884.8 #K\n", + "T41 = 2929.5 #K\n", + "V31 = V21\n", + "V41 = V31*T41/T31 #Volume at state 4(in m**3):\n", + "T5 = T41*(V41/V1)**(n-1) #Temperature at state 5(in K):\n", + "Q51 = Cv*(T5-T1) #Heat rejected in the process 5-1(in kJ):\n", + "nm = (Q-Q51)/Q #Efficiency of mixed cycle:\n", + "\n", + "#Results:\n", + "print \"Efficiency of Otto cycle: \",round(no*100,2),\"%\"\n", + "print \"Efficiency of mixed cycle: \",round(nm*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of Otto cycle: 50.96 %\n", + "Efficiency of mixed cycle: 56.71 %\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4, page no. 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "T3 = 1200 #Maximum temperature(in K):\n", + "T1 = 300 #Minimum temperature(in K):\n", + "n = 1.4 #Adiabatic compression ratio:\n", + "Cp = 1.005 #Value of Cp(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "rp = (T3/T1)**(n/(2*(n-1))) #Optimum pressure ratio for maximum work output:\n", + "T2 = T1*rp**((n-1)/n) #Temperature at state 2(in K):\n", + "T4 = T3*rp**((1-n)/n) #Temperature at state 4(in K):\n", + "Q23 = Cp*(T3-T2) #Heat supplied(in kJ/kg):\n", + "Wc = Cp*(T2-T1) #Compressor work(in kJ/kg):\n", + "Wt = Cp*(T3-T4) #Turbine work(in kJ/kg):\n", + "nth = (Wt-Wc)/Q23*100 #Thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Compressor work: \",round(Wc,2),\"kJ/kg\" \n", + "print \"Turbine work: \",round(Wt,2),\"kJ/kg\"\n", + "print \"Thermal efficiency: \",round(nth,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compressor work: 301.5 kJ/kg\n", + "Turbine work: 603.0 kJ/kg\n", + "Thermal efficiency: 50.0 %\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5, page no. 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1 #Pressure at state 1(in bar):\n", + "p2 = 6.2 #Pressure at state 2(in bar):\n", + "p3 = 6.2 #Pressure at state 3(in bar):\n", + "p4 = 1 #Pressure at state 4(in bar):\n", + "T1 = 300 #Temperature at state 1(in K):\n", + "r = 0.017 #Fuel by air ratio:\n", + "nc = 0.88 #Compressor effeciency:\n", + "nt = 0.90 #Turbine internal efficiency:\n", + "H = 44186 #Heating value of fuel(in kJ/kg):\n", + "n = 1.4 #Adiabatic index of compression:\n", + "n1 = 1.33\n", + "Cpc = 1.147 #Value of Cp for combination(in kJ/kg.K):\n", + "Cpa = 1.005 #Value of Cp for air(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T2 = T1*(p2/p1)**((n-1)/n) #Temperature at state 2(in K):\n", + "T21 = (T2-T1)/nc+T1 #Actual temperature after compression(in K):\n", + "T3 = (r*H+Cpa*T21)/((1+r)*Cpc) #Temperature at state 3(in K):\n", + "T4 = T3*(p4/p3)**((n1-1)/n1) #Temperature at state 4(in K):\n", + "T41 = T3-nt*(T3-T4) #Actual temperature at turbine inlet considering internal efficiency of turbine(in K):\n", + "Wc = Cpa*(T21-T1) #Compressor work, per kg of air compressed(in kJ/kg):\n", + "Wt = Cpc*(T3-T41) #Turbine work, per kg of air compressed(in K):\n", + "Wnet = Wt-Wc #Net work(in kJ/kg):\n", + "Q = r*H #Heat supplied(in kJ/kg):\n", + "nth = Wnet/Q*100 #Thermal effeciency:\n", + "\n", + "#Results:\n", + "print \"Compressor work: \",round(Wc,2),\"kJ/kg\" \n", + "print \"Turbine work: \",round(Wt,2),\"kJ/kg\"\n", + "print \"Thermal efficiency: \",round(nth,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Compressor work: 234.42 kJ/kg\n", + "Turbine work: 414.71 kJ/kg\n", + "Thermal efficiency: 24.0 %\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6, page no. 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "T5 = 1200 #Maximum temperature(in K):\n", + "T1 = 300 #Minimum temperature(in K):\n", + "T3 = 300\n", + "ni = 0.85 #Isentropic efficiency:\n", + "nt = 0.9 #Turbine efficiency:\n", + "n = 1.4 #Adiabatic index of compression:\n", + "\n", + "#Calculations:\n", + "rpopt = (T1/(T5*ni*nt))**(2*n/(3*(1-n)))#Overall optimum pressure ratio:\n", + "\n", + "#Results:\n", + "print \"Overall optimum pressure ratio: \",round(rpopt,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Overall optimum pressure ratio: 13.6\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7, page no. 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "rp = 1.35 #Ratio of pressure:\n", + "m = 50 #Flow rate through compressor(in kg/s):\n", + "no = 0.90 #Overall efficiency:\n", + "p1 = 1 #Initial pressure(in bar):\n", + "T1 = 313 #Initial temperature(in K):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "R = 0.287 #Gas constant(in kJ/kg.K):\n", + "\n", + "#Calculation:\n", + "p9 = p1*rp**8 #Exit pressure(in bar):\n", + "T9 = T1*(p9/p1)**((r-1)/r) #Temperature at exit(in K):\n", + "T9a = (T9-T1)/0.82+T1 #Considerinf efficiency, actual temperature at exit(in K):\n", + "n = log(p9/p1)/(log(p9/p1)-log(T9a/T1)) #Actual index of compression:\n", + "np = ((r-1)/r)*(n/(n-1)) #Polytropic efficiency:\n", + "T2 = T1*rp**((r-1)/r) #Temperature at state 2(in K):\n", + "T2a = T1*(rp)**((n-1)/n) #Actual temperature at state 2(in K):\n", + "ns1 = (T2-T1)/(T2a-T1) #Stage efficiency:\n", + "Wc = (n/(n-1))*m*R*T1*((p9/p1)**((n-1)/n)-1) #Work done by compressor(in kJ/s):\n", + "Wca = Wc/no #Actual compressor work(in kJ/s):\n", + "\n", + "#Results:\n", + "print \"Pressure at exit of comppressor: \",round(p9,2),\"bar\"\n", + "print \"Temperature at the exit of compressor: \",round(T9a,2),\"K\"\n", + "print \"Polytropic efficiency: \",round(np*100,2),\"%\"\n", + "print \"Stage efficiency: \",round(ns1*100,1),\"%\"\n", + "print \"Power required to drive compressor: \",round(Wca,2),\"kJ/s\"," + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at exit of comppressor: 11.03 bar\n", + "Temperature at the exit of compressor: 689.24 K\n", + "Polytropic efficiency: 86.9 %\n", + "Stage efficiency: 86.3 %\n", + "Power required to drive compressor: 18245.07 kJ/s\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9, page no. 381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + " \n", + "\n", + "#Variable Declaration: \n", + "T1 = 27+273 #Temperature at which air is supplied(in K):\n", + "p2 = 8 #Initial pressure(in bar):\n", + "T3 = 1100 #Temperature of air leaving the combustion chamber(in K):\n", + "p4 = 1 #Pressure at state 4(in bar):\n", + "E = 0.8 #Effectiveness of heat exchanger:\n", + "npc = 0.85 #Polytropic efficiency of the compressor:\n", + "npt = 0.90 #Polytropic efficinency of the turbnie:\n", + "r = 1.4 #Adiabatic index of compression:\n", + "Cp = 1.0032 #Value of Cp(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "p3 = p2\n", + "p1 = p4\n", + "nc = r*npc/(r*npc-(r-1)) #Compression index:\n", + "nt = r/(r-npt*(r-1)) #Expansion index:\n", + "T2 = T1*(p2/p1)**((nc-1)/nc) #Temperature at state 2:\n", + "T4 = T3*(p4/p3)**((nt-1)/nt) #Temperature at state 4(in K):\n", + "T5 = (T4-T2)*E+T2 #Using heat exchanger effectiveness, temperature at state 5(in K):\n", + "qa = Cp*(T3-T5) #Heat added in combustion chambers(in kJ/kg):\n", + "Wc = Cp*(T2-T1) #Compressor work(in kJ/kg):\n", + "Wt = Cp*(T3-T4) #Turbine work(in kJ/kg):\n", + "ncycle = (Wt-Wc)/qa #Cycle efficiency:\n", + "Wr = (Wt-Wc)/Wt #Work ratio:\n", + "swo = Wt-Wc #Specific work output(in kJ/kg):\n", + "\n", + "#Results:\n", + "print \"Cycle efficiency: \",round(ncycle*100,2),\"%\" \n", + "print \"Work ratio: \",round(Wr,3)\n", + "print \"Specific work output: \",round(swo,2),\"kJ/kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cycle efficiency: 32.79 %\n", + "Work ratio: 0.334\n", + "Specific work output: 152.56 kJ/kg\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10, page no. 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1 #Initial pressure(in bar):\n", + "T1 = 27+273 #Initial temperature(in K):\n", + "p2 = 5 #Pressure at state 2(in bar):\n", + "nc = 0.85 #Isentropic efficiency:\n", + "T3 = 1000 #Temperature at state 3(in K):\n", + "p3 = p2-0.2 #Pressure at state 3(in bar):\n", + "p4 = p1 #Pressure at state 4(in bar):\n", + "nth = 0.20 #Thermal efficiency of plant:\n", + "r = 1.4 #Adiabatic index of compression:\n", + "Cp = 1.0032 #Value of Cp(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "T21 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2'(in K):\n", + "T2 = (T21-T1)/nc+T1 #Temperature at state 2(in K):\n", + "T41 = T3*(p4/p3)**((r-1)/r) #Temperature at state 4'(in K):\n", + "Wc = Cp*(T2-T1) #Compressor work per kg(in kJ/kg): \n", + "qa = Cp*(T3-T2) #Heat added(in kJ/kg):\n", + "T4 = T3-(qa*(-nth)+Wc)/Cp #Temperature at state 4(in K):\n", + "nt = (T3-T4)/(T3-T41) #Isentropic efficiency of turbine:\n", + "\n", + "#Results:\n", + "print \"Turbine isentropic efficiency: \",round(nt*100,3),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Turbine isentropic efficiency: 29.696 %\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11, page no. 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import sqrt\n", + "#Variable Declaration: \n", + "p1 = 1 #Pressure at which air is supplied(in bar):\n", + "T1 = 27+273 #Temperature at which air is supplied(in K):\n", + "T5 = 1000 #Maximum temperature in the cycle(in K):\n", + "p6 = 3 #Pressure at state 6(in bar):\n", + "p3 = 3\n", + "T7 = 995 #Temperature at state 7(in K):\n", + "c = 42000 #Calorific value of fuel(in kJ/kg):\n", + "Cp = 1.0032 #Value of Cp(in kJ/kg):\n", + "m = 30 #Air flow in compressor(in kg/s):\n", + "nc = 0.85 #Isentropic efficiency of compression:\n", + "ne = 0.90 #Isebtropic efficiency of expansion:\n", + "r = 1.4 #Adiabatic index of compression:\n", + "\n", + "#Calculations:\n", + "p8 = p1\n", + "p7 = p6\n", + "p4 = 10\n", + "p5 = p4\n", + "rp = round(sqrt(10),2) #Pressure ratio for perfect intercooling:\n", + "T21 = round(T1*rp**((r-1)/r),2) #Temperature at state 2'(in K):\n", + "T3 = T1 #For perfect intercooling:\n", + "T2 = round((T21-T1)/nc+T1,2) #Temperature at state 2(in K):\n", + "T41 = round(T3*(rp)**((r-1)/r),2) #Temperature at state 4'(in K):\n", + "T4 = round((T41-T3)/nc+T3,2) #Temperature at state 4(in K):\n", + "Wc = round(2*Cp*(T2-T1),2) #Total compressor work(in kJ/kg):\n", + "T61 = round(T5*(p6/p5)**((r-1)/r),2) #Temperature at state 6'(in K):\n", + "T6 = round(T5-(T5-T61)*ne,2) #Temperature at state 6(in K):\n", + "T81 = round(T7*(p8/p7)**((r-1)/r),2) #Temperature at state 8'(in K):\n", + "T8 = round(T7-(T7-T81)*ne,2) #Temperature at state 8(in K):\n", + "Wt = Cp*(T5-T6+T7-T8) #Expansion work output per kg air(in kJ/kg):\n", + "qa = Cp*(T5-T4+T7-T6) #Heat added per kg air(in kJ/kg):\n", + "mf = qa/ #Fuel required per kg of air:\n", + "afr = 1/mf #Air-fuel ratio:\n", + "Wnet = (Wt-Wc)*m #Net output(in kW):\n", + "nth = (Wt-Wc)/qa #Thermal efficiency:\n", + "print T21\n", + "#Results:\n", + "print \"Thermal efficiency: \",round(nth*100,2),\"%\" \n", + "print \"Net output: \",round(Wnet,2),\"kW\"\n", + "print \"A/F ratio: \",round(afr,2)\n", + "print \"___There is a calculation mistake in calculating Wt, in the book hence answer varies____\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "416.76\n", + "Thermal efficiency: 27.88 %\n", + "Net output: 6876.61 kW\n", + "A/F ratio: 51.08\n", + "___There is a calculation mistake in calculating Wt, in the book hence answer varies____\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12, page no. 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "p1 = 1 #Pressure of air at each state(in bar):\n", + "p2 = 4\n", + "p3 = 4\n", + "p4 = 8\n", + "p6 = p4\n", + "p7 = 4\n", + "p8 = 4\n", + "p9 = 1\n", + "T1 = 300 #Temperature at each state(in K):\n", + "T3 = 290\n", + "T6 = 1300\n", + "T8 = 1300\n", + "E = 0.80 #Effectiveness:\n", + "c = 42000 #Heating value of fuel(in kJ/kg):\n", + "r = 1.4 #Adiabatic index of combustion:\n", + "Cp = 1.0032 #Value of Cp(in kJ/kg):\n", + "\n", + "#Calculations:\n", + "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n", + "T4 = T3*(p4/p3)**((r-1)/r) #Temperature at state 4(in K):\n", + "T7 = T6*(p7/p6)**((r-1)/r) #Temperature at state 7(in K):\n", + "T9 = T8*(p9/p8)**((r-1)/r) #Temperature at state 9(in K):\n", + "T5 = (T9-T4)*E+T4 #Temperature at state 5(in K):\n", + "Wc = Cp*(T2-T1+T4-T3) #Compressor work per kg of air(in kJ/kg):\n", + "Wt = Cp*(T6-T7+T8-T9) #Turbine work per kg of air(in kJ/kg):\n", + "qa = Cp*(T6-T5+T8-T7) #Heat added per kg air(in kJ/kg):\n", + "mf = qa/c #Total fuel per kg of air:\n", + "Wnet = Wt-Wc #Net work(in kJ/kg):\n", + "n = Wnet/qa*100 #Cycle thermal efficiency:\n", + "afr1 = Cp*(T6-T5)/c #Fuel per kg air in combustion chamber 1:\n", + "afr2 = Cp*(T8-T7)/c #Fuel per kg air in combustion chamber 2:\n", + "\n", + "#Results:\n", + "print \"A/F ratio in the two combustion chambers: \",round(afr1,4),round(afr2,4)\n", + "print \"Total turbine work\",round(Wt,2),\"kJ/kg\"\n", + "print \"Cycle thermal efficiency\",round(n,2),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "A/F ratio in the two combustion chambers: 0.0126 0.0056\n", + "Total turbine work 660.84 kJ/kg\n", + "Cycle thermal efficiency 58.9 %\n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13, page no. 387" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import log\n", + "\n", + "#Variable Declaration: \n", + "T2 = 700 #Maximum temperature(in K):\n", + "T1 = 300 #Minimum temperature(in K):\n", + "r = 3 #Compression ratio:\n", + "qa = 30 #Total heat added(in kJ/s):\n", + "E = 0.90 #Regenerator efficiency:\n", + "p = 1 #Pressure at the beginning of compression(in bar):\n", + "n = 100 #Number of cycles:\n", + "Cv = 0.72 #Value of Cv:\n", + "R = 29.27 #Gas constant(in kJ/kg.K):\n", + "\n", + "#Calculations:\n", + "W = R*(T2-T1)*log(r) #Work done per kg of air(in kJ/kg):\n", + "q = R*T2*log(r)+(1-E)*Cv*(T2-T1) #Heat added per kg of air(in kJ/kg):\n", + "m = qa/q #Mass of air for 30 kJ/s of heat supplied(in kg/s):\n", + "mc = m/n #Mass of air per cycle(in kg/cycle):\n", + "BP = W*m #Brake output(in kW):\n", + "V = mc*R*T1/(p*10**2) #Stroke volume(in m**3):\n", + "\n", + "#Results:\n", + "print \"Brake output: \",round(BP,2),\"kW\" \n", + "print \"Stroke volume: \",round(V,5),\"m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Brake output: 17.12 kW\n", + "Stroke volume: 0.00117 m**3\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15, page no. 392" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "#Variable Declaration: \n", + "T1 = 17+273 #Ambient temperature(in K):\n", + "T3 = 1400 #Temperature at state 3(in K):\n", + "T5 = 420 #Temperature at state 5(in K):\n", + "p1 = 1 #Ambient pressure(in bar):\n", + "p2 = 10 #As pressure ratio is 10, pressure at state 2(in bar):\n", + "p3 = 10\n", + "p4 = 1\n", + "ph = 6000 #Pressure in HSRG(in kPa):\n", + "pc = 15 #Condensor pressure(in kPa):\n", + "O = 37.3 #Combined cycle output(in MW):\n", + "r = 1.4 #Adiabatic index of compression:\n", + "Cp = 1.0032 #Value of Cp(in kJ/kg.K):\n", + "#From steam tables:\n", + "ha = 3177.2 #kJ/kg \n", + "sa = 6.5408 #kJ/kg.K \n", + "sb = sa\n", + "x = 0.7976\n", + "hb = 2118.72 #kJ/kg\n", + "hc = 225.94 #kJ/kg\n", + "vc = 0.001014 #m**3/kg\n", + "\n", + "#Calculations:\n", + "T2 = T1*(p2/p1)**((r-1)/r) #Temperature at state 2(in K):\n", + "T4 = T3*(p4/p3)**((r-1)/r) #Temperature at state 4(in K):\n", + "Wc = Cp*(T2-T1) #Compressor work per kg(in kJ/kg):\n", + "Wt = Cp*(T3-T4) #Turbine work per kg(in kJ/kg):\n", + "qa = Cp*(T3-T2) #Heat added in combustion chamber(in kJ/kg):\n", + "WnetGT = Wt-Wc #Net gas turbine output(in kJ/kg air):\n", + "qHSRG = Cp*(T4-T5) #Heat recovered in HSRG for steam generation(in kJ/kg):\n", + "hd = vc*(ph-pc)*10**2 #Enthalpy at exit of feed pump(in kJ/kg):\n", + "had = ha-hd #Heat added per kg of steam(in kJ/kg):\n", + "m = qHSRG/had #Mass of steam generated per kg of air:\n", + "WnetST = ha-hb-(hd-hc) #Net steam turbine cycle output(in kJ/kg):\n", + "sco = WnetST*m #Steam cycle output per kg(in kJ/kg air):\n", + "tco = WnetGT+sco #Total combined output(in kJ/kg air):\n", + "ncc = tco/qa #Combined cycle efficiency:\n", + "ngt = WnetGT/qa #Gas turbine efficiency:\n", + "\n", + "#Results:\n", + "print \"Overall efficiency\",round(ncc*100,2),\"%\" \n", + "print \"Steam per kg of air\",round(m,3),\"kg steam/kg air\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Overall efficiency 57.78 %\n", + "Steam per kg of air 0.119 kg steam/kg air\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16, page no. 394" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "\n", + "#Variable Declaration: \n", + "T1 = 27+273 #Temperature of working fuel at the beginning of compression(in K):\n", + "rp = 70 #Pressure ratio:\n", + "rv = 15 #Compression ratio:\n", + "r = 1.4 #Adiabatic index of compression:\n", + "\n", + "#Calculations:\n", + "T2 = T1*(rv)**(r-1) #Temperature at state 2(in K):\n", + "T3 = T2*rp/(rv**r) #Temperature at state 3(in K):\n", + "T4 = T3+(T3-T2)/r #Temperature at state 4(in K):\n", + "T5 = T4*(T3/T4*rv)**(1-r) #Temperature at state 5(in K):\n", + "n = 1-(T5-T1)/(r*(T4-T3)+(T3-T2))#Air standard thermal efficiency:\n", + "\n", + "#Results:\n", + "print \"Air standard thermal efficiency\",round(n*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air standard thermal efficiency 65.3 %\n" + ] + } + ], + "prompt_number": 34 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Applied_Thermodynamics/README.txt b/Applied_Thermodynamics/README.txt new file mode 100755 index 00000000..75808384 --- /dev/null +++ b/Applied_Thermodynamics/README.txt @@ -0,0 +1,10 @@ +Contributed By: Irshad Raushan +Course: btech +College/Institute/Organization: IITB +Department/Designation: Aerospace Engg. +Book Title: Applied Thermodynamics +Author: Onkar Singh +Publisher: New Zone International Publishers +Year of publication: 2009 +Isbn: 978-81-224-2916-9 +Edition: 3rd
\ No newline at end of file diff --git a/Applied_Thermodynamics/screenshots/lossEnergy.png b/Applied_Thermodynamics/screenshots/lossEnergy.png Binary files differnew file mode 100755 index 00000000..db9bd494 --- /dev/null +++ b/Applied_Thermodynamics/screenshots/lossEnergy.png diff --git a/Applied_Thermodynamics/screenshots/thermaleff.png b/Applied_Thermodynamics/screenshots/thermaleff.png Binary files differnew file mode 100755 index 00000000..ebea0a76 --- /dev/null +++ b/Applied_Thermodynamics/screenshots/thermaleff.png diff --git a/Applied_Thermodynamics/screenshots/work.png b/Applied_Thermodynamics/screenshots/work.png Binary files differnew file mode 100755 index 00000000..49193762 --- /dev/null +++ b/Applied_Thermodynamics/screenshots/work.png |