diff options
26 files changed, 16981 insertions, 0 deletions
diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER11.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER11.ipynb new file mode 100644 index 00000000..851bb6d7 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER11.ipynb @@ -0,0 +1,542 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 11 - Carburetion and Carburettors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.1 PAGE 399" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Suction at throat = 4447.61 N/m**2 \n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "d=0.1#..................#Cylinder bore in m\n", + "l=0.12#................#Cylinder stroke in m\n", + "N=1800#..................#Engine rpm\n", + "d2=0.028#................#Throat diameter in m\n", + "Cda=0.8#................#Co efficient of air flow\n", + "etaV=0.75#..................#Volumetric efficiency\n", + "rhoa=1.2#................#Density of air in kg/m**3\n", + "n=4#.......................#No of cylinders\n", + "#Calculations\n", + "Vs=(pi/4)*d*d*l*n#.................#Stroke Volume in m**3\n", + "Va=etaV*Vs#.......................#Actual volume per stroke in m**3\n", + "Vas=Va*(N/2)*(1/60)#.............#Actual volume sucked per second\n", + "ma=Vas*rhoa#.........................#Air consumed in kg/sec\n", + "delp=((ma/(Cda*(pi/4)*d2*d2))**2)/(2*rhoa)#.............#Suction at throat in N/m**2\n", + "print \"Suction at throat = %0.2f N/m**2 \"%delp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.2 PAGE 400" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Suction at the throat = 539.13 N/m**2 \n", + "Throat area = 7.72 cm**2 \n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "cp=5#.................#Consumption of petrol in kg/h\n", + "afr = 16#...............#Air fuel ratio\n", + "Af=2*10**(-6)#..............#Fuel orifice area in m**2\n", + "z=0.005#................#Distance between tip of jet and level of petrol in float chamber in m\n", + "spgrp=0.75#..............#Specific gravity of petrol\n", + "rhow=1000#.................#Density of water in kg/m**3\n", + "rhoa=1.2#....................#Density of air in kg/m**3\n", + "Cda=0.8#...............#Coefficient of discharge for venturi throat\n", + "g=9.81#...............#Acceleration due to gravity in m/sec**2\n", + "#Calculations\n", + "mf=cp/3600#.................#Fuel consumed in kg/sec\n", + "delp=(((mf/(Af*Cda))**2)*(1/(2*spgrp*rhow)))+(g*z*spgrp*rhow)#\n", + "print \"Suction at the throat = %0.2f N/m**2 \"%delp\n", + "ma=mf*afr#................#Air flow rate\n", + "Atsqr=((ma/Cda)**2)*(1/(2*rhoa*delp))#....................#Throat area in m**2\n", + "print \"Throat area = %0.2f cm**2 \"%(sqrt(Atsqr)*10**4)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.3 PAGE 401" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diameter of the fuel jet = 1.32 mm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "pc=7.2#.................#Petrol consumed in kg/h\n", + "spgrp=0.75#................#Specific gravity of fuel\n", + "rhow=1000#.................#Density of water in kg/m**3\n", + "t1=300#...................#Temperature of air in Kelvin\n", + "afr=15#....................#Air fuel ratio\n", + "d2=0.024#....................#Diameter of choke tube in m\n", + "z=0.0042#...................#The height of the jet above petrol level in float chamber in m\n", + "Cda=0.8#....................#Coefficient of discharge for air\n", + "Cdf=0.7#.....................#Coefficient of discharge for fuel\n", + "p1=1.013#.....................#Atmospheric pressure in bar\n", + "g=9.81#.......................#Acceleration due to gravity in m/s**2\n", + "R=287#........................#Gas constant in J/kg.K\n", + "#calculations\n", + "mf=pc/3600#....................#Rate of fuel consumption in kg/sec\n", + "rhof=spgrp*rhow#...............#Density of fuel in kg/m**3\n", + "rhoa=(p1*10**5)/(R*t1)#............#Density of air in kg/m**3\n", + "ma=mf*afr#.......................#Air flow rate \n", + "delpa=((ma/(Cda*(pi/4)*d2**2))**2)*(1/(2*rhoa))#....................#Suction in N/m**2\n", + "df=sqrt((mf/sqrt(2*rhof*(delpa-(g*z*rhof))))*(1/(Cdf*(pi/4))))#.................#Diameter of fuel jet in m\n", + "print \"Diameter of the fuel jet = %0.2f mm\"%(df*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.4 PAGE 402" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Suction at the throat = 7.67 cm of Water \n", + "Throat area = 2.86 cm \n", + "Velocity of air across the venturi throat = 8.34 m/s \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "pc=5.45#......................#Petrol consumption in kg/h\n", + "afr=15#......................#Air fuel ratio\n", + "af=2*10**(-6)#................#Fuel jet orifice area in m**2\n", + "z=0.00635#...................#Distance between tip of fuel jet and level of petrol in the float chamber in m\n", + "Cda=0.8#............................#Coefficient of discharge of venturi throat\n", + "rhoa=1.29#........................#Density of air in kg/m**3\n", + "spgrp=0.72#........................#Specific gravity of fuel\n", + "rhow=1000#.........................#Density of water in kg/m**3\n", + "g=9.81#..............................#Acceleration due to gravity in m/s**2\n", + "Cdf=0.75#........................#Coefficient of discharge of the fuel\n", + "#calculations\n", + "mf=pc/3600#....................#Fuel consumed in kg/sec\n", + "rhof=spgrp*rhow#...............#Density of fuel in kg/m**3\n", + "delp=(((mf/(af*Cdf))**2)*(1/(2*rhof)))+(g*z*rhof)#......................#Depression in venturi throat in N/m**2\n", + "h2odep=delp/(g*1000)#................................#Depression in venturi throat in cm of Water\n", + "print \"Suction at the throat = %0.2f cm of Water \"%(h2odep*100)\n", + "ma=mf*afr#................#Air flow rate\n", + "At=sqrt(((ma/Cda)**2)*(1/(2*rhoa*delp)))#....................#Throat area in m**2\n", + "dt=sqrt(At/(pi/4))#........................................#Throat diameter in m\n", + "print \"Throat area = %0.2f cm \"%(dt*100)\n", + "Ct=sqrt((2*g*z*rhof)/rhoa)#..........................#Velocity of air across the venturi throat in m/sec\n", + "print \"Velocity of air across the venturi throat = %0.2f m/s \"%(Ct)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.5 PAGE 403" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Throat pressure = 0.76 bar \n", + "Air fuel ratio when the air cleaner is fitted : 13.69\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "afr=15#.....................#Air fuel ratio\n", + "p1=1#.........................#Atmospheric pressure in bar\n", + "p2=0.8#.......................#Pressure at venturi throat in bar\n", + "pd=30#....................#Pressure drop to air cleaner in mm of Hg\n", + "rhohg=13600#....................#Density of Hg in kg/m**3\n", + "af=240#........................#Air flow at sea level in kg/h\n", + "g=9.81#.....................#Acceleration due to gravity in m/s**2\n", + "#calculations\n", + "delpa=p1-p2#........................#When there is no air cleaner\n", + "pt=1-(rhohg*g*(pd/1000)*10**(-5))-delpa#..........................#Throat pressure in bar\n", + "print \"Throat pressure = %0.2f bar \"%pt\n", + "afrn=afr*sqrt(delpa/(p1-pt))#...............................#Air fuel ratio when the air cleaner is fitted\n", + "print \"Air fuel ratio when the air cleaner is fitted : %0.2f\"%afrn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.6 PAGE 403" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Throat diameter = 0.03 m\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "As=4.6#........................#Air supply in kg/min\n", + "p1=1.013#.......................#Atmospheric pressure in bar\n", + "t1=298#......................#Atmospheric temperature in Kelvin\n", + "C2=80#........................#Air flow velocity in m/s\n", + "Cv=0.8#....................#Velocity co efficient\n", + "ga=1.4#........................#Degree of freedom of gas\n", + "R=0.287#........................#Gas constant in kJ/kgK\n", + "#Calculations\n", + "cp=R*(ga/(ga-1))#.......................#Specific heat capacity of air in kJ/kgK\n", + "p2=((1-(((C2/Cv)**2)*(1/(2*cp*1000*t1))))**(ga/(ga-1)))*p1#...................#Throat pressure in bar\n", + "rho1=(p1*10**5)/(R*1000*t1)#\n", + "rho2=rho1*(p2/p1)**(1/ga)#\n", + "ma=As/60#...................#Air flow in kg/s\n", + "A2=ma/(rho2*C2)#.................#Throat area in m**2\n", + "d2=sqrt((4*A2)/pi)#................#Throat diameter in m\n", + "print \"Throat diameter = %0.2f m\"%d2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.7 PAGE 404" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Throat diameter = 3.53 cm \n", + "Orifice diameter = 0.0023 cm \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "As=6#........................#Air supply in kg/min\n", + "fs=0.45#..........................#Fuel supply in kg/min\n", + "p1=1.013#.......................#Atmospheric pressure in bar\n", + "t1=300#......................#Atmospheric temperature in Kelvin\n", + "rhof=740#......................#Density of fuel in kg/m**3\n", + "C2=92#........................#Air flow velocity in m/s\n", + "Cda=0.8#....................#Velocity co efficient\n", + "Cdf=0.6#.........................#Coefficient of discharge for fuel\n", + "ga=1.4#........................#Degree of freedom of gas\n", + "r=0.75#......................#ratio of pressure drop across venturi and of that of choke\n", + "R=0.287#........................#Gas constant in kJ/kgK\n", + "#Calculations\n", + "ma=As/60#.................................#Air flow in kg/s\n", + "mf=fs/60#.................................#Fuel flow in kg/s\n", + "cp=R*(ga/(ga-1))#.......................#Specific heat capacity of air in kJ/kgK\n", + "p2=((1-(((C2/Cda)**2)*(1/(2*cp*1000*t1))))**(ga/(ga-1)))*p1#...................#Throat pressure in bar\n", + "v1=(R*t1*1000)/(p1*10**5)#\n", + "v2=v1*(p1/p2)**(1/ga)#................#specific volume in m**3/kg\n", + "A2=(ma*v2)/(C2)#.................#Throat area in m**2\n", + "d2=sqrt((4*A2)/pi)#................#Throat diameter in m\n", + "print \"Throat diameter = %0.2f cm \"%(d2*100)\n", + "pdv=p1-p2#..........#Pressure drop at venturi in bar\n", + "pdj=r*pdv#.............#Pressure drop at jet in bar\n", + "Af=((mf/Cdf)*(1/sqrt(2*rhof*pdj*10**5)))#.............#Area of orifice in m**2\n", + "df=sqrt((4*Af)/pi)#................#Orifice diameter in m\n", + "print \"Orifice diameter = %0.4f cm \"%(df)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.8 PAGE 404" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diameter of choke = 29.61 mm \n", + "Diameter of the fuel jet = 1.68 mm \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Vs=1489*10**(-6)#.......................#Capacity of engine in m**3\n", + "N=4200#...............#Engine rpm at which max speed is developed\n", + "etaV=0.75#.....................#Volumetric efficiency\n", + "afr=13#........................#air fuel ratio\n", + "Ct=85#..........................#Theoretical air speed at peak power in m/s\n", + "C2=Ct#\n", + "Cda=0.82#....................#Coefficient of discharge for the venturi\n", + "Cdf=0.65#....................#Coefficient of discharge of main petrol jet\n", + "spgr=0.74#..................#Specific gravity of petrol\n", + "z=0.006#.................................#Level of petrol surface below choke\n", + "p1=1.013#......................#Atmospheric pressure in bar\n", + "t1=293#.........................#Atmospheric temperature in Kelvin\n", + "r=0.4#.............................#Ratio of diameter of emulsion tube to choke diameter\n", + "R=0.287#.............................#Gas constant in kJ/kgK\n", + "ga=1.4#..............................#Degree of freedom for air\n", + "g=9.81#..............................#Acceleration due to gravity in m/s**2\n", + "rhow=1000#...........................#Density of water in kg/m**3\n", + "#calculations\n", + "rhof=rhow*spgr#............................#Density of fuel in kg/m**3\n", + "Va=(etaV*Vs*N)/(60*2)#.....................#Volume of air induced in m**3/s\n", + "ma=(p1*10**5*Va)/(R*t1*1000)#...............#mass flow of air in kg/s\n", + "cp=R*(ga/(ga-1))#.......................#Specific heat capacity of air in kJ/kgK\n", + "p2=((1-(((C2)**2)*(1/(2*cp*1000*t1))))**(ga/(ga-1)))*p1#...................#Throat pressure in bar\n", + "pt=p2#\n", + "vt=Va*(p1/p2)**(1/ga)#.....................#Volume flow of air at choke in m**3/s\n", + "At=vt/(Ct*Cda)#...................#Area of emulsion tube in m\n", + "D=sqrt((4*At*10**6)/(pi*(1-r**2)))#...................#Diameter of choke in mm\n", + "print \"Diameter of choke = %0.2f mm \"%D\n", + "mf=ma/afr#..................#Mass flow of fuel in kg/s\n", + "delpa=(p1-p2)*10**5#\n", + "df=sqrt((mf/sqrt(2*rhof*(delpa-(g*z*rhof))))*(1/(Cdf*(pi/4))))#.................#Diameter of fuel jet in m\n", + "print \"Diameter of the fuel jet = %0.2f mm \"%(df*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.9 PAGE 405" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air fuel ratio when the nozzle lip is neglected : 11.35\n", + "Air fuel ratio when nozzle lip is taken into account : 11.39\n", + "Minimum velocity of air = 8.58 m/s\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "da=0.018#..........................#Throat Diameter in m\n", + "df=0.0012#......................#Diameter of fuel orifice in m\n", + "Cda=0.82#.................#Coefficient of air flow\n", + "Cdf=0.65#......................#Coefficient of fuel flow\n", + "z=0.006#........................#Level of petrol surface below the throat\n", + "rhoa=1.2#.......................#density of air in kg/m**3\n", + "rhof=750#.........................#density of fuel in kg/m**3\n", + "g=9.81#........................#Acceleration due to gravity in m/s**2\n", + "delp=0.065*10**5#...................#Pressure drop in N/m**2\n", + "#Calculations\n", + "afr1=(Cda/Cdf)*((da/df)**2)*sqrt(rhoa/rhof)#..................#Air fuel ratio when the nozzle lip is neglected\n", + "print \"Air fuel ratio when the nozzle lip is neglected : \",round(afr1,2)\n", + "afr2=afr1*sqrt(delp/(delp-(g*z*rhof)))#.....................#Air fuel ratio when nozzle lip is taken into account\n", + "print \"Air fuel ratio when nozzle lip is taken into account : \",round(afr2,2)\n", + "C2=sqrt((2*g*z*rhof)/rhoa)#.........................#Minimum velocity of air in m/s\n", + "print \"Minimum velocity of air = %0.2f m/s\"%C2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.10 PAGE 406" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fuel consumption = 46.66 kg/h \n", + "Velocity of air at the throat = 132.52 m/s \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "d=0.11#..................#Engine bore in m\n", + "l=0.11#..................#Engine length in m\n", + "da=0.042#................#Throat diameter of the choke tube in m\n", + "N=3000#..................#Engine rpm\n", + "etaV=0.75#...............#Volumetric efficiency\n", + "Ra=287#..................#Gas constant for air in J/kgK\n", + "Rv=97#...................#Gas constant for fuel vapour in J/kgK\n", + "t=273#....................#Temperature in Kelvin\n", + "p=1.013#...................#Pressure in bar\n", + "delpa=0.12#.................#Pressure depression in bar\n", + "t2=273+15#...................#Temperature at throat\n", + "n=8#........................#No of cylinders\n", + "mO=32#.......................#Mass of Oxygen molecule in amu\n", + "mC=12#........................#Mass of Carbon molecule in amu\n", + "mH=1#.......................#Mass of Hydrogen molecule in amu\n", + "cC=84#......................#Composition of carbon in %\n", + "cH2=16#.....................#Composition of Hydrogen in % \n", + "#Calculations\n", + "Vfm=(pi/4)*d*d*l*n*(N/2)*etaV#.....................#Volume of fuel mixture supplied in m**3/min\n", + "afr=((cC*(mO/mC))+(cH2*(mO/(4*mH))))/23#..................#Air fuel ratio\n", + "va=(Ra*t)/(p*10**5)#.....................#Volume of 1 kg of air in m**3/kg\n", + "vf=(Rv*t)/(p*10**5)#......................#Volume of 1 kg of fuel vapour in m**3/kg\n", + "fc=(Vfm/((afr*va)+vf))*60#...............#Fuel consumption in kg/h\n", + "print \"Fuel consumption = %0.2f kg/h \"%fc\n", + "rhoa=((p-delpa)*10**5)/(Ra*t2)#...............#Density of air at the throat in kg/m**3\n", + "Ca=(afr*(fc/3600))/((pi/4)*da*da*rhoa)#................#Velocity of air at the throat in m/s\n", + "print \"Velocity of air at the throat = %0.2f m/s \"%Ca" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 11.11 PAGE 407" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air fuel ratio at the altitude : 11.26\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "a=4500#.................#Altitude\n", + "afr=14#...............#Air fuel ratio at sea level\n", + "t1=25#...........#Temperature at sea level in Celsius\n", + "p1=1.013#...........#Pressure at sea level in bar\n", + "#Calculations\n", + "t2=t1-(0.0064*a)#.........................#Temperature at the given altitude using the given formula in Celsius\n", + "p2=p1/(10**(a/19300))#....................#Pressure at the given altitude using the given formula in bar\n", + "afr2=afr*sqrt((p2*(t1+273))/(p1*(t2+273)))#...................#Air fuel ratio at the altitude\n", + "print \"Air fuel ratio at the altitude : %0.2f\"%afr2" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER12.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER12.ipynb new file mode 100644 index 00000000..57310f2f --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER12.ipynb @@ -0,0 +1,430 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER-12 Fuel injection systems for C.I. Engines " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.1 PAGE 421" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volume of Fuel Injected per Cycle = 0.05 cc \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "\n", + "n=6#...............#No of cylinders\n", + "BP=125#...............#Brake Power in kW\n", + "N=3000#..............#Engine rpm\n", + "bsfc=200#............#Brake Specific Fuel Consumption g/kWh\n", + "spgr=0.85#.............#Specific Gravity\n", + "\n", + "#Calculations\n", + "\n", + "fc=(bsfc/1000)*BP#.........#Fuel consumption in kg/h\n", + "fcpc=fc/n#..................#Fuel consumption per cylinder\n", + "FCPC=(fcpc/60)/(N/2)#................#Fuel Consumption per cycle in kg\n", + "VFIC = (FCPC*1000)/spgr#...................#Volume of fuel injected per cycle in cc\n", + "print \"Volume of Fuel Injected per Cycle = %0.2f cc \"%VFIC" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.2 PAGE 421" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diameter of Nozzle Orifice = 0.00 m \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "# Initialisation of Variables\n", + "n=6#...............#No of cylinders\n", + "N=1500#............#Engine rpm\n", + "BP=220#.............#Brake Power in kW\n", + "bsfc=0.273#..........#Brake Specific Fuel Consumption in kg/kWh\n", + "theta=30#.............#The Period of Injection in degrees of crank angle\n", + "spgr=0.85#............#Specific Gravity of fuel\n", + "Cf=0.9#................#Orifice discharge co-efficient\n", + "ip=160#...............#Injection pressure in bar\n", + "cp=40#.................#Pressure in combustion chamber in bar\n", + "rhow=1000#................#Density of water in kg/m**3\n", + "#Calculations\n", + "vf = Cf*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec\n", + "qf=(bsfc*BP)/(spgr*rhow*3600)#..................# Volume of fuel injected per sec in m**3\n", + "d=sqrt (qf/((pi/4)*n*vf*(theta/360)*(60/N)*(N/120)))#...........#Diameter of nozzle orifice\n", + "print \"Diameter of Nozzle Orifice = %0.2f m \"%d" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.3 PAGE 422" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volume of Fuel Injected per Cycle = 0.13 cm**3 \n", + "Diameter of orifice = 0.40 mm \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=1#............#No of cylinders\n", + "N=650#............#Engine rpm\n", + "theta=28#...........#Crank Travel in degree\n", + "fc=2.2#...........#Fuel consumption in kg/h\n", + "spgr=0.875#............#Specific Gravity\n", + "ip=150#................#Injection Pressure in bar\n", + "cp=32#.................#Combustion chamber Pressure in bar\n", + "Cd=0.88#...............#co-efficient of discharge of orifice\n", + "rhow=1000#...........#Density of water in kg/m**3\n", + "#Calculation\n", + "fcpc = fc/60#..............#Fuel consumption per cylinder\n", + "fipc = fcpc/(N/2)#.........#Fuel Injected per cycle in kg\n", + "vfpc = fipc/(spgr*rhow)#....#volume of fuel injected per cycle\n", + "print \"Volume of Fuel Injected per Cycle = %0.2f cm**3 \"%(vfpc*10**6)\n", + "tfic=(theta/360)*(60/N)#....#Time for Fuel Injection per Cycle in sec\n", + "mf = fipc/tfic#...............#Mass of fuel injected per cycle in kg/s\n", + "vf = Cd*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec\n", + "d=sqrt((mf*4)/(pi*vf*spgr*rhow))\n", + "print \"Diameter of orifice = %0.2f mm \"%(d*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.4 PAGE 423" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diameter of orifice = 0.56 mm \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "N=2000#............#Engine rpm\n", + "theta=30#...........#Crank Travel in degree\n", + "sfc=0.272#...........#Fuel consumption in kg/kWh\n", + "ip=120#................#Injection Pressure in bar\n", + "cp=30#.................#Combustion chamber Pressure in bar\n", + "Cd=0.9#...............#co-efficient of discharge of orifice\n", + "rhow=1000#...........#Density of water in kg/m**3\n", + "api = 32#..............#API in degree\n", + "pw=15#..................#Power Output in kW\n", + "#Calculation\n", + "spgr= 141.5/(131.5+api)#............#Specific Gravity\n", + "fcpc = (sfc*pw)/((N/2)*60)#..............#Fuel consumption per cycle in kg\n", + "tfic=(theta/360)*(60/N)#....#Time for Fuel Injection per Cycle in sec\n", + "mf = fcpc/tfic#...............#Mass of fuel injected per cycle in kg/s\n", + "vf = Cd*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec\n", + "d=sqrt((mf*4)/(pi*vf*spgr*rhow))\n", + "print \"Diameter of orifice = %0.2f mm \"%(d*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.5 PAGE 424" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fuel consumption = 0.28 kg/kWh \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "N=1800#............#Engine rpm\n", + "theta=32#...........#Crank Travel in degree\n", + "ip=118.2#................#Injection Pressure in bar\n", + "cp=31.38#.................#Combustion chamber Pressure in bar\n", + "Cd=0.9#...............#co-efficient of discharge of orifice\n", + "rhow=1000#...........#Density of water in kg/m**3\n", + "api = 32#..............#API in degree\n", + "pw=11#..................#Power Output in kW\n", + "d=0.47#...................#Fuel Injection orifice diameter in mm\n", + "#Calculation\n", + "spgr= 141.5/(131.5+api)#............#Specific Gravity\n", + "tfic=(theta/360)*(60/N)#....#Time for Fuel Injection per Cycle in sec\n", + "vf = Cd*sqrt((2*(ip-cp)*10**5)/(spgr*rhow))#.............#Actual fuel velocity of injection in m/sec\n", + "mf=vf*spgr*rhow*(pi/4)*(d/1000)**2#\n", + "tncp=(N/2)*60#...............#Total no of cycles per hour\n", + "FIPC=mf*tfic#.................#Mass of fuel injected per cycle in kg/cycle\n", + "fc=FIPC*tncp*(1/pw)#...................#Fuel consumption in kg/kWh\n", + "print \"Fuel consumption = %0.2f kg/kWh \"%fc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.6 PAGE 424" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Orifice Area Required per injector = 0.0136 cm**2 \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=8#......#No of cylinders\n", + "pw=386.4#...........#Power output in kW\n", + "N=800#.............#Engine rpm\n", + "fc=0.25#.............#Fuel Consumption in kg/kWh\n", + "theta=12#..............#Crank Travel in degree (for injection)\n", + "spgr=0.85#...........#Specific Gravity\n", + "patm=1.013#............#Atmospheric pressure\n", + "cf=0.6#................#Co-efficient of discharge for injector\n", + "pcB=32#................#Pressure in cylinder in beginning in bar\n", + "piB=207#...............#Pressure in injector in beginning in bar\n", + "pcE=55#...............#Pressure in cylinder at the end in bar\n", + "piE=595#................#Pressure in injector at the end in bar\n", + "rhow=1000#..............#density of water in kg/m**3\n", + "#calculations\n", + "pwpc = pw/n#......................#Output per cylinder\n", + "fcpc = (pwpc*fc)/60#.............#Fuel consumption per cylinder in kg/min\n", + "fipc = fcpc/(N/2)#................#Fuel injected per cycle in kg\n", + "tfic = (theta*60)/(360*N)#...........#Time for fuel Injection per cycle\n", + "mf = fipc/tfic#......................#Mass of fuel injected per second\n", + "pdb = piB-pcB#....................#Pressure difference at beginning\n", + "pde = piE-pcE#...................#Pressure difference at end\n", + "apd = (pdb+pde)/2#\n", + "Ao=mf/(cf*sqrt(2*apd*10**5*spgr*rhow))#\n", + "print \"Orifice Area Required per injector = %0.4f cm**2 \"%(Ao*10000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.7 PAGE 425" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass of fuel injected into each cylinder per second = 1.10 kg/s\n", + "Diameter of the fuel orifice = 0.55 mm \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=6#...............#No of cylinders\n", + "afr=20#...........#Air fuel ratio\n", + "d = 0.1#...............#cylinder bore in mm\n", + "l=0.14#..............#Cylinder length in mm\n", + "etav=0.8#............#Volumetric Efficiency\n", + "pa=1#.................#Pressure at the beginning of the compression in bar\n", + "ta = 300#.............#Temperature at the beginning of the compression in Kelvin\n", + "theta = 20#...............#Crank travel in degree for injection\n", + "N = 1500#...................#engine rpm\n", + "rhof=960#.................#Fuel density in kg/m**3\n", + "cf=0.67#................#Co efficient of discharge for injector\n", + "pi=150#....................#injection pressure in bar\n", + "pc=40#....................#combustion pressure in bar\n", + "R=287#........................#gas constant for air in kJ/kg.K\n", + "#calculations\n", + "V=(pi/4)*d**2*l*etav#......................#Volume of air supplied per cylinder per cycle in m**3\n", + "ma=(pa*10**5*V)/(R*ta)#.....................#Mass of this air at suction conditions in kg/cycle\n", + "mf=ma/afr#............................#Mass of fuel in kg/cycle\n", + "fipc = (theta*60)/(360*N)#...........#Time taken for fuel injection per cycle in seconds\n", + "MF = mf/fipc#........................#Mass of fuel injected into each cylinder per second\n", + "print \"The mass of fuel injected into each cylinder per second = %0.2f kg/s\"%MF\n", + "vf=cf*sqrt((2*(pi-pc)*10**5)/rhof)#.............#fuel velocity injection in m/s\n", + "d0=sqrt((MF*4)/(pi*vf*rhof))#..................#diameter of fuel orifice in m\n", + "print \"Diameter of the fuel orifice = %0.2f mm \"%(d0*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.8 PAGE 425" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total displacement of plunger = 2.98 cc\n", + "Effective stroke of plunger = 0.16 mm \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Vpbes=7#.................#Volume of fuel in the pump barrel before commencement of effective stroke in cc\n", + "df=3#.................#Diameter of fuel line from pump to injector in mm\n", + "lf=700#.................#Length of fuel line from pump to injector in mm\n", + "Vfiv=2#................#Volume of fuel in the injection valve in cc\n", + "Vfd=0.1#.................#Volume of fuel to be delivered in cc\n", + "p1=150#..............#Pressure at which fuel is delivered in bar\n", + "p2=1#.................#atmospheric pressure in bar\n", + "cc=78.8*10**(-6)#..........#Co - efficient of compressibility per bar\n", + "dp=7#..............#Diameter of plunger in mm\n", + "#calculations\n", + "V1=Vpbes+(pi/4)*((df/10)**2)*(lf/10)+Vfiv#...................#Total initial fuel volume\n", + "delV=cc*(p1-p2)*V1#................#Change in volume due to compression\n", + "displu=delV+Vfd#.....................#Total displacement of plunger\n", + "print \"Total displacement of plunger = %0.2f cc\"%displu\n", + "lp=(displu*4)/(pi*(dp/10)**2)#.............#Effective stroke of plunger\n", + "print \"Effective stroke of plunger = %0.2f mm \"%lp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 12.9 PAGE 426" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time required for spray penetration at an injection pressure of 235 bar = 11.98 milliseconds:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=145#...........#injection pressure in bar\n", + "p2=235#.........#Injection pressure in bar (2nd case)\n", + "t1=16#.............#spray penetration time in milliseconds\n", + "s1=22#................#spray penetration length in cm\n", + "s2=22#.................#spray penetration length in cm (2nd case)\n", + "pc=30#.................#combustion chamber pressure in bar\n", + "#calculations\n", + "delp1=p1-pc#\n", + "delp2=p2-pc#\n", + "t2=(s2/s1)*t1*sqrt(delp1/delp2)#..........#Spray time in seconds for 2nd case\n", + "#Given that s=t*sqrt(delp)\n", + "print \"The time required for spray penetration at an injection pressure of 235 bar = %0.2f milliseconds:\"%t2" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER15.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER15.ipynb new file mode 100644 index 00000000..2a5367b8 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER15.ipynb @@ -0,0 +1,76 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 15 - Engine Cooling" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 15.1 PAGE 499" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mass of cooling water required = 3668.50 kg/h for petrol engine \n", + "The mass of cooling water required = 2674.95 kg/h for diesel engine \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "BP=90#.................#Brake Power in kW\n", + "deltw=27#.................#Raise in temperature of water \n", + "etaP=0.25#...................#Efficiency of petrol engine\n", + "etaD=0.3#....................#Efficiency od diesel engine\n", + "Pec=32#......................#Percentage of energy going to coolant in petrol engine\n", + "Dec=28#......................#Percentage of energy going to coolant in diesel engine\n", + "cp=4.187#..........#specific heat of water at constant pressure\n", + "#Calculations\n", + "hsP = BP/etaP#............#Heat supplied in kW or kJ/s\n", + "ecP=hsP*(Pec/100)#.............#Energy going to cooling water in kg/s\n", + "mwP=ecP/(cp*deltw)#.............#Mass of cooling water required\n", + "hsD = BP/etaD#............#Heat supplied in kW or kJ/s\n", + "ecD=hsD*(Dec/100)#.............#Energy going to cooling water in kg/s\n", + "mwD=ecD/(cp*deltw)#.............#Mass of cooling water required\n", + "print \"The mass of cooling water required = %0.2f kg/h for petrol engine \"%(mwP*3600)\n", + "print \"The mass of cooling water required = %0.2f kg/h for diesel engine \"%(mwD*3600)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER16.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER16.ipynb new file mode 100644 index 00000000..21b69ac2 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER16.ipynb @@ -0,0 +1,304 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 16 - Supercharging of IC Engines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 16.1 PAGE 525" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Power required to run the supercharger = 90.47 kW \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "pwu=735#............#Power developed by naturally aspirated engine in kW\n", + "afru=12.8#.............#Air fuel ratio for naturally aspirated engine\n", + "bsfc=0.350#......#Brake specific fuel consumption in kg/kWh\n", + "metau=0.86#...........#Mechanical efficiency of naturally aspirated engine\n", + "pi=730#...........#Inlet pressure in mm of Hg absolute\n", + "tm=325#...........#Mixture temperature in Kelvin\n", + "pr=1.6#.............#Pressure ratio of supercharged engine\n", + "etaa=0.7#.............#Adiabatic efficiency of supercharged engine\n", + "metas=0.9#..............#Mechanical efficiency of supercharged engine\n", + "afrs=12.8#.............#Air fuel ratio for supercharged engine\n", + "rhohg=13600#.............#Density of mercury in kg/m**3\n", + "R=0.287#...................#Gas constant in kJ/kgK\n", + "ga=1.4#................#Degree of freedom for gas\n", + "cp=1.005#..................#Specific heat of the fuel\n", + "g=9.81#................#Acceleration due to gravity in m/s**2\n", + "#calculations\n", + "t2=tm*(pr)**((ga-1)/ga)#..............#Ideal temperature for the supercharged engine\n", + "t2a=tm+(t2-tm)/etaa#................#Actual temperature for the supercharged engine\n", + "wa=cp*(t2a-tm)#.....................#Work of the supercharger\n", + "wsup=cp*(t2a-tm)/metas#..............#Work required to drive the supercharger in kJ/kg of air\n", + "#When unsupercharged\n", + "p1=(pi/1000)*((g*rhohg)/1000)#..............#Inlet pressure in kN/m**2\n", + "rhounsup=p1/(R*tm)#\n", + "maunsup=(bsfc*pwu*afrs)/3600#...................#Air consumption in kg/s for unsupercharged engine\n", + "#When supercharged\n", + "rhosup=(pr*p1)/(R*t2a)#\n", + "masup=maunsup*(rhosup/rhounsup)#..................#Air consumption in kg/s\n", + "Psup=masup*wsup#...............#Power required to run the supercharger in kW\n", + "print \"The Power required to run the supercharger = %0.2f kW \"%Psup" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 16.2 PAGE 526" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Engin Capacity = 0.02 m**3 \n", + "The Brake mean effective pressure = 8.34 bar\n", + "The Increase of pressure required = 0.47 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1.0132#..............#Mean pressure at sea level in bar\n", + "t1=283#................#Mean temperature at sea level in Kelvin\n", + "BP=260#....................#Brake Power output in kW\n", + "etaV=0.78#..................#Volumetric efficiency at sea level free air condition\n", + "sfc=0.247#............#Specific Fuel consumption in kg/kW.h\n", + "afr=17#...................#Air fuel ratio\n", + "N=1500#...................#Engine rpm\n", + "at=2700#.................#Altitude in mts\n", + "p2=0.72#................#Pressure in bar at the given altitude\n", + "Psup=0.08#.................#8% power of engine is taken by the supercharger\n", + "R=287#...................#Gas constant in J/kgK\n", + "t2=32+273#..............#Temperature in Kelvin at the given altitude\n", + "#calculations\n", + "mf=(sfc*BP)/60#.............#Fuel consumption in kg/min\n", + "ma = mf*afr#..................#Air consumption in ig/min\n", + "acps = ma/(N/2)#............#Air consumption per stroke in kg\n", + "Vs=(acps*R*t1)/(etaV*p1*10**5)#................#Engine capacity in m**3\n", + "print \"The Engin Capacity = %0.2f m**3 \"%Vs\n", + "pmb=(BP*6)/(Vs*10*(N/2))#........#Brake Mean Effective Pressure in bar\n", + "print \"The Brake mean effective pressure = %0.2f bar\"%pmb\n", + "gp=BP/(1-Psup)#.................#Gross power produced by supercharged engine in kW\n", + "masup=ma*gp/BP#......................#Mass of air required for supercharged engine in kg\n", + "matc=masup/(N/2)#..............#Mass of air taken per cycle\n", + "pressure=(matc*R*t2)/(etaV*10**5*Vs)#\n", + "print \"The Increase of pressure required = %0.2f bar\"%(pressure-p2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 16.3 PAGE 527" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Net increase in Brake Power = 17.60 kW \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ec=3600*10**(-6)#.............#Engine capacity in m**3\n", + "pw=13#...............#Power developed in kW per m**3 of free air induced per minute\n", + "etaV=0.82#............#Volumetric Efficiency\n", + "N=3000#................#Engine rpm\n", + "p1=1.0132#...........................#Initial Air pressure in bar\n", + "t1=298#........................#Initial Temperature in Kelvin\n", + "pr=1.8#.....................#Pressure ratio in rotary compressor\n", + "etaC=0.75#.................#Isentropic efficiency of compressor\n", + "etaM=0.8#....................#Mechanical efficiency\n", + "ga=1.4#.....................#Degree of freedom for the gas\n", + "td=4#.......................#The amount by which the temperature is kess than delivery temperature from compressor\n", + "R=287#......................#Gas constant in J/kg.K\n", + "cp=1.005#.....................#Specific heat capacity\n", + "#Calculations\n", + "Vs=(ec*N)/2#....................#Swept volume in m**3/min\n", + "Vu=Vs*etaV#....................#Unsupercharged volume induced per min\n", + "rcdp=pr*p1#........#Rotary compressor delivery pressure\n", + "t2=t1*(pr)**((ga-1)/ga)#..............#Ideal temperature for the supercharged engine\n", + "t2a=t1+(t2-t1)/etaC#................#Actual temperature for the supercharged engine\n", + "ta=t2a-td#............................#Temperature of air at intake to the engine cylinder\n", + "V1=(rcdp*Vs*t1)/(p1*ta)#.................#Equivalent volume at 1.0132 bar and 298 K\n", + "Vinc=V1-Vs#...........................#Increase in induced Volume of air in m**3/min\n", + "ipincai=pw*Vinc#.......................#Increase in IP from air induced in kW\n", + "ipinciip=((rcdp-p1)*10**5*Vs)/(60*1000)#...........#Increase in IP due to increased induction pressure kW\n", + "ipinctot=ipincai+ipinciip#...............#Total increase in Input Power in kW\n", + "bpinc=ipinctot*etaM#....................#Increase in Brake Power of the engine in kW\n", + "ma=(rcdp*10**5*Vs)/(60*R*ta)#...................#Mass of air delivered by the compressor kg/s\n", + "pc=(ma*cp*(t2a-t1))/etaM#....................#Power required by the compressor\n", + "bpincnet=bpinc-pc#..........................#Net Increase in BP\n", + "print \"The Net increase in Brake Power = %0.2f kW \"%bpincnet" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 16.4 PAGE 528" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Engine Capacity = 0.02 m**3:\n", + "The Brake mean effective pressure = 8.41 bar\n", + "The Increase of pressure required = 0.47 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1.0132#..............#Mean pressure at sea level in bar\n", + "t1=283#................#Mean temperature at sea level in Kelvin\n", + "BP=250#....................#Brake Power output in kW\n", + "etaV=0.78#..................#Volumetric efficiency at sea level free air condition\n", + "sfc=0.245#............#Specific Fuel consumption in kg/kW.h\n", + "afr=17#...................#Air fuel ratio\n", + "N=1500#...................#Engine rpm\n", + "at=2700#.................#Altitude in mts\n", + "p2=0.72#................#Pressure in bar at the given altitude\n", + "Psup=0.08#.................#8% power of engine is taken by the supercharger\n", + "R=287#...................#Gas constant in J/kgK\n", + "t2=32+273#..............#Temperature in Kelvin at the given altitude\n", + "#calculations\n", + "mf=(sfc*BP)/60#.............#Fuel consumption in kg/min\n", + "ma = mf*afr#..................#Air consumption in ig/min\n", + "acps = ma/(N/2)#............#Air consumption per stroke in kg\n", + "Vs=(acps*R*t1)/(etaV*p1*10**5)#................#Engine capacity in m**3\n", + "print \"The Engine Capacity = %0.2f m**3:\"%Vs\n", + "pmb=(BP*6)/(Vs*10*(N/2))#........#Brake Mean Effective Pressure in bar\n", + "print \"The Brake mean effective pressure = %0.2f bar\"%pmb\n", + "gp=BP/(1-Psup)#.................#Gross power produced by supercharged engine in kW\n", + "masup=ma*gp/BP#......................#Mass of air required for supercharged engine in kg\n", + "matc=masup/(N/2)#..............#Mass of air taken per cycle\n", + "pressure=(matc*R*t2)/(etaV*10**5*Vs)#\n", + "print \"The Increase of pressure required = %0.2f bar\"%(pressure-p2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 16.5 PAGE 529" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The indicated mean effective pressure = 4.55 bar \n", + "The total aspirated air mass flow into the engine = 1564.51 kg/min \n", + "Air flow into the compressor = 10865.42 kg/min\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=298#.................#Temperature of the air while entering the compressor in Kelvin\n", + "qrej=1210#..............#Amount of heat rejected in cooler in kJ/min\n", + "t2=273+65#...............#Temperature of the air leaving the cooler in Kelvin\n", + "p2=1.75#.................#Pressure of the air leaving the cooler in bar\n", + "n=6#.....................#No of cylinders\n", + "d=0.1#...................#Bore of the cylinder in m\n", + "l=0.11#...................#Stroke of the cylinder in m\n", + "etaV=0.72#................#volumetric efficiency\n", + "N=2000#...............#Engine rpm\n", + "Tout=150#..................#Torque Output in Nm\n", + "etaM=0.8#..................#Mechanical efficiency\n", + "R=287#.......................#Gas constant for air in J/kgK\n", + "cp=1.005#...................#Specific capacity of air\n", + "#calculations\n", + "BP=(2*pi*N*Tout)/(60*1000)#...........#Brake power in kW\n", + "IP=BP/etaM#..........#Input Power in kW\n", + "Vc=(pi/4)*d*d*l#...................#Cylinder Volume in m**3\n", + "pmi=(6*IP)/(n*Vc*(N/2)*10)#................#Indicated mean effective pressure\n", + "print \"The indicated mean effective pressure = %0.2f bar \"%(pmi)\n", + "Vs=Vc*6*(N/2)#.........................#Engine Swept Volume in m**3/min\n", + "Vaa=Vs*etaV#..........................#Aspirated volume of air into engine in m**3/min\n", + "maa=(p2*10**5*Vaa)/(R*t2)#..............#Aspirated air mass flow into the engine in kg/min\n", + "print \"The total aspirated air mass flow into the engine = %0.2f kg/min \"%maa\n", + "t2a=((((BP/cp)/(qrej/(60*cp)))*t2)-t1)/(((BP/cp)/(qrej/(60*cp)))-1)#\n", + "mc=((BP/cp)/(t2a-t1))*60#........................#Air flow into the compressor in kg/min\n", + "print \"Air flow into the compressor = %0.2f kg/min\"%mc" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER17.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER17.ipynb new file mode 100644 index 00000000..7de1dea4 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER17.ipynb @@ -0,0 +1,2436 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 17 - Testing and performance of I.C. engines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.1 PAGE 570" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power developed = 13.30 kW\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "Pmi=6#.....................#Mean effective pressure in bar\n", + "N=1000#....................#Engine rpm\n", + "d=0.11#.....................#Diameter of piston in m\n", + "l=0.14#.....................#Stroke length in m\n", + "n=1#........................#No of cylinders\n", + "k=1#........................#k=1 for two stroke engine\n", + "#Calculations\n", + "V=l*(pi/4)*d*d#.............#Volume of the cylinder in m**3\n", + "IP=(n*Pmi*V*k*10*N)/6#.........#Indicated Power developed in kW\n", + "print \"Indicated power developed = %0.2f kW\"%IP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.2 PAGE 571" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The bore of the engine = 87.96 mm\n", + "The stroke of the engine = 131.94 mm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=4#........................#No of cylinders\n", + "P=14.7#....................#Power developed in kW\n", + "N=1000#....................#Engine speed in rpm\n", + "Pmi=5.5#....................#Mean effective pressure in bar\n", + "lbyd=1.5#...................#Ratio of stroke to bore\n", + "k=0.5#.......................#For four stroke engine\n", + "#Calculations\n", + "d=((P*6)/(n*Pmi*N*k*10*(pi/4)*lbyd))**(1/3)#......................#Calculation of bore in m\n", + "l=lbyd*d#................................#Calculation of stroke in m\n", + "print \"The bore of the engine = %0.2f mm\"%(d*1000)\n", + "print \"The stroke of the engine = %0.2f mm\"%(l*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.3 PAGE 572" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake Power = 2.51 KW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Db=0.6#.....................#Diameter of the brake wheel in m\n", + "d=0.026#......................#Diameter of the rope in m\n", + "W=200#.......................#Dead load on the brake in N\n", + "S=30#......................#Spring balance reading in N\n", + "N=450#......................#Engine speed in rpm\n", + "#Calculations\n", + "BP=((W-S)*pi*(Db+d)*N)/(60*1000)#...............#Brake Power in KW\n", + "print \"Brake Power = %0.2f KW\"%(BP)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.4 PAGE 572" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since it is given that the stroke is equal to bore, their value is = 138.67 mm\n", + "The engine displacement = 0.00 m**3\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=4#........................#No of cylinders\n", + "k=0.5#......................#For four stroke engine\n", + "Tb=160#.....................#Max brake torque in Nm\n", + "N=3000#......................#Engine rpm\n", + "Pm=9.6#....................#Brake mean effective pressure in bar\n", + "#Calculations\n", + "D=((2*pi*N*Tb*6)/(60*1000*Pm*(pi/4)*N*k*10))**(1/3)#.....................#Bore of engine in m\n", + "L=D#...................#Given that the stroke is equal to bore\n", + "Disp=(pi/4)*D*D*L#....................................#Displacement in m**3\n", + "print \"Since it is given that the stroke is equal to bore, their value is = %0.2f mm\"%(D*1000)\n", + "print \"The engine displacement = %0.2f m**3\"%(Disp)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.5 PAGE 572" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since the stroke and bore are equal, their value is = 290.90 mm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=6#.....................#No of cylinders\n", + "Pmb=6#....................#Brake mean effective pressure in bar\n", + "N=1000#..................#Engine rpm\n", + "k=0.5#.......................#For four stroke engine\n", + "Wce=820#.................#Work during compression and expansion in kW\n", + "Wie=50#...................#Work during intake and exhaust in kW\n", + "f=150#......................#Rubbing friction in engiine in kW\n", + "WnetT=40#...................#Net work done by turbine in kW\n", + "#Calculations\n", + "BP=Wce-(Wie+f+WnetT)#.....................#Net work available or brake power in kW\n", + "D=((BP*6)/(n*Pmb*(pi/4)*N*k*10))**(1/3)#......................#Bore of engine in m\n", + "L=D#.........................................#Given that bore is equal to stroke\n", + "print \"Since the stroke and bore are equal, their value is = %0.2f mm\"%(D*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.6 PAGE 573" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of the power input of the engine with methane fuel to that with octane : 1.12\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Cm=50150#............................#Heating value of methane in kJ/kg\n", + "Co=44880#............................#Heating value of octane in kJ/kg\n", + "#Calculations\n", + "#Since Energy supplied is proportional to mass of fuel supplied time calorific value of the fuel supplied\n", + "ratioP=Cm/Co#.........................#Ratio of the power input of the engine with methane fuel to that with octane\n", + "print \"Ratio of the power input of the engine with methane fuel to that with octane : %0.2f\"%ratioP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.7 PAGE 573" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The Brake power = 250.00 kW\n", + "Brake thermal efficiency = 33.07 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "N=2000#...........................#Engine rpm\n", + "k=0.5#..............................#Four stroke engine\n", + "Disp=0.025#........................#Engine displacement in m**3\n", + "Pmb=6#..............................#Brake mean effective pressure in bar\n", + "mf=0.018#............................#Fuel consumption in kg/s\n", + "Cf=42000#............................#Calorific value of fuel in kJ/kg\n", + "#Calcuations \n", + "BP=(Pmb*Disp*N*k*10)/(6)#................#Brake power in kW\n", + "etaBT=BP/(mf*Cf)#.................#Brake thermal efficiency\n", + "print \"The Brake power = %0.2f kW\"%(BP)\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etaBT*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.8 PAGE 574" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake power developed by engine = 9.16 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "T=175#.......................#Torque due to brake load in Nm\n", + "N=500#.........................#Engine speed in rpm\n", + "#calcuations\n", + "BP=(2*pi*N*T)/(60*1000)#.......................#Brake power developed by engine in kW\n", + "print \"Brake power developed by engine = %0.2f kW\"%(BP)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.9 PAGE 575" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 47.71 kW\n", + "Brake power = 42.88 kW\n", + "Mechanical efficiency = 89.88 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.3#.............................#Bore of engine cylinder in m\n", + "L=0.45#............................#Stroke of engine cylinder in m\n", + "N=300#.............................#Engine rpm\n", + "Pmi=6#.............................#Indicated mean effective pressure in bar\n", + "Nbl=1.5#...........................#Net brake load in kN\n", + "Db=1.8#............................#Diameter of brake drum in m\n", + "d=0.02#............................#Brake rope diameter\n", + "k=0.5#.............................#Four stroke engine\n", + "n=1#...............................#No of cylinders\n", + "#Calculations\n", + "IP=(n*Pmi*L*(pi/4)*D*D*N*k*10)/6#......................#Indicated power in kW\n", + "BP=(Nbl*pi*(Db+d)*N)/60#...............................#Brake power in kW\n", + "etam=BP/IP#.............................................#Mechanical efficiency\n", + "print \"Indicated power = %0.2f kW\"%(IP)\n", + "print \"Brake power = %0.2f kW\"%(BP)\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etam*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.10 PAGE 576" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake specific fuel consumption = 0.27 kJ/hW-h\n", + "Brake thermal efficiency : 30.78 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Db=0.7#.............................#Diameter of brake pulley in m\n", + "d=0.025#............................#Diameter of the rope in m\n", + "W=50#...............................#Load on the tight side of the rope in kg\n", + "S=50#...............................#Spring balance reading in N\n", + "N=900#..............................#Engine rpm\n", + "mf=4#...............................#Rate of fuel consumption in kg/h\n", + "C=44000#............................#Calorific value of fuel in kJ/kg\n", + "g=9.81#.............................#Acceleration due to gravity in m/s**2\n", + "#Calculations\n", + "BP=(((W*g)-S)*pi*(Db+d)*N)/(60*1000)#........................#Brake power in kW\n", + "bsfc=mf/BP#...................................................#Brake specific fuel consumption in kJ/hW-h\n", + "print \"Brake specific fuel consumption = %0.2f kJ/hW-h\"%bsfc\n", + "etathB=(BP*3600)/(mf*C)#.............................................#Brake thermal efficiency\n", + "print \"Brake thermal efficiency : %0.2f %%\"%(etathB*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.11 PAGE 576" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated thermal efficiency = 42.52 %\n", + "Brake power = 100.53 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=4#.......................#No of cylinders\n", + "k=0.5#.....................#Four stroke engine\n", + "r=8#.......................#Compression ratio\n", + "d=0.1#.....................#Engine bore in m\n", + "l=0.1#.....................#Engine stroke in m\n", + "etaV=0.75#.................#Volumetric efficiency\n", + "N=4800#....................#Engine rpm\n", + "afr=15#....................#Air fuel ratio\n", + "C=42000000#................#Calorific value of fuel\n", + "rhoa=1.12#.................#Atmospheric density in kg/m**3\n", + "Pmi=10#....................#Mean effective pressure in bar\n", + "etamech=0.8#...............#Mechanical efficiency\n", + "#Calculations \n", + "IP=(n*Pmi*l*(pi/4)*d*d*N*k*10)/6#.................#Indicated power in kW\n", + "Ac=n*(pi/4)*d*d*l*(N/2)*(etaV/60)#.....................#Air consumption in m**3/s\n", + "ma=Ac*rhoa#........................................#Mass flow of air in kg/s\n", + "mf=ma/afr#.........................................#Mass flow of fuel in kg/s\n", + "etath=(IP*1000)/(mf*C)#...................................#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etath*100)\n", + "BP=IP*etamech#.....................................#Brake Power in kW\n", + "print \"Brake power = %0.2f kW\"%BP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.12 PAGE 577" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volumetric efficiency = 84.48 %\n", + "Brake specific fuel consumption = 0.28 kg/kWh\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "N=1800#...................#Engine rpm\n", + "l=0.11#...................#Engine stroke in m\n", + "d=0.085#..................#Engine bore in m\n", + "ma=0.56#..................#Air flow rate in kg/min\n", + "BP=6#.....................#Brake power developed in kW\n", + "afr=20#...................#Air fuel ratio\n", + "C=42550#..................#Calorific value of fuel in kJ/kg\n", + "rhof=1.18#................#Density of fuel in kg/m**3\n", + "#calculations\n", + "V=(pi/4)*d*d*l*(N/2)#.....................#Volume displacemt in m**3/min\n", + "Ma=V*rhof#.................................#Mass of air in kg/min\n", + "etaV=ma/Ma#................................#Volumetric efficiency\n", + "fc=ma/afr#.................................#Fuel concumption\n", + "bsfc=(fc*60)/BP#...........................#Brake specific fuel consumption in kg/kWh\n", + "print \"The volumetric efficiency = %0.2f %%\"%(etaV*100)\n", + "print \"Brake specific fuel consumption = %0.2f kg/kWh\"%(bsfc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.13 PAGE 578" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The mechanical efficiency = 63.59 %\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "pmicover=6.5#....................#Mean effective pressure on cover side in bar\n", + "pmicrank=7#......................#Mean effective pressure on crank side in bar\n", + "D=0.2#...........................#Engine bore in m\n", + "l=0.35#..........................#Engine stroke in m\n", + "drod=0.02#.........................#Diameter of piston rod in m\n", + "W=1370#............................#Dead load on the brake in N\n", + "S=145#.............................#Spring balance reading in N\n", + "Db=1.2#............................#Brake wheel diameter in m\n", + "d=0.02#............................#Brake rope diameter in m\n", + "k=0.5#.............................#Four stroke engine\n", + "N=420#.......................#Engine rpm\n", + "#calculations\n", + "Acover=(pi/4)*D*D#.......................#Area of cylinder on the cover side in m**2\n", + "Acrank=(pi/4)*((D**2)-(drod**2))#..........#Effective area of cylinder on the crank end side in m**2\n", + "IPcover=(pmicover*l*Acover*N*k*10)/6#................#Indicated power on the cover end side in kW\n", + "IPcrank=(pmicrank*l*Acrank*N*k*10)/6#................#Indicated power on the crank end side in kW\n", + "IPtotal=IPcover+IPcrank#....................#TOtal\n", + "BP=((W-S)*pi*(Db+d)*N)/(60*1000)#...................#Brake power in kW\n", + "etamech=BP/IPtotal#..................................#Mechanical efficiency\n", + "print \"The mechanical efficiency = %0.2f %%\"%(etamech*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.14 PAGE 579" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engine bore = 152.98 mm\n", + "Engine stroke = 229.47 mm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "BP=14.7#........................#Brake power in kW\n", + "p1=0.9#.........................#Suction pressure in bar\n", + "etamech=0.8#....................#Mechanical efficiency\n", + "r=5#............................#Compression ratio\n", + "p3=24#..........................#maximum explosion pressure in bar\n", + "N=1000#.........................#Engine rpm\n", + "rld=1.5#........................#Ratio of length and stroke\n", + "ic=1.35#........................#Index of compression curve\n", + "ie=1.3#.........................#Index of expansion curve\n", + "k=0.5#..........................#Four stroke engine\n", + "#calculations\n", + "p2=(r**ic)*p1#......................#intermediate pressure = %0.2f bar) during compression\n", + "p4=p3/(r**ie)#......................#Intermediate pressure = %0.2f bar) during expansion\n", + "pm=((((p3-r*p4)/(ie-1))-((p2-p1*r)/(ic-1)))*(10**5))/(r-1)#...........#Mean effective pressure in N/m**2\n", + "pmb=pm/100000#........................................#Mean effective pressure in bar\n", + "IP=BP/etamech#........................................#Indicated power in kW\n", + "D=((IP*6*4)/(pmb*rld*(pi)*N*k*10))**(1/3)#............#Engine bore in m\n", + "L=rld*D#..............................................#Engine stroke in m\n", + "print \"Engine bore = %0.2f mm\"%(D*1000)\n", + "print \"Engine stroke = %0.2f mm\"%(L*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.15 PAGE 580" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated thermal efficiency = 27.03 %\n", + "Indicated brake efficiency = 23.43 %\n", + "Mechanical efficiency = 86.67 %\n" + ] + } + ], + "source": [ + "#Initialisation of Variables\n", + "IP=30#........................#Indicated power in kW\n", + "BP=26#........................#Brake power in kW\n", + "N=1000#.......................#Engine rpm\n", + "fpbph=0.35#...................#Fuel per brake power hour in kg/B.P.h\n", + "C=43900#......................#Calorific value of fuel used in kJ/kg\n", + "#Calculations\n", + "mf=BP*fpbph#.............#Fuel consumption per hour in kg/h\n", + "etaIth=IP/((mf/3600)*C)#.................#Indicated thermal efficiency\n", + "etaBth=BP/((mf/3600)*C)#.................#Indicated brake efficiency\n", + "etamech=BP/IP#...........................#Mechanical efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etaIth*100)\n", + "print \"Indicated brake efficiency = %0.2f %%\"%(etaBth*100)\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.16 PAGE 581" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake specific fuel consumption = 0.29 kg/kWh\n", + "Brake thermal efficiency = 28.62 %\n" + ] + } + ], + "source": [ + "#Initialisation of Variables\n", + "Db=0.75#.....................#Diameter of brake pulley in m\n", + "d=0.05#......................#Rope diameter in m\n", + "W=400#.......................#Dead load in N\n", + "S=50#........................#Spring balance reading in N\n", + "cf=4.2#......................#Consumption of fuel in kg/h\n", + "N=1000#......................#Engine rpm\n", + "C=43900#.....................#Calorific value of fuel in kJ/kg\n", + "#Calculations\n", + "BP=((W-S)*pi*(Db+d)*N)/(60*1000)#...............#Brake power in kW\n", + "bsfc=cf/BP#......................................#Brake specific fuel consumption in kg/kWh\n", + "etabth=BP/((cf/3600)*C)#.........................#Brake thermal efficiency\n", + "print \"Brake specific fuel consumption = %0.2f kg/kWh\"%(bsfc)\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etabth*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.17 PAGE 581" + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The calorific value of the fuel used = 40341.03 kJ/kg\n", + "Fuel consumption = 20.52 (kg/h\n" + ] + } + ], + "source": [ + "#Initialisation of Variables\n", + "n=6#.............................#No of cylinders\n", + "D=0.09#..........................#Bore of cylinder in m\n", + "L=0.1#...........................#Stroke length in m\n", + "r=7#.............................#Compression ratio\n", + "etarel=0.55#.....................#Relative efficiency\n", + "isfc=0.3#........................#Indicated specific fuel consumption in kg/kWh\n", + "imep=8.6#........................#Indicated mean effective pressure in bar\n", + "N=2500#..........................#Engine speed\n", + "ga=1.4#..........................#Degree of freedom for air\n", + "k=0.5#...........................#Four stroke engine\n", + "#calculations\n", + "etastan=1-1/(r**(ga-1))#...................#Air standard efficiency\n", + "etath=etarel*etastan#.....................#Indicated thermal efficiency \n", + "C=3600/(etath*isfc)#.......................#Calorific value of fuel in kJ/kg\n", + "IP=(n*imep*L*D*D*(pi/4)*N*k*10)/6#................#Indicated power in kW\n", + "fc=IP*isfc#.............................#Fuel consumption in kg/h\n", + "print \"The calorific value of the fuel used = %0.2f kJ/kg\"%(C)\n", + "print \"Fuel consumption = %0.2f (kg/h\"%(fc)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.18 PAGE 582" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engine bore = 62.04 mm\n", + "Engine stroke = 93.05 mm\n", + "Fuel consumption = 8.79 kg/h\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "BP=30#........................#Brake power in kW\n", + "pmi=8#.........................#Mean effective pressure in bar\n", + "etamech=0.8#....................#Mechanical efficiency\n", + "n=4#............................#No of cylinders\n", + "N=2500#.........................#Engine rpm\n", + "rld=1.5#........................#Ratio of length and stroke\n", + "etabth=0.28#......................#Brake thermal efficiency\n", + "k=1#..........................#Two stroke engine\n", + "C=43900#.........................#Calorific value of fuel in kJ/kg\n", + "#calculations\n", + "IP=BP/etamech#........................................#Indicated power in kW\n", + "D=((IP*6*4)/(pmi*n*rld*(pi)*N*k*10))**(1/3)#............#Engine bore in m\n", + "L=rld*D#..............................................#Engine stroke in m\n", + "print \"Engine bore = %0.2f mm\"%(D*1000)\n", + "print \"Engine stroke = %0.2f mm\"%(L*1000)\n", + "mf=BP/(etabth*C)#..............................#Fuel consumption in kg/s\n", + "print \"Fuel consumption = %0.2f kg/h\"%(mf*3600)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.19 PAGE 583" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volumetric efficiency of the engine = 78.16 %\n", + "The brake thermal efficiency of the engine = 23.64 %\n", + "Brake torque = 0.23 kNm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=6#......................#No of cylinders\n", + "pdpc=700*10**(-6)#.................#Piston displacement per cylinder in m**3\n", + "P=78#............................#Power developed in kW\n", + "N=3200#.............................#Engine rpm\n", + "mf=27#.............................#Fuel consumption in kg/h\n", + "C=44000#...........................#Calorific value of fuel in kJ/kg\n", + "afr=12#..............................#Air fuel ratio\n", + "p1=0.9#..........................#Intake air pressure\n", + "pa=p1#\n", + "t1=305#...............................#Intake air temperature\n", + "ta=t1#\n", + "R=0.287#.....................#Gas constant in kJ/kgK\n", + "#Calculations\n", + "ma=afr*mf#............................#maaa of air in kg/h\n", + "Va=(ma*R*t1)/(p1*100)#.............#Volume of air intake in m**3/h\n", + "Vs=pdpc*n*(N/2)*60#.....................#Swept volume in m**3/h\n", + "etaV=Va/Vs#.............................#Volumetric efficiency\n", + "print \"The volumetric efficiency of the engine = %0.2f %%\"%(etaV*100)\n", + "etabt=P/(mf*(C/3600))#...................#Brake thermal efficiency\n", + "print \"The brake thermal efficiency of the engine = %0.2f %%\"%(etabt*100)\n", + "Tb=(P*60)/(2*pi*N)#..........................#Brake torque in kNm\n", + "print \"Brake torque = %0.2f kNm\"%(Tb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.20 PAGE 583" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Average no of times each cylinder misfires in one min : 2.00\n" + ] + } + ], + "source": [ + "import math\n", + "# Initialisation of Variables\n", + "n=6#.......................#No of cylinders\n", + "Vs=1.75*10**(-3)#..............#Stroke volume in m**3\n", + "IP=26.3#.....................#Indicated power in kW\n", + "Ne=504#.......................#Expected Engine rpm\n", + "Pmi=6#........................#Mean effective pressure in bar\n", + "k=0.5#.........................#Four stroke engine\n", + "#Calculations\n", + "Na=math.floor((IP*6)/(n*Pmi*Vs*k*10))#.......................#Actual Engine rpm\n", + "af=(Na*n)/2#.......................#Actual no of fires in min\n", + "ef=(Ne*n)/2#.......................#Expected no of fires in min\n", + "Nm=ef-af#........................#No of misfires/min\n", + "nm=Nm/n#....................#Average no of times each cylinder misfires in one min\n", + "print \"Average no of times each cylinder misfires in one min : %0.2f\"%nm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.21 PAGE 584" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 14.24 kW\n", + "Indicated thermal efficiency = 34.63 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "n=4#.......................#No of cylinders\n", + "D=0.075#.......................#Engine bore in m\n", + "L=0.09#........................#Engine length in m\n", + "err=39/8#.......................#Engine to rear axle ratio\n", + "Dw=0.65#.........................#Wheel diameter in m\n", + "pc=0.227#.......................#Petrol consumption in kg\n", + "pmi=5.625#.........................#Mean effective pressure in bar\n", + "C=43470#..............................#Calorific value of petrol in kJ/kg\n", + "k=0.5#.............................#Four stroke engine\n", + "sc=48#............................#Speed of the car in km/h\n", + "d=3.2#.............................#Distance covered by car in km\n", + "#Calculations\n", + "sc1=sc*(1000/60)#...................#Speed of the car in m/min\n", + "Nt=sc1/(pi*Dw)#......................#Revolutions made by tire per min\n", + "Ne=Nt*err#............................#Speed of engine shaft\n", + "IP=(n*pmi*L*(pi/4)*D*D*Ne*k*10)/6#........#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%(IP)\n", + "sc2=sc/60#.......................#Speed of the car in km/min\n", + "t=d/sc2#..........................#Time for covering 3.2 km in min\n", + "fc=pc/(t*60)#.....................#Fuel consumed per second in kg\n", + "etait=IP/(fc*C)#...............#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etait*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.22 PAGE 584" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 26.59 kW\n", + "Brake power = 21.21 kW\n", + "Mechanical efficiency = 79.75 %\n", + "Indicated thermal efficiency = 21.61 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=1#.................#No of cylinders\n", + "D=0.25#................#Engine bore in m\n", + "L=0.4#.................#Engine stroke in m\n", + "pmg=7#.................#Gross mean effective pressure in bar\n", + "pmp=0.5#...............#Pumping mean effective pressure in bar\n", + "N=250#..................#Engine rpm\n", + "Db=1.5#................#Effective diameter of the brake in m\n", + "Nl=1080#..............#Net load on the brake in N\n", + "fh=10#.................#Fuel used per hour in kg\n", + "C=44300#...............#Calorific value of fuel in kJ/kg\n", + "k=0.5#.................#Four stroke engine\n", + "#Calculations\n", + "mf=fh/3600#.........................#Fuel used per second in kg\n", + "pm=pmg-pmp#.......................#Net pressure\n", + "IP=(n*pm*L*(pi/4)*D*D*N*k*10)/6#..........#/Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%(IP)\n", + "BP=((Nl)*pi*Db*N)/(60*1000)#...............#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%(BP)\n", + "etamech=BP/IP#...........................#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)\n", + "etath=IP/(mf*C)#.........................#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.23 PAGE 585" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake mean effective pressure = 553.38 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "etabth=0.3#....................#Brake thermal efficiency\n", + "afrw=20#........................#Air fuel ratio by weight\n", + "C=41800#.........................#Calorific value of fuel used in kJ/kg\n", + "R=287#........................#Gas constant in J/kg\n", + "#Calculations\n", + "Wp=etabth*C#...................#Work produced per kg of fuel in kJ\n", + "p1=1.0132#t=273+15#............#STP conditions in bar and Kelvin\n", + "V=(afrw*t*R)/(p1*10**5)#.......#Volume of air used in m**3\n", + "pmb=(Wp*1000)/(V*10**5)#........#Brake mean effective pressure in bar\n", + "print \"Brake mean effective pressure = %0.2f bar\"%(pmb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.24 PAGE 585" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volumetric efficiency = 85.67 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "v1=0.216#.....................#Gas consumption in m**3/min\n", + "pw=75#........................#Pressure of gas in mm of water\n", + "t1=290#......................#Temperature of gas in K\n", + "ac=2.84#....................#Air consumption in kg/min\n", + "br=745#......................#Barometer reading in m of Hg\n", + "D=0.25#.....................#Engine bore in m\n", + "L=0.475#......................#Engine stroke in m\n", + "N=240#........................#Engine rpm\n", + "R=287#......................#Gas constant for air in J/kgK\n", + "#Calculations\n", + "p1=br+(pw/13.6)#...................#Pressure of gas in mm of mercury\n", + "p2=760\n", + "t2=273#.....................#NTP conditions in mm of Hg and Kelvin\n", + "v2=(p1*v1*t2)/(t1*p2)#...............#Volume of gas used at NTP in m**3\n", + "gs=v2/(N/2)#.........................#Gas used per stroke in m**3\n", + "v=(ac*R*t2)/(1.0132*10**5)#...........#Volume occupied by air at NTP in m**3/min\n", + "aps=v/(N/2)#...........................#Air used per stroke\n", + "Va=gs+aps#.....................#Actual volume of mixture in m**3 drawn per stroke at NTP\n", + "Vs=(pi/4)*D*D*L#...............#Swept volume in mm**3\n", + "etaV=(Va/Vs)#...................#Volumetric efficiency\n", + "print \"Volumetric efficiency = %0.2f %%\"%(etaV*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.25 PAGE 586" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 26.59 kW\n", + "Brake power = 22.87 kW\n", + "Mechanical efficiency = 86.00 %\n", + "Indicated thermal efficiency = 22.79 %\n", + "Relative efficiency = 43.24 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t=1#...................#Duration of trial in hrs\n", + "Rev=14000#.............#Revolutions\n", + "nmc=500#...............#Number of missed cycles\n", + "bl=1470#................#Net Brake load in N\n", + "mep=7.5#................#Mean effective pressure in bar\n", + "gc=20000#...............#Gas consumption in litres\n", + "lcv=21#.................#LCV of gas at supply condition in kJ/litre\n", + "D=0.25#.................#Engine bore in m\n", + "L=0.4#.................#Engine stroke in m\n", + "r=6.5#..................#Compression ratio\n", + "n=1#......................#No of cylinders\n", + "Cb=4#......................#Effective brake Circumference \n", + "k=0.5#....................#Four stroke engine\n", + "ga=1.4#......................#Degree of freedom\n", + "#Calculations\n", + "N=Rev/60#..............#Engine rpm\n", + "Vg=gc/3600#.............#Fuel consumption in litres/s\n", + "Na=((Rev/2)-nmc)/60#................#Working cycles per min\n", + "IP=(n*mep*L*(pi/4)*D*D*Na*10)/6#............#indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%(IP)\n", + "BP=((bl)*Cb*N)/(60*1000)#...............#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%(BP)\n", + "etamech=BP/IP#...........................#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)\n", + "etath=IP/(Vg*lcv)#.........................#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etath*100)\n", + "etast=1-(1/r**(ga-1))#............#Air standard efficiency \n", + "etarel=etath/etast#............#Relative efficiency\n", + "print \"Relative efficiency = %0.2f %%\"%(etarel*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.26 PAGE 587" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The compression ratio : 5.58\n", + "Thermal efficiency = 19.89 %\n", + "Gas consumption = 0.96 m**3/IP hour\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=1.3#...................#Index of compression\n", + "pa=1.4#\n", + "pb=3.6#\n", + "posa=(1/4)#..........#Point a - the position 1/4 of the stroke\n", + "posb=(3/4)#..........#Point b - the position 3/4 of the stroke\n", + "ga=1.4#...............#Degree of freedom for gas\n", + "etarel=0.4#...................#Relative efficiency\n", + "C=18800#....................#Calorific value of fuel in kJ/m**3\n", + "#Calculations\n", + "r=1+((((pb/pa)**(1/n))-1)/(posb-(((pb/pa)**(1/n))*(posa))))#.........#Compression ratio\n", + "print \"The compression ratio : %0.2f\"%r\n", + "etast=1-(1/r**(ga-1))#............#Air standard efficiency \n", + "etath=etarel*etast#............#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)\n", + "v=1/(etath*C)#...............#Gas consumption per IP sec\n", + "print \"Gas consumption = %0.2f m**3/IP hour\"%(v*3600)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.27 PAGE 587" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean effective pressure developed = 6.54 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=6#.....................#No of cylinders\n", + "r=5#..................#Compression ratio\n", + "Vc=0.000115#................#Clearance volume of each cylinder in m**3\n", + "fc=10.5#.....................#Fuel consumed in kg/h\n", + "C=41800#......................#Calorific value of fuel in kJ/kg\n", + "N=2500#.......................#Engine speed in rpm\n", + "er=0.65#.......................#Efficiency ratio\n", + "ga=1.4#........................#Degree of freedom\n", + "#calculations\n", + "etast=1-(1/r**(ga-1))#...............................#Air standard efficiency\n", + "etath=etast*er#.................................#Thermal efficiency\n", + "IP=etath*(fc/3600)*C#..........................#Indicated power in kW\n", + "Wnet=(IP*(10**3)*60)/(n*(N/2))#..............#Net work froom one cycle per cylinder in N-m\n", + "Vs=(r-1)*Vc#......................#Swept volume in m**3\n", + "pm=Wnet/(Vs*10**5)#...................#Mean effective pressure developed\n", + "print \"Mean effective pressure developed = %0.2f bar\"%(pm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.28 PAGE 588" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean effective pressure = 8.11 bar\n", + "Brake mean effective pressure = 6.16 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.2#.................#Engine bore in m\n", + "L=0.25#...............#Engine stroke in m\n", + "n=2#......................#No of cylinders\n", + "r=13#......................#Compression ratio\n", + "fc=14#..................#Fuel consumption in kg/h\n", + "N=300#....................#Engine rpm\n", + "etarel=0.65#..............#Relative efficiency\n", + "etamech=0.76#.............#Mechanical efficiency\n", + "co=0.05#.....................#Cut off of the stroke\n", + "C=41800#.....................#Calorific value of fuel in kJ/kg\n", + "k=1#........................#Two stroke engine\n", + "ga=1.4#.......................#Degree of freedom\n", + "#calculations\n", + "rho=1+(co*(r-1))#\n", + "etast=1-((1/(r**(ga-1)))*(1/ga)*((rho**ga)-1)*(1/(rho-1)))#............#Air standard efficiency\n", + "etath=etarel*etast#........................#Thermal efficiency\n", + "IP=etath*(fc/3600)*C#........................#Indicated power in kW\n", + "BP=etamech*IP#................................#Brake power in kW\n", + "pmi=(6*IP)/(n*N*L*(pi/4)*D*D*k*10)#............#mean effective pressure in bar\n", + "print \"Mean effective pressure = %0.2f bar\"%(pmi)\n", + "pmb=pmi*etamech#...........................#Brake mean effective pressure in bar\n", + "print \"Brake mean effective pressure = %0.2f bar\"%(pmb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.29 PAGE 589" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The compression ratio : 6.26\n", + "Indicated thermal efficiency : 36.40 %\n", + "Brake specific fuel consumption = 0.27 kg/kWs\n", + "Engine bore = 108.20 mm\n", + "Engine stroke = 135.25 mm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=4#.................#No of cylinders\n", + "C=45200#..................#calorific value of fuel in kJ/kg\n", + "etamech=0.82#...............#Mechanical efficiency\n", + "etarel=0.7#.................#Relative efficiency\n", + "etast=0.52#...............#Air standard efficiency\n", + "etav=0.78#...............#Volumetric efficiency\n", + "sbr=1.25#...................#Stroke bore ratio\n", + "N=2400#...................#Engine rpm\n", + "p=1#.......................#Suction pressure in bar\n", + "t=298#....................#Suction temperature in bar\n", + "BP=72#...................#Brake power in kW\n", + "ga=1.4#......................#Degree of freedom\n", + "afr=16#.................#Air fuel ratio\n", + "R=287#.......................#Gas constant in J/kg\n", + "#calculations\n", + "r=(1/(1-etast))**(1/(ga-1))#............#Compression ratio\n", + "print \"The compression ratio : %0.2f\"%r\n", + "etath=etast*etarel#......................#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency : %0.2f %%\"%(etath*100)\n", + "IP=BP/etamech#....................#Indicated power in kW\n", + "mf=IP/(etath*C)#......................#Fuel consumption in kg/s\n", + "bsfc=mf/BP#......................#Brake specific fuel consumption in kg/kWs\n", + "print \"Brake specific fuel consumption = %0.2f kg/kWs\"%(bsfc*3600)\n", + "mafm=afr+1#......................#Mass of air fuel mixture in kg/kg of fuel\n", + "mafm1=mafm*mf#....................#Mass of air fuel mixture when mf amount of fuel is supplied to engine per second\n", + "v=(mafm1*R*t)/(p*10**5)#.......................#/Volume of air fuel mixture supplied to the engine in m**3\n", + "Vs=v/etav#..............................#Swept volume in m**3\n", + "D=((Vs)/((pi/4)*sbr*n*(N/(2*60))))**(1/3)#............#Engine bore in m\n", + "print \"Engine bore = %0.2f mm\"%(D*1000)\n", + "print \"Engine stroke = %0.2f mm\"%(D*1000*sbr)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.30 PAGE 589" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake power = 14.81 kW\n", + "Mechanical efficiency = 85.00 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=1#.......................#No of cylinders\n", + "D=0.18#...................#Engine bore in m\n", + "L=0.34#....................#Engine stroke in m\n", + "N=400#......................#Engine rpm\n", + "mepw=6.4#.................#Mean effective pressure of working loop in bar\n", + "mepp=0.36#..................#Mean effective pressure of pumping loop in bar\n", + "mepd=0.64#.................#Mean effective pressure (dead cycle) iin bar\n", + "fs=46#................#Firing strokes per min\n", + "#calculations\n", + "pminet=mepw-mepp#..........#Net indicated mean effective pressure in bar\n", + "dc=(N/2)-fs#...............#Dead cycles per min\n", + "IPnet=(n*pminet*(pi/4)*L*D*D*fs*4*10)/6#.............#Net indicated power output in kW\n", + "ppdc=(n*pminet*L*(pi/4)*D*D*10*dc)/6#.............#Pumping power of dead cycles in kW\n", + "FP=IPnet-ppdc#...........................#Frictional power in kW\n", + "IP=(n*pminet*L*(pi/4)*D*D*(N/2)*10)/6#...............#Indicated power in kW\n", + "BP=IP-FP#..................#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%(BP)\n", + "etamech=BP/IP#.................#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.31 PAGE 590" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical efficiency = 81.61 %\n", + "Brake thermal efficiency = 39.54 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=1#..............#No of cylinders\n", + "B=0.32#...............#Engine bore in m\n", + "L=0.42#..............#Engine stroke in m\n", + "N=200#................#Engine rpm\n", + "Nk=90#..................#No of explosions per min\n", + "v1=11.68#............#Gas used in m**3/h\n", + "pg=170#................#Pressure of gas in mm of water \n", + "br=755#................#Barometer reading in mm of Hg\n", + "pmi=6.2#.................#Mean effective pressure in bar\n", + "C=21600#.......................#Calorific value of gas in kJ/kg\n", + "bl=2040#......................#Net load on brake in N\n", + "Db=1.2#......................#Brake drum diameter in m\n", + "t1=298#.....................#Ambient temperature in Kelvin\n", + "#Calculations\n", + "IP=(n*pmi*L*(pi/4)*B*B*Nk*10)/6#..........................#Indicated power in kW\n", + "BP=(bl*pi*Db*N)/(60*1000)#.........................#Brake power in kW\n", + "etamech=(BP/IP)#...................#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)\n", + "p1=br+(pg/13.6)#.................#In mm of Hg\n", + "p2=760#t2=273#...................#NTP conditions in mm of Hg and Kelvin\n", + "v2=(p1*v1*t2)/(p2*t1)#\n", + "etabth=BP/((v2/3600)*C)#..............#Brake thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etabth*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.32 PAGE 591" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volumetric efficiency = 66.45 %\n", + "Air fuel ratio : 13.20\n", + "Mean effective pressure = 7.55 bar\n", + "Relative efficiency = 53.79 %\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "n=1#...................#No of cylinders\n", + "d=0.032#................#Diameter of circular orifice in m\n", + "Cd=0.62#.............#Co efficient of discharge\n", + "hw=150#.................#Pressure across orfice in mm of water\n", + "t=20+273#..............#Temperature of air in the room in Kelvin\n", + "p=1.0132#.................#Ambient pressure in bar\n", + "pd=0.00178#............#Piston displacement in m**3\n", + "R=287#....................#Gas constant in J/kg\n", + "r=6.5#..................#Compression ratio\n", + "fc=0.135#................#Fuel consumption in kg/min\n", + "C=43900#.................#Calorific value of fuel in kJ/kg\n", + "BP=28#................#Brake power in kW\n", + "N=2500#...................#Engine rpm\n", + "k=0.5#....................#Four stroke engine\n", + "g=9.81#.......................#Acceleration due to gravity in m/s**2\n", + "rhow=1000#....................#Density of water in kg/m**3\n", + "ga=1.4#........................#Degree of freedom\n", + "#calculations\n", + "mbyv=(p*10**5)/(R*t)#\n", + "pw=(hw/rhow)*rhow#....................#Pressure across orifice in kg/m**2\n", + "H=pw/mbyv#........................#Head of air column causing the flow in m\n", + "ma=Cd*(pi/4)*d*d*sqrt(2*g*H)#................#Air flow through orifice in m**3/s\n", + "maps=(ma*60)/(N/2)#........................#Air consumption per stroke\n", + "etav=maps/pd#.................#Volumetric efficiency\n", + "print \"Volumetric efficiency = %0.2f %%\"%(etav*100)\n", + "ac=ma*60*mbyv#...............#Mass of air drawn into cylinder per min in kg\n", + "afr=ac/fc#...................#Air fuel ratio\n", + "print \"Air fuel ratio : %0.2f\"%afr\n", + "pmb=(6*BP)/(n*pd*N*k*10)#...................#Mean effective pressure in bar\n", + "print \"Mean effective pressure = %0.2f bar\"%(pmb)\n", + "etast=1-(1/(r**(ga-1)))#...............#Air standard efficiency\n", + "etabth=BP/((fc/60)*C)#...............#Brake thermal efficiency\n", + "etarel=etabth/etast#.................#Relative efficiency\n", + "print \"Relative efficiency = %0.2f %%\"%(etarel*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.33 PAGE 591" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 7.50 kW\n", + "Brake power = 8.04 kW\n", + "Brake mean effective pressure = 6.00 bar\n", + "Brake specific fuel consumption = 0.35 kg/BP h\n", + "Brake thermal efficiency = 24.74 %\n", + "Indicated thermal efficiency = 30.92 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "N=400#.................#Engine rpm\n", + "n=1#....................#no of cylinders\n", + "W=370#.................#Load on the brake in N\n", + "S=50#..................#Spring balance readin in N\n", + "Db=1.2#.................#Diameter of the brake drum\n", + "mf=2.8#.................#Fuel consumption in kg/h\n", + "C=41800#..................#Calorific value of fuel in kJ/kg\n", + "D=0.16#...................#Engine bore in m\n", + "L=0.2#....................#Engine stroke in m\n", + "k=0.5#.....................#Four stroke engine\n", + "Sc=1#....................#Spring constant in bar/mm\n", + "l=40#....................#Length of diagram in mm\n", + "aic=300#.................#Area of indicator card in mm**2\n", + "#Calculations\n", + "pmi=aic*(Sc/l)#..................#Mean effective pressure in bar\n", + "IP=(n*pmi*L*(pi/4)*D*D*k*N*10)/6#..............#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%(pmi)\n", + "BP=((W-S)*pi*Db*N)/(60*1000)#............#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%(BP)\n", + "pmb=(BP*6)/(n*L*D*D*(pi/4)*k*N*10)#...........#Brake mean effective pressure in bar\n", + "print \"Brake mean effective pressure = %0.2f bar\"%(pmb)\n", + "bsfc=mf/BP#.................#Brake specific fuel consumption in kg/BP h\n", + "print \"Brake specific fuel consumption = %0.2f kg/BP h\"%bsfc\n", + "etabth=BP/((mf/3600)*C)#..................#Brake thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etabth*100)\n", + "etaith=IP/((mf/3600)*C)#....................#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etaith*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.34 PAGE 592" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated thermal efficiency = 27.96 %\n", + "Mean effective pressure = 8.06 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "R=287#................#Gas constant in J/kg K\n", + "n=4#...................#No of cylinders\n", + "D=0.0825#..............#Engine bore in m\n", + "L=0.13#................#Engine stroke in m\n", + "BP=28#..................#Brake power in kW\n", + "N=1500#.................#Engine rpm\n", + "afrth=14.8#...............#theoretical air fuel ratio \n", + "C=45980#..................#Calorific value of fuel in kJ/kg\n", + "etamech=0.9#.............#Mechanical efficiency\n", + "ap=70#..................#Percentage of Volume of air in he cylinder\n", + "fr=20#..................#Percentage richness of the fuel\n", + "p1=1.0132#.................#Ambient pressure in bar\n", + "pc=762#...................#Pressure in the cylinder in mm of Hg \n", + "tc=273+15.5#...............#Temperature in the cylinder in Kelvin\n", + "k=0.5#..................#Four stroke engine\n", + "#Calculations\n", + "Vs=(pi/4)*D*D*L#.......................#Swept volume in m**3\n", + "va=(ap/100)*Vs#.....................#Volume of air drawn in m**3\n", + "p=(pc/760)*p1#\n", + "m=(p*(10**5)*va)/(R*tc)#...................#Mass of air per stroke per cylinder\n", + "tmau=m*(N/2)*n#...................#Theoretical mass of air used per minute in kg\n", + "tmfu=tmau/afrth#..................#Theoretical mass of fyel used per min in kg\n", + "mf=(tmfu/60)*((100+fr)/100)#...............#Mass of fuel burnt per second in kg\n", + "IP=BP/etamech#.........................#Indicated power in kW\n", + "etaith=IP/(mf*C)#.....................#Indicated thermal efficiency \n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etaith*100)\n", + "pmb=(BP*6)/(n*L*D*D*(pi/4)*N*10*k)#...............#Mean effective pressure in bar\n", + "print \"Mean effective pressure = %0.2f bar\"%(pmb)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.35 PAGE 593" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 13.44 kW\n", + "Brake power = 10.76 kW\n", + "Indicated thermal efficiency = 23.87 %\n", + "Brake thermal efficiency = 19.11 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=1#..................#No of cylinders\n", + "D=0.2#............#Engine bore in m\n", + "L=0.4#..............#Engine stroke in m\n", + "Nt=9400#...............#Total no of revolutions \n", + "Ne=4200#...............#Total no of explosions\n", + "t=40#...................#Duration of testing in min\n", + "Nk=Ne/t#...............#No of explosions\n", + "bl=540#...............#Brake load in N\n", + "Db=1.6#.................#Diameter of brake wheel in m\n", + "d=0.02#................#Diameter of rope in m\n", + "gu=8.5#..................#Gas used in m**3/sec\n", + "C=15900#...............#Calorific value of fuel in kJ/kg\n", + "Vg=(gu/(t*60))#.................#Volume of gas used in m**3/sec\n", + "aic=550#.....................#Area of indicator diagram mm**2\n", + "l=72#.......................#Length of indicator diagram in mm\n", + "s=0.8#.....................#Spring number in bar/mm\n", + "#calculations\n", + "pmi=(aic*s)/l#................#Mean effective pressure in bar\n", + "IP=(n*pmi*L*D*D*(pi/4)*Nk*10)/6#............#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%(IP)\n", + "BP=(bl*pi*(Db+d)*(Nt/t))/(60*1000)#...............#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%(BP)\n", + "etaith=IP/(Vg*C)#...............#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etaith*100)\n", + "etabth=BP/(Vg*C)#...............#Brake thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etabth*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.36 PAGE 594" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake mean effective pressure = 3.97 bar\n", + "Brake specific fuel consumption = 0.30 kg/kWh\n", + "Brake thermal efficiency = 26.38 %\n", + "Volumetric efficiency = 61.01 %\n", + "Percentage of excess air supplied : 43.76\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=6#....................#No of cylinders\n", + "D=0.125#................#Engine bore in m\n", + "L=0.125#...............#Engine stroke in m\n", + "N=2400#.................#Engine rpm\n", + "W=490#...............#Load on the dynamometer in N\n", + "CD=16100#...............#Dynamometer constant\n", + "d0=0.055#...................#Air orifice diameter in m\n", + "Cd=0.66#...................#Co efficient of discharge\n", + "hw=310#.................#Head causing flow through prifice in mm of water\n", + "br=760#................#Barometer reading in mm of Hg\n", + "t=298#..................#Ambient temperature in Kelvin\n", + "fc=22.1#..................#Fuel consumption per hour in kg\n", + "C=45100#..................#Calorific value of fuel used in kJ/kg\n", + "perc=85#...................#Percentage of carbon in the fuel\n", + "perh=15#...................#Percentage of hydrogen in the fuel\n", + "p1=1.013#....................#Pressure of air at the end of suction stroke in bar\n", + "t1=298#......................#Temperature of air the the end of suction stroke in Kelvin\n", + "k=0.5#.......................#Four stroke engine\n", + "R=287#.......................#Gas constant in J/kgK\n", + "#calculations\n", + "BP=W*(N/CD)#................#Brake power in kW\n", + "pmb=(BP*6)/(L*D*D*k*10*N*n*(pi/4))#................#Brake mean effective pressure in bar\n", + "print \"Brake mean effective pressure = %0.2f bar\"%(pmb)\n", + "bsfc=fc/BP#.......................#Brake specific fuel consumption in kg/kWh\n", + "print \"Brake specific fuel consumption = %0.2f kg/kWh\"%(bsfc)\n", + "etathb=BP/((fc/3600)*C)#......................#Brake thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etathb*100)\n", + "Vst=(pi/4)*D*D*L#..............#Stroke volume in m**3\n", + "Val=840*(pi/4)*d0*d0*Cd*sqrt((hw/10)/((p1*10**5)/(R*t1)))#............#Volume of air passing through orifice of air box per min\n", + "Vac=Val/n#.........................#Actual volume of air per cylinder in m**3/min\n", + "asps=Vac/(N/2)#.......................#Air supplied per stroke per cylinder in m**3\n", + "etav=asps/Vst#....................#Volumetric efficiency\n", + "print \"Volumetric efficiency = %0.2f %%\"%(etav*100)\n", + "Qa=(100/23)*(((perc/100)*(8/3))+((perh/100)*(8/1)))#.....................#Quantity of air required per kg of fuel combustion\n", + "aqas=(Val*((p1*10**5)/(R*t1))*60)/fc#....................#Actual quantity of air supplied per kg of fuel\n", + "pe=(aqas-Qa)/Qa#....................#Fraction of excess air supplied to engine\n", + "print \"Percentage of excess air supplied : %0.2f\"%(pe*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.37 PAGE 595" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical efficiency = 77.28 %\n", + "Brake thermal efficiency = 23.26 %\n", + "HEAT BALANCE TABLE : \n", + "_______________________________________________________________________\n", + "Item kJ Percent\n", + "_______________________________________________________________________\n", + "Heat supplied by fuel 367840 100.00\n", + "Heat absorbed in IP 110694 30.09\n", + "Heat taken away by cooling water 59774 16.25\n", + "Heat carried away by exhaust gases 197371 53.66\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=1#......................#No of cylinders\n", + "D=0.3#....................#Engine bore in m\n", + "L=0.45#....................#Engine stroke in m\n", + "mf=8.8#...................#Fuel consumption in kg/h\n", + "C=41800#...................#Calorific value of fuel in kJ/kg\n", + "N=200#....................#Engine rpm\n", + "pmi=5.8#....................#Mean effective pressure in bar\n", + "bl=1860#....................#Brake load in N\n", + "Db=1.22#...................#Diameter of brake drum in m\n", + "k=0.5#........................#four stroke engine\n", + "mw=650#......................#Mass of cooling water in kg\n", + "cpw=4.18#....................#Specific heat capacity of water\n", + "delt=22#......................#Temperature rise\n", + "#Calculations\n", + "IP=(n*L*D*D*k*10*pmi*N*(pi/4))/6#...............#Indicated power in kW\n", + "BP=(bl*pi*Db*N)/(60*1000)#..................#Brake power in kW\n", + "etamech=BP/IP#............#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)\n", + "etathb=BP/((mf/3600)*C)#...................#Brake thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etathb*100)\n", + "#Heat supplied\n", + "hip=IP*3600#...........#Heat equivalent of IP in kJ/h\n", + "hcw=mw*cpw*delt#..........#Heat carried away by cooling water\n", + "hf=mf*C#................#heat supplied by fuel\n", + "hex=hf-hip-hcw#..........#Heat carried by exhaust gasses\n", + "pf=100#\n", + "pip=(hip/hf)*100#\n", + "pcw=(hcw/hf)*100#\n", + "pex=(hex/hf)*100\n", + "print \"HEAT BALANCE TABLE : \"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Item kJ Percent\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Heat supplied by fuel %d %0.2f\"%(hf,pf)\n", + "print \"Heat absorbed in IP %d %0.2f\"%(hip,pip)\n", + "print \"Heat taken away by cooling water %d %0.2f\"%(hcw,pcw)\n", + "print \"Heat carried away by exhaust gases %d %0.2f\"%(hex,pex)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.38 PAGE 596" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Brake power = 37.01 kW\n", + "Brake specific fuel consumption = 0.28 kg/kWh:\n", + "Brake thermal efficiency = 29.76 %\n", + "HEAT BALANCE TABLE:\n", + "_______________________________________________________________________\n", + "Item kJ Percent\n", + "_______________________________________________________________________\n", + "Heat supplied by fuel 7461 100.00\n", + "Heat absorbed in BP 2220 29.76\n", + "Heat taken away by cooling water 2332 31.26\n", + "Heat carried away by exhaust gases 1811 24.28\n", + "Unaccounted heat 1097 14.70\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=15#................#Compression ratio\n", + "n=1#...................#No of cylinders\n", + "mf=10.2#..................#Fuel consumption in kg/h\n", + "C=43890#.................#Calorific value of fuel in kJ/kg\n", + "ma=3.8#.................#Consumption of air in kg/min\n", + "N=1900#...................#Engine rpm\n", + "T=186#....................#Torque on brake drum in Nm\n", + "mw=15.5#.................#Mass of cooling water used in kg/min\n", + "delt=36#..................#temperature rise\n", + "tg=410#..................#Exhaust gas temperature in Celsius\n", + "tr=20#...................#Room temperature in Celsius\n", + "cp=1.17#.................#Specific heat capacity for exhaust gases kJ/kgK\n", + "cpw=4.18#..................#Specific heat capacity for water in kJ/kgK\n", + "#calculations\n", + "BP=(2*pi*N*T)/(60*1000)#................#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%BP\n", + "bsfc=mf/BP#.............................#Brake specific fuel consumption in kg/kWh\n", + "print \"Brake specific fuel consumption = %0.2f kg/kWh:\"%bsfc\n", + "etabth=BP/((mf/3600)*C)#....................#Brake thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etabth*100)\n", + "#Heat supplied\n", + "mg=(mf/60)+ma#....................#Mass of exhaust gases in kg/min\n", + "hbp=BP*60#...........#Heat equivalent of BP in kJ/min\n", + "hcw=mw*cpw*delt#..........#Heat carried away by cooling water\n", + "hf=(mf/60)*C#................#heat supplied by fuel\n", + "hex=mg*cp*(tg-tr)#..........#Heat carried by exhaust gasses\n", + "ha=round(hf)-round(hbp+hex+hcw)#............#Unaccounted heat\n", + "pf=100#\n", + "pbp=(hbp/hf)*100#\n", + "pcw=(hcw/hf)*100#\n", + "pex=(hex/hf)*100#\n", + "pa=(ha/hf)*100#\n", + "print \"HEAT BALANCE TABLE:\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Item kJ Percent\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Heat supplied by fuel %d %0.2f\"%(hf,pf)\n", + "print \"Heat absorbed in BP %d %0.2f\"%(hbp,pbp)\n", + "print \"Heat taken away by cooling water %d %0.2f\"%(hcw,pcw)\n", + "print \"Heat carried away by exhaust gases %d %0.2f\"%(hex,pex)\n", + "print \"Unaccounted heat %d %0.2f\"%(ha,pa)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.39 PAGE 597" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 15.91 kW\n", + "Brake power = 11.73 kW\n", + "HEAT BALANCE TABLE\n", + "_______________________________________________________________________\n", + "Item kJ Percent\n", + "_______________________________________________________________________\n", + "Heat supplied by fuel 66728 100.000000\n", + "Heat absorbed in IP 19088 28.606158\n", + "Heat taken away by cooling water 16929 25.370159\n", + "Heat carried away by dry exhaust gases 13448 20.154897\n", + "Heat carried away by steam in exhaust gases 6606 9.901049\n", + "Unaccounted heat 10655 15.967810\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Cpw=4.18#..............#Specific heat of water in kJ/kgK\n", + "n=1#................#No of cylinders\n", + "N=350#.......#Engine rpm\n", + "pmi=3.1#..........#Mean effective pressure in bar\n", + "bl=640#..........#Brake load in N\n", + "mf=1.52#............#Fuel consumption in kg\n", + "mw=162#..............#Mass of cooling water\n", + "tw1=30#...............#Water inlet temperature in C\n", + "tw2=55#................#Water outlet temperature in C\n", + "ma=32#..................#Mass of air used per kg of fuel in kg\n", + "tr=25#.................#Room temperature in C\n", + "tg=305#.................#Exhaust temperature in C\n", + "D=0.2#.................#Engine bore in m\n", + "L=0.28#.................#Engine stroke in m\n", + "Db=1#......................#Brake drum diameter in m\n", + "ms=1.4#......................#Mass of steam formed per kg of fuel exhaust in kg\n", + "C=43900#...................#Calorirfic value of fuel in kJ/kg\n", + "Cps=2.09#..................#Specific heat of steamm in exhaust in kJ/kgK\n", + "Cpg=1.0#...................#Specific heat of dry exhaust gases in kJ/kgK\n", + "k=1#....................#Two stroke engiine\n", + "t=20#.....................#Duration of testing in min\n", + "#Calculations\n", + "IP=(n*pmi*N*D*D*L*k*10*(pi/4))/6#...................#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%IP\n", + "BP=(bl*pi*Db*N)/(60*1000)#......................#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%BP\n", + "#Heat supplied\n", + "hf=mf*C#................#heat supplied by fuel\n", + "hip=IP*60*t#...........#Heat equivalent of BP in kJ/min\n", + "hcw=mw*Cpw*(tw2-tw1)#..........#Heat carried away by cooling water\n", + "mg=mf+(ma*mf)#....................#Mass of exhaust gases in kg/min\n", + "mst=mf*ms#..................#Mass of steam formed\n", + "hg=(mg-mst)*Cpg*(tg-tr)#..........#Heat carried by exhaust gasses\n", + "hst=mst*(417.5+2257.9+(Cps*(305-99.6)))#....................#Heat carried by exhaust steam, the obtained values are from steam table and hence are constants at NTP\n", + "ha=round(hf)-round(hip+hg+hst+hcw)#............#Unaccounted heat\n", + "pf=100#\n", + "pip=(hip/hf)*100#\n", + "pcw=(hcw/hf)*100#\n", + "pg=(hg/hf)*100#\n", + "pa=(ha/hf)*100#\n", + "pst=(hst/hf)*100#\n", + "print \"HEAT BALANCE TABLE\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Item kJ Percent\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Heat supplied by fuel %d %f\"%(hf,pf)\n", + "print \"Heat absorbed in IP %d %f\"%(hip,pip)\n", + "print \"Heat taken away by cooling water %d %f\"%(hcw,pcw)\n", + "print \"Heat carried away by dry exhaust gases %d %f\"%(hg,pg)\n", + "print \"Heat carried away by steam in exhaust gases %d %f\"%(hst,pst)\n", + "print \"Unaccounted heat %d %f\"%(ha,pa)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.40 PAGE 598" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volumetric efficiency = 68.49 %\n", + "Brake mean effective pressure = 5.14 bar\n", + "Engine torque = 269.63 N-m\n", + "Brake specific fuel consumption = 0.27 kg/kWh\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=6#................#No of cylinders\n", + "D=0.1#...............#Engine bore in m\n", + "L=0.14#...............#Engine stroke in m\n", + "N=2500#...............#Engine rpm\n", + "k=0.5#..................#Four stroke\n", + "bl=480#.................#Brake load in N\n", + "br=76#..................#Barometer reading in cm of Hg\n", + "d0=3.3/100#..............#Orifice diameter in m\n", + "Cd=0.62#.................#Co efficient of discharge of orifice\n", + "pd=14#...................#Pressure drop across orifice in cm of Hg\n", + "tr=25#...............#Room temperature in C\n", + "mf=0.32#................#Fuel consumption in kg/min\n", + "rhohg=13600#.................#Density of Hg in kg/m**3\n", + "R=0.287#...................#gas constant in kJ/kgK\n", + "g=9.81#.................#Acceleration due to gravity in m/s**2\n", + "CD=17000#....................#dynamometer constant\n", + "#Calculations\n", + "Vs=(pi/4)*D*D*L*(N/2)*(n/60)#..............#Swept volume in m**3\n", + "br1=(br/100)*rhohg*g*(10**-3)#.............#Barometer reading into kN/m**2\n", + "rhoa=br1/(R*(tr+273))#...............#Density of air\n", + "pd1=(pd/100)*rhohg*g#......................#Conversion of pd into N/m**2\n", + "ha=pd1/(rhoa*g)#.......................#Head of air causing flow in m\n", + "Va=Cd*(pi/4)*d0*d0*sqrt(2*g*ha)#............#Volume of air passing through orifice of air box per min\n", + "etav=Va/Vs#....................#Volumetric efficiency\n", + "print \"Volumetric efficiency = %0.2f %%\"%(etav*100)\n", + "BP=bl*(N/CD)#................#Brake power in kW\n", + "pmb=(BP*6)/(L*D*D*k*10*N*n*(pi/4))#................#Brake mean effective pressure in bar\n", + "print \"Brake mean effective pressure = %0.2f bar\"%(pmb)\n", + "T=(BP*60*1000)/(2*pi*N)#....................#Engine torque in N-m\n", + "print \"Engine torque = %0.2f N-m\"%T\n", + "bsfc=(mf*60)/BP#.......................#Brake specific fuel consumption in kg/kWh\n", + "print \"Brake specific fuel consumption = %0.2f kg/kWh\"%bsfc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.41 PAGE 598" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 14.06 kW\n", + "Indicated thermal efficiency = 26.85 %\n", + "HEAT BALANCE TABLE\n", + "_______________________________________________________________________\n", + "Item kJ Percent\n", + "_______________________________________________________________________\n", + "Heat supplied by fuel 3141.79 100.00\n", + "Heat equivalent of BP 659.73 29.76\n", + "Heat taken away by cooling water 862.12 25.37\n", + "Heat carried away by dry exhaust gases 782.78 20.15\n", + "Heat carried away by steam in exhaust gases 294.85 9.90\n", + "Unaccounted heat 543.00 15.97\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Cpw=4.18#..............#Specific heat of water in kJ/kgK\n", + "n=1#................#No of cylinders\n", + "N=350#.......#Engine rpm\n", + "pmi=2.74#..........#Mean effective pressure in bar\n", + "bl=600#..........#Brake load in N\n", + "mf=4.22#............#Fuel consumption in kg\n", + "mw=495#..............#Mass of cooling water\n", + "tw1=13#...............#Water inlet temperature in C\n", + "tw2=38#................#Water outlet temperature in C\n", + "ma=135#..................#Mass of air used in kg/h\n", + "tr=20#.................#Room temperature in C\n", + "tg=370#.................#Exhaust temperature in C\n", + "D=0.2#.................#Engine bore in m\n", + "L=0.28#.................#Engine stroke in m\n", + "Db=1#......................#Brake drum diameter in m\n", + "C=44670#...................#Calorirfic value of fuel in kJ/kg\n", + "Cps=2.093#..................#Specific heat of steamm in exhaust in kJ/kgK\n", + "Cpg=1.005#...................#Specific heat of dry exhaust gases in kJ/kgK\n", + "k=1#....................#Two stroke engiine\n", + "t=60#.....................#Duration of testing in min\n", + "perh=15#.................#Percentage of H2 in the fuel\n", + "#Calculations\n", + "IP=(n*pmi*N*D*D*L*k*10*(pi/4))/6#...................#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%IP\n", + "BP=(bl*pi*Db*N)/(60*1000)#......................#Brake power in kW\n", + "etaith=(IP)/((mf/3600)*C)#.................#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etaith*100)\n", + "#Heat supplied\n", + "hf=(mf/t)*C#................#heat supplied by fuel\n", + "hbp=BP*t#...........#Heat equivalent of BP in kJ/min\n", + "hcw=(mw/60)*Cpw*(tw2-tw1)#..........#Heat carried away by cooling water\n", + "mg=(mf+ma)/t#....................#Mass of exhaust gases in kg/min\n", + "mst=9*(perh/100)*(mf/60)#..................#Mass of steam formed\n", + "mdg=mg-mst#..............................#Mass of dry exhaust gases per min\n", + "hg=(mdg)*Cpg*(tg-tr)#..........#Heat carried by exhaust gasses\n", + "hst=mst*(417.5+2257.9+(Cps*(305-99.6)))#....................#Heat carried by exhaust steam, the obtained values are from steam table and hence are constants at NTP\n", + "ha=round(hf)-round(hbp+hg+hst+hcw)#............#Unaccounted heat\n", + "pf=100#pbp=(hbp/hf)*100#pcw=(hcw/hf)*100#pg=(hg/hf)*100#pa=(ha/hf)*100#pst=(hst/hf)*100#\n", + "print \"HEAT BALANCE TABLE\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Item kJ Percent\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Heat supplied by fuel %0.2f %0.2f\"%(hf,pf)\n", + "print \"Heat equivalent of BP %0.2f %0.2f\"%(hbp,pbp)\n", + "print \"Heat taken away by cooling water %0.2f %0.2f\"%(hcw,pcw)\n", + "print \"Heat carried away by dry exhaust gases %0.2f %0.2f\"%(hg,pg)\n", + "print \"Heat carried away by steam in exhaust gases %0.2f %0.2f\"%(hst,pst)\n", + "print \"Unaccounted heat %0.2f %0.2f\"%(ha,pa)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.42 PAGE 599" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 17.38 kW\n", + "Brake power = 0.32 kW\n", + "HEAT BALANCE TABLE : \n", + "_______________________________________________________________________\n", + "Item kJ Percent\n", + "_______________________________________________________________________\n", + "Heat supplied by fuel 3146 100.00\n", + "Heat absorbed in IP 1043 28.61\n", + "Heat taken away by cooling water 870 25.37\n", + "Heat carried away by dry exhaust gases 877 20.15\n", + "Heat carried away by steam in exhaust gases 319 9.90\n", + "Unaccounted heat 35 15.97\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Cpw=4.18#..............#Specific heat of water in kJ/kgK\n", + "n=1#................#No of cylinders\n", + "N=350#.......#Engine rpm\n", + "pmi=2.8#..........#Mean effective pressure in bar\n", + "bl=590#..........#Brake load in N\n", + "mf=4.3#............#Fuel consumption in kg\n", + "mw=500#..............#Mass of cooling water\n", + "tw1=25#...............#Water inlet temperature in C\n", + "tw2=50#................#Water outlet temperature in C\n", + "ma=33#..................#Mass of air used per kg of fuel in kg\n", + "tr=25#.................#Room temperature in C\n", + "tg=400#.................#Exhaust temperature in C\n", + "D=0.22#.................#Engine bore in m\n", + "L=0.28#.................#Engine stroke in m\n", + "Db=1#......................#Brake drum diameter in m\n", + "C=43900#...................#Calorirfic value of fuel in kJ/kg\n", + "Cps=2.09#..................#Specific heat of steamm in exhaust in kJ/kgK\n", + "Cpg=1.0#...................#Specific heat of dry exhaust gases in kJ/kgK\n", + "k=1#....................#Two stroke engiine\n", + "perh=15#...................#Percentage of hydrogen\n", + "#Calculations\n", + "IP=(n*pmi*N*D*D*L*k*10*(pi/4))/6#...................#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%IP\n", + "BP=(bl*pi*Db*N)/(60*1000)#......................#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%B\n", + "#Heat supplied\n", + "hf=(mf/60)*C#................#heat supplied by fuel\n", + "hip=IP*60#...........#Heat equivalent of BP in kJ/min\n", + "hcw=(mw/60)*Cpw*(tw2-tw1)#..........#Heat carried away by cooling water\n", + "mg=(mf+(mf*ma))/60#....................#Mass of exhaust gases in kg/min\n", + "mst=9*(perh/100)*(mf/60)#..................#Mass of steam formed\n", + "mdg=mg-mst#..............................#Mass of dry exhaust gases per min\n", + "hg=(mdg)*Cpg*(tg-tr)#..........#Heat carried by exhaust gasses\n", + "hst=mst*(417.5+2257.9+(Cps*(400-99.6)))#....................#Heat carried by exhaust steam, the obtained values are from steam tables at NTP\n", + "mg=mf+(ma*mf)#....................#Mass of exhaust gases in kg/min\n", + "ha=round(hf)-round(hip+hg+hst+hcw)#............#Unaccounted heat\n", + "pf=100#pip=(hip/hf)*100#pcw=(hcw/hf)*100#pg=(hg/hf)*100#pa=(ha/hf)*100#pst=(hst/hf)*100#\n", + "print \"HEAT BALANCE TABLE : \"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Item kJ Percent\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Heat supplied by fuel %d %0.2f\"%(hf,pf)\n", + "print \"Heat absorbed in IP %d %0.2f\"%(hip,pip)\n", + "print \"Heat taken away by cooling water %d %0.2f\"%(hcw,pcw)\n", + "print \"Heat carried away by dry exhaust gases %d %0.2f\"%(hg,pg)\n", + "print \"Heat carried away by steam in exhaust gases %d %0.2f\"%(hst,pst)\n", + "print \"Unaccounted heat %d %0.2f\"%(ha,pa)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.43 PAGE 600" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HEAT BALANCE TABLE: \n", + "_______________________________________________________________________\n", + "Item kJ Percent\n", + "_______________________________________________________________________\n", + "Heat supplied by fuel 7951 100.00\n", + "Heat absorbed in BP 3073 29.76\n", + "Heat taken away by cooling water 2544 25.37\n", + "Heat carried away by exhaust gases 1745 20.15\n", + "Unaccounted heat 589 15.97\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "I=210#.....................#Output of generator in A\n", + "V=200#.....................#Generator voltage in V\n", + "etag=0.82#.................#Generator efficiency \n", + "mf=11.2#....................#Fuel used in kg/h\n", + "C=42600#.......................#Calorific value of fuel in kJ/kg\n", + "afr=18#....................#Air fuel ratio\n", + "mc=580#.....................#Mass of water through calorimeter in kg/h\n", + "delt=36#....................#Temperature raise in C\n", + "tg=98#........................#Temperature of exhaust in C\n", + "ta=20#.......................#Ambient temperature in C\n", + "phcw=0.32#.....................#Heat lost to cooling jacket is 32% of heat supplied\n", + "cpe=1.05#...................#Specific heat of exhause gases in kJ/kgK\n", + "cpw=4.18#...................#Specific heat of water in kJ/kgK\n", + "#Calculations\n", + "pow=V*I#......................#Total power generated in W\n", + "BP=(pow/1000)/etag#..................#Brake power in kW\n", + "hf=(mf/60)*C#...................#Heat supplied to the engine\n", + "hbp=BP*60#.........................#Heat equivalent of BP\n", + "mg=(mf/60)*(afr+1)#...............#Mass of exhaust gases formed per min in kg\n", + "hg=((mc/60)*cpw*(delt))+(mg*cpe*(tg-ta))#..........#Heat carried by exhaust gases per min\n", + "hcw=phcw*hf#...................#Heat lost to cooling jacket\n", + "ha=hf-(hcw+hg+hbp)#...................#Unaccounted heat\n", + "pf=100#pbp=(hbp/hf)*100#pcw=(hcw/hf)*100#pg=(hg/hf)*100#pa=(ha/hf)*100\n", + "print \"HEAT BALANCE TABLE: \"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Item kJ Percent\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Heat supplied by fuel %d %0.2f\"%(hf,pf)\n", + "print \"Heat absorbed in BP %d %0.2f\"%(hbp,pbp)\n", + "print \"Heat taken away by cooling water %d %0.2f\"%(hcw,pcw)\n", + "print \"Heat carried away by exhaust gases %d %0.2f\"%(hg,pg)\n", + "print \"Unaccounted heat %d %0.2f\"%(ha,pa)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.44 PAGE 601" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "HEAT BALANCE TABLE : \n", + "_______________________________________________________________________\n", + "Item kJ Percent\n", + "_______________________________________________________________________\n", + "Heat supplied by fuel 8745 100.00\n", + "Heat absorbed in BP 3056 34.95\n", + "Heat lost by FP 658 7.53\n", + "Heat taken away by cooling water 2612 29.87\n", + "Heat carried away by dry exhaust gases 1569 20.71\n", + "Heat carried away by steam in exhaust gases 795 9.10\n", + "Unaccounted heat -189 -2.17\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.34#..............#Engine bore in m\n", + "k=0.5#...............#Four stroke engine\n", + "n=1#..................#No of cylinders\n", + "L=0.44#................#Engine stroke in m\n", + "Ne=400#................#Engine rpm\n", + "aic=465#..............#Area of indicator diagram in mm**2\n", + "l=60#..................#Length of diagram in mm\n", + "s=0.6#...............#Spring constant in bar/mm\n", + "W=950#.................#Load of dynamometer in N\n", + "CD=7460#................#Dynamometer constant\n", + "mf=10.6#................#Fuel used in kg/h\n", + "Ca=49500#.................#Calorific value of fuel in kJ/kg\n", + "mw=25#...................#Cooling water circulated in kg/min\n", + "cpw=4.18#..................#Specific heat capacity of water in kJ/kgC\n", + "delt=25#..................#Rise in temperature of water\n", + "#Mass analysis of fuel\n", + "C=84#..................#Percentage of carbon\n", + "H=15#..................#Percentage of hydrogen\n", + "In=1#..................#Percentage of incombustible\n", + "#Volume analysis of exhaust gases\n", + "CO2=9#..................#Percentage of caron dioxide\n", + "O=10#..................#Percentage of oxygen\n", + "N=81#..................#Percentage of nitrogen\n", + "tg=400#................#Temperature of exhaust gases in C\n", + "cpg=1.05#..............#Specific heat of exhaust gases in kJ/kgC\n", + "tr=25#.................#Temperature of room in C\n", + "ppst=0.03#..............#Partial pressure of steam in exhaust gases in bar\n", + "cpst=2.1#.................#Specific heat of superheated steam in kJ/kgC\n", + "#Calculations\n", + "pmi=(aic*s)/l#................#Mean effective pressure in bar\n", + "IP=(n*pmi*L*D*D*k*10*Ne*(pi/4))/6#...............#Indicated power in kW\n", + "BP=(W*Ne)/CD#.......................#Brake power in kW\n", + "FP=IP-BP#...........................#Frictional power in kW\n", + "hf=(mf/60)*Ca#...................#Heat supplied in kJ per min\n", + "hbp=BP*60#.....................#Heat equivalent of Brake power in kW\n", + "hfp=FP*60#......................#heat equivalent of frictional power in kW\n", + "hcw=mw*cpw*delt#..................#Heat carried away by cooling water\n", + "ma1=(N*C)/(33*(CO2))#...........#Mass of air supplied per kg of fuel\n", + "mg1=ma1+1#.......................#Mass of exhaust gases per kg of fuel\n", + "mg=mg1*(mf/60)#.................#Mass of exhaust gas formed per min\n", + "mst1=9*(H/100)#.................#Mass of steam formed per kg of fuel\n", + "mst=mst1*(mf/60)#..................#Mass of steam formed per min\n", + "mdg=mg-mst#.......................#Mass of dry exhaust gas \n", + "Hex=mdg*cpg*(tg-tr)#...............#Heat carried by exhaust gases\n", + "hst=(2545.5+(cpst*(tg-24.1)))*mst#................#Heat carried by steam in exhaust gases in kJ/kg.....The values are from steam tables corresponding to the partial pressure 0.03 and temperature 400 Celsius\n", + "ha=hf-(hbp+hfp+hcw+hex+hst)#.....................#Unaccounted heat\n", + "pf=100#\n", + "pbp=(hbp/hf)*100#\n", + "pfp=(hfp/hf)*100#\n", + "pcw=(hcw/hf)*100#\n", + "pex=(hex/hf)*100#\n", + "pa=(ha/hf)*100#\n", + "pst=(hst/hf)*100#\n", + "print \"HEAT BALANCE TABLE : \"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Item kJ Percent\"\n", + "print \"_______________________________________________________________________\"\n", + "print \"Heat supplied by fuel %d %0.2f\"%(hf,pf)\n", + "print \"Heat absorbed in BP %d %0.2f\"%(hbp,pbp)\n", + "print \"Heat lost by FP %d %0.2f\"%(hfp,pfp)\n", + "print \"Heat taken away by cooling water %d %0.2f\"%(hcw,pcw)\n", + "print \"Heat carried away by dry exhaust gases %d %0.2f\"%(Hex,pex)\n", + "print \"Heat carried away by steam in exhaust gases %d %0.2f\"%(hst,pst)\n", + "print \"Unaccounted heat %d %0.2f\"%(ha,pa)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.45 PAGE 602" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mechanical efficiency = 83.29 %\n", + "Indicated thermal efficiency = 13.44 %\n", + "Air standard efficiency = 49.13 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=4#........................#No of cylinders\n", + "ga=1.4#...................#Degree of freedom\n", + "D=0.075#..................#Engine bore in m\n", + "L=0.1#...................#Engine stroke in m\n", + "mf=6#.......................#Fuel consumption in kg/h\n", + "C=83600#..................#Calorific value of fuel used\n", + "Vc=0.0001#.................#Clearence volume in m**3\n", + "BP=15.6#.................#Brake power wilh all cylinder working in kW\n", + "BP1=11.1#...................#Brake power wilh cylinder no 1 cutout in kW\n", + "BP2=11.03#...................#Brake power wilh cylinder no 2 cutout in kW\n", + "BP3=10.88#...................#Brake power wilh cylinder no 3 cutout in kW\n", + "BP4=10.66#...................#Brake power wilh cylinder no 4 cutout in kW\n", + "#Calculations\n", + "IP1=BP-BP1#...........................#Indicated power produced in cylinder 1 in kW\n", + "IP2=BP-BP2#...........................#Indicated power produced in cylinder 2 in kW\n", + "IP3=BP-BP3#...........................#Indicated power produced in cylinder 3 in kW\n", + "IP4=BP-BP4#...........................#Indicated power produced in cylinder 4 in kW\n", + "IP=IP1+IP2+IP3+IP4#.............................#Total Indicated power produced in kW\n", + "etamech=BP/IP#..............................#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)\n", + "etaith=IP/((mf/3600)*C)#.....................#Indicated thermal efficiency\n", + "print \"Indicated thermal efficiency = %0.2f %%\"%(etaith*100)\n", + "Vs=(pi/4)*D*D*L#..........................#Stroke volume in m**3\n", + "r=(Vs+Vc)/Vc#................................#Compression ratio\n", + "etast=1-(1/(r**(ga-1)))#...........................#Air standard efficiency\n", + "print \"Air standard efficiency = %0.2f %%\"%(etast*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 17.46 PAGE 603" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engine torque = 59.20 Nm:\n", + "Brake mean effective pressure = 7.31 bar\n", + "Brake thermal efficiency = 21.31 %\n", + "Specific fuel consumption = 0.38 kg/kWh\n", + "Mechanical efficiency = 76.56 %\n", + "Indicated mean effective pressure = 9.55 bar \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=4#..........................#No of cylinders\n", + "D=0.06#......................#Engine bore in m\n", + "L=0.09#.......................#Engine stroke in m\n", + "N=2800#.......................#Engine rpm\n", + "Ta=0.37#.......................#Length of torque arm in m\n", + "spgr=0.74#.....................#Specific graviy of fuel \n", + "fc=8.986#......................#Fuel consumption in ltrs/h\n", + "mf=fc*spgr#.....................#Fuel consumed in kg/h\n", + "C=44100#......................#Calorific value of fuel in kJ/kg\n", + "BPnl=160#.................#Net brake load in N\n", + "BP1=110#...................#Brake load with cylinder no 1 cutout in N\n", + "BP2=107#...................#Brake load with cylinder no 2 cutout in N\n", + "BP3=104#...................#Brake load with cylinder no 3 cutout in N\n", + "BP4=110#...................#Brake load with cylinder no 4 cutout in N\n", + "k=0.5#.....................#Four stroke engine\n", + "#Calculations\n", + "T=BPnl*Ta#.......................#Engine torque in N-m\n", + "print \"Engine torque = %0.2f Nm:\"%T\n", + "BP=(2*pi*N*T)/(60*1000)#..........................#Brake power in kW\n", + "pmb=(BP*6)/(n*D*D*L*N*10*(pi/4)*k)#...................#Brake mean effective pressure in bar\n", + "print \"Brake mean effective pressure = %0.2f bar\"% pmb\n", + "etabth=BP/((mf/3600)*C)#...........................#Brake thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\"%(etabth*100)\n", + "sfc=mf/BP#.......................#Specific fuel consumption in kg/kWh\n", + "print \"Specific fuel consumption = %0.2f kg/kWh\"%sfc\n", + "IP1=BPnl-BP1#...........................#Indicated power produced in cylinder 1 in kW\n", + "IP2=BPnl-BP2#...........................#Indicated power produced in cylinder 2 in kW\n", + "IP3=BPnl-BP3#...........................#Indicated power produced in cylinder 3 in kW\n", + "IP4=BPnl-BP4#...........................#Indicated power produced in cylinder 4 in kW\n", + "IP=IP1+IP2+IP3+IP4#.............................#Total Indicated power produced in kW\n", + "etamech=BPnl/IP#..............................#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)\n", + "pmi=pmb/etamech#............................#Indicated mean effective pressure in bar\n", + "print \"Indicated mean effective pressure = %0.2f bar \"%pmi" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER20.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER20.ipynb new file mode 100644 index 00000000..567d7045 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER20.ipynb @@ -0,0 +1,2465 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 20 - Air Compressors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.1 PAGE 750" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 4.24 kW\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "v1=1#.........#Volume of air taken in m**3/min\n", + "p1=1.013#...............#Intake pressure in bar\n", + "t1=288#...............#Intake temperature in K\n", + "p2=7#......................#Delivery pressure in bar\n", + "n=1.35#..............#Adiabatic index\n", + "R=287#..............#Gas constant in kJ/kgK\n", + "#Calculations\n", + "m=(p1*v1*10**5)/(R*t1)#..............#Mass of air delivered per min in kg\n", + "t2=t1*((p2/p1)**((n-1)/n))#...........#Delivery temperature in K\n", + "iw=(n/(n-1))*m*R*(t2-t1)#............#Indicated work in kJ/min\n", + "IP=iw/(60*1000)#....................#Indicated power\n", + "print \"Indicated power = %0.2f kW\"%IP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.2 PAGE 750" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cylinder bore = 141.44 mm\n", + "Motor power = 5.54 kW\n" + ] + } + ], + "source": [ + "from math import pi, sqrt\n", + "# Initialisation of Variables\n", + "N=300#............#Compressor rpm\n", + "afr=15#.........#Air fuel ratio\n", + "etamech=0.85#....#Mechanical efficiency\n", + "etamt=0.9#.......#Motor transmission efficiency\n", + "v=1#............#Volume dealt with per min at inlet in m**3/min\n", + "rld=1.5#........#Ratio of stroke to diameter\n", + "v1=1#.........#Volume of air taken in m**3/min\n", + "p1=1.013#...............#Intake pressure in bar\n", + "t1=288#...............#Intake temperature in K\n", + "p2=7#......................#Delivery pressure in bar\n", + "n=1.35#..............#Adiabatic index\n", + "R=287#..............#Gas constant in kJ/kgK\n", + "#Calculations\n", + "m=(p1*v1*10**5)/(R*t1)#..............#Mass of air delivered per min in kg\n", + "t2=t1*((p2/p1)**((n-1)/n))#...........#Delivery temperature in K\n", + "iw=(n/(n-1))*m*R*(t2-t1)#............#Indicated work in kJ/min\n", + "IP=iw/(60*1000)#....................#Indicated power in kW\n", + "vdc=v/N#........#Volume drawn in per cycle in m**3\n", + "D=(vdc/((pi/4)*rld))**(1/3)#..........#Cylinder bore in m\n", + "print \"Cylinder bore = %0.2f mm\"%(D*1000)\n", + "pc=IP/etamech#.........#Power input to the compressor in kW\n", + "mp=pc/etamt#..........#Motor power in kW\n", + "print \"Motor power = %0.2f kW\"%mp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.3 PAGE 751" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature at the end of compression = 430.07 K\n", + "Work done during compression per kg of air = 236.03 kJ\n", + "Heat transferred during compression per kg of air = -98.28 kJ\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#......#Suction pressure in bar\n", + "t1=293#.....#Suction temperature in K\n", + "n=1.2#......#Compression index\n", + "p2=10#......#Delivery pressure in bar\n", + "R=0.287#....#Gas constant in kJ/kgK\n", + "cv=0.718#...#Specific heat at constant volume in kJ/kgK\n", + "#Calculations\n", + "t2=t1*((p2/p1)**((n-1)/n))#.....#Temperature at the end of compression in K\n", + "print \"Temperature at the end of compression = %0.2f K\"%t2\n", + "W=1*R*t1*(n/(n-1))*(((p2/p1)**((n-1)/n))-1)#.......#Work done during compression of air in kJ\n", + "print \"Work done during compression per kg of air = %0.2f kJ\"%W\n", + "Q=(t2-t1)*(cv-((R)/(n-1)))#..........#Heat transferred during compression of air in kJ/kg\n", + "print \"Heat transferred during compression per kg of air = %0.2f kJ\"%Q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.4 PAGE 752" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volumetric Efficiency = 77.39 %\n", + "Indicated power = 5.35 kW\n", + "Isothermal efficiency = 79.79 %\n", + "Mechanical efficiency = 85.60 %\n", + "Overall efficiency = 68.30 %\n" + ] + } + ], + "source": [ + "from math import log\n", + "# Initialisation of Variables\n", + "p1=1#........#Suction pressure in bar\n", + "t1=293#.......#Suction temperature in K\n", + "p2=6#..........#Discharge pressure in bar\n", + "t2=453#.......#Discharge temperature in K\n", + "N=1200#.........#Compressor rpm\n", + "Ps=6.25#........#Shaft power in kW\n", + "ma=1.7#........#Mass of air delivered in kg/min\n", + "D=0.14#......#Engine bore in m\n", + "L=0.10#.......#Engine stroke in m\n", + "R=287#..........#Gas constant in kJ/kgK\n", + "#Calculations\n", + "Vd=(pi/4)*D*D*L*N#.........#Displlacement volume in m**3/min\n", + "FAD=ma*R*t1/(p1*10**5)#........#Free air delivered\n", + "etav=FAD/Vd#.....#Volumetric efficiency \n", + "print \"Volumetric Efficiency = %0.2f %%\"%(etav*100)\n", + "n=1/(1-((log(t2/t1))/(log(p2/p1))))#........#Index of compression\n", + "IP=(n/(n-1))*(ma/60)*(R/1000)*t1*(((p2/p1)**((n-1)/n))-1)#..........#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%IP\n", + "Piso=((ma/60)*(R/1000)*t1*(log(p2/p1)))#..........#Isothermal power\n", + "etaiso=Piso/IP#..............#Isothermal efficiency\n", + "print \"Isothermal efficiency = %0.2f %%\"%(etaiso*100)\n", + "etamech=IP/Ps#...........#Mechanical efficiency\n", + "print \"Mechanical efficiency = %0.2f %%\"%(etamech*100)\n", + "etao=Piso/Ps#........#Overall efficiency\n", + "print \"Overall efficiency = %0.2f %%\"%(etao*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.5 PAGE 753" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Work output = 148.95 kW\n", + "Mass of cooling water = 2.12 kg/min\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ma=6.75#.........#Mass of air compressed in kg/min\n", + "p1=1#............#Initial pressure in atm\n", + "cp=1.003#.........#Specifc heat at constant vpressure in kJ/kgK\n", + "t1=21#...........#Initial temperature in Celsius\n", + "t2=43#..........#Final temperature in Celsius\n", + "rp=1.35#.........#Pressure ratio\n", + "ga=1.4#.........#Ratio os specific heats\n", + "delt=3.3#.......#Change in temperature \n", + "cpw=4.18#.......#Specific heat for water in kJ/kgK\n", + "#Calculations\n", + "W=ma*cp*(t2-t1)#............#Work output in kJ\n", + "print \"Work output = %0.2f kW\"%W\n", + "t21=(t1+273)*(rp**((ga-1)/ga))#...........#Final temperature if the compression had been isentropic\n", + "Qr=ma*cp*(t21-(t2+273))#............#Heat rejected in kJ\n", + "mw=Qr/(cpw*delt)#........#Mass of cooling water in kg/min\n", + "print \"Mass of cooling water = %0.2f kg/min\"%mw" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.6 PAGE 754" + ] + }, + { + "cell_type": "code", + "execution_count": 70, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Swept volume = 0.03 m**3\n", + "Delivery temperature = 449.90 K\n", + "Indicated Power = 57.58 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ma=14#........#Quantity of air delivered in kg/min\n", + "p1=1.013#......#Intake pressure in bar\n", + "t1=288#.........#Intake temperature in K\n", + "p2=7#...........#Delivery pressure in bar\n", + "N=300#..........#Compressor rpm\n", + "pervc=0.05#.......#Percentage of clearance volume in the total stroke volume\n", + "n=1.3#............#Compressor and expansion index\n", + "#Calculations\n", + "V1byVs=pervc+1#\n", + "v1minv4=ma/(N*2)#\n", + "v4byv3=((p2/p1)**(1/n))#\n", + "v4byvs=v4byv3*pervc#\n", + "Vs=v1minv4/(V1byVs-v4byvs)#.....#Swept volume in m**3\n", + "print \"Swept volume = %0.2f m**3\"%Vs\n", + "t2=t1*((p2/p1)**((n-1)/n))#........#Delivery Temperature in K\n", + "print \"Delivery temperature = %0.2f K\"%t2\n", + "IP=((n)/(n-1))*p1*(10**5)*((ma)/(60*1000))*(((p2/p1)**((n-1)/n))-1)#\n", + "print \"Indicated Power = %0.2f kW\"%IP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.7 PAGE 754" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 63.51 kW\n", + "Volumetric efficiency = 2.07 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "FAD=14#...........#Free air delivered in m**3/min\n", + "p1=0.95#.........#Induction pressure in bar\n", + "t1=305#........#Induction temperature in K\n", + "p2=7#...........#Delivery pressure in bar\n", + "n=1.3#...........#Adiabatic index\n", + "VcbyVs=0.05#........#Ratio of clearance volume and swept volume\n", + "R=287#...........#Gas constant in J/kgK\n", + "t=288#...........#free air temperature in K\n", + "p=1.013#.........#free air pressure in bar\n", + "#Calculations\n", + "m=(p*100000*FAD)/(R*t)#..........#Mass delivered per min in kg\n", + "t2=t1*((p2/p1)**((n-1)/n))#\n", + "IP=((n/(n-1))*m*(R/1000)*(t2-t1))/60#.........#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%IP\n", + "v4byv3=(p2/p1)**(1/n)#v4byvs=v4byv3*VcbyVs#v1minv4=(1+VcbyVs)-v4byvs#\n", + "Vbyvs=v1minv4*(t/t1)*(p1/p)#\n", + "etav=Vbyvs/1#.............#Volumetric efficiency\n", + "print \"Volumetric efficiency = %0.2f %%\"%(etav*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.8 PAGE 755" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power input to compressor = 83.65 kW\n", + "Compressor stroke = 300.00 mm\n", + "Compressor bore = 291.43 mm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "FAD=16#.......#Free air delivered in m**3/min\n", + "p1=0.96#......#Suction pressure in bar\n", + "t1=303#.......#Suction temperature in K\n", + "n=1.3#........#Compression index\n", + "k=0.04#........#Clearance ratio\n", + "p2=6#.........#Delivery pressure in bar\n", + "etamech=0.9#...#Mechanical efficiency\n", + "vp=300#.......#Piston speed in m/min\n", + "N=500#........#Compressor rpm\n", + "p=1#.....#Ambient pressure in bar\n", + "t=288#.....#Ambient temperature in K\n", + "etac=0.85#...#Compressor efficiency\n", + "R=0.287#......#Universal gas constant\n", + "#Calculations\n", + "m=(p*10**5*FAD)/(R*1000*t)#...........#Mass flow rate of compressor in kg/min\n", + "t2=t1*((p2/p1)**((n-1)/n))#.....#Temperature at the end of compression in K\n", + "P=(n/(n-1))*(m/60)*R*(t2-t1)*(1/etamech)*(1/etac)#..........#Power input to compressor in kW\n", + "print \"Power input to compressor = %0.2f kW\"%P\n", + "L=vp/(2*N)#.........#Stroke in m\n", + "print \"Compressor stroke = %0.2f mm\"%(L*1000)\n", + "etav=((t/t1)*(p1/p)*(1+k-(k*((p2/p1)**(1/n)))))#........#Volumetric efficiency\n", + "D=sqrt(FAD/((pi/4)*L*N*2*etav))#...........#Compressor bore in m\n", + "print \"Compressor bore = %0.2f mm\"%(D*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.9 PAGE 756" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volumetric efficiency = 91.10 %\n", + "Power required to drive the compressor = 2.27 kW\n", + "Compressor rpm : 486.0\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "m=0.6#..........#Mass of air delivered in kg/min\n", + "p2=6#.........#Delivery pressure in bar\n", + "p1=1#..........#Induction pressure in bar\n", + "t1=303#........#Induction temperature in K\n", + "D=0.1#.........#Compressor bore in m\n", + "L=0.15#........#Compressor stroke in m\n", + "k=0.03#........#Clearance ratio\n", + "etamech=0.85#....#Mechanical efficiency\n", + "R=0.287#.......#Gas constant in kJ/kgK\n", + "n=1.3#........#Compression index\n", + "#Calculations\n", + "etav=(1+k)-(k*((p2/p1)**(1/n)))#..........#Volumetric efficiency\n", + "print \"Volumetric efficiency = %0.2f %%\"%(etav*100)\n", + "IP=(n/(n-1))*(m/60)*R*t1*(((p2/p1)**((n-1)/n))-1)#.........#Indicated power in kW\n", + "P=IP/etamech#...........#Power required to drive the compressor in kW\n", + "print \"Power required to drive the compressor = %0.2f kW\"%P\n", + "FAD=(m*R*t1*1000)/(p1*10**5)#...........#Free air delivery in m**3/min\n", + "Vd=FAD/etav#........#Displacement volume in m**3/min\n", + "N=Vd/((pi/4)*D*D*L)#.........#Compressor rpm\n", + "print \"Compressor rpm : \",round(N)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.10 PAGE 756" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage change in free air delivery = 2.68 %\n", + "Percentage change in power delivered = 2.68 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "L=88#...........#Compressor stroke in cm\n", + "k=0.02#...........#Clearance ratio\n", + "p3=8.2#...........#Delivery pressure in bar\n", + "p4=1.025#.......#Suction pressure in bar\n", + "p1=p4#.......#Suction pressure in bar \n", + "n=1.3#.........#Compression index\n", + "lo=0.55#...#Length of distance piece fitted after overhaul in cm\n", + "#Calculations\n", + "pcfa=(((L+(L*k))-((L*k)*((p3/p4)**(1/n))))-(((k*L)+lo+L)-(((k*L)+lo)*((p3/p4)**(1/n)))))/((L+L*k)-((L*k)*((p3/p4)**(1/n))))\n", + "print \"Percentage change in free air delivery = %0.2f %%\"%(pcfa*100)\n", + "pcpa=pcfa#......#Percentage change in power delivered\n", + "print \"Percentage change in power delivered = %0.2f %%\"%(pcpa*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.11 PAGE 757" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Motor power = 241.07 kW\n", + "Compressor bore = 262.71 mm\n", + "Compressor stroke = 315.25 mm\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import pi\n", + "# Initialisation of Variables\n", + "v=30#.............#Suction volume in m**3/min\n", + "p1=1#...........#Suction pressure in bar\n", + "t1=300#.........#Suction temperature in K\n", + "p2=16#...........#Delivery pressure in bar\n", + "N=320#..........#Compressor rpm\n", + "k=0.04#.........#Clearance ratio\n", + "rld=1.2#.........#Ratio of stroke to bore\n", + "etamech=0.82#....#Mechanical efficiency\n", + "n=1.32#.........#Compression index\n", + "ti=39+273#......#Temperature inside the suction chamber in K\n", + "nc=4#.........#No of cylineders\n", + "#Calculations\n", + "W=(n/(n-1))*(p1/1000)*10**5*(v/60)*(((p2/p1)**((n-1)/n))-1)#........#Work done in kW\n", + "mp=W/etamech#..........#Motor power in kW\n", + "print \"Motor power = %0.2f kW\"%mp\n", + "etav=((1+k)-(k*((p2/p1)**(1/n))))*(t1/ti)#........#Volumetric efficiency\n", + "Vs=(v/nc)*(1/(2*N))*(1/etav)#............#Swept volume of cylinder in m**3\n", + "D=(Vs/((pi/4)*rld))**(1/3)#.............#Compressor bore in m\n", + "L=D*rld#..............#Compresor stroke in m\n", + "print \"Compressor bore = %0.2f mm\"%(D*1000)\n", + "print \"Compressor stroke = %0.2f mm\"%(L*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.12 PAGE 758" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diameter of compressor cylinder = 159.70 mm\n", + "Stroke of compressor cylinder = 191.64 mm\n", + "Diameter of engine cylinder = 98.49 mm\n", + "Stroke of engine cylinder = 118.18 mm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "n=2#........#No of cylinders \n", + "ma=16#........#Mass of air supplied per min in kg\n", + "p1=1#........#Suction pressure in bar\n", + "t1=288#.......#Suction temperature in K\n", + "k=0.04#.......#Clearance ratio\n", + "ni=1.3#........#Compression index\n", + "R=0.287#........#Gas constant in kJ/kgK\n", + "N=2000#........#Engine rpm\n", + "p3=7#...........#Delivery pressure in bar\n", + "rld=1.2#...........#Ratio of stroke to bore for compressor cylinder and engine cylinder\n", + "etamech=0.82#.........#Mechanical efficiency of engine\n", + "pmb=5.5#..........#Mean effective pressure in bar in engine\n", + "ne=4#.............#No of engine cylinders\n", + "#Calculations\n", + "Vs=(((ma/n)*R*1000*t1)/(p1*10**5*N))/((1+k)-(k*((p3/p1)**(1/ni))))#\n", + "Dc=(Vs/((pi/4)*rld))**(1/3)#.........#Diameter of compressor cylinder in m\n", + "Lc=rld*Dc#.............#Stroke of the compressor cylinder in m\n", + "print \"Diameter of compressor cylinder = %0.2f mm\"%(Dc*1000)\n", + "print \"Stroke of compressor cylinder = %0.2f mm\"%(Lc*1000)\n", + "IP=(ni/(ni-1))*(ma/60)*R*t1*(((p3/p1)**((ni-1)/ni))-1)#......#Indicated power of the compressor in kW\n", + "BP=IP/etamech#...............#Brake power of the engine in kW\n", + "De=((BP*60*1000)/(ne*pmb*10**5*rld*(pi/4)*N))**(1/3)#......#Diameter of the engine cylinder in m\n", + "Le=rld*De#...........#Stroke of the engine cylinder in m\n", + "print \"Diameter of engine cylinder = %0.2f mm\"%(De*1000)\n", + "print \"Stroke of engine cylinder = %0.2f mm\"%(Le*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.13 PAGE 759" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volumetric efficiency = 81.44 %\n", + "Diameter of the cylinder = 17.98 cm\n", + "Stroke of the cylinder = 17.98 cm\n", + "Brake power = 11.10 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "nc=1.25#......#Index of compression\n", + "ne=1.3#......#Index of expansion\n", + "etamech=0.85#.......#Mechanical efficiency\n", + "p1=1#.........#Suction pressure in bar\n", + "p2=7.5#.......#Delivery pressure in bar\n", + "t1=25+273#....#Suction temperature in bar\n", + "Vamb=2.2#.....#Volume of free air delivered in m**3\n", + "N=310#........#Engine rpm\n", + "k=0.05#.......#Clearance ratio\n", + "pamb=1.03#.....#Ambient pressure in bar\n", + "tamb=293#......#Ambient temperature in K\n", + "#Calculations\n", + "etav=(1+k-(k*((p2/p1)**(1/ne))))#........#Volumetric efficiency\n", + "print \"Volumetric efficiency = %0.2f %%\"%(etav*100)\n", + "v1=(pamb*Vamb*t1)/(p1*tamb)#.......#Volume of air delivered at suction condition in m**3\n", + "vs=(v1/(etav*N*2))#.........#Swept volume in m**3\n", + "D=(vs/(pi/4))**(1/3)#........#Diameter of the cylinder in m\n", + "L=D#\n", + "print \"Diameter of the cylinder = %0.2f cm\"%(D*100)\n", + "print \"Stroke of the cylinder = %0.2f cm\"%(L*100)\n", + "W=2*vs*10**5*(((nc)/(nc-1))*p1*(1+k)*(((p2/p1)**((nc-1)/(nc)))-1)-((ne)/(ne-1))*p1*(k*((p2/p1)**(1/ne)))*(((p2/p1)**((ne-1)/(ne)))-1))#..........#Work done per cycle of operation in Nm/cycle\n", + "IP=W*N/(60*1000)#...............#Indicated power in kW\n", + "BP=IP/etamech#.............#Brake power in kW\n", + "print \"Brake power = %0.2f kW\"%BP" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.14 PAGE 760" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Compressor diameter = 35.75 cm\n", + "Compressor stroke = 53.63 cm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "v=14#..........#Volume of air delivered in m**3\n", + "p1=1#........#Suction pressure in bar\n", + "p2=7#........#Delivery pressure in bar\n", + "N=310#........#Compressor rpm\n", + "n=1.35#........#Compression index\n", + "k=0.05#........#Clearance ratio\n", + "rld=1.5#.........#Ratio of cylinder length and diameter\n", + "#Calculations\n", + "etav=(1+k)-(k*((p2/p1)**(1/n)))#..........#Volumetric efficiency\n", + "Vs=v/(etav*N)#.............#Swept volume in m**3\n", + "D=((Vs)/((pi/4)*rld))**(1/3)#......#Compressor diameter in m\n", + "L=rld*D#......................#Compressor stroke in m\n", + "print \"Compressor diameter = %0.2f cm\"%(D*100)\n", + "print \"Compressor stroke = %0.2f cm\"%(L*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.15 PAGE 761" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Free air delivered = 13.89 m**3/min\n", + "Heat rejected during compression = 748.46 kJ/min\n", + "Power needed to drive the compressor = 52.01 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.33#.........#Cylinder diameter in m\n", + "L=0.35#.........#Cylinder stroke in m\n", + "k=0.05#.........#Clearance ratio \n", + "N=300#..........#Compressor rpm\n", + "psuc=0.95#........#Suction pressure in bar\n", + "tsuc=298#.........#Suction temperature in K\n", + "pamb=1.013#......#Ambient pressure in bar\n", + "tamb=293#.........#Ambient temperature in K\n", + "p2=4.5#...........#Delivery pressure in bar\n", + "n=1.25#..........#Compression index\n", + "cv=0.717#...........#Specific heat at constant volume in kJ/kgK\n", + "ga=1.4#..........#Ratio of specific heats\n", + "etamech=0.8#......#Mechanical efficiency\n", + "R=0.287#.........#Gas constant in kJ/kgK\n", + "#Calculations\n", + "Vs=(pi/4)*D*D*L*N*2#............#Swept volume in m**3\n", + "p1=psuc#etav=1-(k*(((p2/p1)**(1/n))-1))#........#Volumetric efficiency\n", + "Vad=Vs*etav#................#Actual air drawn per min in m**3\n", + "FAD=(psuc/pamb)*(tamb/tsuc)*Vad#............#Free air delivered in m**3/min\n", + "print \"Free air delivered = %0.2f m**3/min\"%FAD\n", + "t1=tsuc#ma=(p1*10**5*Vad)/(R*1000*t1)#.......#Mass of air delivered per min in kg\n", + "t2=t1*((p2/p1)**((n-1)/n))#..........#Delivery temperature in K\n", + "Qr=ma*cv*((ga-n)/(n-1))*(t2-t1)#..........#Heat rejected during compression in kJ/min\n", + "print \"Heat rejected during compression = %0.2f kJ/min\"%Qr\n", + "P=((n)/(n-1))*R*t1*(ma/60)*(((p2/p1)**((n-1)/(n)))-1)*(1/etamech)#..........#Power needed to drive the compressor in kW\n", + "print \"Power needed to drive the compressor = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.16 PAGE 762" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power required to run the compressor = 4.19 kW\n" + ] + } + ], + "source": [ + "#Initialisation of variables\n", + "p1=1.03#...........#Intake pressure in bar\n", + "t1=300#............#Intake temperature in K\n", + "p2=7#.............#Intake pressure for High pressure cylinder in bar\n", + "t2=310#..............#Temperature of air entering high pressure cylinder in K\n", + "p3=40#............#Pressure of air after compression in bar\n", + "V=30#.........#volume of air delivered in m**3/h\n", + "R=0.287#............#Gas constant for air in kJ/kgK\n", + "ga=1.4#...........#Ratio of specific heats\n", + "#Calculations\n", + "m=p1*10**5*V/(R*1000*t1)#..........#Mass of air compressed in kg/h\n", + "t21=t1*((p2/p1)**((ga-1)/ga))#.......#Actual temperature of air entering high pressure cylinder in K\n", + "t3=t2*((p3/p2)**((ga-1)/ga))#........#Actual temperature of air after compression in K\n", + "W=((ga)/(ga-1))*m*(R/3600)*(t21-t1+t3-t2)#..........#Power required to run compressor in kW\n", + "print \"Power required to run the compressor = %0.2f kW\"%W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.17 PAGE 762" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diameter of low pressure cylinder = 267.30 mm\n", + "Diameter of high pressure cylinder = 109.13 mm\n", + "Power required to run the compressor = 57.49 kW\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "FAD=6#.......#Free air delivered in m**3/min\n", + "p1=1#........#suction pressure in bar\n", + "t1=300#......#Suction temperature in K\n", + "p3=40#.......#Delivery pressure in bar\n", + "p2=6#........#Intermediate pressure in bar\n", + "t3=300#........#Temperature at the inlet to 2nd stage in K\n", + "n=1.3#.........#Compression index\n", + "etamech=0.8#.....#Mechanical efficiency\n", + "N=400#............#Compressor rpm\n", + "R=0.287#.........#Gas constant in kJ/kgK\n", + "#Calculations \n", + "dlp=(FAD/(N*(pi/4)))**(1/3)#...............#Diameter of the low pressure cylinder in m\n", + "dhp=sqrt(1/(dlp*N*(pi/4)))#............#Diameter of high pressure cylinder in m\n", + "print \"Diameter of low pressure cylinder = %0.2f mm\"%(dlp*1000)\n", + "print \"Diameter of high pressure cylinder = %0.2f mm\"%(dhp*1000)\n", + "m=(p1*FAD*10**5)/(R*t1*1000*60)#........#Mass flow of air in kg/s\n", + "W=n*(1/(n-1))*m*R*t1*(((p2/p1)**((n-1)/n))+((p3/p2)**((n-1)/n))-2)#........#Indicated work in kJ/s\n", + "P=W/etamech#...............#Power required in kW\n", + "print \"Power required to run the compressor = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.18 PAGE 763" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intermediate pressure = 0.26 Mpa\n", + "Volume of low pressure cylinder = 0.02 m**3\n", + "Volume of high pressure cylinder = 0.01 m**3\n", + "Power required to drive the compressor = 42.96 kW\n", + "Heat rejected in the intercooler = 15.04 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ns=2#.............#No of stages\n", + "v1=0.2#.........#Intake volume in m**3/s\n", + "p1=1#..........#Intake pressure in bar\n", + "t1=289#...............#Intake temperature in K\n", + "p3=7#.........#Final pressure in bar\n", + "n=1.25#.......#Compression index\n", + "N=600#........#Compressor rpm\n", + "cp=1.005#.....#Specific heat at constant pressure in kJ/kgK\n", + "R=0.287#......#Gas constant in kJ/kgK\n", + "#Calculations\n", + "p2=sqrt(p1*p3)#......#Intermediate pressure in bar\n", + "print \"Intermediate pressure = %0.2f Mpa\"%(p2/10)\n", + "vslp=60*v1/N#..........#Volume of low pressure cylinder in m**3\n", + "vshp=p1*vslp/p2#..........#Volume of high pressure cylinder in m**3\n", + "print \"Volume of low pressure cylinder = %0.2f m**3\"%vslp\n", + "print \"Volume of high pressure cylinder = %0.2f m**3\"%vshp\n", + "W=(ns*(n/(n-1)))*p1*10**5*(v1/1000)*(((p3/p1)**((n-1)/(ns*n)))-1)#...........#Power required to drive the compressor in kW\n", + "print \"Power required to drive the compressor = %0.2f kW\"%W\n", + "m=p1*10**5*v1/(R*t1*1000)#.........#Mass of air handled in kg/s\n", + "t2=t1*((p2/p1)**((n-1)/n))#.........#Temperature at the end of first stage compression in K\n", + "Qr=m*cp*(t2-t1)#.......#Heat rejected in the intercooler in kW\n", + "print \"Heat rejected in the intercooler = %0.2f kW\"%Qr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 20.19 PAGE 764" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of cylinder diameters : 2.340\n" + ] + } + ], + "source": [ + "#initialisation of variables\n", + "p3=30#..........#delivery pressure in bar\n", + "p1=1#.........#suction pressure in bar\n", + "t1=273+15#.......#suction temperature in K\n", + "n=1.3#.........#adiabatic index\n", + "#calculation\n", + "p2=sqrt(p1*p3)#.....#Pressure before entering High pressure cylinder in bar\n", + "t21=t1*((p2/p1)**((n-1)/n))#.........#Actual temperature before entering the high pressure turbine in K\n", + "r=sqrt((p2**(1/n))*(t21/t1))#............#Ratio of cylinder diameters\n", + "print \"Ratio of cylinder diameters : %0.3f\"%r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.20 PAGE 765" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Work done in compressing 1 kg of gas = 388.53 kJ\n", + "Pressure in the intercooler would rise.\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ns=2#.........#No of stages\n", + "p1=1#........#Suction pressure in bar\n", + "p2=7.4#.......#Intercooler pressure in bar\n", + "p3=42.6#.......#Delivery pressure in bar\n", + "t1=15+273#......#Suction temperature in K\n", + "n=1.3#........#Compression index\n", + "R=0.287#.......#Gas constant in kJ/kgK\n", + "dlp=0.09#.......#Diameter of low pressure cylinder in m\n", + "dhp=0.03#.......#Diameter of high pressure cylinder in m\n", + "etav=0.9#.....#Volumetric efficiency\n", + "#Calculations\n", + "W=n*(1/(n-1))*R*t1*(((p2/p1)**((n-1)/n))+((p3/p2)**((n-1)/n))-2)#\n", + "print \"Work done in compressing 1 kg of gas = %0.2f kJ\"%W\n", + "#Given that stroke length is same in both cases\n", + "rV=p2/p1#.........#Ratio of volumes\n", + "rECV=((dlp/dhp)**2)*etav#.........#Ratio of effective cylinder volumes\n", + "if (rECV>rV):\n", + " print \"Pressure in the intercooler would rise.\"\n", + "elif (rECV<rV):\n", + " print \"Pressure in the intercooler would fall\"\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.21 PAGE 765" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stroke length = 0.36 m\n", + "Bore = 0.27 m\n", + "Work required = 49.20 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "V=4#...........#Volume of air handled in m**3/min\n", + "p1=1.016#.....#Suction pressure in bar\n", + "t1=288#........#Suction temperature in K\n", + "N=250#.........#Compressor rpm\n", + "p3=78.65#.....#Delivery pressure in bar\n", + "vp=3#........#Piston speed in m/s\n", + "etamech=0.75#.....#mechanical efficiency\n", + "etav=0.8#........#Volumetric efficiency\n", + "n=1.25#..........#Compression index\n", + "R=287#...........#Gas constant in J/kgK\n", + "ns=2#............#No of stages\n", + "#Calculations\n", + "l=(vp*60)/(2*N)#..........#Stroke length in m\n", + "d=sqrt(V/((pi/4)*l*N*etav))#.......#Bore in m\n", + "print \"Stroke length = %0.2f m\"%l\n", + "print \"Bore = %0.2f m\"%d\n", + "m=(p1*10**5*V)/(R*t1)#.......#Mass of air handled by the compressor in kg/min\n", + "p2=sqrt(p1*p3)#.............#Intermediate pressure in bar\n", + "t2=t1*((p2/p1)**((n-1)/n))#.........#Temperature at the end of first stage compression in K\n", + "W=ns*(n/(n-1))*(m/60)*(R/1000)*(t2-t1)*(1/etamech)#..........#Work required in kW\n", + "print \"Work required = %0.2f kW\"%W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.22 PAGE 766" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Indicated power = 15.48 kW\n", + "Swept volume for low pressure cylinder = 0.0131 m**3\n", + "Swept volume of high pressure cylinder = 0.0044 m**3\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "m=4.5#.........#Amount of air compressed in kg/min\n", + "ps=1.013#.......#Suction pressure in bar\n", + "ts=288#.........#Suction temperature in K\n", + "rp=9#...........#Pressure ratio\n", + "n=1.3#.........#Compression index\n", + "k=0.05#........#Clearance ratio\n", + "N=300#.........#Compressor rpm\n", + "R=287#.........#Gas constant in J/kgK\n", + "ns=2#............#No of stages\n", + "#Calculations\n", + "ti=round(ts*((sqrt(rp))**((n-1)/n)))#......#Intermediate temperature in K\n", + "W=round(ns*n*(1/(n-1))*m*(R/1000)*(ti-ts))#..........#Work required per min in kJ\n", + "IP=W/60#.........#Indicated power in kW\n", + "print \"Indicated power = %0.2f kW\"%IP\n", + "mc=m/N#...........#Mass induced per cycle in kg\n", + "etav=(1+k)-(k*(sqrt(rp)**(1/n)))#.......#Volumetric efficiency\n", + "Vs=(mc*R*ts)/(ps*10**5*etav)#........#Swept volume for low pressure cylinder in m**3\n", + "print \"Swept volume for low pressure cylinder = %0.4f m**3\"%Vs\n", + "vdhp=(mc*ts*R)/(sqrt(rp)*ps*10**5)#............#Volume of air drawn in high pressure cylinder per cycle in m**3\n", + "vshp=vdhp/etav#...............#Swept volume ofhigh pressure cylinder in m**3\n", + "print \"Swept volume of high pressure cylinder = %0.4f m**3\"%vshp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.23 PAGE 767" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power required to run the compressor = 18.68 kW\n", + "Bore of low pressure cylinder = 19.06 cm\n", + "Stroke of low pressure cylinder = 19.06 cm\n", + "Bore of high pressure cylinder = 7.00 cm\n", + "Stroke of high pressure cylinder = 19.06 cm\n", + "Ratio of cylinder volumes : 7.4162\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "v1=2.2#...........#free air delivered by the compressor in m**3/min\n", + "p1=1#........#Suction pressure in bar\n", + "t1=298#.......#Suction temperature in K\n", + "pd=55#........#Delivery pressure in bar\n", + "N=210#.......#Compressor rpm\n", + "n=1.3#........#Compression index\n", + "k=0.05#.......#Clearance ratio for high pressure and low pressure cylinders\n", + "R=287#.......#Gas constant in J/kgK\n", + "ns=2#.......#No of stages\n", + "#Calculations\n", + "ps=p1#\n", + "m =(p1*v1*10**5)/(R*t1)#.........#Mass of air deivered in m**3/min\n", + "W=(ns*(n/(n-1)))*m*R*t1*(((pd/ps)**((n-1)/(ns*n)))-1)#...........#Work done by compressor in Nm/min\n", + "P=W/(60*1000)#...........#Power required to run the compressor\n", + "print \"Power required to run the compressor = %0.2f kW\"%P\n", + "pi=sqrt(ps*pd)#........#Intermediate pressure in bar\n", + "etav1=(1+k)-(k*((pi/p1)**(1/n)))#...........#Volumetric efficiency of the low pressure cylinder \n", + "Vs=(v1*10**6)/(etav1*N)#............#Swept volume in cm**3\n", + "dlp=(Vs/((pi/4)))**(1/3)#..........#Diameter of low pressure cylinder in cm\n", + "llp=dlp#.................#Stroke of low pressure cylinder in cm\n", + "print \"Bore of low pressure cylinder = %0.2f cm\"%dlp\n", + "print \"Stroke of low pressure cylinder = %0.2f cm\"%llp\n", + "dhp=sqrt(dlp*dlp/pi)#.........#Diameter of high pressure cylinder in cm\n", + "lhp=llp#\n", + "print \"Bore of high pressure cylinder = %0.2f cm\"%dhp\n", + "print \"Stroke of high pressure cylinder = %0.2f cm\"%lhp\n", + "rcv=pi/ps#.....#Ratio of cylinder volumes\n", + "print \"Ratio of cylinder volumes : %0.4f\"%rcv" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.24 PAGE 768" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat rejected to the intercooler = 5145.32 kJ/min\n", + "Diameter of high pressure cylinder = 184.68 mm\n", + "Power required for high pressure cylinder = 106.28 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#........#Suction pressure in bar\n", + "p2=4#.....#Intermediate pressure in bar\n", + "p5=3.8#.......#Pressure of air leaving the interooler in bar\n", + "p6=15.2#........#Delivery pressure in bar\n", + "t1=300#..........#Suction temperature in K\n", + "dlp=0.36#........#Diameter of low pressure cylinder in m\n", + "llp=0.4#........#Stroke of low pressure cylinder in m\n", + "N=220#........#Compressor rpm\n", + "k=0.04#........#Clearance ratio\n", + "cp=1.0035#.........#Specific heat at constant pressure in kJ/kgK\n", + "n=1.3#........#Compression index\n", + "R=0.287#........#Gas constant in kJ/kgK\n", + "p8=p5#\n", + "p3=p2#\n", + "p7=p6#\n", + "t5=t1#\n", + "#Calculations\n", + "Vslp=(pi/4)*dlp*dlp*llp*N*2#.......#Swept volume in m**3\n", + "etavlp=(1+k)-(k*((p2/p1)**(1/n)))#.....#Volumetric efficiency\n", + "valp=Vslp*etavlp#................#Volume of air drawn in low pressure cylinder in m**3\n", + "m=(p1*10**5*valp)/(R*1000*t1)#........#Mass of air drawin in kg/min\n", + "t2=round(t1*((p2/p1)**((n-1)/n)))#\n", + "Qr=m*cp*(t2-t5)#........#Heat rejected to the intercooler in kJ/min\n", + "print \"Heat rejected to the intercooler = %0.2f kJ/min\"%Qr\n", + "vahp=(m*R*t5*1000)/(p5*10**5)#...#Volume of air drawn into high pressure cylinder per min in m**3\n", + "Vshp=vahp/etavlp#.........#Swept volume of high pressure cylinder in m**3/min\n", + "dhp=sqrt(Vshp/((pi/4)*2*N*llp))#..........#Diameter of high pressure cylinder in m\n", + "print \"Diameter of high pressure cylinder = %0.2f mm\"%(dhp*1000)\n", + "P=(n/(n-1))*m*(1/60)*R*(t2-t1)#.......#Power required for high pressure cylinder in kW\n", + "print \"Power required for high pressure cylinder = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.25 PAGE 769" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power required to run the compressor = 85.38 kW\n", + "Heat rejected in intercooler = 1742.36 kJ/min\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ps=1#........#Suction pressure in bar\n", + "pi=4.2#.....#Intermediate pressure in bar\n", + "pi1=4#.......#Pressure of air leaving the interooler in bar\n", + "pd=18#........#Delivery pressure in bar\n", + "t1=298#..........#Suction temperature in K\n", + "t5=t1#\n", + "dlp=0.4#........#Diameter of low pressure cylinder in m\n", + "llp=0.5#........#Stroke of low pressure cylinder in m\n", + "N=200#........#Compressor rpm\n", + "k=0.05#........#Clearance ratio\n", + "cp=1.004#.........#Specific heat at constant pressure in kJ/kgK\n", + "n=1.25#........#Compression index\n", + "R=0.287#........#Gas constant in kJ/kgK\n", + "#Calculations\n", + "Vslp=(pi/4)*dlp*dlp*llp#..........#Swept volume of low pressure cylinder in m**3\n", + "etavlp=(1+k)-(k*((pi/ps)**(1/n)))#.....#Volumetric efficiency\n", + "t2=round(t1*((pi/ps)**((n-1)/n)))#\n", + "m=(ps*10**5*etavlp*Vslp)/(R*1000*t1)#...#Mass of air in kg\n", + "wlp=((n)/(n-1))*R*1000*t1*m*(((pi/ps)**((n-1)/(n)))-1)#..........#Work done per min in Nm in low pressure cylinder\n", + "whp=((n)/(n-1))*R*t5*m*1000*(((pd/pi1)**((n-1)/(n)))-1)#..........#Work done per min in Nm in high pressure cylinder\n", + "W=wlp+whp#.........#Net work done in Nm\n", + "IP=(W*N)/(60*1000)#............#Power required to run the compressor in kW\n", + "print \"Power required to run the compressor = %0.2f kW\"%IP\n", + "Qr=m*N*cp*(t2-t1)#...........#Heat rejected in intercooler in kJ/min\n", + "print \"Heat rejected in intercooler = %0.2f kJ/min\"%Qr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.26 PAGE 771" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power required = 49.23 kW\n", + "Isothermal work done = 41.78 kW\n", + "Isothermal efficiency = 84.86 %\n", + "Free air delivered = 9.04 m**3/min\n", + "Heat transferred in intercooler = 19.89 kW\n", + "\n", + "Swept volume for low pressure stage = 0.02 m**3\n", + "\n", + "\n", + "Clearance volume for low pressure stage = 0.00 m**3\n", + "\n", + "\n", + "Swept volume for high pressure stage = 0.01 m**3\n", + "\n", + "\n", + "Clearance volume for high pressure stage = 0.00 m**3\n", + "\n" + ] + } + ], + "source": [ + "from math import log\n", + "# Initialisation of Variables\n", + "p1=1#............#Intake pressure in bar\n", + "p2=4#..............#Pressure after first stage in bar\n", + "p3=16#............#Final pressure in bar\n", + "ns=2#............#No of stages\n", + "t1=300#............#Intake temperature in K\n", + "n=1.3#............#Compression index\n", + "klp=0.04#.........#Clearance ratio for low pressure cylinder\n", + "khp=0.06#........#Clearance ratio for high pressure cylinder\n", + "N=440#............#Engine rpm\n", + "R=0.287#..........#Gas constant in kJ/kgK\n", + "m=10.5#.............#Mass of air delivered in kg/min\n", + "cp=1.005#.........#Specific heat at constant pressure in kJ/kgK\n", + "#Calculations\n", + "rp=sqrt(p1*p3)#...........#Pressure ratio per stage\n", + "P=((ns*n)/(n-1))*R*t1*(m/60)*(((p3/p1)**((n-1)/(ns*n)))-1)#..........#Work done per min in Nm\n", + "print \"Power required = %0.2f kW\"%P\n", + "isoWd=(m/60)*R*t1*log(p3/p1)#..........#Isothermal work done in Nm\n", + "print \"Isothermal work done = %0.2f kW\"%isoWd\n", + "etaiso=isoWd/P#...............#Isothermal efficiency\n", + "print \"Isothermal efficiency = %0.2f %%\"%(etaiso*100)\n", + "FAD=(m*R*t1*1000)/(p1*10**5)#.............#Free air delivered in m**3/min\n", + "print \"Free air delivered = %0.2f m**3/min\"%FAD\n", + "t2=t1*((p2/p1)**((n-1)/n))#.....#Temperature at the end of compression in K\n", + "Qt=(m/60)*cp*(t2-t1)#..............#Heat transferred in intercooler in kW\n", + "print \"Heat transferred in intercooler = %0.2f kW\"%Qt\n", + "etavlp=(1+klp)-(klp*((p2/p1)**(1/n)))#..........#Volumetric efficiency of low pressure stage\n", + "etavhp=(1+khp)-(khp*((p2/p1)**(1/n)))#..........#Volumetric efficiency of high pressure stage\n", + "vslp=FAD/(N*etavlp)#......#Swept volume for low pressure stage in m**3\n", + "vclp=klp*vslp#..............#Clearance volume for low pressure stage in m**3\n", + "print \"\\nSwept volume for low pressure stage = %0.2f m**3\\n\"%(vslp)\n", + "print \"\\nClearance volume for low pressure stage = %0.2f m**3\\n\"%(vclp)\n", + "vshp=FAD/(N*rp*etavhp)#......#Swept volume for high pressure stage in m**3\n", + "vchp=khp*vshp#..............#Clearance volume for high pressure stage in m**3\n", + "print \"\\nSwept volume for high pressure stage = %0.2f m**3\\n\"%(vshp)\n", + "print \"\\nClearance volume for high pressure stage = %0.2f m**3\\n\"%(vchp)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.27 PAGE 771" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Work done = 1297727.20 Nm\n", + "Isothermal work done = 1146628.13 Nm\n", + "Isothermal efficiency = 88.36 %\n", + "Single stage work done per min = 1686780.23 Nm\n", + "Percentage of work saved : 23.06 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ns=3#......#No of stages\n", + "p1=1.05#......#Intake pressure in bar\n", + "pd=40#..........#Delivery pressure in bar\n", + "V=3#..........#Volume of air xupplied per min in m**3\n", + "n=1.25#........#Compression index\n", + "#Calculations\n", + "Wd=((ns*n)/(n-1))*p1*V*10**5*(((pd/p1)**((n-1)/(ns*n)))-1)#..........#Work done per min in Nm\n", + "print \"Work done = %0.2f Nm\"%Wd\n", + "isoWd=10**5*p1*V*log(pd/p1)#..........#Isothermal work done in Nm\n", + "print \"Isothermal work done = %0.2f Nm\"%isoWd\n", + "etaiso=isoWd/Wd#...............#Isothermal efficiency\n", + "print \"Isothermal efficiency = %0.2f %%\"%(etaiso*100)\n", + "wdss=((n)/(n-1))*p1*V*10**5*(((pd/p1)**((n-1)/(n)))-1)#..........#Single stage Work done per min in Nm\n", + "print \"Single stage work done per min = %0.2f Nm\"%wdss\n", + "perws=(wdss-Wd)/wdss#.......#Percentage of work saved\n", + "print \"Percentage of work saved : %0.2f %%\"%(perws*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.28 PAGE 772" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\n", + "Intermediate pressures: \n", + " p2 = 3.30\n", + " p3 = 10.90\n", + "\n", + "Indicated power required = 101.19 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#.............#Intake pressure in bar\n", + "p4=36#........#Final pressure in bar\n", + "n=1.25#.........#Compression index\n", + "R=0.287#.......#Gas constant in kJ/kgK\n", + "t1=300#..........#Intake temperature in K\n", + "ns=3#...........#No of stages\n", + "v=15#..........#Volume of air delivered in m**3\n", + "#Calculations\n", + "p2=p1*((p4/p1)**(1/ns))#\n", + "p3=p2*((p4/p1)**(1/ns))#\n", + "print \"\\n\\nIntermediate pressures: \\n p2 = %0.2f\\n p3 = %.2f\\n\"%(p2,p3)\n", + "t2=t1*((p4/p1)**(((n-1)/n)*(1/ns)))#....#Delivery temperature in K\n", + "m=p1*10**5*v/(R*1000*t1)#...........#Mass of air handled per min in kg\n", + "Wt=((n/(n-1))*m*R*(1/60)*(t2-t1)*ns)#........#Total work done in three stages \n", + "print \"Indicated power required = %0.2f kW\"%Wt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.29 PAGE 772" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heat rejected in intercooler after first stage = 1706.67 kJ/min\n", + "Heat rejected in intercooler after second stage = 2191.78 kJ/min\n", + "Heat rejected in intercooler after third stage = 2506.94 kJ/min\n", + "Diameter of the intermediate cylinder = 179.48 mm\n", + "Diameter of the intermediate cylinder = 87.59 mm\n", + "Shaft power = 190.75 kW\n", + "\n", + "Heat transferred during first stage = 609.22 kJ/min\n", + "\n", + "Heat transferred during second stage = 586.52 kJ/min\n", + "\n", + "Heat transferred during third stage = 446.82 kJ/min\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ns=3#........#No of stages\n", + "N=200#.......#Compressor rpm\n", + "p1=1#.......#Intake pressure in bar\n", + "t1=20+273#....#Intake temperature in K\n", + "D=0.35#......#Engine bore in m\n", + "L=0.4#.......#Engine stroke in m\n", + "p2=4#........#Discharge pressure from first stage in bar\n", + "p6=16#........#Discharge pressure from second stage in bar\n", + "p10=64#........#Discharge pressure from third stage in bar\n", + "pd=0.2#........#Loss of pressure between intercoolers in bar\n", + "R=0.287#......#Gas constant in kJ/kgK\n", + "k=0.04#.......#Clearence volume in 4% of the stroke volume\n", + "n1=1.2#.....#Compressor index for first stage\n", + "n2=1.25#.....#Compressor index for second stage\n", + "n3=1.3#.....#Compressor index for third stage\n", + "cp=1.005#......#Specific heat at constant pressure in kJ/kgK\n", + "etamech=0.8#.....#Mechanical efficiency\n", + "#Calculations\n", + "p5=p2-pd#\n", + "p9=p6-pd#\n", + "t5=t1#\n", + "t9=t1#\n", + "Vs=(pi/4)*D*D*L*N*2#............#Swept volume of low pressure cylinder per min in m**3\n", + "etav1=(1+k)-(k*((p2/p1)**(1/n1)))#.....#Volumetric efficiency in first stage\n", + "etav2=(1+k)-(k*((p6/p5)**(1/n2)))#.....#Volumetric efficiency in second stage\n", + "etav3=(1+k)-(k*((p10/p9)**(1/n3)))#.....#Volumetric efficiency in third stage\n", + "vain1=Vs*etav1#.................#Volume of air taken in first stage in m**3/min\n", + "m=(p1*10**5)*vain1/(R*t1*1000)#...........#Mass of air intake in kg/min in first stage\n", + "t2=round(t1*((p2/p1)**((n1-1)/n1)))#\n", + "t6=t5*((p6/p5)**((n2-1)/n2))#\n", + "t10=t9*((p10/p9)**((n3-1)/n3))#\n", + "Qr1=m*cp*(t2-t5)#........#Heat rejected in intercooler after first stage in kJ/min\n", + "Qr2=m*cp*(t6-t9)#........#Heat rejected in intercooler after second stage in kJ/min\n", + "Qr3=m*cp*(t10-t1)#........#Heat rejected in intercooler after third stage in kJ/min\n", + "print \"Heat rejected in intercooler after first stage = %0.2f kJ/min\"%Qr1\n", + "print \"Heat rejected in intercooler after second stage = %0.2f kJ/min\"%Qr2\n", + "print \"Heat rejected in intercooler after third stage = %0.2f kJ/min\"%Qr3\n", + "vainip=m*R*t5*1000/(p5*10**5)#.........#Volume drawn in intermediate pressure cylinder/min\n", + "Vsip=vainip/etav2#.............#Swept volume of intermediate cylinder in m**3/min\n", + "Dip=sqrt(Vsip/(2*N*L*(pi/4)))#............#Diameter of the intermediate cylinder in m\n", + "print \"Diameter of the intermediate cylinder = %0.2f mm\"%(Dip*1000)\n", + "vainhp=m*R*t9*1000/(p9*10**5)#.........#Volume drawn in high pressure cylinder/min\n", + "Vshp=vainhp/etav3#.............#Swept volume of high pressure cylinder in m**3/min\n", + "Dhp=sqrt(Vshp/(2*N*L*(pi/4)))#............#Diameter of the intermediate cylinder in m\n", + "print \"Diameter of the intermediate cylinder = %0.2f mm\"%(Dhp*1000)\n", + "Ps=(((n1/(n1-1))*m*R*(t2-t1))+((n2/(n2-1))*m*R*(t6-t5))+((n3/(n3-1))*m*R*(t10-t9)))*(1/(60*etamech))#...#Shaft power in kW\n", + "print \"Shaft power = %0.2f kW\"%Ps\n", + "cv=cp-R#..........#Specific heat at constant volume in kJ/kgK\n", + "ga=cp/cv#...........#Ratio of specific heats\n", + "Qt1=cv*((ga-n1)/(ga-1))*(t2-t1)*m#............#Heat transfer during first stage in kJ/min\n", + "Qt2=cv*((ga-n2)/(ga-1))*(t6-t1)*m#............#Heat transfer during second stage in kJ/min\n", + "Qt3=cv*((ga-n3)/(ga-1))*(t10-t1)*m#............#Heat transfer during third stage in kJ/min\n", + "print\"\\nHeat transferred during first stage = %0.2f kJ/min\"%(Qt1)\n", + "print \"\\nHeat transferred during second stage = %0.2f kJ/min\"%(Qt2)\n", + "print \"\\nHeat transferred during third stage = %0.2f kJ/min\"%(Qt3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.30 PAGE 773" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No of stages : 4\n", + "Exact stage pressure ratio : 3.34\n", + "\n", + "Intermediate pressures\n", + "p4=37.38\n", + "p3=10.90\n", + "p2=4.00\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#.....#Intake pressure in bar\n", + "p5=125#.....#Pressure of the compressed air in bar\n", + "rpr=4#.........#Pressure ratio is restricted to 4\n", + "#Calculations\n", + "X=(log(p5/p1)/log(rpr))#\n", + "if(X>round(X)):\n", + " x=round(X)+1#\n", + "else:\n", + " x=round(X)#\n", + "print \"No of stages : %d\"%x\n", + "esrp=(p5/p1)**(1/x)#\n", + "print \"Exact stage pressure ratio : %0.2f\"%esrp\n", + "p4=p5/esrp#p3=p4/esrp#p2=p3/esrp#......#Intermediate pressures in bar\n", + "print \"\\nIntermediate pressures\\np4=%.2f\\np3=%.2f\\np2=%.2f\"%(p4,p3,p2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.31 PAGE 774" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "No of stages: 4\n", + "Total work done = 512.24 kJ/kg\n", + "Heat rejected in intercoolers = 254.23 kJ/kg\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ps=1#.........#Suction pressure in bar\n", + "t1=273+125#.......#Delivery temperature in K\n", + "pd=160#...........#Delivery pressure in bar\n", + "tm=40+273#........#Min temperature\n", + "ts=298#........#Suction temperature in K\n", + "n=1.25#......#Adiabatic index\n", + "cv=0.71#.......#Specific heat at constant volume in kJ/kgK\n", + "R=0.287#......#Gas constant in kJ/kgK\n", + "ns=3#.......#No of stages\n", + "#Calculations\n", + "p1=ps*((t1/ts)**(n/(n-1)))#\n", + "x=(log(pd/p1))/(((n/(n-1))*(log(t1/tm))))#\n", + "print \"No of stages: %d\"%(round(x)+1)\n", + "rp1=p1#...........#Pressure ratio in 1st stage\n", + "rp=(pd/rp1)**(1/ns)#.........#Pressure ratio in the following stage\n", + "W=(n/(n-1))*R*ts*(((rp1)**((n-1)/n))-1)#.........#Work done in first stage in kJ\n", + "Wf=ns*(n/(n-1))*R*tm*(((rp)**((n-1)/n))-1)#.........#Work done in next three stages in kJ\n", + "wt=W+Wf#............#Total work done per kg in kJ\n", + "print \"Total work done = %0.2f kJ/kg\"%wt\n", + "cp=cv+R#..............#Specific heat at constant pressure in kJ/kgK\n", + "Qr=ns*cp*(t1-tm)#.............#Heat rejected in intercoolers in kJ/kg\n", + "print \"Heat rejected in intercoolers = %0.2f kJ/kg\"%Qr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.32 PAGE 775" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Swept capacity of low pressure cylinder = 0.12 m**3\n", + "Swept capacity of intermediate pressure cylinder = 0.03 m**3\n", + "Swept capacity of intermediate pressure cylinder = 0.01 m**3\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Vamb=10.5#........#Free air volume in m**3\n", + "Pamb=1.013#...........#Free air presssure in bar\n", + "Tamb=273+15#..........#Free air temperature in K\n", + "T1=(273+25)#...........#Temperature at the end of suction in all cylinders in K\n", + "P1=1#............#Pressure at the suction in bar\n", + "pd=95#...........#Delivery presssure in bar\n", + "N=100#.........#Compressor rpm\n", + "n=1.25#..........#Adiabatic index\n", + "k=0.04#.........#Fractional clearances for LP\n", + "k1=0.07#.........#Fractional clearances for HP\n", + "#Calculations\n", + "z=(pd/P1)**(1/3)#.........#Pressure ratio\n", + "pi1=z*P1#\n", + "pi2=z*pi1#\n", + "etavollp=1+k-(k*(z**(1/n)))#\n", + "etavolhp=1+k1-(k1*(z**(1/n)))#\n", + "v1=(Pamb*Vamb*T1)/(Tamb*P1)#\n", + "sclp=(round(v1))/(etavollp*N)#.........#Swept capacity of LP cylinder in m**3\n", + "print \"Swept capacity of low pressure cylinder = %0.2f m**3\"%sclp\n", + "vip=(Pamb*Vamb*T1)/(pi1*Tamb)#.........#Volume of free air reduced to suction conditions of IP cylinder\n", + "scip=vip/(etavolhp*N)#.........#Swept capacity of IP cylinder in m**3\n", + "print \"Swept capacity of intermediate pressure cylinder = %0.2f m**3\"%scip\n", + "vhp=(Pamb*Vamb*T1)/(pi2*Tamb)#.........#Volume of free air reduced to suction conditions of HP cylinder\n", + "schp=vhp/(etavolhp*N)#.........#Swept capacity of HP cylinder in m**3\n", + "print \"Swept capacity of intermediate pressure cylinder = %0.2f m**3\"%schp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.34 PAGE 776" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature at the end of expansion = 244.63 K\n", + "Indicated power of the motor = 1.00 kW\n", + "Mass of air supplied per min = 0.56 kg\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.0635#.......#Engine bore in m\n", + "L=0.114#.........#Engine stroke in m\n", + "p1=6.3#..........#Supply pressure in bar\n", + "t1=273+24#.........#Supply temperature in K\n", + "p4=1.013#..........#Exhaust pressure in bar\n", + "cv=0.05#............#Clearance volume is 5% of the swept volume\n", + "cr=0.5#..........#Cut off ratio\n", + "n=1.3#...........#Adiabatic index\n", + "R=287#...............#gas constant in kJ/kgK\n", + "N=300#.............#Engine rpm\n", + "ga=1.4#...........#Ratio of specific heats\n", + "#Calculations\n", + "Vs=(pi*D*D*L)/4#........#Swept volume in m**3\n", + "Vc=cv*Vs#..........#Clearance volume in m**3\n", + "v6=Vc#\n", + "v5=v6#\n", + "v1=(Vs/2)+Vc#\n", + "v2=Vs+Vc#\n", + "v3=v2#\n", + "p3=p4#\n", + "v4=v5+(cv*Vs)#\n", + "p2=p1*((v1/v2)**n)#.......#Pressure at the end of expansion\n", + "t2=t1*((v1/v2)**(n-1))#........#Temperature at the end of expansion in K\n", + "print \"Temperature at the end of expansion = %0.2f K\"%t2\n", + "p5=p4*((v4/v5)**n)#\n", + "w=((p1*(v1-v6))+(((p1*v1)-(p2*v2))/(n-1))-(p3*(v3-v4))-(((p5*v5)-(p4*v4))/(n-1)))*10**5#.......#Workk done per cycle in Nm\n", + "IP=(w*N)/(60*1000)#..........#Indicated power in kW\n", + "print \"Indicated power of the motor = %0.2f kW\"%IP\n", + "t3=t2*((p3/p2)**((ga-1)/ga))#\n", + "t4=t3#\n", + "m4=(p4*v4*10**5)/(R*t4)#\n", + "m1=(p1*v1*10**5)/(R*t1)#\n", + "ma=(m1-m4)*N#..........#Mass of air supplied per min\n", + "print \"Mass of air supplied per min = %0.2f kg\"%ma" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.35 PAGE 777" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Work input for roots compressor = 1.52 kJ/rev\n", + "Work input for vane compressor = 1.35 kJ/rev\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "v=0.03#..............#Induced volume in m**3/rev\n", + "p1=1.013#...........#Inlet pressure in bar\n", + "rp=1.5#............#Pressure ratio\n", + "ga=1.4#...........#Ratio of specific heats\n", + "#Calculations\n", + "p2=rp*p1#\n", + "wr=(p2-p1)*(10**5)*v/1000#.....#Work input for roots compressor in kJ\n", + "print \"Work input for roots compressor = %0.2f kJ/rev\"%wr\n", + "pi=(p2+p1)/2#\n", + "wv=((p2-pi)*(10**5)*v*((p1/pi)**(1/ga))*(1/1000))+((ga/(ga-1))*p1*(10**5)*(v/1000)*(((pi/p1)**((ga-1)/ga))-1))#...#Work input required for vane type in kJ/rev\n", + "print \"Work input for vane compressor = %0.2f kJ/rev\"%wv" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.36 PAGE 778" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Compressor efficiency = 85.98 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "v=0.08#.........#Volume of air compressed in m**3\n", + "p1=1#..........#Intake pressure in bar\n", + "p2=1.5#........#Pressure after compression in in bar\n", + "ga=1.4#.........#Ratio of specific heats\n", + "#Calculations\n", + "wac=v*(p2-p1)*10**5#........#Actual work done in Nm\n", + "wid=(ga/(ga-1))*p1*v*(10**5)*(((p2/p1)**((ga-1)/ga))-1)#...........#Ideal work done per revolution in Nw\n", + "etac=wid/wac#................#Compressor efficiency\n", + "print \"Compressor efficiency = %0.2f %%\"%(etac*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.37 PAGE 778" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Isentropic efficiency = 74.46 %\n", + "Power required to drive the coompressor = 190.69 kW\n", + "Overall efficiency = 72.92 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "m=2.5#..........#Air flow rate in kg/s\n", + "p1=1#........#Inlet pressure in bar\n", + "t1=290#............#Inlet temperature in bar\n", + "C1=80#..........#Inlet Velocity in m/s\n", + "p2=1.5#........#pressure after compression in bar\n", + "t2=345#............#temperature after compression in bar\n", + "C2=220#..........#Velocity after compression in m/s\n", + "cp=1.005#...........#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#............#Ratio of specific heats\n", + "R=287#..............#Gas constant for air in kJ/kgK\n", + "#Calculations\n", + "t21=t1*((p2/p1)**((ga-1)/ga))#\n", + "wisen=cp*(t21-t1)+((C2*C2)-(C1*C1))/(2*1000)#.....#Isentropic work done in kJ/kg\n", + "w=cp*(t2-t1)+((C2*C2)-(C1*C1))/(2*1000)#.....#Actual work done (in impeller) in kJ/kg\n", + "etaisen=wisen/w#...............#Isentropic efficiency\n", + "print \"Isentropic efficiency = %0.2f %%\"%(etaisen*100)\n", + "P=m*w#..........#Power required to drive the coompressor in kW\n", + "print \"Power required to drive the coompressor = %0.2f kW\"%P\n", + "t3=(((C2*C2)-(C1*C1))/(2*1000*cp))+t2#....#Temperature of air after leaving the diffuser in K\n", + "p3=p2*((t3/t2)**(ga/(ga-1)))#..........#Pressure of air after leaving the diffuser in bar\n", + "t31=t1*((p3/p1)**((ga-1)/ga))#...........#Delivery temperature from diffuser in K\n", + "etao=(t31-t1)/(t3-t1)#...............#Overall efficiency \n", + "print \"Overall efficiency = %0.2f %%\"%(etao*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.38 PAGE 779" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Actual rise in temperature = 165.00\n", + "Tip diameter of the impeller = 101.70 cm\n", + "Power required = 1459.26 kW\n", + "Diameter of the eye = 41.91 cm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ma=528#.............#Air flow in kg/min\n", + "m=ma/60#.............#Air flow in kg/s\n", + "p1=1#........#Inlet pressure in bar\n", + "t1=293#............#Inlet temperature in bar\n", + "N=20000#..............#Compressor rpm\n", + "etaisen=0.8#.........#Isentropic efficiency\n", + "po1=1#.........#Static pressure in bar\n", + "p02=4#...........#Final total pressure in bar\n", + "C1=145#.........#Velocity of air when entering the impeller in m/s\n", + "rwt=0.9#..........#Ratio of whirl speed to tip speed \n", + "dh=0.12#........#Hub diameter in m\n", + "cp=1.005#...........#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#............#Ratio of specific heats\n", + "R=287#..............#Gas constant for air in kJ/kgK\n", + "#Calculations\n", + "t01=t1+((C1*C1)/(2*cp*1000))#..........#Stagnation temperature at the inlet to the machine in K\n", + "p01=p1*((t01/t1)**(ga/(ga-1)))#.....#Stagnation pressure at the inlet to the machine in bar\n", + "t021=t01*((p02/p01)**((ga-1)/ga))#\n", + "deltisen=t021-t01#.........#Isentropic rise in temperature in K\n", + "delt=round(deltisen/etaisen)#........#Actual rise in temperature \n", + "print \"Actual rise in temperature = %0.2f\"%delt\n", + "wc=cp*delt#.........#Work consumed by compressor in kJ/kg\n", + "Cbl2=sqrt(wc*1000/rwt)#\n", + "d2=Cbl2*60/(pi*N)#..........#Tip diameter of the impeller in m\n", + "print \"Tip diameter of the impeller = %0.2f cm\"%(d2*100)\n", + "P=m*wc#............#Power required in kW\n", + "print \"Power required = %0.2f kW\"%P\n", + "rho1=(p1*10**5)/(R*t1)#.......#Density at entry in kg/m**3\n", + "d1=sqrt(((m*4)/(C1*rho1*pi))+(dh**2))#.......#Eye diameter in m\n", + "print \"Diameter of the eye = %0.2f cm\"%(d1*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.39 PAGE 780" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Final temperature of air = 466.65 Kevin\n", + "Theoretical power = 2282.94 kW\n", + "Impeller diameter at outlet = 208.66 cm\n", + "Impeller diameter at inlet = 104.33 cm\n", + "Breadth of impeller at inlet = 14.92 cm\n", + "Impeller blade angle at inlet = 39.02 degrees\n", + "Diffuser blade angle at inlet = 22.06 degrees\n" + ] + } + ], + "source": [ + "from math import atan\n", + "# Initialisation of Variables\n", + "N=10000#.................#Compressor rpm\n", + "v=660#............#Volume of air delivered in m**3/min\n", + "p1=1#.................#Inlet pressure in bar\n", + "t1=293#.............#Inlet temperature in K\n", + "rp=4#.............#Pressure ratio\n", + "etaisen=0.82#........#Isentropic efficiency\n", + "Cf2=62#...............#Flow velocity in m/s\n", + "rr=2#.............#Ratio of outer radius of impeller to inner radius of impeller\n", + "ka=0.9#..............#Blade area co efficient\n", + "fis=0.9#...........#Slip factor\n", + "cp=1.005#..............#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#............#Ratio of specific heats\n", + "R=287#..............#Gas constant for air in kJ/kgK\n", + "#Calculations\n", + "t21=t1*(rp**((ga-1)/ga))#\n", + "Cf1=Cf2#\n", + "t2=t1+((t21-t1)/etaisen)#..........#Final temperature of air\n", + "m=(p1*10**5*v/60)/(R*t1)#...............#Mass flow rate in m**3/s\n", + "P=m*cp*(t2-t1)#.........#Theoretical power in kW\n", + "print \"Final temperature of air = %0.2f Kevin\"%t2\n", + "print \"Theoretical power = %0.2f kW\"%P\n", + "Cbl2=sqrt(1000*cp*(t2-t1)/fis)#\n", + "d2=60*Cbl2/(pi*N)#..........#Impeller diameter at outlet in m\n", + "d1=d2/rr#...............#Impeller diameter at inlet in m\n", + "print \"Impeller diameter at outlet = %0.2f cm\"%(d2*100)\n", + "print \"Impeller diameter at inlet = %0.2f cm\"%(d1*100)\n", + "b1=(v/60)/(2*pi*(d1/2)*Cf1*ka)#.........#Breadth of impeller at inlet in m\n", + "print \"Breadth of impeller at inlet = %0.2f cm\"%(b1*100)\n", + "Cbl1=Cbl2/rr#\n", + "beta1=(atan(Cf1/Cbl1))*180/pi#\n", + "al2=(atan(Cf2/(fis*Cbl2)))*180/pi#\n", + "print \"Impeller blade angle at inlet = %0.2f degrees\"%(beta1)\n", + "print \"Diffuser blade angle at inlet = %0.2f degrees\"%(al2,)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.40 PAGE 780" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Blade angles \n", + "\n", + "\t Blade angle at the inlet of the impeller: beta 1=124.714309 \n", + "\t Blade angle at the outlet of the impeller: beta 2=-30.095513 \n", + "\t Absolute angle at the tip of impeller: alpha 2=22.507168\n", + "\n", + "\n", + "Breadth of the blade at inlet = 18.22 cm\n", + "Breadth of the blade at outlet = 7.18 cm\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "v1=4.8#......#Volume of air compressed in m**3/s\n", + "p1=1#....#Inlet pressure in bar\n", + "t1=293#........#Inlet pressure in K\n", + "n=1.5#........#Compression index\n", + "Cf1=65#......#Air flow velocity at inlet in m/s\n", + "Cf2=Cf1#......#Flow velocity is same at inlet and outlet\n", + "d1=0.32#..........#Inlet impeller diameter in m\n", + "d2=0.62#........#Outlet impeller diameter in m\n", + "N=8000#........#Blower rpm\n", + "cp=1.005#......#Specific heat at constant pressure in kJ/kgK\n", + "#Calculations\n", + "t21=t1*((n/p1)**((n-1)/n))#....#Temperature at the outlet of compressor in K\n", + "Cbl1=(pi*d1*N)/60#......#Peripheral velocity at inlet in m/s\n", + "Cbl2=(pi*N*d2)/60#......#Tip peripheral velocity at outlet in m/s\n", + "Cw2=(cp*(t21-t1)*1000)/Cbl2#\n", + "be1=(atan(Cf1/Cbl1))*180/pi#\n", + "be2=(atan(Cf2/(Cbl2-Cw2)))*180/pi#......#Blade angles at the tip of the impeller\n", + "al2= (atan(Cf2/Cw2))*180/pi# \n", + "print \"\\nBlade angles \\n\\n\\t Blade angle at the inlet of the impeller: beta 1=%f \\n\\t Blade angle at the outlet of the impeller: beta 2=%f \\n\\t Absolute angle at the tip of impeller: alpha 2=%f\\n\\n\"%(be1,be2,al2)\n", + "b1=v1/(2*pi*(d1/2)*Cf1)#........#Breadth of blade at inlet in m\n", + "print \"Breadth of the blade at inlet = %0.2f cm\"%(b1*100)\n", + "v2=(v1*t21*p1)/(n*t1)#..............#Discharge at the outlet in m**3/s\n", + "b2=v2/(2*pi*(d2/2)*Cf2)#........#Breadth of blade at outlet in m\n", + "print \"Breadth of the blade at outlet = %0.2f cm\"%(b2*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.41 PAGE 781" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diameter of the impeller = 0.33 m\n", + "Power input to compressor = 2951.61 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "m=16.5#.......#Air flow in kg/s\n", + "rp=4#........#Pressure ratio\n", + "N=15000#.........#Compressor rpm\n", + "t01=293#.........#Inlet head temperature\n", + "fis=0.9#...........#Slip factor\n", + "fiw=1.04#.........#Power input factor\n", + "etaisen=0.8#.......#Isentropic efficiency\n", + "cp=1.005#........#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#......#Ratio of specific heats\n", + "#Calculations\n", + "t021=t01*(rp**((ga-1)/ga))#\n", + "delt=(t021-t01)/etaisen#Cbl2=sqrt((1000*cp*delt)/(fiw*fis))#\n", + "D=(60*Cbl2)/(pi*N)#..............#Diameter of impeller\n", + "print \"Diameter of the impeller = %0.2f m\"%D\n", + "P=m*cp*delt#\n", + "print \"Power input to compressor = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.42 PAGE 781" + ] + }, + { + "cell_type": "code", + "execution_count": 105, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total head temperature = 447.09 K\n", + "Static temperature at outlet = 439.93 K\n", + "Static pressure at exit = 3.45 bar\n", + "Static temperature at inlet = 278.25 K\n", + "Static pressure at inlet = 0.90 bar\n", + "Static pressure ratio : 3.8237\n", + "Work done on air = 159.89 kJ/kg\n", + "Power required to drive the compressor = 1918.67 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "rp=3.6#..........#Pressure ratio\n", + "die=0.35#.......#Diameter of inlet eye of compressor in m\n", + "Cf=140#..........#Axial velocity in m/s\n", + "m=12#.............#Mass flow in kg/s\n", + "Cbl2=120#.........#Velocity in the delivery duct in m/s\n", + "Ci=460#..........#The tip speed of the impeller in m/s\n", + "N=16000#............#Speed of impeller in rpm\n", + "etaisen=0.8#.......#Isentropic efficiency\n", + "pc=0.73#........#Pressure co efficient\n", + "pa=1.013#..........#Ambient pressure in bar\n", + "ta=273+15#................#Ambient temperature in K\n", + "ga=1.4#..........#Ratio of specific heats\n", + "cp=1.005#.........#Specific heat at constant pressure in kJ/kgK\n", + "R=0.287#........#Gas constant in kJ/kgK\n", + "#Calculations\n", + "delt=((ta*((rp**((ga-1)/ga))-1))/etaisen)#.......#Rise in temperature\n", + "t02=ta+delt#............#Total head temperature in K\n", + "print \"Total head temperature = %0.2f K\"%t02\n", + "t2=t02-((Cbl2*Cbl2)/(2*cp*1000))#..........#Static temperature at outlet in K\n", + "print \"Static temperature at outlet = %0.2f K\"%t2\n", + "p02=pa*rp#\n", + "p2=p02/(1+((Cbl2*Cbl2)/(2*R*t2*1000)))#...........#Static pressure at exit in bar\n", + "print \"Static pressure at exit = %0.2f bar\"%p2\n", + "t1=ta-((Cf*Cf)/(2*cp*1000))#.............#Static temperature at inlet in K\n", + "print \"Static temperature at inlet = %0.2f K\"%t1\n", + "p1=pa/(1+((Cf*Cf)/(2*R*t1*1000)))#...........#Static pressure at inlet in bar\n", + "print \"Static pressure at inlet = %0.2f bar\"%p1\n", + "rp=p2/p1#.....#Static pressure ratio\n", + "print \"Static pressure ratio : %0.4f\"%rp\n", + "W=cp*delt#...........#Work done on air in kJ/kg of air\n", + "print \"Work done on air = %0.2f kJ/kg\"%W\n", + "P=m*cp*delt#..........#Power required to drive the compressor in kW\n", + "print \"Power required to drive the compressor = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.43 PAGE 782" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature rise of air while passing through compressor: 159.09 \n", + "Pressure ratio : 3.8237\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=300#.........#Inlet temperature in K\n", + "N=18000#.............#Compressor rpm\n", + "etaisen=0.76#.......#Isentropic efficiency\n", + "od=0.55#......#Outer diameter of blade tip\n", + "sf=0.82#......#Slip factor\n", + "cp=1.005#.........#Specific heat capacity at constant pressure in kJ/kgK\n", + "ga=1.4#.............#Ratio of specific heats\n", + "#Calculations\n", + "Cbl2=(pi*od*N)/60#W=Cbl2*Cbl2*sf/1000#...........#Work done per kg of air in kW\n", + "delt=W/cp#..............#Temperature rise of air while passing through compressor \n", + "print \"Temperature rise of air while passing through compressor: %0.2f \"%delt\n", + "t21=(etaisen*delt)+t1#rp=((t21/t1)**(ga/(ga-1)))#.....#Pressure ratio\n", + "print \"Pressure ratio : %0.4f\"%rp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.44 PAGE 782" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure rise = 0.01 bar\n", + "Work done per kg of air = 7.66 kW\n" + ] + } + ], + "source": [ + "from math import tan\n", + "# Initialisation of Variables\n", + "Cbl=240#........#Mean blade velocity in m/s\n", + "Cf=190#.........#Air flow velocity in m/s\n", + "al1=45#al2=14#.........#Blade angels in degrees\n", + "rho=1#.........#Density of air in kg/m**3\n", + "#Calculations \n", + "pr=(1/2)*(rho*Cf*Cf/(10**5))*(((tan(al1*pi/180))**2)-((tan(al2*pi/180))**2))#.......#Pressure rise in bar\n", + "print \"Pressure rise = %0.2f bar\"%pr\n", + "W=Cbl*Cf/1000*((tan(al1*pi/180))-(tan(al2*pi/180)))#.............#Work done per kg of air in kW\n", + "print \"Work done per kg of air = %0.2f kW\"%W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.45 PAGE 783" + ] + }, + { + "cell_type": "code", + "execution_count": 108, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Work done by the machine = 174.52 kJ/kg\n", + "\n", + "Blade angels are as follows (In degrees)\n", + "\n", + "alpha1=44.885692\tbeta1=146.719453\n", + "\n", + "alpha2=146.719453\tbeta2=44.885692\n", + "\n", + "\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "etaisen=0.82#.......#Overall isentropic efficiency \n", + "N=8#............#No of stages\n", + "t1=293#...........#Inlet temperature in K\n", + "ga=1.4#............#Ratio of specific heats\n", + "rp=4#.............#Pressure ratio\n", + "Rd=0.5#................#Reaction factor\n", + "Cbl=180#.................#Mean blade speed in m/s\n", + "Cf=90#...............#Air flow velocity in m/s\n", + "cp=1.005#.........#Specific heat at constant pressure in kJ/kgK\n", + "#Calculations\n", + "t21=t1*(rp**((ga-1)/ga))#\n", + "t2=((t21-t1)/etaisen)+t1#\n", + "wrt=cp*(t2-t1)#.........#Work done by the machine in kJ/kg\n", + "print \"Work done by the machine = %0.2f kJ/kg\"%wrt\n", + "be1=atan(((cp*(t2-t1)*1000/(Cf*Cbl*N))+(Cbl/Cf))/2)*180/pi#\n", + "al1=atan((Cbl/Cf)-tan(be1*pi/180))*180/pi#\n", + "print \"\\nBlade angels are as follows (In degrees)\\n\\nalpha1=%f\\tbeta1=%f\\n\\nalpha2=%f\\tbeta2=%f\\n\\n\"%(al1,be1,be1,al1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.46 PAGE 784" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Flow velocity = 102.39 m/s\n", + "No of stages : 3.0\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "etaisen=0.85#.......#Overall isentropic efficiency\n", + "t1=293#...........#Inlet temperature in K\n", + "rp=4#.............#Pressure ratio\n", + "Rd=0.5#................#Reaction factor\n", + "Cbl=180#.................#Mean blade speed in m/s\n", + "wip=0.82#..............#Work input factor\n", + "al1=12#be1=42#......#Blade angels in degrees\n", + "ga=1.4#............#Ratio of specific heats \n", + "cp=1.005#.........#Specific heat at constant pressure in kJ/kgK\n", + "#Calculations\n", + "t21=t1*(rp**((ga-1)/ga))#\n", + "t2=((t21-t1)/etaisen)+t1#\n", + "wrt=cp*(t2-t1)#.........#Theoretical work required in kJ/kg\n", + "Cf=Cbl/(tan(al1*pi/180)+tan(be1*pi/180))#\n", + "Cw1=Cf*tan(al1*pi/180)#Cw2=Cf*tan(be1*pi/180)#\n", + "wcps=Cbl*(Cw2-Cw1)*wip/1000#.............#Work consumed per stage in kJ/kg\n", + "N=round(wrt/wcps)#.......#No of stages\n", + "print \"Flow velocity = %0.2f m/s\"%Cf\n", + "print \"No of stages : \",N" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.47 PAGE 784" + ] + }, + { + "cell_type": "code", + "execution_count": 110, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Blade angels are as follows (In degrees)\n", + "\n", + "alpha1=12.216721\t\tbeta1=147.399029\n", + "\n", + "alpha2=147.399029\tbeta2=12.216721\n", + "\n", + "\n", + "Power required by the compressor = 184.95 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "rp=5#..........#Stagnation pressure ratio ga\n", + "etaisen=0.92#.......#Overall isentropic efficiency\n", + "t1=290#.............#Inlet stagnation temperature in K\n", + "p1=1#...............#Inlet stagnation pressure in bar\n", + "Cbl=160#...........#Mean blade speed in m/s\n", + "ga=1.4#...........#Ratio of specific heats\n", + "Rd=0.5#............#Degree of reaction\n", + "Cf=90#................#Axial velocity of air through compressor in m/s\n", + "N=8#.............#No of stages\n", + "m=1#.........#Mass flow in kg/s\n", + "cp=1.005#............#Specific heat at constant pressure in kJ/kgK\n", + "#Calculations\n", + "tN1=t1*(rp**((ga-1)/ga))#......#Temperature at the end of compression stage due to isentropic expansion in K\n", + "tN=((tN1-t1)/etaisen)+t1#\n", + "be1=atan(((cp*(tN-t1)*1000/(Cf*Cbl*N))+(Cbl/Cf))/2)*180/pi#\n", + "al1=atan((Cbl/Cf)-tan(be1*pi/180))*180/pi#\n", + "print \"\\nBlade angels are as follows (In degrees)\\n\\nalpha1=%f\\t\\tbeta1=%f\\n\\nalpha2=%f\\tbeta2=%f\\n\\n\"%(al1,be1,be1,al1)\n", + "P=m*cp*(tN-t1)#..........#Power required by the compressor in kW\n", + "print \"Power required by the compressor = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.48 PAGE 785" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stagnation polytropic efficiency = 87.59 %\n", + "No of stages : 3.0\n", + "Inlet temperature = 294.85 K\n", + "Inlet pressure = 0.94 bar\n", + "Height of the blade in the first stage = 27.40 cm\n" + ] + } + ], + "source": [ + "from math import cos\n", + "# Initialisation of Variables\n", + "rp=4#........#Stagnation pressure ratio\n", + "etaisen=0.85#.....#Stagnation isentropic efficiency\n", + "p1=1#.............#Inlet stagnation pressure in bar\n", + "t1=300#...........#Inlet stagnation temperature in K\n", + "Rd=0.5#............#Degree of reaction\n", + "Cu=180#...........#Mean blade speed in m/s\n", + "Wd=0.9#...........#Work done factor\n", + "htr=0.42#.......#Hub tip ratio\n", + "al1=12#be2=al1#.......#Relative air angle at rotor inlet in degrees\n", + "al2=32#be1=al2#........#Relative air angle at rotor at outlet in degrees\n", + "ga=1.4#...........#Ratio of specific heats\n", + "cp=1.005#..........#Specific heat capacity at constant pressure in kJ/kgK\n", + "R=287#..........#Gas constant in J/kgK\n", + "m=19.5#..........#Mass flow in kg/s\n", + "#Calculations\n", + "tN1=t1*(rp**((ga-1)/ga))#......#Temperature at the end of compression stage due to isentropic expansion in K\n", + "tN=((tN1-t1)/etaisen)+t1#\n", + "etap=log(rp**((ga-1)/ga))/log(tN/t1)#...........#Stagnation polytropic efficiency\n", + "print \"Stagnation polytropic efficiency = %0.2f %%\"%(etap*100)\n", + "Cf=Cu/(tan(al1*pi/180)+tan(be1*pi/180))#\n", + "Cw1=Cf*tan(al1*pi/180)#Cw2=Cf*tan(al2*pi/180)#\n", + "wcps=Cu*(Cw2-Cw1)*Wd/1000#.............#Work consumed per stage in kJ/kg\n", + "wc=cp*(tN-t1)#...............#Work consumed by compressor in kJ/kg\n", + "N=round(wc/wcps)#.......#No of stages\n", + "print \"No of stages : \",N\n", + "C1=Cf/cos(al1*pi/180)#.......#Absolute velocity at exit from guide vanes in m/s\n", + "ti=t1-((C1*C1)/(2*cp*1000))#..........#Inlet temperature in K\n", + "print \"Inlet temperature = %0.2f K\"%ti\n", + "pi=p1*((ti/t1)**(ga/(ga-1)))#......#Inlet pressure in bar\n", + "print \"Inlet pressure = %0.2f bar\"%pi\n", + "rho1=(pi*10**5)/(R*ti)#.............#Density of air approaching the first stage\n", + "r1=sqrt(m/(rho1*pi*Cf*(1-(htr**2))))#\n", + "rh=r1*htr#\n", + "l=r1-rh#............#Height of the blade in the first stage in m\n", + "print \"Height of the blade in the first stage = %0.2f cm\"%(l*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 20.49 PAGE 785" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Delivery pressure = 5.57 bar\n", + "No of stages : 11.0\n", + "Overall efficiency = 84.86 %\n" + ] + } + ], + "source": [ + "from math import exp\n", + "# Initialisation of Variables\n", + "ma=20#..........#Air flow rate in kg/s\n", + "p1=1#.........#Inlet stagnation pressure in bar\n", + "t1=290#.........#Inlet stagnation temperature in Kelvin\n", + "t2=305#.........#Temperature at the end of first stage in K\n", + "etapc=0.88#.....#Polytropic efficiency of compression\n", + "P=4350#......#Power consumed by compressor in kW\n", + "ga=1.4#.....#Ratio of specific heats\n", + "cp=1.005#......#Specific heat at constant pressure \n", + "#Calculations\n", + "p2byp1=(exp(etapc*log(t2/t1)))**(ga/(ga-1))#\n", + "tN=(P/(ma*cp))+t1#\n", + "pN=p1*((tN/t1)**((etapc*ga)/(ga-1)))#......#Delivery pressure in bar\n", + "print \"Delivery pressure = %0.2f bar\"%pN\n", + "N=log(pN/p1)/log(p2byp1)#...........#No of stages \n", + "print \"No of stages : \",round(N)\n", + "tN1=t1*((pN/p1)**((ga-1)/ga))#\n", + "etao=(tN1-t1)/(tN-t1)#...............#Overall efficiency\n", + "print \"Overall efficiency = %0.2f %%\"%(etao*100)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER21.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER21.ipynb new file mode 100644 index 00000000..711a3d45 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER21.ipynb @@ -0,0 +1,1241 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 21 - Gas turbines and jet propulsion" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.1 PAGE 848" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power developed = 250.22 kW/kg of air\n", + "Thermal efficiency = 17.96 %\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "p1=1#.........#Pressure of air while entering the turbine in bar\n", + "t1=293#........#Temperature of air entering the turbine in K\n", + "p2=4#.........#Pressure of air after compression in bar\n", + "etac=0.8#....#Efficiency of compressor\n", + "etat=0.85#.....#Efficiency of turbine\n", + "afr=90#........#Air fuel ratio\n", + "ma=3#...........#Mass of air in kg/s\n", + "ga=1.4#........#Ratio of specific heats\n", + "cp=1#.............#Specific heat at constant pressure in kJ/kgK\n", + "C=41800#.............#Calorific value of fuel in kJ/kg\n", + "#Calculations\n", + "t2=t1*((p2/p1)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "t3=round((C/((afr+1)*cp))+t21)#..............#Temperature before expansion in turbine in K\n", + "p4=p1#\n", + "p3=p2#\n", + "t4=t3*((p4/p3)**((ga-1)/ga))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "wt=((afr+1)/afr)*cp*(t3-t41)#........#Work done by turbine in kJ/kg of air\n", + "wc=round(1*cp*(t21-t1))#.................#Work done by compression in kJ/kg of air\n", + "wnet=wt-wc#..........#Net work done in kJ/kg\n", + "P=wnet*ma#.................#Power developed in kW/kg of air\n", + "print \"Power developed = %0.2f kW/kg of air\"%P\n", + "qs=(1/afr)*C#................#Heat supplied in kJ/kg of air\n", + "etath=wnet/qs#................#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.2 PAGE 848" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power developed = 770.31 kW/kg of air\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=288#........#Temperature of air entering the turbine in K\n", + "t3=883#..............#Temperature before expansion in turbine in K\n", + "etac=0.8#....#Efficiency of compressor\n", + "etat=0.82#.....#Efficiency of turbine\n", + "rp=6#...........#Pressure ratio\n", + "ma=16#...........#Mass of air in kg/s\n", + "gac=1.4#........#Ratio of specific heats for compression process\n", + "gae=1.333#............#Ratio of specific heats for expansion process\n", + "cpc=1.005#.............#Specific heat at constant pressure in kJ/kgK during compression process\n", + "cpe=1.11#.............#Specific heat at constant pressure in kJ/kgK during expansion process\n", + "C=41800#.............#Calorific value of fuel in kJ/kg\n", + "#Calculations\n", + "t2=t1*((rp)**((gac-1)/gac))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "t4=t3/((rp)**((gae-1)/gae))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "wt=cpe*(t3-t41)#........#Work done by turbine in kJ/kg of air\n", + "wc=(1*cpc*(t21-t1))#.................#Work done by compression in kJ/kg of air\n", + "wnet=wt-wc#..........#Net work done in kJ/kg\n", + "P=wnet*ma#.................#Power developed in kW/kg of air\n", + "print \"Power developed = %0.2f kW/kg of air\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.3 PAGE 849" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal efficiency = 65.57 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#.........#Pressure of air while entering the turbine in bar\n", + "t1=300#........#Temperature of air entering the turbine in K\n", + "p2=6.2#.........#Pressure of air after compression in bar\n", + "etac=0.88#....#Efficiency of compressor\n", + "etat=0.9#.....#Efficiency of turbine\n", + "far=0.017#........#Fuel air ratio\n", + "ga=1.4#........#Ratio of specific heats for compression\n", + "gae=1.333#........#Ratio of specific heats for expansion\n", + "cp=1.147#.............#Specific heat at constant pressure in kJ/kgK during expansion\n", + "cpc=1.005#.............#Specific heat at constant pressure in kJ/kgK during compression\n", + "C=44186#.............#Calorific value of fuel in kJ/kg\n", + "#Calculations\n", + "t2=t1*((p2/p1)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "t3=(((C*far)/((far+1)*cpc))+t21)#..............#Temperature before expansion in turbine in K\n", + "p4=p1#p3=p2#t4=t3*((p4/p3)**((gae-1)/gae))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "wt=(cp*(t3-t41))#........#Work done by turbine in kJ/kg of air\n", + "wc=round(1*cpc*(t21-t1))#.................#Work done by compression in kJ/kg of air\n", + "wnet=wt-wc#..........#Net work done in kJ/kg\n", + "qs=(far)*C#................#Heat supplied in kJ/kg of air\n", + "etath=wnet/qs#................#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.4 PAGE 850" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air fuel ratio is 56:1\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=300#........#Temperature of air entering the turbine in K\n", + "t3=1148#..............#Temperature before expansion in turbine in K\n", + "etac=0.8#....#Efficiency of compressor\n", + "etat=0.852#.....#Efficiency of turbine\n", + "rp=4#...........#Pressure ratio\n", + "p1=1#...............#Pressure of air before entering compressor\n", + "ga=1.4#........#Ratio of specific heats\n", + "cp=1.0#.............#Specific heat at constant pressure in kJ/kgK \n", + "C=42000#.............#Calorific value of fuel in kJ/kg\n", + "perlcc=10#............#Percent loss of calorific value of fuel in combustion chamber\n", + "#Calculations\n", + "p2=p1*rp#.................#Pressure of air after compression in bar\n", + "etacc=(100-perlcc)/100#.......#Efficiency of combustion chamber\n", + "t2=t1*((rp)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "afr=((C*etacc)/(cp*(t3-t21)))-1#........#Air fuel ratio\n", + "print \"Air fuel ratio is %d:1\"%round(afr)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.5 PAGE 851" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal efficiency = 15.92 %\n", + "The work ratio is 0.259290\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=300#........#Temperature of air entering the turbine in K\n", + "t3=883#..............#Temperature before expansion in turbine in K\n", + "etac=0.8#....#Efficiency of compressor\n", + "etat=0.852#.....#Efficiency of turbine\n", + "rp=4#...........#Pressure ratio\n", + "p1=1#...............#Pressure of air before entering compressor\n", + "ga=1.4#........#Ratio of specific heats\n", + "cp=1.11#.............#Specific heat at constant pressure in kJ/kgK \n", + "C=42000#.............#Calorific value of fuel in kJ/kg\n", + "perlcc=10#............#Percent loss of calorific value of fuel in combustion chamber\n", + "#Calculations\n", + "p2=p1*rp#.................#Pressure of air after compression in bar\n", + "etacc=(100-perlcc)/100#.......#Efficiency of combustion chamber\n", + "t2=t1*((rp)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "qs=cp*(t3-t21)#...................#Heat supplied in kJ/kg\n", + "t4=t3/((rp)**((ga-1)/ga))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "wt=cp*(t3-t41)#........#Work done by turbine in kJ/kg of air\n", + "wc=(1*cp*(t21-t1))#.................#Work done by compression in kJ/kg of air\n", + "wnet=wt-wc#..........#Net work done in kJ/kg\n", + "etath=wnet/qs#................#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)\n", + "wrr=wnet/wt#...................#Work ratio\n", + "print \"The work ratio is %f\"%wrr" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.6 PAGE 851" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Quantity of air in circulation = 13.49 kg\n", + "Actual heat supplied per kg of air circulation = 552.66 kJ\n", + "Thermal efficiency = 14.28 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#.........#Pressure of air while entering the turbine in bar\n", + "t1=293#........#Temperature of air entering the turbine in K\n", + "p2=5#.........#Pressure of air after compression in bar\n", + "plcc=0.1#.....#Pressure loss in combustion chamber in bar\n", + "t3=953#............#Temperature before expansion in turbine in K\n", + "etac=0.85#....#Efficiency of compressor\n", + "etat=0.8#.....#Efficiency of turbine\n", + "etacc=0.85#......#Efficiency of combustion chamber\n", + "ga=1.4#........#Ratio of specific heats\n", + "cp=1.024#.............#Specific heat at constant pressure in kJ/kgK \n", + "P=1065#.............#Power developed by the plant in kW\n", + "\n", + "#Calculations\n", + "p3=p2-plcc#........................#Pressure before expansion in turbine in bar\n", + "p4=p1#\n", + "t2=t1*((p2/p1)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "t4=t3*((p4/p3)**((ga-1)/ga))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "wt=(cp*(t3-t41))#........#Work done by turbine in kJ/kg of air\n", + "wc=round(1*cp*(t21-t1))#.................#Work done by compression in kJ/kg of air\n", + "wnet=wt-wc#..........#Net work done in kJ/kg\n", + "ma=P/wnet#.............#Quantity of air in circulation in kg\n", + "print \"Quantity of air in circulation = %0.2f kg\"%(ma)\n", + "qs=cp*(t3-t21)/etac#..................#Actual heat supplied per kg of air circulation in kJ\n", + "print \"Actual heat supplied per kg of air circulation = %0.2f kJ\"%qs\n", + "etath=wnet/qs#.............#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.7 PAGE 852" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pressure ratio of low pressure turbine : 2.3042\n", + "Temperature of the exhaust from the unit = 672.95 K\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ma=20#..............#Air flow rate in kg/s\n", + "t1=300#........#Temperature of air entering the turbine in K\n", + "t3=1000#............#Temperature before expansion in turbine in K\n", + "rp=4#...............#Pressure ratio\n", + "cp=1#.............#Specific heat at constant pressure in kJ/kgK \n", + "ga=1.4#........#Ratio of specific heats\n", + "#Calculations\n", + "t2=t1*((rp)**((ga-1)/ga))#...............#Temperature of air after compression in K\n", + "t4=t3-t2+t1#............#Temperature after expansion in turbine in K\n", + "prlp=rp/((t3/t4)**(ga/(ga-1)))#.............#Pressure ratio of low pressure turbine\n", + "print \"Pressure ratio of low pressure turbine : %0.4f\"%prlp\n", + "t5=t4/((prlp)**((ga-1)/ga))#............#Temperature of the exhaust from the unit in K\n", + "print \"Temperature of the exhaust from the unit = %0.2f K\"%t5" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.8 PAGE 853" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cycle efficiency = 31.04 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#.........#Pressure of air while entering the turbine in bar\n", + "t1=300#........#Temperature of air entering the turbine in K\n", + "t21=490#........#Actual temperature of air after compression in K\n", + "t3=1000#............#Temperature before expansion in turbine in K\n", + "rp=5#.............#Pressure ratio\n", + "etac=0.8#....#Efficiency of compressor\n", + "etat=0.8#.....#Efficiency of turbine\n", + "ga=1.4#........#Ratio of specific heats\n", + "cp=1.005#.............#Specific heat at constant pressure in kJ/kgK \n", + "#Calculations\n", + "t4=t3/((rp)**((ga-1)/ga))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "t5=((t41-t21)*etac)+t21#...........#Temperature of the exhaust from the unit in K\n", + "wc=cp*(t21-t1)#.............#Work consumed by compressor in kJ/kg\n", + "wt=cp*(t3-t41)#........#Work done by turbine in kJ/kg\n", + "qs=cp*(t3-t5)#..........#Heat supplied in kJ/kg\n", + "etac=(wt-wc)/qs#.........#Cycle efficiency\n", + "print \"Cycle efficiency = %0.2f %%\"%(etac*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.9 PAGE 853" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal efficiency of power turbine = 9.46 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#.........#Pressure of air while entering the turbine in bar\n", + "t1=288#........#Temperature of air entering the turbine in K\n", + "p2=8#.........#Pressure of air after compression in bar\n", + "t3=1173#.............#Temperature before expansion in turbine in K\n", + "etac=0.76#....#Efficiency of compressor\n", + "etat=0.86#.....#Efficiency of turbine\n", + "ma=23#.........#Quantity of air circulation in kg/s\n", + "ga=1.4#........#Ratio of specific heats for compression\n", + "gag=1.34#........#Ratio of specific heats for expansion\n", + "cp=1.005#.............#Specific heat at constant pressure in kJ/kgK \n", + "cpg=1.128#.............#Specific heat at constant pressure in kJ/kgK\n", + "C=4200#.............#Calorific value of fuel in kJ/kg\n", + "etamech=0.95#........#Mechanical efficiency\n", + "etagen=0.96#.........#Generator efficiency\n", + "#Calculations\n", + "t2=t1*((p2/p1)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "p4=p1#p3=p2#.............#Isobaric processes\n", + "t4=t3*((p4/p3)**((gag-1)/gag))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "wc=cp*(t21-t1)#................#Work dony by compressor\n", + "m1=(wc)/(cpg*(t3-t41))#.............#Flow through compressor turbine in kg\n", + "m2=1-m1#..............#Flow through power turbine in kg\n", + "wpt=m2*(cpg*(t3-t41))#.........#turbine work in kJ/kg\n", + "P=ma*wpt*etamech*etagen#.........#Power output in kW\n", + "qi=cpg*t3-cp*t21#.............#Input heat in kJ/kg of air\n", + "etath=wpt/qi#.............#Thermal efficiency of power turbine\n", + "print \"Thermal efficiency of power turbine = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.10 PAGE 854" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature of gasses entering the turbine = 654.75 K\n", + "Pressure of gasses entering the power turbine = 1.65 bar\n", + "Net power output = 73.95 kW\n", + "Work ratio : 0.2198\n", + "Thermal efficiency of the unit : 19.26 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=288#........#Temperature of air entering the turbine in K\n", + "t3=883#..............#Temperature before expansion in turbine in K\n", + "etac=0.82#....#Efficiency of compressor\n", + "etathp=0.85#.....#Efficiency of high pressure turbine\n", + "etatlp=0.85#.....#Efficiency of low pressure turbine\n", + "rp=7#...........#Pressure ratio\n", + "p1=1.01#...............#Pressure of air before entering compressor\n", + "ga=1.4#........#Ratio of specific heats for compression\n", + "gag=1.333#........#Ratio of specific heats for expansion\n", + "cp=1.005#.............#Specific heat at constant pressure in kJ/kgK \n", + "cpg=1.15#.............#Specific heat at constant pressure in kJ/kgK in generator\n", + "#Calculations\n", + "p2=p1*rp#\n", + "t2=t1*((p2/p1)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#..............#Actual temperature of air after compression in K\n", + "wc=cp*(t21-t1)#............#Compressor work in kJ/kg\n", + "t41=t3-(wc/cpg)#..........#Temperature of gasses entering the turbine in K\n", + "print \"Temperature of gasses entering the turbine = %0.2f K\"%t41\n", + "t4=round(t3-((t3-t41)/etathp))#.........#Ideal temperature of gases entering the turbine in K\n", + "p3=p2#.........#Isobaric processes\n", + "p4=p3/((t3/t4)**(1/((gag-1)/gag)))#....#Pressure of gasses entering the power turbine in bar\n", + "print \"Pressure of gasses entering the power turbine = %0.2f bar\"%p4\n", + "t5=t41*((((t3/t4)**(1/((gag-1)/gag)))/(rp))**((gag-1)/gag))#\n", + "t51=t41-(etatlp*(t41-t5))#\n", + "wlp=cpg*(t41-t51)#............#Net power output in kW\n", + "print \"Net power output = %0.2f kW\"%wlp\n", + "wr=wlp/(wlp+wc)#............#Work ratio\n", + "print \"Work ratio : %0.4f\"%wr\n", + "qs=cpg*(t3-t21)#...........#Heat supplied in kJ/kg\n", + "etath=wlp/qs#..........#Thermal efficiency\n", + "print \"Thermal efficiency of the unit : %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.11 PAGE 855" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Net work output = 173.98 kW\n", + "Power plant efficiency = 25.00 %\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "rp=5.6#................#Pressure ratio\n", + "t1=303#.............#Temperature of intake air in K\n", + "p1=1#............#Pressure of intake air in bar\n", + "t5=973#............#Highest temperature of the cycle in K\n", + "etac=0.85#..........#Effeciency of compressor\n", + "etat=0.9#..........#Efficiency of turbine\n", + "ma=1.2#..........#Rate of air flow in kg/s\n", + "cp=1.02#...........#Specific heat at constant volume in kJ/kgK\n", + "ga=1.41#.............#Ratio of specific heats\n", + "#Calculations\n", + "t2=t1*((sqrt(rp))**((ga-1)/ga))#\n", + "t21=((t2-t1)/etac)+t1#\n", + "wc=2*ma*cp*(t21-t1)#............#Work input for the two stage compressor in kJ/s\n", + "t6=t5/(rp**((ga-1)/ga))#\n", + "t61=t5-etat*(t5-t6)#\n", + "wt=ma*cp*(t5-t61)#...............#Work output from turbine in kJ/s\n", + "wnet=wt-wc#....................#Net work available in kJ/s\n", + "print \"Net work output = %0.2f kW\"%wnet\n", + "qs=ma*cp*(t5-t21)#.................#Heat supplied in kJ/s\n", + "etath=wnet/qs#\n", + "print \"Power plant efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.13 PAGE 856" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cycle efficiency = 11.81 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=288#.............#Temperature of intake air in K\n", + "rp=4#.............#Pressure ratio\n", + "etac=0.82#.........#Compressor efficiency\n", + "etahe=0.78#...........#Efficiency of heat exchanger\n", + "etat=0.7#...........#Turbine efficiency\n", + "t3=873#............#Temperature before expansion in turbine in K\n", + "R=0.287#............#Gas constant for air in kJ/kgK\n", + "ga=1.4#...........#Ratio of specific heats\n", + "#Calculations\n", + "t2=t1*((rp)**((ga-1)/ga))#...............#Ideal temperature of air after compression in K\n", + "t21=((t2-t1)/etac)+t1#...............#Actual temperature of air after compression in K\n", + "t4=t3/(rp**((ga-1)/ga))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-etat*(t3-t4)#............#Actual temperature after expansion in turbine in K\n", + "cp=R*(ga/(ga-1))#..............#Specific heat at constant pressure in kJ/kgK\n", + "wc=cp*(t21-t1)#.............#Compressor work in kJ/kg\n", + "wt=cp*(t3-t41)#....................#Turbine work in kJ/kg\n", + "wnet=wt-wc#....................#Net work available in kJ/s\n", + "t5=(etahe*(t41-t21))+t21#\n", + "qs=cp*(t3-t5)#.................#Heat supplied in kJ/kg\n", + "etac=wnet/qs#...............#Cycle efficiency\n", + "print \"Cycle efficiency = %0.2f %%\"%(etac*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.14 PAGE 857" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal efficiency in simple cycle = 23.25 %\n", + "Thermal efficiency in heat exchanger cycle = 20.94 %\n", + "Increase in thermal efficiency = -2.31 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "etahe=0.72#.................#Efficiency of heat exchanger\n", + "p1=1.01#.........#Pressure of air while entering the turbine in bar\n", + "t1=293#........#Temperature of air entering the turbine in K\n", + "p2=4.04#.........#Pressure of air after compression in bar\n", + "etat=0.85#..........#Turbine efficiency\n", + "pdhe=0.05#............#Pressure drop on each side of heat exchanger in bar\n", + "pdcc=0.14#...........#Pressure drop in combustion chamber in bar\n", + "etac=0.8#...........#Compressor efficiency\n", + "ga=1.4#.............#Ratio of specific heats\n", + "C=41800#.............#Calorific value of fuel in kJ/kg\n", + "cp=1.024#...........#Specific heat at constant pressure in kJ/kgK\n", + "afrc=90#..............#Air fuel ratio for simple cycle\n", + "#Calculations\n", + "t2=(t1*((p2/p1)**((ga-1)/ga)))#...............#Ideal temperature of air after compression in K\n", + "t21=round(((t2-t1)/etac)+t1)#...............#Actual temperature of air after compression in K\n", + "t3=((1*C)/(cp*(afrc+1)))+t21#............#Temperature before expansion in turbine in K\n", + "p4=p1#p3=p2-pdcc#t4=round(t3*((p4/p3)**((ga-1)/ga)))#............#Ideal temperature after expansion in turbine in K\n", + "t41=t3-(etat*(t3-t4))#.................#Actual temperature after expansion in turbine in K\n", + "etath=(t3-t41-t21+t1)/(t3-t21)#...........#Thermal efficiency in simple cycle\n", + "print \"Thermal efficiency in simple cycle = %0.2f %%\"%(etath*100)\n", + "p3he=p2-pdhe-pdcc#..........#Pressure before expansion in turbine in bar in heat exchanger cycle\n", + "p4he=p1+pdhe#................#Pressure after expansion in turbine in bar in heat exchanger cycle\n", + "t4he=t3*((p4he/p3he)**((ga-1)/ga))#............#Ideal temperature after expansion in turbine in K in heat exchanger cycle\n", + "t41he=round(t3-(etat*(t3-t4he)))#.................#Actual temperature after expansion in turbine in K in heat exchanger cycle\n", + "t5=(etahe*(t41he-t21))+t21#\n", + "etathhe=(t3-t41he-t21+t1)/(t3-t5)#.............#Thermal efficiency for heat exchanger cycle\n", + "print \"Thermal efficiency in heat exchanger cycle = %0.2f %%\"%(etathhe*100)\n", + "inc=etathhe-etath#\n", + "print \"Increase in thermal efficiency = %0.2f %%\"%(inc*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.15 PAGE 858" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal efficiency = 23.44 %\n", + "The workk ratio is 0.283\n", + "Mass flow = 39.12 kg/s\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=293#........#Temperature of air entering the turbine in K\n", + "rp=9#............#Overall pressure ratio\n", + "etac=0.8#........#Efficiency of compressor\n", + "t6=898#..........#Reheat remperature\n", + "t8=t6#etat=0.85#.......#Efficiency of turbine\n", + "etamech=0.95#..........#Mechanical efficiency\n", + "etahe=0.8#...............#Heat exchanger thermal efficiency\n", + "cpg=1.15#.............#Specific heat capacity for gases in heat exchanger in kJ/kgK\n", + "cpa=1.005#............#Specific heat capacity for normal air in kJ/kgK\n", + "gag=1.333#.............#Ratio of specific heats for gases in heat exchanger \n", + "ga=1.4#...............#Ratio of specific heats for normal gases\n", + "P=4500#.................#Power output of turbine in kW\n", + "#Calculations\n", + "t2=t1*((sqrt(rp))**((ga-1)/ga))#\n", + "t21=((t2-t1)/etac)+t1#\n", + "wc=cpa*(t21-t1)#............#Work input per compressor stage\n", + "whp=(2*wc)/etamech#.........#Work output of HP turbine in kJ/kg\n", + "t71=t6-(whp/cpg)#\n", + "t7=round(t6-((t6-t71)/etat))#\n", + "k=(rp/((t6/t7)**((gag)/(gag-1))))**((gag-1)/gag)#\n", + "k1=((round((k/2)*100))*2)/100#..............#Rounding off upto 2 decimals\n", + "t9=t8/(k1)#\n", + "t91=t8-((t8-t9)*etat)#\n", + "wout=cpg*(t8-t91)*etamech#..............#Net work output in kJ/kg\n", + "t5=etahe*(t91-t21)+t21#\n", + "qs=cpg*(t6-t5)+cpg*(t8-t71)#...............#Heat supplied\n", + "etath=wout/qs#.................#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)\n", + "wgross=whp+(wout/etamech)#.........#Gross work output in kJ/kg\n", + "wr=wout/wgross#................#Work ratio\n", + "print \"The workk ratio is %0.3f\"%wr\n", + "m1=P/wout#...............#Mass flow in kg/s\n", + "print \"Mass flow = %0.2f kg/s\"%m1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.16 PAGE 859" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal efficiency of the turbine without regenerator = 27.01 %\n", + "Thermal efficiency of the turbine with regenerator = 38.96 %\n", + "Mass of fluid circulated = 2.40 kg/s\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "#Conditions of the closed gas turbine\n", + "t1=293#.............#Temperature at the inlet of first stage compressor in K\n", + "t5=1023#.................#Maximum temperature in K\n", + "p1=1.5#................#Inlet pressure in bar\n", + "p2=6#.................#Pressure in bar\n", + "etac=0.82#..............#Compressor efficiency\n", + "etat=0.82#..............#Turbine efficiency\n", + "etare=0.70#................#Regenerator efficiency\n", + "P=350#....................#Power developed by the plant in kW\n", + "ga=1.4#................#Ratio of specific heats\n", + "cp=1.005#..............#Specific heat at constant pressure in kJ/kgK\n", + "t3=t1#\n", + "#Calculations\n", + "t2=t1*((sqrt(p2/p1))**((ga-1)/ga))#\n", + "t21=((t2-t1)/etac)+t1#t41=t21#\n", + "t6=t5/((p2/sqrt(p1*p2))**((ga-1)/ga))#\n", + "t61=t5-(etat*(t5-t6))#\n", + "t81=t61#\n", + "t7=t5#\n", + "ta=(etare*(t81-t41))+t41#.......#Temperature of air coming out of regenerator in K\n", + "wnet=2*cp*(t5-t61-t21+t1)#........#Net work done in kJ/kg of air\n", + "qs=cp*(t5-t41+t7-t61)#...........#Heat supplied without regenerator in kJ/kg of air\n", + "qsr=cp*(t5-ta+t7-t61)#............#Heat supplied with regenerator in kJ/kg of air\n", + "etath=wnet/qs#.............#Thermal efficiency (without regenerator)\n", + "etathr=wnet/qsr#.........#Thermal efficiency (with regenerator)\n", + "mfl=P/wnet#..........#mass of fluid circulated in kg/s\n", + "print \"Thermal efficiency of the turbine without regenerator = %0.2f %%\"%(etath*100)\n", + "print \"Thermal efficiency of the turbine with regenerator = %0.2f %%\"%(etathr*100)\n", + "print \"Mass of fluid circulated = %0.2f kg/s\"%mfl" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.17 PAGE 860" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Net power output = 2042.40 kW \n", + "Thermal efficiency = 30.95 %\n", + "Specific fuel consumption = 0.28 kg/kWh\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=293#............#Temperature of inlet air into low pressure compressor in K\n", + "p1=1.05#.........#Pressure of inlet air into low pressure compressor in bar\n", + "t3=300#...........#Temperature of air after passing it through intercooler in K\n", + "t6=1023#..........#temperature of air in combustion chamber in K\n", + "rp=2#...........#Pressure ratio of each compressor \n", + "etac=0.82#........#Compressor efficiency\n", + "etat=0.82#..........#Turbine efficiency\n", + "etaht=0.72#............#Heat exchanger efficiency\n", + "ma=16#...........#Air flow in kg/s\n", + "ga=1.4#...........#Ratio of specific heats for air\n", + "gag=1.33#..........#Ratio of specific heats for gases\n", + "cpa=1.0#...........#Specific heat at constant pressure in kJ/kgK for air\n", + "cpg=1.15#.........#Specific heat at constant pressure in kJ/kgK for gases\n", + "C=42000#.........#Calorific value of fuel in kJ/kg\n", + "#Calculations\n", + "t2=round(t1*(rp**((ga-1)/ga)))#\n", + "t21=round(((t2-t1)/etac)+t1)#\n", + "t4=t3*(rp**((ga-1)/ga))#\n", + "t41=round(((t4-t3)/etac)+t3)#\n", + "t71=round(((cpg*t6)-cpa*(t21-t1+t41-t3))/cpg)#\n", + "t7=t6-((t6-t71)/etat)#\n", + "p6=p1*rp*rp#\n", + "p7=p6/((t6/t7)**((gag)/(gag-1)))#\n", + "t8=round(t71/((p7/p1)**((gag-1)/gag)))#\n", + "t81=round(t71-(etat*(t71-t8)))#\n", + "P=cpg*(t71-t81)#...........#Net power output in kJ/kg\n", + "print \"Net power output = %0.2f kW \"%(P*ma)\n", + "t5=etaht*(t81-t41)+t41#\n", + "qs=ma*cpg*(t6-t5)#......#Heat supplied in combustion chamber in kJ/s\n", + "etath=P*ma/qs#.........#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)\n", + "afr=C/(cpg*(t6-t5))#......#Air fuel ratio\n", + "mf=ma*3600/afr#..............#Fuel supplied per hour in kg\n", + "sfc=mf/(P*ma)#...........#Specific fuel consumption in kg/kWh\n", + "print \"Specific fuel consumption = %0.2f kg/kWh\"%sfc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.18 PAGE 861" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Overall efficiency = 30.89 %\n", + "Work ratio = 0.363 Mass flow rate = 34.32 kg/s\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=293#............#Temperature of inlet air into low pressure compressor in K\n", + "p1=1.1#.........#Pressure of inlet air into low pressure compressor in bar\n", + "p2=3.3#..........#Pressure of air in the low pressure compressor in bar\n", + "t3=300#.............#Intercooled temperature in K\n", + "pli=0.15#..........#Loss in pressure due to intercooling in bar\n", + "p3=p2-pli#...........#Pressure after intercooling in bar\n", + "p4=9.45#............#Pressure of air after high pressure compressor in bar\n", + "p6=p4#t6=973#.........#Temperature of gases supplied to high pressure turbine in K\n", + "t8=943#.........#Reheat temperature in K\n", + "plr=0.12#...........#Loss of pressure after reheating in bar\n", + "p7=3.62#............#Pressure of gases at the end of expansion in high pressure turbine in bar\n", + "p8=p7-plr#...........#Pressure of outlet gases in bar\n", + "ga=1.4#...........#Ratio of specific heats for air\n", + "gag=1.33#..........#Ratio of specific heats for gases\n", + "cpa=1.005#...........#Specific heat at constant pressure in kJ/kgK for air\n", + "cpg=1.15#.........#Specific heat at constant pressure in kJ/kgK for gases\n", + "etac=0.82#........#Compressor efficiency\n", + "etat=0.85#..........#Turbine efficiency\n", + "etaht=0.65#.........#Efficiency of heat exchanger\n", + "P=6000#..................#Power generated in kW\n", + "p9=p1#\n", + "#Calculations\n", + "t2=round(t1*((p2/p1)**((ga-1)/ga)))#\n", + "t21=round(((t2-t1)/etac)+t1)#\n", + "t4=round(t3*((p4/p3)**((ga-1)/ga)))#\n", + "t41=round(((t4-t3)/etac)+t3)#\n", + "t7=round(t6/((p6/p7)**((gag-1)/gag)))#\n", + "t71=round(t6-(etat*(t6-t7)))#\n", + "t9=round(t8/((p8/p9)**((gag-1)/gag)))#\n", + "t91=round(t8-(etat*(t8-t9)))#\n", + "t5=round(etaht*(t91-t41)+t41)#\n", + "wthp=cpg*(t6-t71)#.......#Work done by high pressure turbine in kJ/kg of gas\n", + "wtlp=cpg*(t8-t9)#.......#Work done by low pressure turbine in kJ/kg of gas\n", + "wchp=cpg*(t21-t1)#.......#Work done by high pressure compressor in kJ/kg of gas\n", + "wclp=cpg*(t41-t3)#.......#Work done by low pressure compressor in kJ/kg of gas\n", + "qs=cpg*(t6-t5+t8-t71)#.........#Heat supplied in kJ/kg of gas\n", + "etath=(wthp+wtlp-wchp-wclp)/qs#..#Overall efficiency\n", + "print \"Overall efficiency = %0.2f %%\"%(etath*100)\n", + "wr=(wthp+wtlp-wchp-wclp)/(wthp+wtlp)#......#Work ratio\n", + "print \"Work ratio = %0.3f \"%wr,\n", + "m=P/(wthp+wtlp-wchp-wclp)#.....#Mass flow rate\n", + "print \"Mass flow rate = %0.2f kg/s\"%m" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.19 PAGE 862" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Exit velocity of jet = 651.10 m/s\n", + "Rate of fuel consumption = 0.86 kg/s\n", + "Thrust specific fuel consumption = 0.00 kg/N\n", + "Thermal efficiency = 31.41 %\n", + "Propulsive power = 10437.94 kW\n", + "Propulsive efficiency = 59.81 %\n", + "Overall efficiency = 18.79 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ma=60.2#...........#Rate of air consumption in kg/s\n", + "delh=230#.......#Enthalpy change for nozzle in kJ/kg\n", + "z=0.96#..........#Velocity co efficient \n", + "afr=70#............#Air fuel ratio\n", + "etaco=0.92#...............#Combustion eficiency\n", + "CV=42000#..............#Calorific value of fuel in kJ/kg\n", + "v=1000#............#Velocity of aircraft in km/h\n", + "Ca=v*(5/18)#............#Aircraft velocity in m/s\n", + "#Calculations\n", + "Cj=z*sqrt(2*delh*v)#...........#Exit velocity of jet\n", + "print \"Exit velocity of jet = %0.2f m/s\"%Cj\n", + "mf=ma/afr#.........#Rate of fuel consumption\n", + "print \"Rate of fuel consumption = %0.2f kg/s\"%mf\n", + "tp=ma*(Cj-Ca)#......#Thrust produced in N\n", + "tsfc=mf/tp#.........#Thrust specific fuel consumption in kg/N\n", + "print \"Thrust specific fuel consumption = %0.2f kg/N\"%tsfc\n", + "etath=((Cj**2)-(Ca**2))/(2*(1/afr)*CV*etaco*1000)#.........#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)\n", + "pp=(ma/1000)*((Cj**2)-(Ca**2))/2#................#Propulsive power in kW\n", + "print \"Propulsive power = %0.2f kW\"%pp\n", + "etapp=(2*Ca)/(Cj+Ca)#......................#Propulsive efficiency\n", + "print \"Propulsive efficiency = %0.2f %%\"%(etapp*100)\n", + "etao=((Cj-Ca)*Ca)/((1/afr)*CV*etaco*1000)#............#Overall efficiency\n", + "print \"Overall efficiency = %0.2f %%\"%(etao*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.20 PAGE 863" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Absolute velocity of jet = 363.64 m/s\n", + "Volume of air compressed = 5920.59 kg/min\n", + "Diameter of the jet = 463.09 mm\n", + "Turbine output = 2464.65 kW\n", + "\n", + "Air fuel ratio is 53.225:1\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "v=800#.............#Speed of the turbojet in km/h\n", + "etapp=0.55#......#Propulsive efficiency\n", + "etao=0.17#.........#Overall efficiency\n", + "al=9500#...............#Altitude in m\n", + "rhoa=0.17#............#Density of air at the given altitude in kg/m**3\n", + "dr=6100#...........#Drag on the plane in N\n", + "CV=46000#.........#Calorific value of fuel in kJ/kg\n", + "#Calculations\n", + "Ca=v*(1000/3600)#.........#Velocity of jet in m/s\n", + "Cj=((2*Ca)/etapp)-Ca#........#Velocity of gases at nozzle exit relative to the aircraft in m/s\n", + "print \"Absolute velocity of jet = %0.2f m/s\"%(Cj-Ca)\n", + "ma=dr/(Cj-Ca)#............#Rate of air flow in kg/s\n", + "Va=(ma/rhoa)*60#..........#Volume of air compresssed per min in kg\n", + "print \"Volume of air compressed = %0.2f kg/min\"%Va\n", + "d=sqrt((Va*4)/(60*pi*Cj))#..........#Diameter of the jet in m\n", + "print \"Diameter of the jet = %0.2f mm\"%(d*1000)\n", + "tp=dr*(Ca/1000)#...........#Thrust power in kW\n", + "wt=tp/etapp#................#Turbine output in kW\n", + "print \"Turbine output = %0.2f kW\"%wt\n", + "mf=wt/(etao*CV)#...........#Rate of fuel consumption in kg/s\n", + "afr=ma/mf#..........#Air fuel ratio\n", + "print \"\\nAir fuel ratio is %0.3f:1\"%(afr)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.21 PAGE 864" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power required to drive the compressor = 171.46 kW\n", + "\n", + "\n", + "Air fuel ratio 73.094:1\n", + "\n", + "Pressure of gases leaving the turbine = 9.45 bar\n", + "Thrust per kg of air per second = 619.83 N\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=288#..........#Temperature of the inlet air into compressor in K\n", + "p1=1.01#......#Pressure of the inlet air into compressor in bar\n", + "t3=1023#.........#Maximum temperature in K\n", + "p2=4.04#.........#Pressure of air at the end of compression in bar\n", + "etac=0.82#.......#compressor efficiency\n", + "etat=0.78#......#Turbine efficiency\n", + "etan=0.88#........#Nozzle efficiency\n", + "R=0.287#.........#Gas constant for air in kJ/kgK\n", + "ga=1.4#............#Ratio of specific heats\n", + "C=42000#..........#Calorific value of fuel in kJ/kg\n", + "#Calculations\n", + "t2=t1*((p2/p1)**((ga-1)/ga))#........#Ideal temperature at the end of compression in K\n", + "t21=((t2-t1)/etac)+t1#...........#Actual temperature at the end of compression in K\n", + "cp=R*(ga/(ga-1))#..............#Specific heat at constant pressure in kJ/kgK\n", + "Pc=cp*(t21-t1)#.............#Power required to drive the compressor in kW\n", + "print \"Power required to drive the compressor = %0.2f kW\"%Pc\n", + "afr=((C)/(cp*(t3-t21)))-1#....#Air fuel ratio\n", + "print \"\\n\\nAir fuel ratio %0.3f:1\\n\"%(afr)\n", + "t41=t1+t3-t21#......#Actual temperatur of gases leaving the turbine in K\n", + "t4=t3-((t3-t41)/etat)#......#Ideal temperature of gases leaving the turbine in K\n", + "p3=p2#p4=p3*((t4/t3)**(ga/(ga-1)))#.......#Pressure of gases leaving the turbine in bar\n", + "print \"Pressure of gases leaving the turbine = %0.2f bar\"%p4\n", + "p5=p1#t5=t41/((p4/p5)**((ga-1)/ga))#\n", + "t51=t41-(etan*(t41-t5))#\n", + "Cj=sqrt(2*cp*(t41-t51)*1000)#..............#Jet velocity in m/s\n", + "th=Cj*1#..................#Thrust per kg per second in N\n", + "print \"Thrust per kg of air per second = %0.2f N\"%th" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.22 PAGE 865" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air fuel ratio : 48.348\n", + "Specific thrust = 956.34 N/kg\n", + "Total thrust = 25345.68 N\n" + ] + } + ], + "source": [ + "from scipy import sqrt\n", + "# Initialisation of Variables\n", + "Ca=216#................#Speed of aircraft in m/s\n", + "t1=265.8#...............#Intake air temperature in K\n", + "p1=0.78#...............#Intake air pressure in bar\n", + "rp=5.8#..................#Pressure ratio in compressor \n", + "t4=1383#.................#Temperature of gases entering the gas turbine in K\n", + "pd=0.168#...............#Pressure drop in combustion chamber in bar\n", + "etad=0.9#..............#Diffuser efficiency\n", + "etan=0.9#............#Nozzle efficiency\n", + "etac=0.9#............#Compressor efficiency\n", + "etat=0.8#.............#Turbine efficiency\n", + "C=44150#............#Calorific value of fuel in kJ/kg\n", + "cp=1.005#.............#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#...............#Ratio of specific heats\n", + "cin=0.12#...............#Inlet cross sectio of the diffuser in m**3\n", + "R=0.287#............#Gas constant in kJ/kgK\n", + "#Calculations\n", + "t2=t1+((Ca*Ca)/(2*cp*1000))#......#For ideal diffuser\n", + "t21=t1+((Ca*Ca)/(2*cp*etad*1000))#......#For actual diffuser\n", + "p2=p1*((t2/t1)**(ga/(ga-1)))#\n", + "t3=t21*(rp**((ga-1)/ga))#\n", + "t31=t21+((t3-t21)/etac)#\n", + "afr=(C-(cp*t4))/(cp*(t4-t31))#............#Air fuel ratio\n", + "print \"Air fuel ratio : %0.3f\"%afr\n", + "p3=p2*rp#\n", + "p4=p3-pd#...............#Pressure of gases entering the turbine in bar\n", + "t51=t4-(t31-t21)#\n", + "t5=round(t4-((t4-t51)/etat))#\n", + "p5=p4/((t4/t5)**(ga/(ga-1)))#p6=p1#\n", + "t6=t51/((p5/p6)**((ga-1)/ga))#\n", + "t61=t51-(etac*(t51-t6))#\n", + "Cj=44.72*sqrt(cp*(t51-t61))#........#Velocity at the exit of the nozzle in m/s\n", + "st=(1+(1/afr))*Cj#............#Specific thrust in N/kg\n", + "print \"Specific thrust = %0.2f N/kg\"%abs(st)\n", + "v1=Ca*cin#...........#Volume of flowing air in m**3/s\n", + "ma=(p1*v1*10**5)/(R*t1*1000)#.........#Mass flow of air\n", + "tt=ma*st#..............#Total thrust in N\n", + "print \"Total thrust = %0.2f N\"%abs(tt)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 21.23 PAGE 866" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Overall efficiency = 14.06 %\n", + "Rate of air consumption = 8.48 kg/s\n", + "Power developed by turbine = 1375.10 kW\n", + "The outlet area of jet tube = 0.08 m**2\n", + "Specific fuel consumption = 0.13 kg per kg of thrust\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "al=9000#..........#Altitude in m\n", + "Ca=215#...........#Speed of aircraft in m/s\n", + "TP=750#.............#Thrust power developed in kW\n", + "p1=0.32#...........#Inlet pressure of air in bar\n", + "t1=231#.............#Inlet temperature of air in K\n", + "t3=963#.............#Temperature of gases leaving the combustion chamber in K\n", + "rpc=5.2#............#Pressure ratio\n", + "C=42500#..........#Calorific value of fuel in kJ/kg\n", + "C41=195#.........#Velocity in ducts\n", + "etac=0.86#..........#Compressor efficiency\n", + "ga=1.4#............#Ratio of specific heats for air\n", + "gag=1.33#............#Ratio of specific heats for gases\n", + "etat=0.86#..........#Turbine efficiency\n", + "etajt=0.9#..........#Jet tube efficiency\n", + "cp=1.005#............#Specific heat at constant pressure in kJ/kgK for air\n", + "cpg=1.087#............#Specific heat at constant pressure in kJ/kgK for gases\n", + "R=0.29#..................#Gas constant for exhaust gases in kJ/kgK\n", + "#Calculations\n", + "t2=t1*(rpc**((ga-1)/ga))#\n", + "t21=t1+((t2-t1)/etac)#\n", + "mf=(cpg*(t3-t21))/(C-(cpg*(t3-t21)))#\n", + "afr=1/mf#..........#Air fuel ratio\n", + "t41=round(t3-((cp*(t21-t1))/(cpg*(1+mf))))#\n", + "t4=t3-((t3-t41)/etat)#p4=rpc#\n", + "rpt=(t3/t4)**(gag/(gag-1))#.............#Expansion pressure ratio in turbine\n", + "rpj=p4/rpt#....................#Expansion pressure ratio in jet tube\n", + "t5=t41/(rpj**((gag-1)/gag))#\n", + "Cj=sqrt(etajt*2*((cpg*1000*(t41-t5))+((C41*C41)/2)))#\n", + "etao=((((1+mf)*Cj)-Ca)*Ca)/(1000*mf*C)#......#Overall efficiency\n", + "print \"Overall efficiency = %0.2f %%\"%(etao*100)\n", + "ma=(TP*1000)/((((1+mf)*Cj)-Ca)*Ca)#........#Rate of air consumption in kg/s\n", + "print \"Rate of air consumption = %0.2f kg/s\"%ma\n", + "P=ma*(1+mf)*cpg*(t3-t41)#..............#Power developed by the turbine in kW\n", + "print \"Power developed by turbine = %0.2f kW\"%P\n", + "t51=t41-(((Cj**2)-(C41**2))/(2*1000*cpg))#\n", + "rhoe=(p1*10**5)/(R*1000*t51)#..........#Density of exhaust gases\n", + "Ajt=(ma*(1+mf))/(Cj*rhoe)#.......#Discharge of jet area in m**2\n", + "print \"The outlet area of jet tube = %0.2f m**2\"%Ajt\n", + "sfc=(mf*ma*3600)/(1000*(TP/Ca))#..........#Specific fuel consumption in kg/thrust-hour\n", + "print \"Specific fuel consumption = %0.2f kg per kg of thrust\"%sfc" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER3.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER3.ipynb new file mode 100644 index 00000000..2f5ea927 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER3.ipynb @@ -0,0 +1,1841 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 3 - Air Standard Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.1 PAGE 87" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Engine thermal efficiency = 53.49 %\n", + "Head added = 243.03 kJ\n", + "Change in entropy = 0.361 kJ/K\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "t1=673#.....................#Max temp in Kelvin\n", + "t3=313##...................#Min temp in Kelvin\n", + "W=130#.................#Work produced in kJ\n", + "#calculations\n", + "etath=(t1-t3)/t1#................#Engine thermal efficiency\n", + "print \"Engine thermal efficiency = %0.2f %%\"%(etath*100)\n", + "ha=W/etath#.................#Heat added in kJ\n", + "print \"Head added = %0.2f kJ\"%ha\n", + "dels=(ha-W)/t3#...........#Change in entropy\n", + "print \"Change in entropy = %0.3f kJ/K\"%dels" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.2 PAGE 88" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The maximum temperature = 585.37 Kelvin\n", + "The minimum temperature = 292.68 Kelvin\n", + "Volume at the end of isothermal expansion = 0.19 m**3\n", + "\n", + "\n", + "\n", + "Process Heat transfer\n", + "\n", + "_______________________________________________________________\n", + "\n", + "Isothermal expansion 40 kJ\n", + "\n", + "Adiabatic reversible expansion 0 kJ\n", + "\n", + "Isothermal compression -40 kJ\n", + "\n", + "Adiabatic reversible compressions 0 kJ\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "m=0.5#.....................#Mass of air in kg\n", + "etath=0.5#.................#Thermal efficiency of engine\n", + "hie=40#...................#Heat transferred during isothermal expansion in kJ\n", + "p1=7#....................#Pressure in bar at the beginning of expansion\n", + "v1=0.12#..................#Volume in m**3 at the beginning of expansion\n", + "cv=0.721#...................#Specific heat at constant volume in kJ/kgK\n", + "cp=1.008#..................#Specific heat at constant pressure in kJ/kgK\n", + "R=287#......................#Gas constant in J/kgK\n", + "#Calculations\n", + "t1=(p1*10**5*v1)/(R*m)#....................#Max temp in K\n", + "t2=t1*(1-etath)#.......................#Min temp in K\n", + "print \"The maximum temperature = %0.2f Kelvin\"%t1\n", + "print \"The minimum temperature = %0.2f Kelvin\"%t2\n", + "from math import exp\n", + "v2=(exp((hie*1000)/(m*R*t1)))*v1#..................#Volume at the end of isothermal expansion in m**3\n", + "print \"Volume at the end of isothermal expansion = %0.2f m**3\"%v2\n", + "print \"\\n\\n\"\n", + "print \"Process Heat transfer\\n\"\n", + "print \"_______________________________________________________________\\n\"\n", + "print \"Isothermal expansion %d kJ\\n\"%(hie)\n", + "print \"Adiabatic reversible expansion %d kJ\\n\"%(0)\n", + "print \"Isothermal compression %d kJ\\n\"%(-hie)\n", + "print \"Adiabatic reversible compressions %d kJ\"%(0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.3 PAGE 89" + ] + }, + { + "cell_type": "code", + "execution_count": 77, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "p1=18 bar \n", + "p2=12 bar \n", + "p3=0.977 bar \n", + "p4=1.465 bar \n", + "t1=t2=683 Kelvin \n", + "t3=t4=334 Kelvin \n", + "\n", + "Change in entropy = 0.19 kJ/K\n", + "Mean effective pressure of the cycle = 0.47 bar\n", + "Mean effective pressure of the cycle = 235.25 bar\n" + ] + } + ], + "source": [ + "from math import log\n", + "# Initialisation of Variables\n", + "p1=18#..................#Maximum pressure in bar\n", + "t1=410+273#.............#Maximum temperature in Kelvin\n", + "ric=6#.....................#Ratio of isentropic compression\n", + "rie=1.5#.................#Ratio of isothermal expansion\n", + "v1=0.18#..................#Volume of air at the beginning of expansion\n", + "ga=1.4#...................#Degree of freedom of gas\n", + "R=287#.....................#Gas constant in J/kgK\n", + "nc=210#..................#no of working cycles\n", + "#Calculations\n", + "\n", + "t4=t1/(ric**(ga-1))#.............#Min temp in K\n", + "t3=t4#\n", + "p4=p1/(ric**ga)#..................#Min pressure in bar\n", + "p2=p1/rie#.......................#pressure of gas before isentropic expansion in bar\n", + "p3=p2*((1/6)**ga)#.................#Pressure of gas after isentropic expansion in bar\n", + "print \"p1=%.f bar \\np2=%.f bar \\np3=%.3f bar \\np4=%.3f bar \\nt1=t2=%0.f Kelvin \\nt3=t4=%.f Kelvin \\n\"%(p1,p2,p3,p4,t1,t3)\n", + "dels=(p1*10**5*v1*log(rie))/(1000*t1)#....................#Change in entropy\n", + "print \"Change in entropy = %0.2f kJ/K\"%dels\n", + "qs=t1*dels#.......................#Heat supplied in kJ\n", + "Qr=t4*dels#.......................#Heat rejected in kJ\n", + "eta=(qs-Qr)/qs#............#Efficiency of the cycle\n", + "v3byv1=ric*rie#\n", + "Vs=(v3byv1-1)*v1#.................#Stroke volume\n", + "pm=((qs-Qr)*10**3)/(Vs*10**5)#........#Mean effective pressure of the cycle in bar\n", + "print \"Mean effective pressure of the cycle = %0.2f bar\"%pm\n", + "P=(qs-Qr)*(nc/60)#.........................#Power of engine\n", + "print \"Mean effective pressure of the cycle = %0.2f bar\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.4 PAGE 92" + ] + }, + { + "cell_type": "code", + "execution_count": 78, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature of the sink = 1442 Celsius\n", + "temperature of source = 1785 Celsius:\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "eta=1/6#...................#Efficiency of the engine\n", + "rts=70#.................#The amount of temp which is reduced in the sink in C\n", + "#Calculation\n", + "t1byt2=1/(1-eta)#\n", + "t2=(rts+273)/((2*eta*t1byt2)-t1byt2+1)#............#Temperature of the sink in K\n", + "print \"Temperature of the sink = %0.f Celsius\"%(t2-273)\n", + "t1=t1byt2*t2#...............#Temperature of source in K\n", + "print \"temperature of source = %0.f Celsius:\"%(t1-273)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.5 PAGE 92" + ] + }, + { + "cell_type": "code", + "execution_count": 79, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Since the efficiency of the given engine is more than efficiency of carnot engine, the claim is not true.\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=1990#....................#Temperature of the heat source in K\n", + "t2=850#..................#Temperature of the sink in K\n", + "Q=32.5#...................#Heat supplied in kJ/min\n", + "P=0.4#....................#Power developed by the engine in kW\n", + "#Calculations\n", + "eta=1-(t2/t1)#..........#Efficiency of carnot engine\n", + "etath=P/(Q/60)#..................#Efficiency of the given engine\n", + "if (etath>eta):\n", + " print \"Since the efficiency of the given engine is more than efficiency of carnot engine, the claim is not true.\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.7 PAGE 96" + ] + }, + { + "cell_type": "code", + "execution_count": 80, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The compression ratio of the engine is: 6.25\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "etaotto=0.6#............#Efficiency of otto engine\n", + "ga=1.5#.................#Ratio of specific heats\n", + "#Calculations\n", + "r=(1/(1-etaotto))**(1/(ga-1))#................#Compression ratio\n", + "print \"The compression ratio of the engine is:\",r" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.8 PAGE 96" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The air standard efficiency of otto cycle = 56.47 %\n", + "Mean effective pressure = 1.34 bar\n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "D=0.25#......................#Engine bore in m\n", + "L=0.375#...................#Engine stroke in m\n", + "Vc=0.00263#................#Clearence volume in m**3\n", + "p1=1#..................#Initial pressure in bar\n", + "t1=323#...................#Initial temperature in K\n", + "p3=25#....................#Max pressure in bar\n", + "ga=1.4#....................#Ratio of specific heats\n", + "#Calculations\n", + "Vs=(pi/4)*D*D*L#................#Swept volume in m**3\n", + "r=round((Vs+Vc)/Vc)#..........................#Compression ratio\n", + "etaotto=1-(1/(r**(ga-1)))#..................#Air standard efficiency of otto cycle\n", + "print \"The air standard efficiency of otto cycle = %0.2f %%\"%(etaotto*100)\n", + "p2=p1*((r)**ga)#\n", + "rp=p3/p2#..........................#Pressure ratio\n", + "pm=(p1*r*((r**(ga-1))-1)*(rp-1))/((ga-1)*(r-1))#................#Mean effective pressure in bar\n", + "print \"Mean effective pressure = %0.2f bar\"%pm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.9 PAGE 98" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature after adiabatic compression = 689.22 K\n", + "Pressure after adiabatic compression = 18.38 bar\n", + "Temperature after isochoric compression = 2772.55 K\n", + "Pressure after isochoric compression = 73.93 bar\n", + "Temperature after adiabatic expansion = 1206.82 K\n", + "Pressure after adiabatic expansion = 4.02 bar\n", + "Specific work = 847.09 kJ/kg\n", + "Thermal efficiency = 56.47 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#.....................#Pressure in bar\n", + "t1=300#......................#Temperature in K\n", + "Q=1500#.....................#Heat added in kJ/kg\n", + "r=8#.......................#Compression ratio\n", + "Cv=0.72#....................#Specific heat at constant volume\n", + "ga=1.4#......................#Ratio of specific heats\n", + "#Calculations\n", + "t2=t1*(r)**(ga-1)#..........#Temperature after adiabatic compression in K\n", + "p2=p1*(r**ga)#..............#Pressure after adiabatic compression in bar\n", + "t3=(Q/Cv)+t2#.................#Temperature after isochoric compression in K\n", + "p3=(p2*t3)/t2#................#Pressure after isochoric compression in bar\n", + "t4=t3/(r**(ga-1))#.......................#Temperature after adiabatic expansion in K\n", + "p4=p3*(1/(r**(ga)))#................#Pressure after adiabatic expansion in bar\n", + "Ws=Cv*(t3-t2-t4+t1)#.........#Specific work in kJ/kg\n", + "etath=1-(1/(r**(ga-1)))#............#Thermal efficiency\n", + "print \"Temperature after adiabatic compression = %0.2f K\"%t2\n", + "print \"Pressure after adiabatic compression = %0.2f bar\"%p2\n", + "print \"Temperature after isochoric compression = %0.2f K\"%t3\n", + "print \"Pressure after isochoric compression = %0.2f bar\"%p3\n", + "print \"Temperature after adiabatic expansion = %0.2f K\"%t4\n", + "print \"Pressure after adiabatic expansion = %0.2f bar\"%p4\n", + "print \"Specific work = %0.2f kJ/kg\"%Ws\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.10 PAGE 99" + ] + }, + { + "cell_type": "code", + "execution_count": 83, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature after adiabatic compression = 614.30 K\n", + "Pressure after adiabatic compression = 12.29 bar\n", + "Temperature after isochoric compression = 1842.00 K\n", + "Pressure after isochoric compression = 36.84 bar\n", + "Temperature after adiabatic expansion = 899.56 K\n", + "Pressure after adiabatic expansion = 3.00 bar\n", + "Thermal efficiency = 56.47 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=6#..............#Compression ratio\n", + "p1=1#................#Pressure after isochoric expansion in bar\n", + "t1=300#................#Temperature after isochoric expansion in K\n", + "t3=1842#...............#Temperature after isochoric compression in K\n", + "ga=1.4#...............#Ratio of specific heats\n", + "#Calculations\n", + "p2=p1*(r**ga)#...............#Pressure after adiabatic compression in bar\n", + "t2=t1*(r**(ga-1))#.............#Temperature after adiabatic compression in K\n", + "p3=p2*(t3/t2)#..................#pressure after isochoric compression in bar\n", + "t4=t3/(r**(ga-1))#..............#Temperature after adiabatic expansion in K\n", + "p4=p3*(1/(r**(ga)))#...........#Pressure after adiabatic expansion in bar\n", + "etaotto=1-(1/(r**(ga-1)))#............#Efficiency of otto cycle\n", + "p5=p1#\n", + "t5=((p5/p3)**((ga-1)/ga))*t3#................#Atkinson cycle temp after further adiabatic expansion in K\n", + "etatk=1-((ga*(t5-t1))/(t3-t2))#...........#Efficiency of atkinson cycle\n", + "print \"Temperature after adiabatic compression = %0.2f K\"%t2\n", + "print \"Pressure after adiabatic compression = %0.2f bar\"%p2\n", + "print \"Temperature after isochoric compression = %0.2f K\"%t3\n", + "print \"Pressure after isochoric compression = %0.2f bar\"%p3\n", + "print \"Temperature after adiabatic expansion = %0.2f K\"%t4\n", + "print \"Pressure after adiabatic expansion = %0.2f bar\"%p4\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.11 PAGE 101" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Compression ratio: 3.95\n", + "Temperature at the end of compression = 607.79 K\n", + "Temperature at the end of heat addition = 1266.43 K\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#...................#Initial pressure in bar\n", + "t1=343#..................#Initial temperature in K\n", + "p2=7#....................#Pressure after adiabatic compression\n", + "Qs=465#...............#Heat addition at constant volume in kJ/kg\n", + "cp=1#.....................#Specific heat at constant pressure in kJ/kg\n", + "cv=0.706#..................#Specific heat at constant volume in kJ/kg\n", + "ga=cp/cv#.................#Ratio of specific heats\n", + "#Calculations\n", + "r=(p2/p1)**(1/ga)#...............#Compression ratio\n", + "t2=t1*(r**(ga-1))#.....................#Temperature at the end of compression in K\n", + "t3=t2+(Qs/cv)#.............#Temperature at the end of heat addition in K\n", + "print \"Compression ratio:\",round(r,2)\n", + "print \"Temperature at the end of compression = %0.2f K\"%t2\n", + "print \"Temperature at the end of heat addition = %0.2f K\"%t3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.12 PAGE 102" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Compression ratio: 6.92\n", + "Thermal efficiency = 53.87 %\n", + "Work done = 598.65 kJ\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ga=1.4#..............#Ratio of specific heats\n", + "p2byp1=15#...............#Ratio pressure at the end of compression to that of pressure at the start\n", + "t1=311#................#Initial temperature in K\n", + "t3=2223#...............#Maximum temperature in K\n", + "R=0.287#...............#Gas constant in kJ/kg K\n", + "#Calculations\n", + "r=p2byp1**(1/ga)#...............#Compression ratio\n", + "etath=1-(1/(r**(ga-1)))#.............#Thermal efficiency\n", + "t2=t1*(r**(ga-1))#............#Temperature at the end of compression in K\n", + "t4=t3/(r**(ga-1))#...........#Temperature at the end of isothermal expansion in K\n", + "cv=R/(ga-1)#................#Specific heat at constant volume in kJ/kg\n", + "Q=cv*(t3-t2)#..............#Heat supplied in kJ/kg of air\n", + "Qr=cv*(t4-t1)#.................#Heat rejected in kJ/kg of air\n", + "W=Q-Qr#.................#Work done\n", + "print \"Compression ratio:\",round(r,2)\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)\n", + "print \"Work done = %0.2f kJ\"%W" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.13 PAGE 104" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature after adiabatic compression: 601.15 K\n", + "\n", + "Pressure after adiabatic compression: 11.00 bar\n", + "\n", + "Volume after adiabatic compression: 0.08 m**3\n", + "\n", + "Temperature after isochoric compression: 1172.73 K\n", + "\n", + "Pressure after isochoric compression: 21.46 bar\n", + "\n", + "Volume after isochoric compression: 0.08 m**3\n", + "\n", + "Temperature after adiabatic expansion: 591.09 K\n", + "\n", + "Pressure after adiabatic expansion: 1.95 bar\n", + "\n", + "Volume after adiabatic expansion: 0.45 m**3\n", + "\n", + "Percentage clearance: 22.01\n", + "\n", + "Efficiency of otto cycle: 49.60\n", + "\n", + "Mean effective pressure: 2.82 bar:\n", + "\n", + "Power developed: 364.54 kW\n", + "\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "v1=0.45#.............#Initial volume in m**3 \n", + "p1=1#...............#Initial pressure in bar\n", + "t1=303#.............#Initial temperature in K\n", + "p2=11#...................#Pressure at the end of compression stroke in bar\n", + "Q=210#...................#heat added at constant volume in kJ\n", + "N=210#.................#No of working cycles per min\n", + "ga=1.4#.............#Ratio of specific heats\n", + "R=287#.................#Gas constant in kJ/kgK\n", + "cv=0.71#.................#Specific heat at constant volume in kJ/kg\n", + "#Calculations\n", + "r=(p2/p1)**(1/ga)#...................#Compression ratio\n", + "t2=t1*(r**(ga-1))#...................#Temperature at the end of adiabatic compression\n", + "v2=(t2*p1*v1)/(t1*p2)#.................#Volume at the end of adiabatic compression in m**3\n", + "m=(p1*v1*10**5)/(R*t1)#................#Mass of engine fluid in kg\n", + "t3=(Q/(m*cv))+t2#...................#Temperature at the end of isochoric compression in K\n", + "p3=(t3/t2)*p2#................#Pressure at the end of isochoric compression in bar\n", + "v3=v2#\n", + "t4=t3*(1/r)**(ga-1)#...................#Temperature at the end of adiabatic expansion in K\n", + "p4=p3*(1/r)**ga#......................#Pressure at the end of adiabatic expansion in bar\n", + "v4=v1#\n", + "pc=(v2*100)/(v1-v2)#..................#Percentage clearence\n", + "etaotto=1-(1/(r**(ga-1)))#........................#Efficiency of otto cycle\n", + "Qr=m*cv*(t4-t1)#...............................#Heat rejected in kJ/kg\n", + "pm=((Q-Qr)*1000)/((v1-v2)*100000)#......#Mean effective pressure in bar\n", + "P=(Q-Qr)*(N/60)#........................#Power developed in kW\n", + "print \"Temperature after adiabatic compression: %0.2f K\\n\"%(t2)\n", + "print \"Pressure after adiabatic compression: %0.2f bar\\n\"%(p2)\n", + "print \"Volume after adiabatic compression: %0.2f m**3\\n\"%(v2)\n", + "print \"Temperature after isochoric compression: %0.2f K\\n\"%(t3)\n", + "print \"Pressure after isochoric compression: %0.2f bar\\n\"%(p3)\n", + "print \"Volume after isochoric compression: %0.2f m**3\\n\"%(v3)\n", + "print \"Temperature after adiabatic expansion: %0.2f K\\n\"%(t4)\n", + "print \"Pressure after adiabatic expansion: %0.2f bar\\n\"%(p4)\n", + "print \"Volume after adiabatic expansion: %0.2f m**3\\n\"%(v4)\n", + "print \"Percentage clearance: %0.2f\\n\"%(pc)\n", + "print \"Efficiency of otto cycle: %0.2f\\n\"%(etaotto*100)\n", + "print \"Mean effective pressure: %0.2f bar:\\n\"%(pm)\n", + "print \"Power developed: %0.2f kW\\n\"%(P)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.14 PAGE 106" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air standard efficiency of the engine = 49.59 %\n", + "There is no change in efficiency when Helium is used as working fluid instead of air\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=310#................#Min temperature in K\n", + "t3=1220#................#Max temperature in K\n", + "ga=1.4#................#Ratio of specific heats for air\n", + "cph=5.22#............#Specific heat at constant volume for helium in kJ/kg\n", + "cvh=3.13#...............#Specific heat at constant pressure for helium in kJ/kg\n", + "#Calculations \n", + "r=(t3/t1)**(1/((ga-1)*2))#..............#Compression ratio\n", + "etaotto=1-(1/(r**(ga-1)))#................#Air standard efficiency\n", + "gah=cph/cvh#................#Ratio of specific heats for Helium\n", + "rh=(t3/t1)**(1/((gah-1)*2))#..............#Compression ratio when Helium is used\n", + "etaottoh=1-(1/(rh**(gah-1)))#................#Air standard efficiency when Helium is used\n", + "print \"Air standard efficiency of the engine = %0.2f %%\"%(etaotto*100)\n", + "if ((round (etaotto)- round (etaottoh)) == 0):\n", + " print \"There is no change in efficiency when Helium is used as working fluid instead of air\"\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.15 PAGE 108" + ] + }, + { + "cell_type": "code", + "execution_count": 88, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power developed = 1.88 kW\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "t1=310#.........#Minimum temperature in K\n", + "t3=1450#............#maximum temperature in K\n", + "m=0.38#...........#Mass of working fluid in kg\n", + "cv=0.71#...........#Specific heat at constant volume in kJ/kg\n", + "#Calculations\n", + "t4=sqrt(t1*t3)#............#Temperature at the end of adiabatic expansion in K\n", + "t2=t4#\n", + "W=cv*(t3-t2-t4+t1)#..................#Work done in kJ/kg\n", + "P=W*(m/60)#.................#Power developed in kW\n", + "print \"Power developed = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.17 PAGE 113" + ] + }, + { + "cell_type": "code", + "execution_count": 89, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of diesel engine = 61.19 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=15#...................#Compression ratio\n", + "ga=1.4#..............#Ratio os fpecific heats for air\n", + "perQ=6#................#Heat addition at constant pressure takes place at 6% of stroke\n", + "#Calculations\n", + "rho=1+((perQ/100)*(r-1))#.............#Cut off ratio\n", + "etad=1-((((rho**ga)-1)/(rho-1))*(1/(ga*(r**(ga-1)))))#..................#Efficiency of diesel engine\n", + "print \"Efficiency of diesel engine = %0.2f %%\"%(etad*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.18 PAGE 114" + ] + }, + { + "cell_type": "code", + "execution_count": 90, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of diesel engine = 59.34 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "L=0.25#...............#Engine stroke in m\n", + "D=0.15#..................#Engine bore in m\n", + "v2=0.0004#...............#Clearance volume in m**3\n", + "pers=5#...............#Percentage of stroke when fuel injection occurs\n", + "ga=1.4#..............#Ratio of specific heats\n", + "#Calculations\n", + "Vs=(pi/4)*D*D*L#..............#Swept volume in m**3\n", + "Vt=Vs+v2#....................#Total cylinder volume in m**3\n", + "v3=v2+((pers/100)*Vs)#..............#Volume at point of cut off\n", + "rho=v3/v2#............#Cut off ratio\n", + "r=1+(Vs/v2)#.............#Compression ratio\n", + "etad=1-((((rho**ga)-1)/(rho-1))*(1/(ga*(r**(ga-1)))))#..................#Efficiency of diesel engine\n", + "print \"Efficiency of diesel engine = %0.2f %%\"%(etad*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.19 PAGE 114" + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage loss in efficiency due to delay in cut off : 2.10\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=14#....................#Compression ratio\n", + "pers1=5#...............#Percentage of stroke when fuel cut off occurs\n", + "pers2=8#...............#Percentage of stroke when delayed fuel cut off occurs\n", + "v2=1#.....................#Clearance volume in m**3\n", + "ga=1.4#..................#Ratio of specific heats\n", + "#Calculations\n", + "#When the fuel is cut off at 5 %\n", + "rho1=((pers1/100)*(r-1))+1#.............#Cut off ratio\n", + "etad1=1-((((rho1**ga)-1)/(rho1-1))*(1/(ga*(r**(ga-1)))))#..................#Efficiency of diesel engine\n", + "#When the fuel is cut off at 8 %\n", + "rho2=((pers2/100)*(r-1))+1#.............# Delayed Cut off ratio\n", + "etad2=1-((((rho2**ga)-1)/(rho2-1))*(1/(ga*(r**(ga-1)))))#..................#Efficiency of diesel engine when cut off ratio is deyaled\n", + "print \"Percentage loss in efficiency due to delay in cut off : %0.2f\"%((etad1-etad2)*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.20 PAGE 115" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cut off Percentage : 11.17\n" + ] + } + ], + "source": [ + "from scipy.optimize import fsolve\n", + "# Initialisation of Variables\n", + "pm=7.5#.................#Mean effective pressure in bar\n", + "r=12.5#..................#Compression ratio\n", + "p1=1#....................#Initial pressure in bar\n", + "ga=1.4#.................#Ratio of specific heats\n", + "#Calculations\n", + "k=(pm*(ga-1)*(r-1))/(p1*(r**ga))#\n", + "c1=(r**(1-ga))/k#\n", + "c2=(-ga)/k#\n", + "c=1+(ga/k)-((r**(1-ga))/k)#\n", + "def F(rho):\n", + " f=c1*(rho**ga)+c2*rho+c#\n", + " return f\n", + "#Initial guess\n", + "rho=2#\n", + "#Derivative\n", + "def D(rho):\n", + " z=c1*ga*(rho**(ga-1))+c2#\n", + " return z\n", + "y=fsolve(F,rho)\n", + "perc=((y-1)/(r-1))*100#..................#Percentage of cutoff\n", + "print \"Cut off Percentage : %0.2f\"%perc" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.21 PAGE 115" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature after adiabatic compression: 886.253082 K\n", + "\n", + "Pressure after adiabatic compression: 44.312654 bar\n", + "\n", + "Volume after adiabatic compression: 0.000673 m**3\n", + "\n", + "Temperature after isobaric compression: 1878.856533 K\n", + "\n", + "Pressure after isobaric compression: 44.312654 bar\n", + "\n", + "Volume after isobaric compression: 0.001427 m**3\n", + "\n", + "Temperature after adiabatic expansion: 858.996630 K\n", + "\n", + "Pressure after adiabatic expansion: 2.863322 bar\n", + "\n", + "Volume after adiabatic expansion: 0.010098 m**3\n", + "\n", + "Efficiency of diesel engine = 59.77 %\n", + "Mean effective pressure : 7.42\n", + "Power developed = 44.27 kW \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.2#.................#Engine bore in m\n", + "L=0.3#.............#Engine stroke in m\n", + "p1=1#................#Initial pressure in bar\n", + "N=380#.................#No of working cycles per min\n", + "t1=300#..............#Initial temperature in K\n", + "co=8#................#Cut off percentage\n", + "r=15#..................#Compression ratio\n", + "R=287#.................#gas constant in J/kg\n", + "ga=1.4#................#Ratio of specific heats\n", + "#Calculations\n", + "Vs=(pi/4)*D*D*L#.............#Stroke volume in m\n", + "v1=(r/(r-1))*Vs#................#Volume at the end of isochoric compression in m**3\n", + "m=(p1*v1*10**5)/(R*t1)#................#Mass of air in cylinder in kg/cycle\n", + "p2=p1*(r**ga)#.......................#Pressure at the end of isentropic compression in bar\n", + "t2=t1*(r**(ga-1))#....................#Temperature at the end of isentropic compression in K\n", + "v2=Vs/(r-1)#..................#Volume at the end of isentropic compressionin m**3\n", + "p3=p2#\n", + "rho=((r-1)*(co/100))+1#................#Cut off ratio\n", + "v3=rho*v2#.......................#Volume at the end of isobaric expansion in m**3\n", + "t3=t2*(v3/v2)#..................#Temperature at the end of isobaric expansion in K\n", + "p4=((rho/r)**ga)*p3#..............#Pressure at the end of adiabatic expansion in bar\n", + "t4=((rho/r)**(ga-1))*t3#..............#Temperature at the end of adiabatic expansion in K\n", + "v4=v1#\n", + "print \"Temperature after adiabatic compression: %f K\\n\"%(t2)\n", + "print \"Pressure after adiabatic compression: %f bar\\n\"%(p2)\n", + "print \"Volume after adiabatic compression: %f m**3\\n\"%(v2)\n", + "print \"Temperature after isobaric compression: %f K\\n\"%(t3)\n", + "print \"Pressure after isobaric compression: %f bar\\n\"%(p3)\n", + "print \"Volume after isobaric compression: %f m**3\\n\"%(v3)\n", + "print \"Temperature after adiabatic expansion: %f K\\n\"%(t4)\n", + "print \"Pressure after adiabatic expansion: %f bar\\n\"%(p4)\n", + "print \"Volume after adiabatic expansion: %f m**3\\n\"%(v4)\n", + "etad=1-((((rho**ga)-1)/(rho-1))*(1/(ga*(r**(ga-1)))))#..................#Efficiency of diesel engine\n", + "print \"Efficiency of diesel engine = %0.2f %%\"%(etad*100)\n", + "pm=p1*(r**ga)*(ga*(rho-1)-((r**(1-ga))*((rho**ga)-1)))*(1/(ga-1))*1/(r-1)#.......#Mean effective pressure \n", + "print \"Mean effective pressure : %0.2f\"%pm\n", + "Wdc=(pm*Vs*10**5)/1000#..................#Work done per cycle in kJ/cycle\n", + "P=(Wdc*N)/60#...........................#Power developed in kW\n", + "print \"Power developed = %0.2f kW \"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.22 PAGE 118" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mean effective pressure = 7.02 bar \n", + "Ratio of maximum pressure to mean effective pressure 6.49\n", + "Cycle efficiency = 60.48 %\n", + "Fuel consumption = 0.35 kg/kWh\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "rc=15.3#....................#Compression ratio\n", + "re=7.5#...................#Expansion ratio\n", + "cp=1.005#.................#Specific heat at constant pressure in kJ/kg K\n", + "cv=0.718#..................#Specific heat at constant volume in kJ/kgK\n", + "ga=1.4#....................#Ratio of specific heats\n", + "p1=1#....................#Initial pressure in bar\n", + "t1=300#..................#Initial temperature in K\n", + "etamech=0.8#..................#Mechanical efficiency\n", + "C=42000#...........................#Calorific value of fuel in kJ/kg\n", + "rita=0.5#.........................#Ratio of indicated thermal efficiency to air standard efficiency\n", + "R=287#..........................#Gas constant in kJ/kgK\n", + "#Calculations\n", + "t2=t1*(rc**(ga-1))#.................#Temperature at the end of adiabatic compression in K\n", + "p2=p1*(rc**ga)#...................#Pressure at the end of adiabatic compression in bar\n", + "t3=(rc*t2)/re#....................#Temperature at the end of constant pressure process in K\n", + "v2=1#..................#Volume at the end of adiabatic process in m**3\n", + "m=(p2*v2*10**5)/(R*t2)#..................#Mass of working fluid in kg\n", + "t4=t3*((1/re)**(ga-1))#...................#Temperature at the end of adiabatic expansion in K\n", + "W=(m*(cp*(t3-t2)))-(m*(cv*(t4-t1)))#........#Work done in kJ\n", + "pm=W/(rc-1)#..............................#Mean effective pressure in kN/m**2\n", + "print \"Mean effective pressure = %0.2f bar \"%(pm/100)\n", + "print \"Ratio of maximum pressure to mean effective pressure %0.2f\"%((p2*100)/(pm))\n", + "etacy=W/(m*cp*(t3-t2))#...............#Cycle efficiency\n", + "print \"Cycle efficiency = %0.2f %%\"%(etacy*100)\n", + "etaith=rita*etacy#..................#Indicated thermal efficiency\n", + "etabth=etaith*etamech#...............#Brake thermal efficiency\n", + "mf=3600/(etabth*C)#................#Fuel consumption per kWh\n", + "print \"Fuel consumption = %0.2f kg/kWh\"%mf" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.23 PAGE 123" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of dual cycle : 63.76\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "Vs=0.0053#................#Swept volume in m**3\n", + "Vc=0.00035#...............#Clearance volume in m**3\n", + "v3=Vc#\n", + "v2=Vc#\n", + "p3=65#..................#Max pressure in bar\n", + "co=5#...................#Cut off percentage\n", + "p4=p3#ga=1.4#...............#Ratio of specific heats\n", + "t1=353#....................#Temperature at the start of compression in K\n", + "p1=0.9#...................#Pressure at the start of compression in bar\n", + "#Calculations\n", + "r=1+(Vs/Vc)#...................#Compression ratio\n", + "rho=(((co/100)*Vs)/Vc)+1#...................#Cut off ratio\n", + "p2=p1*(r**ga)#\n", + "Beta=p3/p2#.............................#Explosion ratio\n", + "etadual=1-((1/(r**(ga-1)))*((Beta*(rho**ga))-1)*(1/((Beta-1)+(Beta*ga*(rho-1)))))#............#Efficiency of dual cycle\n", + "print \"Efficiency of dual cycle : %0.2f\"%(etadual*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.24 PAGE 124" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of dual cycle : 61.42\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=14#......................#Compression ratio\n", + "Beta=1.4#................#Explosion ratio\n", + "co=6#..................#Cut off percentage\n", + "ga=1.4#.................#Ratio of specific heats\n", + "#Calculation\n", + "rho=((co/100)*(r-1))+1#...............#Cut off ratio\n", + "etadual=1-((1/(r**(ga-1)))*((Beta*(rho**ga))-1)*(1/((Beta-1)+(Beta*ga*(rho-1)))))#............#Efficiency of dual cycle\n", + "print \"Efficiency of dual cycle : %0.2f\"%(etadual*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.25 PAGE 124" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air standard efficiency = 57.55 %\n", + "Power developed = 51.39 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.25#.................#Engine bore in m\n", + "L=0.3#.............#Engine stroke in m\n", + "p1=1#................#Initial pressure in bar\n", + "N=3#...............#No of cycles per second\n", + "p3=60#................#Maximum pressure in bar\n", + "t1=303#..............#Initial temperature in K\n", + "co=4#................#Cut off percentage\n", + "r=9#..................#Compression ratio\n", + "R=287#.................#gas constant in J/kg\n", + "cv=0.71#...............#Specific heat at constant volume in kJ/kgK\n", + "cp=1.0#.................#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#...............#Ratio of specific heats\n", + "#Calculations\n", + "p4=p3#\n", + "Vs=(pi/4)*D*D*L#.............#Stroke volume in m**3\n", + "Vc=Vs/(r-1)#..................#Clearance volume in m**3\n", + "rho=((r-1)*(co/100))+1#................#Cut off ratio\n", + "v1=Vc+Vs#.................#Volume after isochoric compression in m**3\n", + "p2=p1*(r**ga)#................#Pressure after adiabatic compression in bar\n", + "t2=t1*(r**(ga-1))#..............#Temperature after adiabatic expansion in K\n", + "t3=(p3*t2)/p2#..............#Temperature after isochoric compression in K\n", + "t4=t3*rho#.....................#Temperature after isobaric expansion in K\n", + "t5=t4*((rho/r)**(ga-1))#.........#Temperature after adiabatic expansion in K\n", + "p5=p4*(rho/r)**ga#...............#Pressure after adiabatic expansion in bar\n", + "Qs=(cv*(t3-t2)+cp*(t4-t3))#.....#Heat supplied in kJ/kg\n", + "Qr=cv*(t5-t1)#...................#Heat rejected in kJ/kg\n", + "etast=1-(Qr/Qs)#.................#Air standard efficiency\n", + "print \"Air standard efficiency = %0.2f %%\"%(etast*100)\n", + "m=(p1*v1*10**5)/(R*t1)#...............#Mass of air in cycle\n", + "W=m*(Qs-Qr)#....................#Work done per cycle in kJ\n", + "P=W*N#............................#Power developed in kW\n", + "print \"Power developed = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.26 PAGE 127" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature after adiabatic compression: 874.19 K\n", + "\n", + "Pressure after adiabatic compression: 21.67 bar\n", + "\n", + "Temperature after isochoric compression: 2742.67 K\n", + "\n", + "Pressure after isochoric compression: 68.00 bar\n", + "\n", + "Temperature after isobaric expansion: 3166.05 K\n", + "\n", + "Pressure after isobaric expansion: 68.00 bar\n", + "\n", + "Temperature after adiabatic expansion: 1392.38 K\n", + "\n", + "Pressure after adiabatic expansion: 3.84 bar\n", + "\n", + "Air standard efficiency = 58.24 %\n", + "Mean effective pressure = 11.09 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#................#Initial pressure in bar\n", + "t1=363#.............#Initial temperature in K\n", + "r=9#.................#Compression ratio\n", + "p3=68#...............#Max pressure\n", + "p4=p3#\n", + "Qs=1750#..............#Total heat supplied\n", + "ga=1.4#...............#Ratio of specific heats\n", + "R=287#................#Gas constant in kJ/kgK\n", + "cv=0.71#..............#Specific heat at constant volume in kJ/kgK\n", + "cp=1#................#Specific heat at constant pressure in kJ/kgK\n", + "#Calculations\n", + "p2=p1*((r)**ga)#............#Pressure at the end of adiabatic compression in bar\n", + "t2=t1*((r)**(ga-1))#..........#Temperature at the end of adiabatic compression in K\n", + "t3=t2*(p3/p2)#............#Temperature at the end of isochoric compression in K\n", + "Qv=cv*(t3-t2)#.............#Heat added at constant volume in kJ/kg\n", + "Qp=Qs-Qv#.....................#Heat added at constant pressure in kJ/kg\n", + "t4=(Qp/cp)+t3#................#Temperature at the end of isobaric expansion in kJ/kg\n", + "rho=t4/t3#.....................#Cut off ratio\n", + "p5=p4*((rho/r)**ga)#................#Pressure at the end of adiabatic expansion in kJ/kg\n", + "t5=t4*((rho/r)**(ga-1))#...........#Temperature at the end of adiabatic expansion in kJ/kg\n", + "print \"Temperature after adiabatic compression: %0.2f K\\n\"%(t2)\n", + "print \"Pressure after adiabatic compression: %0.2f bar\\n\"%(p2)\n", + "print \"Temperature after isochoric compression: %0.2f K\\n\"%(t3)\n", + "print \"Pressure after isochoric compression: %0.2f bar\\n\"%(p3)\n", + "print \"Temperature after isobaric expansion: %0.2f K\\n\"%(t4)\n", + "print \"Pressure after isobaric expansion: %0.2f bar\\n\"%(p4)\n", + "print \"Temperature after adiabatic expansion: %0.2f K\\n\"%(t5)\n", + "print \"Pressure after adiabatic expansion: %0.2f bar\\n\"%(p5)\n", + "Qr=cv*(t5-t1)#....................#Heat rejected in kJ\n", + "etast=1-(Qr/Qs)#.................#Air standard efficiency\n", + "print \"Air standard efficiency = %0.2f %%\"%(etast*100)\n", + "pm=(1/(r-1))*((68*(rho-1))+(((p4*rho)-(p5*r))/(ga-1))-((p2-r)/(ga-1)))#................#Mean effective pressure in bar\n", + "print \"Mean effective pressure = %0.2f bar\"%pm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.27 PAGE 129" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air standard efficiency = 65.30 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=300#...............#Initial temperature\n", + "rmami=70#....................#Ratio of max pressure and min pressure\n", + "r=15#....................#Compression ratio\n", + "ga=1.4#.................#Ratio of specific heats\n", + "R=287#....................#Gas constant in kJ/kgK\n", + "t2=t1*(r**(ga-1))#.................#Temperature at the end of adiabatic compression in K\n", + "t3=t2*(rmami/(r**ga))#............#Temperature at the end of isochoric compression in K\n", + "t4=t3+((t3-t2)/ga)#..............#Temperature at the end of isobaric process in K\n", + "t5=t4/((1/(t4/(t3*r)))**(ga-1))#..........#Temperature at the end of adiabatic expansion in K\n", + "etast=1-((t5-t1)/((t3-t2)+ga*(t4-t3)))#..............#Air standard efficiency\n", + "print \"Air standard efficiency = %0.2f %%\"%(etast*100,)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.28 PAGE 131" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Thermal efficiency = 61.80 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=373#.............#Initial temperature in K\n", + "p1=1#...............#Initial pressure in bar\n", + "p3=65#..............#Maximum pressure in bar\n", + "R=287#.................#Gas constant in kJ/kg\n", + "p4=p3#\n", + "ga=1.41#.................#Ratio of specific heats\n", + "Vs=0.0085#............#Swept volume in m**3\n", + "afr=21#...............#Air fuel ratio\n", + "r=15#.................#Compression ratio\n", + "C=43890#..............#Calorific value of fuel in kJ/kg\n", + "cp=1#................#Specific heat at constant pressure in kJ/kgK\n", + "cv=0.71#..............#Specific heat at constant volume in kJ/kgK\n", + "#Calculations\n", + "Vc=Vs/(r-1)#...............#Clearance volume in m**3\n", + "v2=Vc\n", + "v1=Vs+v2#\n", + "v3=Vc\n", + "v5=v1#\n", + "p2=p1*(r**ga)#.....................#Pressure at the end of adiabatic compression in bar\n", + "t2=t1*(r**(ga-1))#................#Temperature at the end of adiabatic compression in K\n", + "t3=(t2*p3)/p2#...................#Temperature at the end of isochoric compression in K\n", + "m=(p1*v1*10**5)/(R*t1)#............#Mass of air in the cycle in kg\n", + "Qv=m*cv*(t3-t2)#.....................#Heat added during constant volume process in kJ\n", + "fv=Qv/C#.............................#Fuel added during constant volume process in kg\n", + "mf=m/afr#..................#Total amount of fuel added in kg\n", + "mfib=mf-fv#....................#Total amount of fuel added in isobaric process in kg\n", + "Qib=mfib*C#....................#Total amount of heat added in isobaric process in kJ\n", + "t4=(Qib/((m+mf)*cp))+t3#........#Temperature at the end of isobaric process in K\n", + "v4=(v3*t4)/t3#..................#Volume at the end of isobaric process in m**3\n", + "t5=t4/((v5/v4)**(ga-1))#.........#Temperature at the end of isochoric expansion in K\n", + "Qrv=(m+mf)*cv*(t5-t1)#...............#Heat rejected during constant volume process in kJ\n", + "W=(Qib+Qv)-Qrv#................#Work done in kJ\n", + "etath=W/(Qib+Qv)#..................#Thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\"%(etath*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.29 PAGE 133" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature after adiabatic compression: 524.81 K\n", + "\n", + "Pressure after adiabatic compression: 15.59 bar\n", + "\n", + "Temperature after isochoric compression: 1201.99 K\n", + "\n", + "Pressure after isochoric compression: 35.70 bar\n", + "\n", + "Temperature after isobaric expansion: 3283.19 K\n", + "\n", + "Pressure after isobaric expansion: 35.70 bar\n", + "\n", + "Temperature after adiabatic expansion: 2195.60 K\n", + "\n", + "Pressure after adiabatic expansion: 4.78 bar\n", + "\n", + "Mean effective pressure = 10.92 bar\n", + "Engine efficiency = 32.95 %\n", + "Power of the engine = 171.53 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "D=0.25#.............#Engine bore in m\n", + "L=0.4#..............#Engine stroke in m\n", + "t1=303#.............#Initial temperature in K\n", + "R=287#...............#Gas constant in kJ/kgK\n", + "p1=1#...............#Initial pressure in bar\n", + "N=8#................#No of working cycles per sec\n", + "cv=0.71#.............#Specific heat at constant volume in kJ/kgK\n", + "cp=1#.................#Specific heat at constant pressure in kJ/kgK\n", + "n=1.25#.............#Adiabatic index\n", + "rc=9#...............#Compression ratio\n", + "re=5#...............#Expansion ratio\n", + "rqptqe=2#...........#Ratio of heat liberated at constant pressure to heat liberated at constant volume\n", + "#Calculations\n", + "p2=p1*(rc**n)#.......................#Pressure at the end of adiabatic compression in bar\n", + "t2=t1*(rc**(n-1))#...................#Temperature at the end of adiabatic compression in K\n", + "rho=rc/re#..........................#Cut off ratio\n", + "t3=(2*cv*t2)/((2*cv)-(cp*(rho-1)))#...............#Temperature at the end of isochoric compression in K\n", + "p3=p2*(t3/t2)#....................................#Pressure at the end of isochoric compression in bar\n", + "p4=p3#t4=rho*t3#.................................#Temperature and pressure at the end of isobaric process\n", + "p5=p4*(1/(re**n))#.................................#Pressure at the end of adiabatic expansion in bar\n", + "t5=t4*(1/(re**(n-1)))#.............................#Temperature at the end of adiabatic expansion in K\n", + "pm=(1/(rc-1))*((p3*(rho-1))+(((p4*rho)-(p5*rc))/(n-1))-((p2-(p1*rc))/(n-1)))#...............#Mean effective pressure \n", + "print \"Temperature after adiabatic compression: %0.2f K\\n\"%(t2)\n", + "print \"Pressure after adiabatic compression: %0.2f bar\\n\"%(p2)\n", + "print \"Temperature after isochoric compression: %0.2f K\\n\"%(t3)\n", + "print \"Pressure after isochoric compression: %0.2f bar\\n\"%(p3)\n", + "print \"Temperature after isobaric expansion: %0.2f K\\n\"%(t4)\n", + "print \"Pressure after isobaric expansion: %0.2f bar\\n\"%(p4)\n", + "print \"Temperature after adiabatic expansion: %0.2f K\\n\"%(t5)\n", + "print \"Pressure after adiabatic expansion: %0.2f bar\\n\"%(p5)\n", + "print \"Mean effective pressure = %0.2f bar\"%pm\n", + "Vs=(pi/4)*D*D*L#....................#Swept volume in m**3\n", + "W=(pm*(10**5)*Vs)/1000#.................#Work done per cycle in kJ\n", + "m=(p1*(10**5)*(rc/(rc-1))*Vs)/(R*t1)#.....................#Mass of air per cycle in kg\n", + "Qs=m*(cv*(t3-t2)+cp*(t4-t3))#.....................#Heat supplied per cycle in kJ\n", + "eta=W/Qs#....................#Engine efficiency\n", + "print \"Engine efficiency = %0.2f %%\"%(eta*100)\n", + "P=W*N#.................#Power of the engine in kW\n", + "print \"Power of the engine = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.31 PAGE 140" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Work done = 282.90 kJ/kg\n", + "Efficiency of cycle = 32.64 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "cp=0.92#..................#Specific heat at constant pressure in kJ/kgK\n", + "cv=0.75#..................#Specific heat at constant volume in kJ/kgK\n", + "p1=1#...................#Pressure at the end of adiabatic expansion in bar\n", + "p2=p1#...................#Pressure at the end of isobaric compression in bar\n", + "p3=4#....................#Pressure at the end of isobaric compression in bar\n", + "p4=16#...................#Final pressure after heat addition in bar\n", + "t2=300#.....................#Temperature at the end of isobaric compression in K\n", + "ga=1.22#................#Ratio of specific heats\n", + "#Calculations\n", + "t3=t2*((p3/p2)**((ga-1)/ga))#............#Temperature at the end of isobaric compression in K\n", + "t4=(p4*t3)/p3#........................#Final temperature after heat addition in K\n", + "t1=t4/((p4/p1)**((ga-1)/ga))#...................#Temperature at the end of adiabatic compression in K\n", + "Qs=cv*(t4-t3)#.........................#Heat supplied in kJ/kg\n", + "Qr=cp*(t1-t2)#.........................#Heat rejected in kJ/kg\n", + "W=Qs-Qr#.......................#Work done per kg of gas in kJ\n", + "print \"Work done = %0.2f kJ/kg\"%W\n", + "eta=W/Qs#......................#Efficiency of cycle\n", + "print \"Efficiency of cycle = %0.2f %%\"%(eta*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.32 PAGE 145" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cycle efficiency = 40.07 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=101.325#....................#Pressure of intake air in kPa\n", + "t1=300#.......................#Temperature of intake air in kPa\n", + "rp=6#.........................#Pressure ratio in the cycle\n", + "ga=1.4#.........................#Ratio of specific heats\n", + "rtc=2.5#...........................#Ratio of turbine work and compressor work\n", + "#Calculations\n", + "t2=t1*(rp**((ga-1)/ga))#..................#Temperature at the end of isentropic expansion in K\n", + "t3=(rtc*(t2-t1))/(1-(1/(rp**((ga-1)/ga))))#........#Temperature at the end of isobaric expansion in K\n", + "t4=t3/(rp**((ga-1)/ga))#.......................#Temperature at the end of isentropic compression in K\n", + "eta=(t3-t4-t2+t1)/(t3-t2)#...................#Cycle efficiency\n", + "print \"Cycle efficiency = %0.2f %%\"%(eta*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.33 PAGE 147" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Power developed per kg of gas per second = 362.01 kW \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#....................#Intake pressure in bar\n", + "p2=5#....................#Supply pressure in bar\n", + "t3=1000#..................#Supply temperature in Kelvin\n", + "cp=1.0425#................#Specific heat at constant pressure in kJ/kgK\n", + "cv=0.7662#.................#Specific heat at constant volume in kJ/kgK\n", + "ga=cp/cv#..................#Ratio of specific heats\n", + "#Calculations\n", + "t4=t3*((p1/p2)**((ga-1)/ga))#\n", + "P=cp*(t3-t4)#.....................#Power developed per kg of gas per second in kW\n", + "print \"Power developed per kg of gas per second = %0.2f kW \"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.34 PAGE 147" + ] + }, + { + "cell_type": "code", + "execution_count": 105, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Temperature at turbine inlet = 423.51 K\n", + "Power developed = 13.85 kW\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "ma=0.1#...................#Air supplied in kg/s\n", + "p1=1#.....................#Supply pressure in bar\n", + "t4=285#.................#Temperature of air when supplied to cabin in K\n", + "p2=4#...................#Pressure at inlet to turbine in bar\n", + "cp=1.0#..................#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#..................#Ratio of specific heats\n", + "#Calculations\n", + "t3=t4*((p2/p1)**((ga-1)/ga))#................#Temperature at turbine inlet in K\n", + "print \"Temperature at turbine inlet = %0.2f K\"%t3\n", + "P=ma*cp*(t3-t4)#...........................#Power developed in kW\n", + "print \"Power developed = %0.2f kW\"%P" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.35 PAGE 148" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Efficiency of the cycle : 30.09\n", + "Heat supplied to the air = 456.17 kJ/kg \n", + "Work available at the shaft = 137.25 kJ/kg \n", + "Heat rejected in the cooler = 318.92 kJ/kg \n", + "Temperature of air leaving the turbine = 610.33 K \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#......................#Pressure of air entering the compressor in bar\n", + "p2=3.5#.................#Pressure of air while leaving the compressor in bar\n", + "t1=293#..................#Temperature of air at the onlet of the compressor in K\n", + "t3=873#.................#Temperature of air at the turbine inlet in K\n", + "cp=1.005#...............#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#...................#Ratio of specific heats\n", + "#Calculations\n", + "rp=p2/p1#....................#Pressure ratio of the cycle\n", + "eta=1-(1/(rp**((ga-1)/ga)))#..............#Efficiency of the cycle\n", + "print \"Efficiency of the cycle : %0.2f\"%(eta*100)\n", + "t2=t1*((rp**((ga-1)/ga)))#................#Temperature of air while leaving the compressor in K\n", + "q1=cp*(t3-t2)#................#Heat supplied to the air in kJ/kg\n", + "print \"Heat supplied to the air = %0.2f kJ/kg \"%(q1)\n", + "W=eta*q1#........................#Work available at the shaft in kJ/kg\n", + "print \"Work available at the shaft = %0.2f kJ/kg \"%W\n", + "q2=q1-W#................#Heat rejected in the cooler in kJ/kg\n", + "print \"Heat rejected in the cooler = %0.2f kJ/kg \"%q2\n", + "t4=t3/(rp**((ga-1)/ga))#.......................#Temperature of air leaving the turbine in K\n", + "print \"Temperature of air leaving the turbine = %0.2f K \"%t4" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.36 PAGE 149" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum temperature = 1251.38 K \n", + "Cycle efficiency = 40.07 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#...................#Pressure of air entering the compressor in bar\n", + "t1=300#.................#Temperature of air entering the compressor in bar\n", + "rp=6#...................#Pressure ratio\n", + "rtc=2.5#.................#Ratio of turbine work to compressor work\n", + "ga=1.4#............#Ratio of specific heats\n", + "#calculations\n", + "t2=t1*(rp**((ga-1)/ga))#..................#Temperature at the end of isentropic expansion in K\n", + "t3=(rtc*(t2-t1))/(1-(1/(rp**((ga-1)/ga))))#........#Temperature at the end of isobaric expansion in K\n", + "t4=t3/(rp**((ga-1)/ga))#.......................#Temperature at the end of isentropic compression in K\n", + "eta=(t3-t4-t2+t1)/(t3-t2)#...................#Cycle efficiency\n", + "print \"Maximum temperature = %0.2f K \"%t3\n", + "print \"Cycle efficiency = %0.2f %%\"%(eta*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.37 PAGE 150" + ] + }, + { + "cell_type": "code", + "execution_count": 108, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate of fuel consumption = 0.02 kg/s \n", + "Mass flow rate of air = 1.68 kg/s \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=303#........................#Min temperature in K\n", + "t3=1073#........................#Max temperature in K\n", + "C=45000#.....................#Calorific value of fuel in kJ/kg\n", + "cp=1#....................#Specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#........................#Ratio os specific heats\n", + "diftc=100#..................#Difference between work done by turbine and compressor in kW\n", + "#Calculations\n", + "t2=sqrt(t1*t3)# t4 = t2#.....#Assumed\n", + "mf=diftc/(C*(1-((t4-t1)/(t3-t2))))#................#Fuel used in kg per second\n", + "print \"Rate of fuel consumption = %0.2f kg/s \"%mf\n", + "ma=(diftc-(mf*(t3-t4)))/((t3-t4-cp*(t2-t1)))#............#Rate of air consumption in kg/s\n", + "print \"Mass flow rate of air = %0.2f kg/s \"%(ma)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.38 PAGE 151" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Compressor work = 259.32 kJ/kg \n", + "Turbine work = 351.64 kJ/kg \n", + "Heat supplied = 517.54 kJ/kg \n", + "Cycle efficiency = 17.84 %\n", + "Actual exhaust temperature of turbine = 723.11 K\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "t1=300#.................#Inlet temperature in K\n", + "p1=1#....................#Inlet pressure in bar\n", + "ma=1#....................#Mass of air in kg\n", + "rp=6.25#.............#Pressure ratio\n", + "t3=1073#.....#Maximum temperature in K\n", + "etac=0.8#............#Efficiency of compressor\n", + "etat=0.8#.............#Efficiency of turbine\n", + "ga=1.4#.................#Ratio of specific heats\n", + "cp=1.005#.............#Specific heat at constant pressure in kJ/kgK\n", + "#Calculations\n", + "t2=t1*(rp**((ga-1)/ga))#...........#Ideal Temperature of air while leaviing the compressor in K\n", + "t21=((t2-t1)/etac)+t1#............#Actual Temperature of air while leaviing the compressor in K\n", + "Wcomp=ma*cp*(t21-t1)#.............#Compressor work in kJ/kg\n", + "t4=t3/(rp**((ga-1)/ga))#........#Ideal temperature of air while leaving the turbine in K\n", + "t41=t3-(etat*(t3-t4))#..........#Actual temperature of air while leaving the turbine in K\n", + "Wtur=ma*cp*(t3-t41)#..............#Turbine work in kJ/kg\n", + "Wnet=Wtur-Wcomp#.................#Net work produced in kJ/kg\n", + "Qs=ma*cp*(t3-t21)#.................#Heat supplied in kJ/kg\n", + "print \"Compressor work = %0.2f kJ/kg \"%(Wcomp)\n", + "print \"Turbine work = %0.2f kJ/kg \"%Wtur\n", + "print \"Heat supplied = %0.2f kJ/kg \"%Qs\n", + "print \"Cycle efficiency = %0.2f %%\"%((Wnet/Qs)*100)\n", + "print \"Actual exhaust temperature of turbine = %0.2f K\"%t41" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.39 PAGE 153" + ] + }, + { + "cell_type": "code", + "execution_count": 110, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Air fuel ratio is 56:1\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "etat=0.85#..............#Turbine efficiency\n", + "etac=0.8#...............#Compressor efficiency\n", + "t3=1148#................#Max temperature in K\n", + "t1=300#................#Temperature of working fluid when entering the compressor in Kelvin\n", + "cp=1#...................#specific heat at constant pressure in kJ/kgK\n", + "ga=1.4#................#ratio of specific heats\n", + "p1=1#...................#Pressure of working fluid while entering the compressor in bar\n", + "rp=4#...................#Pressure ratio\n", + "C=42000#...............#Calorific value of fuel used in kJ/kgK\n", + "perlcc=10#.............#Percentage loss of calorific value in combustion chamber\n", + "\n", + "#calculations\n", + "p2=p1*rp#.................#pressure of air while leaving the compressor in bar\n", + "etacc=1-(perlcc/100)#............#efficiency of combustion chamber\n", + "t2=t1*(rp**((ga-1)/ga))#...........#Ideal Temperature of air while leaviing the compressor in K\n", + "t21=((t2-t1)/etac)+t1#............#Actual Temperature of air while leaviing the compressor in K\n", + "afr=((C*etacc)/(cp*(t3-t21)))-1#...........#Air fuel ratio\n", + "print \"Air fuel ratio is %d:1\"%round(afr)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 3.40 PAGE 154" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Work done in process 1-2 = 148.93 kJ/kg \n", + "Heat rejected in process 1-2 = 148.93 kJ/kg \n", + "Work done in process 2-3 = 0.00 kJ/kg \n", + "Heat rejected in process 2-3 = 0.00 kJ/kg \n", + "Work done in process 3-4 = 446.80 kJ/kg \n", + "Heat rejected in process 3-4 = 446.80 kJ/kg\n", + "Work done in process 4-1 = 297.87 kJ/kg \n", + "Heat rejected in process 4-1 = 297.87 kJ/kg \n", + "Thermal efficiency of the cycle = 66.67 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "p1=1#...........#pressure before isothermal compression in bar\n", + "t1=310#.........#temperature before isothermal compression in K\n", + "p3=16#.........#pressure before isothermal expansion in bar\n", + "t3=930#.........#temperature before isothermal expansion in K\n", + "R=287#.............#Gas constant in kJ/kgK\n", + "#Calculations\n", + "v1=(R*t1)/(p1*10**5)#...............#Volume before isothermal compression in m**3\n", + "v3=(R*t3)/(p3*10**5)#...............#Volume before isothermal expansion in m**3\n", + "v2=v3#v4=v1#.................#2-3 and 1-4 are isochoric processes\n", + "r=v1/v2#...................#Compression ratio\n", + "q12=R*t1*log(r)#...............#Work done and heat rejected in process 1-2\n", + "w12=q12#\n", + "print \"Work done in process 1-2 = %0.2f kJ/kg \"%(q12/1000)\n", + "print \"Heat rejected in process 1-2 = %0.2f kJ/kg \"%(w12/1000)\n", + "q23=0#w23=q23#..................#COnstant volume process and hence work done is zero\n", + "print \"Work done in process 2-3 = %0.2f kJ/kg \"%(q23/1000)\n", + "print \"Heat rejected in process 2-3 = %0.2f kJ/kg \"%(q23/1000)\n", + "q34=R*t3*log(r)#...............#Work done and heat rejected in process 1-2\n", + "w34=q34#\n", + "print \"Work done in process 3-4 = %0.2f kJ/kg \"%(q34/1000)\n", + "print \"Heat rejected in process 3-4 = %0.2f kJ/kg\"%(w34/1000)\n", + "q41=q34-q12\n", + "w41=q41#\n", + "print \"Work done in process 4-1 = %0.2f kJ/kg \"%(q41/1000)\n", + "print \"Heat rejected in process 4-1 = %0.2f kJ/kg \"%(w41/1000)\n", + "etath=w41/q34#.....................#Thermal efficiency\n", + "print \"Thermal efficiency of the cycle = %0.2f %%\"%(etath*100)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER4.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER4.ipynb new file mode 100644 index 00000000..fae4fcaa --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER4.ipynb @@ -0,0 +1,434 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 4 - Fuel-Air & Actual Cycles" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.2 PAGE 187" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage change in the efficiency of otto cycle = -0.71 %\n" + ] + } + ], + "source": [ + "from math import log\n", + "# Initialisation of Variables\n", + "r=8#..........................#Compression Ratio\n", + "ga=1.4#.......................#Degree of freedom for the gas\n", + "Cvinc=1.1#....................#Increase of specific heat at constant volume in percentage\n", + "#Calculations\n", + "eta=1-1/(r**(ga-1))#...........#efficiency of otto cycle\n", + "deta=(1-eta)*(ga-1)*log(r)*(Cvinc/100)#............#Change in efficiency\n", + "etach=-deta/eta#............................#Percentage change in efficiency of change in efficiency\n", + "print \"The percentage change in the efficiency of otto cycle = %0.2f %%\"%(etach*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.3 PAGE 187" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage change in the efficiency of otto cycle = -1.98 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=7#..........................#Compression Ratio\n", + "ga=1.4#.......................#Degree of freedom for the gas\n", + "Cvinc=3#....................#Increase of specific heat at constant volume in percentage\n", + "#Calculations\n", + "eta=1-1/(r**(ga-1))#...........#efficiency of otto cycle\n", + "deta=(1-eta)*(ga-1)*log(r)*(Cvinc/100)#............#Change in efficiency\n", + "etach=-deta/eta#............................#Percentage change in efficiency of change in efficiency\n", + "print \"The percentage change in the efficiency of otto cycle = %0.2f %%\"%(etach*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.4 PAGE 188" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage change = -1.15 efficiency\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "# Initialisation of Variables\n", + "r=18#..........................#Compression Ratio\n", + "co=5#..........................#Cut off percent of stroke\n", + "cv=0.71#.......................#Mean specific heat for cycle in kJ/kg K\n", + "R=0.285#.......................#Charecteristic gas constant in kJ/kh K\n", + "cvinc=2#.......................#Percentage increase in mean specific heat of the cycle\n", + "#Calculation\n", + "rho=(co/100)*(r-1)+1#\n", + "ga=1+(R/cv)#\n", + "eta=1-(1/(ga*(r**(ga-1))))*((rho**ga)-1)/(rho-1)#.....................#Efficiency of diesel cycle \n", + "etach=-((1-eta)/eta)*(ga-1)*(log(r)-(((rho**ga)*log(rho))/((rho**ga)-1))+(1/ga))*(cvinc/100)#...#Variation in the air standard efficiency\n", + "print \"Percentage change = %0.2f efficiency\"%(etach*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.5 PAGE 189" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Max pressure in the cylinder = 65.52 bar \n", + "Max pressure for constant specific heat = 93.52 bar \n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "# Initialisation of Variables\n", + "r=7#......................#Compression ratio\n", + "C=44000#..................#Calorific value of fuel used in kJ/kg\n", + "afr=15#...................#Air fuel ratio\n", + "t1=338#....................#Temperature of the charge at the end of the stroke in Kelvin\n", + "p1=1#......................#Pressure of the charge at the end of the stroke in bar\n", + "n=1.33#....................#Index of compression\n", + "cv=0.71#......#Specific heat constant at constant volume in kJ/kgK\n", + "k=20*10**(-5)#\n", + "#Calculations\n", + "p2=p1*(r)**n#\n", + "t2=(t1*p2)/(p1*r)#\n", + "ha=C/(afr+1)#......................#Heat added per kg of charge in kJ\n", + "t3=((-2*cv)+sqrt((4*cv*cv)+(4*k*((2*cv*t2)+(k*t2*t2)+(2*ha)))))/(2*k)#\n", + "p3=(p2*t3)/t2#.............................#Max pressure for constant volume process in bar\n", + "P3=p2*((ha/cv)+t2)/t2#.....................#Max pressure for constant specific heat in bar\n", + "print \"Max pressure in the cylinder = %0.2f bar \"%(p3)\n", + "print \"Max pressure for constant specific heat = %0.2f bar \"%P3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.6 PAGE 190" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Max pressure in the cylinder = 102.27 bar \n", + "Max pressure for constant specific heat = 150.64 bar \n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=10#......................#Compression ratio\n", + "C=48000#..................#Calorific value of fuel used in kJ/kg\n", + "afr=15#...................#Air fuel ratio\n", + "t1=330#....................#Temperature of the charge at the end of the stroke in Kelvin\n", + "p1=1#......................#Pressure of the charge at the end of the stroke in bar\n", + "n=1.36#....................#Index of compression\n", + "cv=0.7117#......#Specific heat constant at constant volume in kJ/kgK\n", + "k=2.1*10**(-4)#\n", + "#Calculations\n", + "p2=p1*(r)**n#\n", + "t2=t1*((p2/p1)**((n-1)/n))#\n", + "ha=C/(afr+1)#......................#Heat added per kg of charge in kJ\n", + "t3=((-2*cv)+sqrt((4*cv*cv)+(4*k*((2*cv*t2)+(k*t2*t2)+(2*ha)))))/(2*k)#\n", + "p3=(p2*t3)/t2#.............................#Max pressure for constant volume process in bar\n", + "P3=p2*((ha/cv)+t2)/t2#.....................#Max pressure for constant specific heat in bar\n", + "print \"Max pressure in the cylinder = %0.2f bar \"%p3\n", + "print \"Max pressure for constant specific heat = %0.2f bar \"%P3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.7 PAGE 191" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Percentage of the stroke when the combustion is completed is 9.77\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=15#......................#Compression ratio\n", + "C=43000#..................#Calorific value of fuel used in kJ/kg\n", + "afr=27#...................#Air fuel ratio\n", + "t2=870#....................#Temperature of the charge at the end of the stroke in Kelvin\n", + "cv=0.71#......#Specific heat constant at constant volume in kJ/kgK\n", + "R=0.287#.........................#Gas constant in kJ/kgK\n", + "k=20*10**(-5)#\n", + "#Calculations\n", + "cp=cv+R#............................#Specific heat at constant pressure\n", + "ha=C/(afr+1)#......................#Heat added per kg of charge in kJ\n", + "t3=((-2*cp)+sqrt((4*cp*cp)+(4*k*((2*cp*t2)+(k*t2*t2)+(2*ha)))))/(2*k)#\n", + "co=((t3/t2)-1)/(r-1)#.............#combustion occupies this amt of stroke \n", + "print \"Percentage of the stroke when the combustion is completed is \",round(co*100,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.8 PAGE 192" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Max pressure in the cylinder = 73.23 bar \n", + "Percentage of the stroke when the combustion is completed is 2.42\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=14#......................#Compression ratio\n", + "t1=87+273#....................#Temperature of the charge at the end of the stroke in Kelvin\n", + "p1=1#......................#Pressure of the charge at the end of the stroke in bar\n", + "hsupa=1700#............................#heat supplied per kg of air in kJ\n", + "cv=0.71#......#Specific heat constant at constant volume in kJ/kgK\n", + "k=20*10**(-5)#\n", + "ga=1.4#.....................#Degree of freedom \n", + "R=0.287#......................#Gas constant in kJ/kgK\n", + "#Calculations\n", + "p2=p1*(r)**ga#\n", + "t2=t1*(r**(ga-1))#\n", + "ha=hsupa/2#......................#Heat added per kg of charge in kJ\n", + "t3=((-2*cv)+sqrt((4*cv*cv)+(4*k*((2*cv*t2)+(k*t2*t2)+(2*ha)))))/(2*k)#\n", + "p3=(p2*t3)/t2#.............................#Max pressure for constant volume process in bar\n", + "P3=p2*((ha/cv)+t2)/t2#.....................#Max pressure for constant specific heat in bar\n", + "print \"Max pressure in the cylinder = %0.2f bar \"%p3\n", + "cp=cv+R#.................................#Heat capacity at constant pressure in kJ/kgK\n", + "t4=((-2*cp)+sqrt((4*cp*cp)+(4*k*((2*cp*t3)+(k*t3*t3)+(2*ha)))))/(2*k)#\n", + "co=((t4/t3)-1)/(r-1)#.............#combustion occupies this amt of stroke \n", + "print \"Percentage of the stroke when the combustion is completed is \",round(co*100,2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.9 PAGE 193" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Maximum temperature ignoring molecular expansion = 4862.39 Kelvin \n", + "Maximum pressure ignoring molecular expansion = 113.41 bar \n", + "Maximum temperature considering molecular expansion = 4862.39 Kelvin \n", + "Maximum pressure considering molecular expansion = 122.86 bar\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=8#...........................#Compression ratio\n", + "C=44000#............#Calorific value of fuel in kJ/kg\n", + "afr=13.8#.....................#Air fuel ratio\n", + "t1=343#.............................#Temperature of the mixture at the beginning of the compression in Kelvin\n", + "p1=1#........................#Pressure of the mixture at the beginning of the compression in bar\n", + "cv=0.716#.....................#Specific heat at constant volume in kJ/kgK\n", + "In=1.35#.......................#Index of compression\n", + "nc=6#..........................#No of carbon elements in the given fuel\n", + "nh=14#.........................#No of hydrogen elements in the given fuel\n", + "mc=12#...........................#Atomic mass of carbon in amu\n", + "mh=2#.............................#atomic mass of hydrogen molecule in amu\n", + "mo=32#...........................#Atomic mass of oxygen molecule in amu\n", + "#Calculations\n", + "#The chemical equation is C6H14 + xO2 ==> yCO2 + zH2O \n", + "#x is the no of oxygen molecules required for complete combustion\n", + "#y is the no of carbon dioxide molecules produced in complete combustion\n", + "#z is the no of Water molecules produced in complete combustion\n", + "y=nc#............................#As no of CO2 molecules is equal to no of C atoms in the fuel\n", + "z=nh/2#..........................#No of H2O molecules is equal to half the no of H atoms in the fuel\n", + "x=(z/2)+y#...........................#No of oxygen molecules required for combustionis half the no of water molecules plus the no of oxygen molecules \n", + "gafr=((x*32)*(100/23))/((mc*y)+(mh*z))#.................#Gravimetric air fuel ratio\n", + "ms=(gafr/afr)*100#......................#Actual mixture strength\n", + "#Since the mixture strength is greater than 100 %\n", + "#The mixture is rich in fuel. The combustion is therefore incompplete and hence CO will be formed\n", + "d=ms/100#......................#No of fuel molecules required for combustion\n", + "#The chemical equation is d(C6H14) + 9.5(O2) ==> a(CO2) + b(CO) + c(H2O) \n", + "c=(d*nh)/2#...............................#No of H2O molecules is equal to half the no of H atoms in the fuel\n", + "a=(x*2)-(d*nc)-c#........................#Equating atoms of the same element on both sides of equation\n", + "b=(d*nc)-a#\n", + "#By adding nitrogen on both sides, we are adding the same molecular weight on both sides.\n", + "#Air is 79 % nitrogen and 21 % oxygen\n", + "#Both N2 and O2 are diatomic molecules\n", + "n=x*(79/21)#.............................#No of nitrogen molecules \n", + "mbc=d+x+n#.............................#Moles before combustion\n", + "mac=a+b+c+n#.............................#Moles after expansion\n", + "me=(mac-mbc)/mbc#........................#Molecular expansion\n", + "t2=(t1*(r**(In-1)))#\n", + "t3=(t2+(C/((afr+1)*cv)))#..................#Maximum temperature ignoring molecular expansion in Kelvin\n", + "p3=p1*r*(t3/t1)#...........................#Maximum pressure ignoring molecular expansion in bar\n", + "t3me=t3#...............................#Maximum temperature considering molecular expansion in Kelvin\n", + "p3me=p3*(mac/mbc)#....................#Maximum pressure considering molecular expansion in bar\n", + "print \"Maximum temperature ignoring molecular expansion = %0.2f Kelvin \"%t3\n", + "print \"Maximum pressure ignoring molecular expansion = %0.2f bar \"%p3\n", + "print \"Maximum temperature considering molecular expansion = %0.2f Kelvin \"%t3me\n", + "print \"Maximum pressure considering molecular expansion = %0.2f bar\"%p3me" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 4.10 PAGE 194" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The cycle work = 872.05 kJ/kg \n", + "The cycle efficiency = 44.99 %\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "r=7#....................#Compression Ratio\n", + "t2=715#.................#Temperature at the end of isentropic compression in Kelvin\n", + "t4=1610#................#Temperature at the end of expansion in Kelvin\n", + "#Calculations\n", + "vr2=65.8#..................#From steam table\n", + "u2=524.2#..................#From steam table\n", + "vr4=5.69#..................#From steam table\n", + "u4=1307.63#..................#From steam table\n", + "vr1=r*vr2#\n", + "t1=338#..................#From steam table\n", + "u1=241.38#..................#From steam table\n", + "vr3=vr4/r#\n", + "t3=2800#..................#From steam table\n", + "u3=2462.5#..................#From steam table\n", + "W=(u3-u2)-(u4-u1)#..................#Work done\n", + "Qa=(u3-u2)#..........................#Heat added\n", + "eta=W/Qa#...........................#Cycle efficiency\n", + "print \"The cycle work = %0.2f kJ/kg \"%W\n", + "print \"The cycle efficiency = %0.2f %%\"%(eta*100)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER5.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER5.ipynb new file mode 100644 index 00000000..c77521f7 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER5.ipynb @@ -0,0 +1,117 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 5 - Combustion in S.I. Engines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 5.1 PAGE 218" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Time for one combustion process = 0.00 seconds \n", + "The crank position is = 12.47 degree\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "d=10.2#............#Engine bore in cm\n", + "spo=0.6#............#Spark plug offset in cm\n", + "vf=15.8#............#Average flame speed in m/s\n", + "thetas=20#.............#The angle of the crank when spark plug is fired\n", + "theta=6.5#..........#Angle by which the Engine rotates for combustion to develop (degree)\n", + "N=1200#................#Engine rpm\n", + "#calculations\n", + "dmax=(0.5*d)+spo#.........#Max distance of flame travel in cm\n", + "tf=(dmax)/(vf*100)#................#Time of flame travel in seconds\n", + "degs=(N/60)*360#...................#Conversion of engine rpm into degree/second\n", + "ctheta=tf*degs#...............#Crank angle for flame travel in degree\n", + "tc=theta/degs#..................#time for combustion to develop in seconds\n", + "top=tf+tc#......................#Time for one combustion process in seconds\n", + "thetatot=theta+ctheta#................#Total crank rotation in degree\n", + "thetacp = thetatot-thetas#..........#Crank position\n", + "print \"Time for one combustion process = %0.2f seconds \"%top\n", + "print \"The crank position is = %0.2f degree\"%thetacp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 5.2 PAGE 219" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The time of spark = 15.00 Degrees before TDC \n", + "Time of spark = 16.00 degrees before TDC\n" + ] + } + ], + "source": [ + "# Initialisation of Variables\n", + "dp=22#............#Delay period in degree\n", + "cp=17#...............#Combustion period in degree\n", + "dper=14#...............#Delay Percentage\n", + "#Calculations\n", + "thetad=dp/2#.........#Full throttle half speed will result in delay angle being reduced for the same time\n", + "#Thus ignition timing should be arranged so that the total of thetad+cp ends 13 degree after TDC\n", + "tsp=(thetad+cp)-13#............#Time of spark in degree\n", + "print \"The time of spark = %0.2f Degrees before TDC \"%tsp\n", + "#Half throttle half speed will result in an increase of 14% in delay time over that at full throttle half speed \n", + "theta=(dper*thetad)/100#\n", + "dtheta=thetad+theta#............#Delay angle\n", + "tp=dtheta+cp#................#Total period\n", + "tsp=tp-13#..............#\n", + "print \"Time of spark = %0.2f degrees before TDC\"%tsp" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER7.ipynb b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER7.ipynb new file mode 100644 index 00000000..62d3ba22 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/CHAPTER7.ipynb @@ -0,0 +1,596 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CHAPTER 7 - Air capacity of four stroke engines" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.1 PAGE 246" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Gas Inhaled per minute : 0.23 m**3/min \n" + ] + } + ], + "source": [ + "from math import pi\n", + "# Initialisation of Variables\n", + "D=20.3#................#Diameter in cm\n", + "L=30.5#.................#Length in cm\n", + "N=300#................#Engine rpm\n", + "eta=78#.................#Efficiency in percentage\n", + "afr=4/1#.................#Air Fuel Ratio\n", + "\n", + "#Calculations\n", + "StV = ((pi)/4)*((D/100)**2)*(L/100)#.......#Calculating the stroke volume\n", + "Vinh= (eta/100)*StV#...................#Volume Inhaled\n", + "Gainh= (Vinh/(4+1))#..............#Gas Inhaled\n", + "Gainhpm = Gainh*(N/2)#\n", + "print \"Gas Inhaled per minute : %0.2f m**3/min \"%(Gainhpm)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.2 PAGE 247" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Volumetric efficiency of the engine is : 0.85\n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "\n", + "N=3600#................#engine rpm\n", + "T=15#................#Inlet temperature in degree Celsius\n", + "Tk = T+273#..............#Inlet temperature in Kelvin\n", + "p=760#................#Inlet pressure in mm of Hg i.e. 1.013 x 10**5 Pa\n", + "ppa=1.013*(10**5)#.........# Inlet pressure in Pascals\n", + "pdv=4066#..............#Total piston displacement volume in cm**3\n", + "pdvsi=pdv*(10**(-6))#.............#Total piston displacement volume in m**3\n", + "afr=14/1#...................#Air fuel ratio is 14:1\n", + "bsfc=0.38#..................# b.s.f.c in kg/kWh\n", + "BP=86#.............#power output in kW\n", + "R=287#................#Gas constant for air in J/kg.K\n", + "#Calculations\n", + "m = (BP*bsfc*afr)/60#...............#Air consumption\n", + "V = (m*R*Tk)/ppa#\n", + "DV= pdvsi*(N/2)#.........#Displacement Volume\n", + "VE=V/DV#...............#Volumetric Efficiency\n", + "print \"Volumetric efficiency of the engine is : %0.2f\"%(VE)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.3 PAGE 248" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volumetric efficiency based on the free air condition : 0.86\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import sqrt\n", + "#Initializing the variables\n", + "n=4#..............#No of cylinders\n", + "d=5#.............#diameter of orifice in cm\n", + "dsi=d/100#..........# diameter in m\n", + "Cd=0.6#.............#Co-efficient of discharge\n", + "D=10#..............#Engine bore in cm\n", + "Dsi=d/100#............#Engine bore in m\n", + "L=12#................#Engine stroke in cm\n", + "Lsi=L/100#............#Engine stroke in m\n", + "N=1200#...............#Engine rpm\n", + "hw=0.046#............#Pressure drop across orifice in m of water\n", + "T = 17#..........#Ambient Temparature in Degree Celsius\n", + "Tk = T+273#..........# Ambient Temperature in Kelvin\n", + "Pbar = 1#.............# Ambient pressure in bar\n", + "Ppa = 1 * (10**5)#.......#Ambient pressure in Pascal\n", + "R = 287#.............# Gas constant in J/kg.K\n", + "rhow = 1000#............#Density of water in kg/m**3\n", + "g=9.81#...............#Acceleration due to gravity\n", + "#Calculations\n", + "\n", + "rhoa= Ppa/(R*Tk)#.........#Density of air\n", + "ha= (hw*rhow)/rhoa#\n", + "av= sqrt(2*g*ha)#.............#Air velocity\n", + "area = (pi/4)*(dsi**2)#\n", + "Vact = Cd*area*av#.............# V actual\n", + "Vswt = n*(pi/4)*(Dsi**2)*Lsi*(N/60*2)#\n", + "eff = Vact/Vswt#...............#Volumetric efficiency\n", + "print \"The volumetric efficiency based on the free air condition : %0.2f\"%(eff)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.4 PAGE 249" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The given fuel C7H16 requires 11(O2) for complete combustion\n", + "Hence, Mass of fuel is : 100.00\n", + "Mass of Oxygen required is : 352.00\n", + "The air fuel ratio is : 15.30\n", + "The volumetric efficiency of the engine is = 75.90 %\n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "n=1#...................#No of cylinders\n", + "k=0.5#\n", + "Vs=7000#............#displacement volume in cm**3\n", + "Vssi= Vs*(10**(-6))#........#displacement volume in m**3\n", + "OP=14.7#...................#Power developed in kW\n", + "N=450#..................#Engine rpm\n", + "sfc=0.272#................#Specific fuel consumption in kg/kWh\n", + "#Fuel used is C7H16\n", + "mC=12#.............#mass of carbon in amu\n", + "mH=1#.................#mass of hydrogen in amu\n", + "mO=16#.................#mass of oxygen in amu\n", + "pi=1.013 * (10**5)#................#initial pressure in pascal\n", + "T=30#...................#initial temperature in degree celsius\n", + "Tk=30+273#................#initial temperature in degree kelvin\n", + "R=287#..................#Gas constant for air in J/kg.K\n", + "#calculations\n", + "print \"The given fuel C7H16 requires 11(O2) for complete combustion\"\n", + "mf=(7*mC)+(16*mH)#\n", + "print \"Hence, Mass of fuel is : %0.2f\"%(mf)\n", + "MO=11* 2 * mO#\n", + "print \"Mass of Oxygen required is : %0.2f\"%(MO)\n", + "ma = MO/0.23#.......#mass of air\n", + "#Air contains 23% of oxygen by weight\n", + "afr = ma/mf#...............#air fuel ratio is the ratio of mass of air to mass of fuel\n", + "print \"The air fuel ratio is : %0.2f\"%(afr)\n", + "MF = sfc * OP#...........#actual fuel consumed in kg/h\n", + "MA = afr*MF#\n", + "AAS = MA * (1+0.3)#....................#actual air supplied in kg/h\n", + "M = AAS + MF#................#mass of charge in kg/h\n", + "VCS = ((M/60)*R*Tk)/pi#.............#Volume of charge sucked in m**3/min\n", + "DVM = Vssi * (N/2)#..............#Displacement volume/min\n", + "eta = VCS/DVM#\n", + "print \"The volumetric efficiency of the engine is = %0.2f %%\"%(eta*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.5 PAGE 250" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volumetric efficiency is = 87.43 %\n", + "The brake thermal efficiency is = 23.38 %\n", + "The brake torque = 0.01 Nm \n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "n=6#................#No of cylinders\n", + "vsi=730*(10**(-6))#..........#Piston displacement per cylinder in m**3\n", + "BP=80#.............#Power produced per cylinder in kW\n", + "N=3100#...........#Engine rpm\n", + "C=44*(10**6)#...........#Calorific value of petrol in J/kg\n", + "Pc=28#........#Petrol consumed per hour in kg\n", + "afr = 13/1#.......#air fuel ratio\n", + "pi=0.88*(10**5)#..............#Intake pressure in pa\n", + "T=300#............#Intake temperature in Kelvin\n", + "R = 287#.........#gas constant in J/kg.K\n", + "#calculations\n", + "ma = (Pc*afr)/60#...........#air comsumed\n", + "rhoa = pi/(R*T)#.......#Density of air\n", + "etaV=ma/(rhoa*vsi*n*(N/2))#\n", + "print \"The volumetric efficiency is = %0.2f %%\"%(etaV*100)\n", + "mf = Pc/3600#...............#Fuel consumed per sec\n", + "etaBT = (BP*1000)/(mf*C)#\n", + "print \"The brake thermal efficiency is = %0.2f %%\"%(etaBT*100)\n", + "T=(BP*60*1000)/(2*(pi)*N)#\n", + "print \"The brake torque = %0.2f Nm \"%(T)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.6 PAGE 251" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volumetric efficiency is = 81.44 %\n", + "Percentage Reduction in Output = 4.61 %\n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "etaV1 = 0.8#.........#Volumetric efficiency\n", + "pi1 = 1.013#.......#Inlet pressure\n", + "pe1= 1.013\n", + "pi2= 1.013#\n", + "pe2 = 1.15#.........#Exhaust pressure\n", + "Tk1 = 298#...........#Temperature in Kelvin\n", + "Tk2 = 318#...........#Temperature in Kelvin\n", + "r = 7.5#........#compression ratio\n", + "ga=1.4#..........#degree of freedom for gas\n", + "#calculations\n", + "#For pressure change\n", + "eta_V2 = r - (pe2/pi2)**(1/ga)#\n", + "eta_V1 = r - (pe1/pi1)**(1/ga)#\n", + "x=eta_V2/eta_V1#\n", + "#For inlet temperature change\n", + "y = sqrt(Tk2/Tk1)#\n", + "#For volumetric efficiency, considering both pressure and temperature\n", + "etaV2 = etaV1*x*y#\n", + "print \"The volumetric efficiency is = %0.2f %%\"%(etaV2*100)\n", + "PO=((etaV1/Tk1)-(etaV2/Tk2))/(etaV1/Tk1)#\n", + "print \"Percentage Reduction in Output = %0.2f %%\"%(PO*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.7 PAGE 252" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage increase in volumetric efficiency is = 6.68 %\n", + "The percentage increase in power = 23.34 %\n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "pi1 = 1.013#.......#Inlet pressure\n", + "pe1= 1.013\n", + "pi2= 1.3#\n", + "pe2 = 1.013#.........#Exhaust pressure\n", + "Tk1 = 300#...........#Temperature in Kelvin\n", + "Tk2 = 333#...........#Temperature in Kelvin\n", + "r = 14#........#compression ratio\n", + "ga=1.4#..........#degree of freedom for gas\n", + "R=287#...........#gas constant in J/kg.K\n", + "#calculations\n", + "#For pressure change\n", + "eta_V2 = r - (pe2/pi2)**(1/ga)#\n", + "eta_V1 = r - (pe1/pi1)**(1/ga)#\n", + "x=eta_V2/eta_V1#\n", + "#For inlet temperature change\n", + "y = sqrt(Tk2/Tk1)#\n", + "#For volumetric efficiency, considering both pressure and temperature\n", + "pive = ((x*y)-1)#.........#percentage increase in volumetric efficiency\n", + "print \"The percentage increase in volumetric efficiency is = %0.2f %%\"%(pive*100)\n", + "rho1 = (pi1*10**5)/(R*Tk1)#\n", + "rho2 = (pi2*10**5)/(R*Tk2)#\n", + "z = (rho2/rho1)*x*y#\n", + "pip = (z-1)#\n", + "print \"The percentage increase in power = %0.2f %%\"%(pip*100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.8 PAGE 253" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There is no change in volumetric efficiency due to inlet and exhaust pressure change\n", + "For inlet temperature change\n", + "Percentage decrease = 4.99 %\n", + "Brake power of the engine on the hill station = 24.81 kW \n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "IP1 = 32#...............#Indicated power output in kW\n", + "etamech=80#............#Mechanical efficiency at sea level\n", + "p1=1.013#.............#initial pressure at sea level in bar\n", + "tk1 = 308#...............#Initial temperature at sea level in Kelvin\n", + "tk2 = 278#..................#temperature atop the hill in Kelvin\n", + "rhoHg=13600#..............#Density of mercury in kg/m**3\n", + "h=2000#.....................#Hill altitude \n", + "g = 9.81#................#Acceleration due to gravity\n", + "delp = 10#..............#drop of mercury in mm Hg per every 100 m climb\n", + "#calculations\n", + "\n", + "print \"There is no change in volumetric efficiency due to inlet and exhaust pressure change\"\n", + "print \"For inlet temperature change\"\n", + "x = sqrt(tk2/tk1)#................#for inlet temperature change\n", + "#x is the ratio of the efficiencies at the beginning and on hill top\n", + "print \"Percentage decrease = %0.2f %%\"%((1-x)*100)\n", + "dp = rhoHg*g*((delp/1000)*(h/100))*(10**(-5))#........#Drop in pressure at hill station\n", + "p2=p1-dp#\n", + "IP_1 = p1/tk1#\n", + "IP_2 = (x*p2)/tk2#\n", + "k = IP_2/IP_1#..............#Ratio of indicative power output during initial and final conditions\n", + "IP2 = (IP1 * k)/(etamech/100)#\n", + "#Since the engine speed is the same at two places, the friction and hence mechanical efficiency remains unchanged\n", + "BP2 = IP2*(etamech/100)#\n", + "print \"Brake power of the engine on the hill station = %0.2f kW \"%(BP2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.9 PAGE 254" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volumetric efficiency of supercharged engine = 86.36 %\n", + "Indicated power of supercharged engine is = 102.11 kW \n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "etaV1 = 0.81#.........#Volumetric efficiency\n", + "pi1 = 1.01#.......#Inlet pressure before supercharger\n", + "pe1= 1.01#...........#Exhaust pressure before supercharger\n", + "pi2= 1.38#............#Inlet pressure after supercharger\n", + "pe2 = 1.01#.........#Exhaust pressure in bar after addition of super charger\n", + "Tk1 = 300#...........#Temperature in Kelvin\n", + "Tk2 = 321#...........#Temperature in Kelvin\n", + "r = 7.5#........#compression ratio\n", + "ga=1.4#..........#degree of freedom for gas\n", + "R=287#.............#Gas constant for air in J/kgK\n", + "IP1=75#...............#Indicated power output before addition of supercharger\n", + "#calculations\n", + "#For pressure change\n", + "eta_V2 = r - (pe2/pi2)**(1/ga)#\n", + "eta_V1 = r - (pe1/pi1)**(1/ga)#\n", + "x=eta_V2/eta_V1#\n", + "#For inlet temperature change\n", + "y = sqrt(Tk2/Tk1)#\n", + "#For volumetric efficiency, considering both pressure and temperature\n", + "etaV2 = etaV1*x*y#\n", + "print \"The volumetric efficiency of supercharged engine = %0.2f %%\"%(etaV2*100)\n", + "rho1 = (pi1*10**5)/(R*Tk1)#....#density of air before addition of supercharger\n", + "rho2 = (pi2*10**5)/(R*Tk2)#..#density of air after addition of supercharger\n", + "IP2 = IP1 * (etaV2*rho2)/(etaV1*rho1)#\n", + "print \"Indicated power of supercharged engine is = %0.2f kW \"%IP2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.10 PAGE 255" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The volumetric efficiency of the engine = 0.00 %\n", + "The heating value of 1 m**3 of charge at 25 degree Celsius = 1513.16 kJ.m**3\n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "n=1#.....#No of cylinders\n", + "D=0.32#.....#Bore of the cylinder in m\n", + "L=0.38#......#Stroke of the cylinder in m\n", + "N = 280#....#Engine rpm\n", + "CV = 18600#....#calorific value of fues in kJ/m**3\n", + "Tk1 = 300#....#Initial temperature in Kelvin\n", + "p1 = 1.013#.....#Initial pressure in bar\n", + "ma = 3.36#.......#mass of air consumed per min\n", + "tgc = 0.25#......#test gas consumption in m**3/min\n", + "pw = 120#.........#pressure of water in mm during the test gas consumption\n", + "tgct = 300#.......#Temperature in Kelvin during test gas consumption\n", + "rhow = 1000#.....#density of water in kg/m**3\n", + "R=287#...........#Gas constant in J/kg.K\n", + "#calculations\n", + "V= (ma*R*Tk1)/(p1*(10**5))#...#Volume of air consumed at inlet condition\n", + "\n", + "gsp = p1 +(pw/rhow)/10.2#...................#Gas supply pressure\n", + "#1 bar = 10.2 m\n", + "gcic = tgc*(gsp/p1)#..........#Gas consumption at inlet condition\n", + "Vi = gcic+V#.....#Volume of mixture at inlet condition\n", + "Vswt = (pi/4)*(D**2)*L*(N/2)#......#Swept volume \n", + "etaV = Vi/Vswt#.....#Volumetric efficiency\n", + "print \"The volumetric efficiency of the engine = %0.2f %%\"%(etaV*100)\n", + "hv = (gcic/Vi)*CV#......#Heating value\n", + "print \"The heating value of 1 m**3 of charge at 25 degree Celsius = %0.2f kJ.m**3\"%hv" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## EXAMPLE 7.12 PAGE 256" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i)Nominal diameter of the inlet valve = 0.04 m or 44.95 mm\n", + "(ii)When the engine is modified to develop max indicative power at 2800rpm, nominal diameter of the inlet valve = 0.05 m or 48.55 mm\n", + "(iii)The new mach index value is : 0.64\n", + "Hence the volumetric efficiency drops (There is a steady decrease in volumetric efficiency of an engine if there is an increase in the mach index beyond 0.55, Refer the FIG 7_12)\n", + "(iv)The mach index for the unmodified engine : 1.10\n", + "The volumetric efficiency is approximately 56% (from the FIG 7_12)\n" + ] + } + ], + "source": [ + "#Initializing the variables\n", + "Z=0.55#.............#Mach Index\n", + "Dcy=0.11#............#Engine Bore in m\n", + "L = 0.14#............#stroke length in m\n", + "N = 2400#.............#Engine rpm\n", + "N1 = 2800#............#Engine rpm after modification\n", + "N2=4800#.............#Max rpm for unmodified engine\n", + "p = 0.88#.........#pressure at intake valve in bar\n", + "t=340#...............#temperature at intake valve in Kelvin\n", + "ki = 0.33#...........#Inlet flow co-efficient\n", + "ga = 1.4#...............#degree of freedom of the gas\n", + "R = 287#.................#Gas constant for air in J/kg.K\n", + "#calculations\n", + "\n", + "Us = sqrt(ga*R*t)#......#sonic velocity of air-fuel mixture at the inlet valve\n", + "Up = (2*L*N)/60#...........#piston speed\n", + "Div = sqrt(((Dcy**2)*Up)/(Z*ki*Us))#...............#Nominal diameter of the inlet valve in m\n", + "print \"(i)Nominal diameter of the inlet valve = %0.2f m or %0.2f mm\"%(Div,Div*1000)\n", + "Div1 = sqrt(((Dcy**2)*2*L*N1)/(Z*ki*Us*60))#.......# Nominal diameter of inlet valve for the modified engine in m\n", + "print \"(ii)When the engine is modified to develop max indicative power at 2800rpm, nominal diameter of the inlet valve = %0.2f m or %0.2f mm\"%(Div1, Div1*1000,)\n", + "Up1=(2*L*N1)/60#............#New piston speed for modified engine\n", + "Z1 = ((Dcy/Div)**2)*(Up1/(ki*Us))#\n", + "print \"(iii)The new mach index value is : %0.2f\"%(Z1)\n", + "print \"Hence the volumetric efficiency drops (There is a steady decrease in volumetric efficiency of an engine if there is an increase in the mach index beyond 0.55, Refer the FIG 7_12)\"\n", + "Up2 = (2*L*N2)/60#..............#Piston speed at max rpm for unmodified engine\n", + "Z2 = ((Dcy/Div)**2)*(Up2/(ki*Us))#\n", + "print \"(iv)The mach index for the unmodified engine : %0.2f\"%Z2\n", + "print \"The volumetric efficiency is approximately 56% (from the FIG 7_12)\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/HeatTransfer(3).png b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/HeatTransfer(3).png Binary files differnew file mode 100644 index 00000000..52b8656a --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/HeatTransfer(3).png diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/cycleWorkEff(4).png b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/cycleWorkEff(4).png Binary files differnew file mode 100644 index 00000000..e55702fe --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/cycleWorkEff(4).png diff --git a/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/volumetric_Eff(7).png b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/volumetric_Eff(7).png Binary files differnew file mode 100644 index 00000000..facf3212 --- /dev/null +++ b/A_textbook_of_Internal_Combustion_Engines_by_R._K._Rajput/screenshots/volumetric_Eff(7).png diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb new file mode 100644 index 00000000..2f8362cd --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_1.ipynb @@ -0,0 +1,382 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 1 : Introduction\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.1- Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "P_m = 760 # pressure of mercury in mm\n", + "P_m_bar = P_m/750 # in bar\n", + "P_W = 0.006867 # pressure of water in bar\n", + "P = P_m_bar+P_W # in bar\n", + "print \"The absolute pressure of gas = %0.3f bar \" %P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute pressure of gas = 1.020 bar \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.2- Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Rho = 13.6 \n", + "g = 9.81 \n", + "a = 760 # in mm\n", + "b = 480 # in mm\n", + "h = a-b # in mm\n", + "P = (1000*Rho*g*h)/(1000) # in N/m**2\n", + "P= int(P/100)*100 #in N/m**2\n", + "print \"The absolute pressure = %0.f N/m**2 \" %P\n", + "P = int(P /100) # in mbar\n", + "print \"The absolute pressure = %0.f mbar \" %P" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute pressure = 37300 N/m**2 \n", + "The absolute pressure = 373 mbar \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.3- Page No : 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "G_P = 30 # guage pressure of steam in bar\n", + "P1 = 745 # in mm\n", + "P1= P1/750 # in bar\n", + "PressureInBoiler = G_P+P1 # in bar\n", + "print \"The absolute pressure in the bioler =\",round(PressureInBoiler,3),\"bar\"\n", + "P2 = 708.2 # in mm\n", + "P2= P2/750 # in \n", + "PressureInCond = P1-P2 # in bar\n", + "print \"The absolute pressure in the Condenser = %0.4f bar \" %PressureInCond\n", + "PressureInCond = round(PressureInCond*10**4)*10**1 # in N/m**2\n", + "print \"The absolute pressure in the Condenser = %0.f N/m**2 \" %(PressureInCond)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute pressure in the bioler = 30.993 bar\n", + "The absolute pressure in the Condenser = 0.0491 bar \n", + "The absolute pressure in the Condenser = 4910 N/m**2 \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.4- Page No : 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "Rho = 0.78 # in kg/m**3\n", + "g = 9.81 \n", + "h = 3 # in m\n", + "b = g*Rho*h*1000 # in N/m**2\n", + "b = b * 10**-3 # in kN/m**2\n", + "print \"The gauge pressure = %0.3f kN/m**2 \" %b" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gauge pressure = 22.955 kN/m**2 \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.5- Page No : 7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "B_h = 755 # Barometric height in mm\n", + "M_h= 240 # Manometer height in mm\n", + "P = B_h+M_h # in mm \n", + "P = P/750 # absolute pressure in bar\n", + "P= P*10**5 # in N/m**2\n", + "print \"The absolute pressure in the vessel = %0.4f MN/m**2 \" %(P*10**-6)\n", + "print \"The absolute pressure in the vessel = %0.3f bar \" %(P*10**-5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute pressure in the vessel = 0.1327 MN/m**2 \n", + "The absolute pressure in the vessel = 1.327 bar \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.6- Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "T = 287 # in degree C\n", + "T = T + 273 # in K\n", + "print \"The temperature on absolute scale = %0.f K \" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature on absolute scale = 560 K \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.7- Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Given data\n", + "\n", + "a = 0.26 \n", + "b = 5*10**-4 \n", + "E = 10 # in mV\n", + "T = (a/(2*b))*( sqrt(1+(4*E*b/a**2)) - 1 ) # in degree C\n", + "print \"The unit of a will be mV/\u00b0C and the unit of b will be mV/\u00b0C**2\"\n", + "print \"The Temperature = %0.2f degree C \" %T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The unit of a will be mV/\u00b0C and the unit of b will be mV/\u00b0C**2\n", + "The Temperature = 35.97 degree C \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.8- Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "Q_w = 500 # quantity of water flowing in kg/minute\n", + "T1 = 80 # in \u00b0 C\n", + "T2 = 20 # in \u00b0C\n", + "del_T = T1-T2 # in \u00b0C\n", + "Spe_heat = 4.182 # in kJ/kg\n", + "Q_h = Q_w*del_T*Spe_heat # in kJ/minute\n", + "print \"Quantity of heat supplied to water in the economizer is\",int(Q_h),\"kJ/minute or\",round(Q_h*10**-3,2),\" MJ/minute\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantity of heat supplied to water in the economizer is 125460 kJ/minute or 125.46 MJ/minute\n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.9- Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "CopperMass = 3 # in kg\n", + "WaterMass= 6 # in kg\n", + "Spe_heat_copper= 0.394 # in kJ/kg-K\n", + "T1 = 90 # in degree C\n", + "T2 = 20 # in degree C\n", + "del_T = T1-T2 # in degree C\n", + "H_C = CopperMass*Spe_heat_copper*del_T # heat required by copper in kJ\n", + "Spe_heat_water= 4.193 # in kJ/kg-K\n", + "H_W = WaterMass*Spe_heat_water*del_T # heat required by water in kJ\n", + "H = H_C+H_W #heat required by vessel and water in kJ\n", + "H = H * 10**-3 # in MJ\n", + "print \"Heat required by vessel and water = %0.3f MJ \" %H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat required by vessel and water = 1.844 MJ \n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 1.10- Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "\n", + "m = 18.2 #quantity of air supplied of coal in kg\n", + "T1 = 200 # in degree C\n", + "T2 = 18 # in degree C\n", + "del_T = T1-T2 # in degree C\n", + "Spe_heat = 1 # in kJ/kg-K\n", + "Q_C = m*Spe_heat*del_T # in kJ\n", + "print \"The Quantity of heat supplied per kg of coal = %0.1f kJ \" %Q_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Quantity of heat supplied per kg of coal = 3312.4 kJ \n" + ] + } + ], + "prompt_number": 45 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb new file mode 100644 index 00000000..1e9e60ad --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_2.ipynb @@ -0,0 +1,967 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 2 : Gas Laws And Properties\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.1 - Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "P1= 250 # in kN/m**2\n", + "V1= 6.2 # in m**3\n", + "V2= 1.82 # in m**3\n", + "# Formula P1*V1 = P2*V2\n", + "P2= P1*V1/V2 # in kN/m**2\n", + "print \"Pressure of air after compression = %0.1f kN/m**2 \" %P2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure of air after compression = 851.6 kN/m**2 \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.2 - Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "guagePressure= 1500 # in kN/m**2\n", + "atmPressure= 100 # in kN/m**2\n", + "P1= guagePressure+atmPressure # in kN/m**2\n", + "V1= 0.1 # in m**3\n", + "V2= 0.4 # in m**3\n", + "# Formula P1*V1 = P2*V2\n", + "P2= P1*V1/V2 # in kN/m**2\n", + "NewGuagePressure= P2-atmPressure # in kN/m**2\n", + "print \"New guage pressure = %0.f kN/m**2 (3 bar)\" %NewGuagePressure" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New guage pressure = 300 kN/m**2 (3 bar)\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.3 - Page No : 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1= -4+101.3 # in kN/m**2\n", + "V1= 96+475 # in cm**3\n", + "V2= 96 # in cm**3\n", + "# Formula P1*V1 = P2*V2\n", + "P2= P1*V1/V2 # in kN/m**2\n", + "print \"Pressure at the end of the compression stroke = %0.1f kN/m**2 \" %P2\n", + "print \"Pressure at the end of the compression stroke = %0.3f bar \" %(P2*10**-2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the end of the compression stroke = 578.7 kN/m**2 \n", + "Pressure at the end of the compression stroke = 5.787 bar \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.4 - Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V0= 1 # in m**3\n", + "t= 300 # in \u00b0C\n", + "V= V0*(1+t/273) # in m**3\n", + "print \"The volume occupied = %0.1f m**3 \" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The volume occupied = 2.1 m**3 \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.5 - Page No : 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V1= 2 # in m**3\n", + "T1= 30+273 # in K\n", + "T2= 230+273 # in K\n", + "# V1/T1 = V0/T0 = V2/T2\n", + "V2= V1*T2/T1 # in m**3\n", + "print \"The final volume = %0.3f m**3 \" %V2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final volume = 3.320 m**3 \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.6 - Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1= 7*10**5 # in N/m**2\n", + "V1= 3 # in m**3\n", + "V2= 9 # in m**3\n", + "T1= 150+273 # in K\n", + "T2= 10+273 # in K\n", + "# Formula P1*V1/T1 = P2*V2/T2\n", + "P2= P1*V1*T2/(T1*V2) # in N/m**2\n", + "print \"Pressure of the gas = %0.3f bar \" %(P2*10**-5)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure of the gas = 1.561 bar \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.7 - Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1= 100 # in kN/m**2\n", + "V1byV2= 12 # in \n", + "T1= 115+273 # in K\n", + "T2= 180+273 # in K\n", + "# Formula P1*V1/T1 = P2*V2/T2\n", + "P2= P1*V1byV2*T2/T1 # in N/m**2\n", + "print \"Absolute pressure at the end of compression stroke = %0.2f bar \" %(P2*10**-2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Absolute pressure at the end of compression stroke = 14.01 bar \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.8 - Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "mR= 8314.3 # in J/kg-mole-K\n", + "P= 200*10**3 # in N/m**2\n", + "T= 30+273 # in K\n", + "# Formula P*V = mR*T\n", + "V= mR*T/P # in m**3\n", + "print \"The molecular volume of all the gases = %0.3f m**3 \" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The molecular volume of all the gases = 12.596 m**3 \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.9 - Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1= 96 # in kN/m**2\n", + "P2= 725 # in kN/m**2\n", + "V1= 600 # in cm**3\n", + "V2= 100 # in cm**3\n", + "T1= 100+273 # in K\n", + "# Formula P1*V1/T1 = P2*V2/T2\n", + "T2= P2*V2*T1/(P1*V1) # in K\n", + "print \"Temperature at the end of compression = %0.3f \u00b0C \" %(T2-273)\n", + "# Note:- In the book, There is an error to calculate the value of T2." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at the end of compression = 196.488 \u00b0C \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.10 - Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "MR= 8314.2 # in J/kg-mole-K\n", + "mass= 44 # Molecular mass of carbon dioxide in kg\n", + "R= MR/mass # in J/kg-K\n", + "P= 11 # in MPa\n", + "P=P*10**6 # in Pa\n", + "V= 50*10**-3 # in m**3\n", + "T= 18+273 # in K\n", + "# Formula P*V= m*R*T\n", + "m= P*V/(R*T) # in kg\n", + "m=round(m) # in kg\n", + "MolecularVolume= MR*T/P # in m**3\n", + "D= m/V # density of the gas in kg/m**3\n", + "SpecificVolume= 1/D # in m**3/kg\n", + "print \"The mass of the gas = %0.f kg \" %m\n", + "print \"The Molecular volume = %0.2f m**3 \" %MolecularVolume\n", + "print \"The density of the gas = %0.f kg/m**3 \" %D\n", + "print \"The specific volume of the gas = %0.3f m**3/kg \" %SpecificVolume" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of the gas = 10 kg \n", + "The Molecular volume = 0.22 m**3 \n", + "The density of the gas = 200 kg/m**3 \n", + "The specific volume of the gas = 0.005 m**3/kg \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.11 - Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1= 350 # in kN/m**2\n", + "P1=P1*10**3 # in N/m**2\n", + "P2= 1.05 # in kN/m**2\n", + "P2=P2*10**6 # in N/m**2\n", + "V= 0.3 # in m**3\n", + "R= 0.29 # in kJ/kg-K\n", + "R= R*10**3 # in j/kgK\n", + "T1= 35+273 # in K\n", + "# Formula P*V= m*R*T\n", + "m= P1*V/(R*T1) # in kg\n", + "# Formula P1*V1/T1 = P2*V2/T2 and since V1= V2\n", + "T2= P2*T1/P1 # in K\n", + "print \"Temperature at constant volume compression = %0.f \u00b0C \" %(T2-273)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at constant volume compression = 651 \u00b0C \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.12 - Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "g1= 1.75 # gauge reading in bar\n", + "atm= 1.013 # in atmospheric pressure in bar\n", + "P1= g1+atm # in bar\n", + "T1= 12+273 # in K\n", + "T2= 45+273 # in K\n", + "# Formula P1*V1/T1 = P2*V2/T2 and since V1= V2\n", + "P2= P1*T2/T1 # in bar\n", + "g2=P2-atm # tyre gauge reading in bar \n", + "print\"Tyre guage reading at 45\u00b0C = %0.2f bar \"%g2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Tyre guage reading at 45\u00b0C = 2.07 bar \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.13 - Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Q= 120 # in kJ\n", + "W= 150 # in kJ\n", + "E= Q-W # change in internal energy in kJ\n", + "print \"The internal energy of the system decreases by %0.0f kJ\" %abs(E)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The internal energy of the system decreases by 30 kJ\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.14 - Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Q= -40 # in kJ/kg\n", + "W= -80 # in kJ/kg\n", + "E= Q-W # change in internal energy in kJ/kg\n", + "print \"Change in internal energy = %0.0f kJ/kg \" %E\n", + "print \"Thus internal energy of the working substance increases \"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in internal energy = 40 kJ/kg \n", + "Thus internal energy of the working substance increases \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.15 - Page No : 37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Int_energy_changes= 20 # in kJ/kg\n", + "Q= 0 # in kJ\n", + "W= -90 # in kJ\n", + "E= Q-W # change in internal energy in kJ/kg\n", + "m= E/Int_energy_changes # in kg\n", + "print \"The mass of the fluid in the system = %0.1f kg \" %m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of the fluid in the system = 4.5 kg \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.16 - Page No : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "U= 2800 # in kJ/kg\n", + "P= 20 # in bar\n", + "P= P*10**5 # in N/m**2\n", + "V= 0.23/1000 # in m**3\n", + "SP= U+P*V # specific enthalpy in kJ/kg\n", + "print \"The specific enthalpy = %0.0f kJ/kg \" %SP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The specific enthalpy = 3260 kJ/kg \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.17 - Page No : 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "h1= 210 #first heat transfer in kJ\n", + "h2= -20 # second heat transfer in kJ\n", + "h3= -190 # third heat transfer in kJ\n", + "h4= 60 # fourth heat transfer in kJ\n", + "W1= -180 # first work transfer in kJ\n", + "W2= 200 # second work transfer in kJ\n", + "W3= -300 # third work transfer in kJ\n", + "# Total Heat transfer = Total work transfer\n", + "W4= h1+h2+h3+h4-W1-W2-W3 # forth work transfer in kJ\n", + "print \"Fourth work transfer = %0.0f kJ is :\" %W4\n", + "print \"Thus the system delivers\",int(W4),\"kJ of work\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fourth work transfer = 340 kJ is :\n", + "Thus the system delivers 340 kJ of work\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.18 - Page No : 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Cv= 0.718 # in kJ/kgK\n", + "R= 0.278 # in kJ/kgK\n", + "T1= 15+273 # in K\n", + "T2= 135+273 # in K\n", + "m= 2 # mass in kg\n", + "V1= 0.7 # in m**3\n", + "Q= m*Cv*(T2-T1) # in kJ\n", + "print \"Heat supplied to gas = %0.2f kJ \" %Q\n", + "# Formula P1*V1= m*R*T1\n", + "P1= m*R*T1/V1 # in kN/m**2 absolute\n", + "# From P1/T1= P2/T2\n", + "P2= P1*T2/T1 # in kN/m**2\n", + "print \"The final pressure = %0.1f kN/m**2 \" %P2\n", + "# Note : The calculation in the book is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat supplied to gas = 172.32 kJ \n", + "The final pressure = 324.1 kN/m**2 \n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.19 - Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Cv= 1.005 # in kJ/kgK\n", + "T1= 200+273 # in K\n", + "T2= 15+273 # in K\n", + "V1= 0.12 # in m**3\n", + "m= 0.25 # mass in kg\n", + "Q= m*Cv*(T1-T2) # in kJ\n", + "print \"Heat extracted from the gas = %0.2f kJ \" %Q\n", + "# From V1/T1= V2/T2\n", + "V2= V1*T2/T1 # in m**3\n", + "print \"The final volume of the gas = %0.3f m**3 \" %V2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat extracted from the gas = 46.48 kJ \n", + "The final volume of the gas = 0.073 m**3 \n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.20 - Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "m=2 # molecular mass\n", + "UGC= 8.3143 # universal gas constant in kJ/kg-mole-K\n", + "Cp= 14.41 # in kJ/kg-K\n", + "R= UGC/m # in kJ/kgK\n", + "Cv= Cp-R # in kJ/kgK\n", + "gama= Cp/Cv \n", + "print \"The value of R = %0.3f kJ/kgK is :\" %R\n", + "print \"The value of Cv = %0.3f kJ/kgK \" %Cv\n", + "print \"The value of gama = %0.1f\" %gama" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of R = 4.157 kJ/kgK is :\n", + "The value of Cv = 10.253 kJ/kgK \n", + "The value of gama = 1.4\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.21 - Page No : 48" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Cp = 0.796 # in kJ/kg-K\n", + "Cv = 0.67 # in kJ/kg-K\n", + "P1=1 # in bar\n", + "P1= P1*10**5 # in N/m**2\n", + "P2=3.5 # in bar\n", + "P2= P2*10**5 # in N/m**2\n", + "V1= 0.12 # in m**3\n", + "V2= 0.05 # in m**3\n", + "m=1 # in kg\n", + "R= Cp-Cv # in kJ/kg-K\n", + "R= R*10**3 # in J/kg-K\n", + "# Formula P*V= m*R*T\n", + "T1= P1*V1/(m*R) # in K\n", + "# Formula P1*V1/T1 = P2*V2/T2\n", + "T2= P2*V2*T1/(P1*V1) # in K\n", + "T= T2-T1 # Temperature rise in K\n", + "print \"Temperature rise = %0.1f K \" %T\n", + "E= m*Cv*(T2-T1) # change in internal energy kJ\n", + "print \"Change in internal energy = %0.1f kJ \" %E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature rise = 43.7 K \n", + "Change in internal energy = 29.2 kJ \n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.22 - Page No : 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "CO2= 0.12 #volume of CO2 in m**3\n", + "CO= 0.25 # in m**3\n", + "H2= 0.06 # in m**3\n", + "CH4= 0.02 # in m**3\n", + "N2= 0.55 # in m**3\n", + "R= 8.3143 # Universal gas constant in kJ/kg-mol-K\n", + "mm_CO2= 44 # molecular mass of CO2\n", + "mm_CO= 28 \n", + "mm_H2= 2 \n", + "mm_CH4= 16 \n", + "mm_N2= 28 \n", + "Gm_CO2= 5.28 # gravimetric mass of CO2\n", + "Gm_CO= 7.00 \n", + "Gm_H2= 0.12 \n", + "Gm_CH4= 0.32 \n", + "Gm_N2= 15.40 \n", + "total_Gm= Gm_CO2+Gm_CO+Gm_H2+Gm_CH4+Gm_N2 \n", + "Per_relative_CO2= Gm_CO2/total_Gm*100 # in %\n", + "Per_relative_CO= Gm_CO/total_Gm*100 # in %\n", + "Per_relative_H2= Gm_H2/total_Gm*100 # in %\n", + "Per_relative_CH4= Gm_CH4/total_Gm*100 # in %\n", + "Per_relative_N2= Gm_N2/total_Gm*100 # in %\n", + "print \"Analysis % Relative : \"\n", + "print \"CO2 : \",round(Per_relative_CO2,1)\n", + "print \"CO : \",round(Per_relative_CO,1)\n", + "print \"H2 : \",round(Per_relative_H2,3)\n", + "print \"CH4 : \",round(Per_relative_CH4,2)\n", + "print \"N2 : \",round(Per_relative_N2,1)\n", + "App_Gas_Constant= R/total_Gm # in kJ/kg-K\n", + "mol_Vol= 22.4 #mole volume at NTP in m**3\n", + "Average_Density= total_Gm/mol_Vol # in kg/m**3 at NTP\n", + "print \"The Apparent gas constant = %0.4f kJ/kg-K \" %App_Gas_Constant\n", + "print \"The average density = %0.3f kg/m**3 at NTP. \" %Average_Density" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Analysis % Relative : \n", + "CO2 : 18.8\n", + "CO : 24.9\n", + "H2 : 0.427\n", + "CH4 : 1.14\n", + "N2 : 54.8\n", + "The Apparent gas constant = 0.2957 kJ/kg-K \n", + "The average density = 1.255 kg/m**3 at NTP. \n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.23 - Page No : 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Cv = 652 # in J/kg-K\n", + "R= 287 # in J/kg-K\n", + "Cp= Cv+R # in J/kg-K\n", + "m=0.3 # in kg\n", + "P= 1.5*10**5 # in N/m**2\n", + "V= 0.283 # in m**3\n", + "# Formula P*V= m*R*T\n", + "T= P*V/(m*R) # in K\n", + "T= T-273 # in \u00b0C\n", + "T1= -40 # in \u00b0C\n", + "delta_U= m*Cv*(T-T1) # in J\n", + "print \"Internal energy = %0.3f kJ \" %(delta_U*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal energy = 50.862 kJ \n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 2.24 - Page No :50 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "H2= 0.50 #volume of H2 in m**3\n", + "CH4= 0.19 # in m**3\n", + "CO= 0.18 # in m**3\n", + "C2H4= 0.02 # in m**3\n", + "CO2= 0.05 # in m**3\n", + "N2= 0.06 # in m**3\n", + "P= 100 # pressure of mixture in kN/m**2\n", + "mm_CO2= 44 # molecular mass of CO2\n", + "mm_CO= 28 \n", + "mm_H2= 2 \n", + "mm_CH4= 16 \n", + "mm_C2H4= 28 \n", + "mm_N2= 28 \n", + "R= 8.3143 # Universal gas constant in kJ/kg-mol-K\n", + "R_H2= R/mm_H2 # gas constant for H2\n", + "R_CO2= R/mm_CO2 \n", + "R_CO= R/mm_CO \n", + "R_C2H4= R/mm_C2H4 \n", + "R_CH4= R/mm_CH4 \n", + "R_N2= R/mm_N2 \n", + "M= mm_CO2*CO2+mm_H2*H2+mm_CH4*CH4+mm_CO*CO+mm_C2H4*C2H4+mm_N2*N2 # in kg\n", + "print \"Apparent molecular mass of the gas = %0.2f kg \" %M\n", + "mol_Vol= 22.4 #mole volume at NTP in m**3\n", + "density= M/mol_Vol # in kg/m**3\n", + "print \"Density of the mixture = %0.3f kg/m**3 \" %density\n", + "mixture_G_constant= R/M # in kJ/kg-K \n", + "print \"The mixture gas constant = %0.3f kJ/kg-K \" %mixture_G_constant\n", + "P_H2= P*H2 #partial pressure of H2 in kN/m**2\n", + "P_CH4= P*CH4 # in kN/m**2\n", + "P_CO= P*CO # in kN/m**2\n", + "P_C2H4= P*C2H4 # in kN/m**2\n", + "P_CO2= P*CO2 # in kN/m**2\n", + "P_N2= P*N2 # in kN/m**2\n", + "print \"The partial pressure of H2 = %0.0f kN/m**2\" %P_H2\n", + "print \"The partial pressure of CH4 = %0.0f kN/m**2\" %P_CH4\n", + "print \"The partial pressure of CO = %0.0f kN/m**2\" %P_CO\n", + "print \"The partial pressure of C2H4 = %0.0f kN/m**2\" %P_C2H4\n", + "print \"The partial pressure of CO2 = %0.0f kN/m**2\" %P_CO2\n", + "print \"partial pressure of N2 = %0.0f kN/m**2\" %P_N2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Apparent molecular mass of the gas = 13.52 kg \n", + "Density of the mixture = 0.604 kg/m**3 \n", + "The mixture gas constant = 0.615 kJ/kg-K \n", + "The partial pressure of H2 = 50 kN/m**2\n", + "The partial pressure of CH4 = 19 kN/m**2\n", + "The partial pressure of CO = 18 kN/m**2\n", + "The partial pressure of C2H4 = 2 kN/m**2\n", + "The partial pressure of CO2 = 5 kN/m**2\n", + "partial pressure of N2 = 6 kN/m**2\n" + ] + } + ], + "prompt_number": 77 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb new file mode 100644 index 00000000..39e249ba --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_3.ipynb @@ -0,0 +1,1450 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 3 : Thermodynamic Processes\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.1 - Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "P = 2.15 * 10**5 # in N/m**2\n", + "T = 20 # in degree C \n", + "T = T + 273 # in K\n", + "V = 0.20 # in m**3\n", + "R = 0.2927 # in kJ/kg-K\n", + "R = R * 10**3 # in J/kg-K\n", + "m = (P*V)/(T*R) # in kg\n", + "Q = 20*10**3 # in J\n", + "C_v = 0.706*10**3 # in J/kg-K\n", + "theta = Q/(m*C_v) # in degree C\n", + "T = T - 273 # in degree C\n", + "T1 = theta + T # new temp. in degree C\n", + "print \"New temperature = %0.1f degree C \" %T1\n", + "T1 = T1 + 273 # in K\n", + "T = T + 273 # in K\n", + "P2 = P * (T1/T) # in N/m**2\n", + "P2 = P2 * 10**-3# in kN/m**2\n", + "print \"New pressure = %0.3f kN/m**2 \" %P2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "New temperature = 76.5 degree C \n", + "New pressure = 256.459 kN/m**2 \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.2 - Page No : 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P = 350# in kN/m**2\n", + "P = P * 10**3# in N/m**2\n", + "m = 1# in kg\n", + "m = m * 10**3# in gram\n", + "V = 0.35# in m**3\n", + "C_p = 1.005# in kJ/kg-K\n", + "C_v = 0.710# in kJ/kg-K\n", + "R = C_p - C_v# in kJ/kg-K\n", + "T = (P*V)/(m*R) # in K\n", + "T = T - 273# in degree C\n", + "print \"The intial temperature = %0.0f K \" %(T+273)\n", + "T = T + 273# in K\n", + "T1 = 316# in degree C\n", + "T1 = T1 + 273# in K\n", + "P2 = P * (T1/T) # in N/m**2\n", + "P2 = P2 * 10**-3# in kN/m**2\n", + "print \"The final pressure of air = %0.1f kN/m**2 \" %P2\n", + "T = T - 273# in degree C\n", + "T1 = T1 - 273# in degree C\n", + "m = m * 10**-3# in kg\n", + "Q = m * C_v * (T1-T) # in kJ\n", + "print \"Heat added = %0.2f kJ \" %Q\n", + "G = m*C_v * (T1-T) # Gain of internal energy # in kJ\n", + "print \"Gain of internal energy = %0.2f kJ \" %G\n", + "G_enthalpy = m*C_p*(T1-T) # Gain of enthalpy in kJ\n", + "print \"Gain of enthalpy = %0.2f kJ \" %G_enthalpy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The intial temperature = 415 K \n", + "The final pressure of air = 496.4 kN/m**2 \n", + "Heat added = 123.36 kJ \n", + "Gain of internal energy = 123.36 kJ \n", + "Gain of enthalpy = 174.61 kJ \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3 - Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P = 3.2# in bar\n", + "P = P * 10**5# in N/m**2\n", + "R = 292.7# in kJ/kg-K\n", + "C_p = 1.003# in kJ/kg-K\n", + "m = 1#\n", + "V1 = 0.3# in m**3\n", + "V2 = 2*V1# in m**3\n", + "W = P*(V2-V1) # in J\n", + "W = W * 10**-3 # in kJ\n", + "print \"The work done = %0.0f kJ \" %W\n", + "T1 = (P*V1)/(m*R) # in K\n", + "print \"The intail Temperature = %0.0f \u00b0C \" %(T1-273)\n", + "T2 = T1*(V2/V1) # in K\n", + "print \"The final temperature = %0.0f \u00b0C \" %(T2-273)\n", + "Q = m*C_p*(T2-T1) # in kJ\n", + "print \"The Heat added = %0.0f kJ \" %(Q)\n", + "\n", + "# Note: To evaluate the value of Heat added, \n", + "# wrong value of T1 is putted (i.e 273 k at place of 328 K), so the answer of Heat added is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work done = 96 kJ \n", + "The intail Temperature = 55 \u00b0C \n", + "The final temperature = 383 \u00b0C \n", + "The Heat added = 329 kJ \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.4 - Page No : 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R = 0.29# in kJ/kg-K\n", + "R = R * 10**3# in J/kg-K\n", + "C_p = 1.005# in kJ/kg-K\n", + "T = 185# in degree C\n", + "T = T + 273# in K\n", + "T2 = 70+273# in K\n", + "V1 = 0.23# in m**3\n", + "P = 500# in kN/m**2\n", + "P = P * 10**3# in N/m**2\n", + "m = (P*V1)/(R*T) # in kg\n", + "Q = m*C_p*(T2-T) # in kJ\n", + "print \"Heat transferred = %0.2f kJ \" %Q\n", + "print \"i.e. %0.2f kJ heat has been abstracted from the gas\" %(abs(Q))\n", + "V2 = V1*(T2/T) # in m**3\n", + "W = P * (V2-V1) # in J\n", + "W= W*10**-3#in kJ\n", + "print \"The work done = %0.0f kJ \" %W\n", + "print \"i.e.\",round(abs(W),0),\"kJ work has been done on the gas \"\n", + "R= R*10**-3# in kJ/kg-K\n", + "C_v = C_p - R# in kJ/kg-K\n", + "I_E = m*C_v*(T2-T) # Change in internal energy in kJ\n", + "print \"Change in internal energy = %0.3f kJ \" %I_E\n", + "print \"i.e.\",round(abs(I_E),3),\"kJ energy is decrease in internal energy\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat transferred = -100.07 kJ \n", + "i.e. 100.07 kJ heat has been abstracted from the gas\n", + "The work done = -29 kJ \n", + "i.e. 29.0 kJ work has been done on the gas \n", + "Change in internal energy = -71.193 kJ \n", + "i.e. 71.193 kJ energy is decrease in internal energy\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.5 - Page No : 71" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Given data\n", + "P1 = 1.1# in MN/m**2\n", + "P1 = P1 * 10**6# in N/m**2\n", + "V1 = 1.5# in m**3\n", + "V2 = 7.5# in m**3\n", + "P2 = (P1*V1)/V2# in kN/m**2\n", + "P2 = P2 * 10**-6# in MN/m**2\n", + "P2 = P2 * 10**3# in kN/m**2\n", + "print \"The final pressure = %0.0f kN/m**2 \" %P2\n", + "W = P1*V1*log(V2/V1) # in J\n", + "W = W * 10**-4# in kJ\n", + "print \"The work done = %0.0f kJ \" %int(W)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final pressure = 220 kN/m**2 \n", + "The work done = 265 kJ \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.6 - Page No : 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 2800000# in N/m**2\n", + "P1 = P1 * 10**-6# in MN/m**2\n", + "C_p = 1.024# in kJ/kg-K\n", + "C_v = 0.7135# in kJ/kg-K\n", + "V1 = 1# in m**3. (asuumed )\n", + "V2 = 5*V1# in m**3\n", + "T1 = 220# in degree C\n", + "T1 = T1 + 273# in K\n", + "Gamma = C_p/C_v#\n", + "P2 = (P1*(V1)**Gamma)/((V2)**Gamma) # in MN/m**2\n", + "print \"The final pressure = %0.3f MN/m**2 \" %P2\n", + "T2 = (P2/P1)*V2*T1 # in K\n", + "print \"The final temperature = %0.1f degree C \" %(T2-273)\n", + "R = C_p-C_v# in kJ/kg-K\n", + "W = (R*(T1-T2))/(Gamma - 1) # in kJ\n", + "print \"Work done = %0.1f kJ \" %W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final pressure = 0.278 MN/m**2 \n", + "The final temperature = -28.3 degree C \n", + "Work done = 177.1 kJ \n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.7 - Page No : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log10\n", + "# Given data\n", + "W = 89.947# in kJ\n", + "T1 = 240# in degree C\n", + "T1=T1+273# in K\n", + "T2 = 115# in degree C\n", + "T2=T2+273# in K\n", + "C_v = W/(T1-T2) # in kJ/kg-K\n", + "print \"The value of Cv = %0.3f kJ/kg-K \" %C_v\n", + "V1 = 1# in m**3 (assumed)\n", + "V2 = 2*V1# in m**3\n", + "# (T1/T2) = (V2/V1)**(Gamma - 1)\n", + "Gamma=log10(T1/T2)/log10(V2/V1)+1#\n", + "Gamma = 1.4#\n", + "C_p = Gamma * C_v# in kJ/kg-K\n", + "print \"The value Cp = %0.3f kJ/kg-K \" %C_p" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of Cv = 0.720 kJ/kg-K \n", + "The value Cp = 1.007 kJ/kg-K \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.8 - Page No : 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P = 7# in bar\n", + "P = P *10**5# in N/m**2\n", + "R = 0.287# in kJ/kg-K\n", + "R=R*10**3# in J/kg-K\n", + "Gamma = 1.4#\n", + "T = 100# in degree C\n", + "T = T + 273# in K\n", + "V = (R*T)/P# in m**3\n", + "print \"The volume of one kg of air = %0.3f m**3\" %V\n", + "C_v = 0.718# in kJ/kg\n", + "T=T-273# in degree C\n", + "InternalEnergy= C_v*T# in kJ/kg\n", + "print \"Internal energy of 1 kg air = %0.1f kJ/kg\" %InternalEnergy\n", + "P1= P# in bar\n", + "V1 = 1# in m**3 (assumed)\n", + "V2 = 4 * V1# in m**3\n", + "T1= T# in degree C\n", + "T1=T1+273# in K\n", + "P2 = (P * (V1)**Gamma)/((V2)**Gamma) # in N/m**2\n", + "print \"The final pressure = %0.3f bar \" %(P2*10**-5)\n", + "T2 = (P2*V2)/(P1*V1)*T1# in K\n", + "T2 = T2 - 273# in degree \n", + "print \"The final temperature = %0.1f degree C \" %T2\n", + "I_E = C_v * T2# in kJ/kg\n", + "print \"Internal energy = %0.2f kJ/kg \" %I_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The volume of one kg of air = 0.153 m**3\n", + "Internal energy of 1 kg air = 71.8 kJ/kg\n", + "The final pressure = 1.005 bar \n", + "The final temperature = -58.8 degree C \n", + "Internal energy = -42.20 kJ/kg \n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.9 - Page No : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Gamma = 1.41#\n", + "C_v = 0.703# in kJ/kg-K\n", + "P1 = 105# in kN/m**2\n", + "P2 = 2835# in kN/m**2\n", + "T1 = 15# in degree C\n", + "T1 = T1 + 273# in K\n", + "m = 0.2# in kg\n", + "# Formula T2/T1 = (P2/P1)**((Gamma-1)/Gamma)\n", + "T2 = T1*(P2/P1)**((Gamma-1)/Gamma) # in K\n", + "T2 = T2 - 273# in degree C\n", + "print \"The final temperature = %0.0f degree C \" %T2\n", + "T2 = T2+273# in K\n", + "I_E = m*C_v*(T2-T1) # in kJ\n", + "print \"Change in internal energy = %0.3f kJ \" %I_E\n", + "W = I_E# in kJ\n", + "print \"Work done = %0.3f kJ \" %W\n", + "\n", + "# Note: There is an error to calculate the value of T2, and this wrong value is putted to evaluate \n", + "# the value of Change in internal energy but the value of Change in internal energy is calculated correct." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final temperature = 478 degree C \n", + "Change in internal energy = 65.089 kJ \n", + "Work done = 65.089 kJ \n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.10 - Page No : - Page No : 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "P1= 100# in N/m**2\n", + "T1 = 30# in degree C\n", + "T1 = T1 + 273# in K\n", + "C_v = 0.718# in kJ/kg-K\n", + "#C_v= C_v*10**3# in J/kg-K\n", + "R = 287.1# in J/kg-K\n", + "d = 15# in cm\n", + "l = 20# in cm\n", + "V = (pi/4)*(d)**2*l# in cm**3\n", + "V = V * 10**-3# in litre\n", + "Clear_V = 1.147# clearance volume \n", + "Vol = V+Clear_V#volume of air at beginning of compression in litre\n", + "ROC = Vol/Clear_V# Ratio of compression\n", + "P2 = P1*(Vol/Clear_V)**1.2# in kN/m**2\n", + "print \"The pressure at the end of compression = %0.1f kN/m**2 \" %P2\n", + "T2 = (P2*Clear_V*T1)/(P1*Vol) # in K\n", + "T2 = T2 - 273# in degree C\n", + "T1 = T1 - 273# in degree C\n", + "T = T2-T1# in degree C\n", + "print \"The temperature at the end of compression = %0.1f degree C \" %T\n", + "T1 = T1 + 273# in K\n", + "m = (P1*Vol)/(R*T1) # in kg\n", + "I_E = m*C_v*T# in kJ\n", + "print \"The change in internal energy = %0.3f kJ \" %I_E" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pressure at the end of compression = 540.7 kN/m**2 \n", + "The temperature at the end of compression = 98.4 degree C \n", + "The change in internal energy = 0.380 kJ \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.11 - Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V1 = 2.5 # in litre\n", + "P1 = 1400 # kN/m**2\n", + "P2 = 280 # in kN/m**2\n", + "T1 = 1100 # in \u00b0C\n", + "T1 = T1 + 273 # in K\n", + "n = 1.28\n", + "V2 = V1*(P1/P2)**(1/1.28) # in litres\n", + "print \"Final volume = %0.1f litres \" %V2\n", + "T2 = T1*((P2*V2)/(P1*V1)) # in K\n", + "T2 = T2 - 273# in degree C\n", + "print \"Final temperature = %0.0f degree C \" %T2\n", + "W = (P1* V1 - P2*V2)/(n-1) # in Joules\n", + "print \"Work done = %0.2f kJ \" %(W*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final volume = 8.8 litres \n", + "Final temperature = 693 degree C \n", + "Work done = 3.71 kJ \n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.12 - Page No : 87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Gamma = 1.4#\n", + "P1 = 780# in kN/m**2\n", + "P2 = 100# in kN/m**2\n", + "V1 = 750# in cm**3\n", + "V1= V1*10**-6# in m**3\n", + "V2 = (1/5)*V1# in m**3\n", + "n = (log(P1/P2))/(log(V1/V2))\n", + "print \"The value of index = %0.3f\" %n\n", + "W = (P1*V2-P2*V1)/(1-n) # in kJ\n", + "print \"Work done = %0.3f kJ \" %W\n", + "print \"i.e.\",round(abs(W),4),\"kJ work is done on the gas\"\n", + "Q = ((Gamma - n)/(Gamma-1)) * (-W) # in kJ\n", + "print \"Heat rejected during Compression is :\",round(Q,4),\"kJ or\",round(Q*10**3),\"joules.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of index = 1.276\n", + "Work done = -0.152 kJ \n", + "i.e. 0.152 kJ work is done on the gas\n", + "Heat rejected during Compression is : 0.047 kJ or 47.0 joules.\n" + ] + } + ], + "prompt_number": 63 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.13 - Page No : 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T1 = 40# in degree C\n", + "T1 = T1 +273# in K\n", + "P2 = 50# in bar\n", + "P1 = 1# in bar\n", + "Gamma = 1.4#\n", + "C_v = 0.718# in kJ/kg-K\n", + "SpeHeat = 1.005# in kJ/kg-K\n", + "HeatSupply= 125.6# in kJ/kg\n", + "T2 = T1 * (P2/P1)**((Gamma-1)/Gamma) # in K\n", + "C_p = C_v * (T2-T1) # in kJ/kg\n", + "del_T = HeatSupply/SpeHeat# in degree C\n", + "del_U = C_v * del_T# in kJ/kg\n", + "print \"Change in internal energy = %0.1f kJ/kg \" %del_U\n", + "T3 = T2 + del_T# in K\n", + "del_Phi = SpeHeat * log(T3/T2) # in kJ/kg-K\n", + "print \"Change in entropy during constant pressure = %0.3f kJ/kg-K \" %del_Phi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in internal energy = 89.7 kJ/kg \n", + "Change in entropy during constant pressure = 0.123 kJ/kg-K \n" + ] + } + ], + "prompt_number": 65 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.14 - Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 30# in bar\n", + "P1= P1*10**5# in N/m**2\n", + "V1 = 0.85# in m**3\n", + "V2 = 4.25# in m**3\n", + "W = P1 *V1 * log(V2/V1) # in Joules\n", + "W = W * 10**-3# in kJ\n", + "T = 400# in K\n", + "del_U = W/T# in kJ/K\n", + "print \"Change in entropy = %0.3f kJ/K \" %del_U" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy = 10.260 kJ/K \n" + ] + } + ], + "prompt_number": 66 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.15 - Page No : 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_P = 1.041# in kJ/kg-K\n", + "C_V = 0.743# in kJ/kg-K\n", + "R = C_P - C_V# in kJ/kg-K\n", + "P1 = 140# in kN/m**2\n", + "P2 = 1400# in kN/m**2\n", + "V1 = 0.14# in m**3\n", + "T1 = 25# in degree C\n", + "T1 = T1 + 273# in K\n", + "Gamma = 1.4#\n", + "n = 1.25#\n", + "m = (P1 * 10**3 *V1)/(R * 10**3 * T1) # in kg\n", + "V2 = V1 * (P1/P2)**(1/n) # in m**3\n", + "del_U = C_P * (log(V2/V1)) + C_V * (log(P2/P1)) # in kJ/kg-K\n", + "del_U = m * del_U # in kJ/K\n", + "print \"Part (i)\"\n", + "print \"Change in entropy = %0.4f kJ/K \" %del_U\n", + "T2 = T1 * (V1/V2)**(n-1) # in K\n", + "del_U1 = C_P * (log(T2/T1)) - R*(log(P2/P1)) # in kJ/kg-K\n", + "print \"Part (ii)\"\n", + "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U1\n", + "del_U2 = C_V * (log(T2/T1)) + R*(log(V2/V1)) # in kJ/kg-K\n", + "print \"Part (iii)\"\n", + "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U2\n", + "del_U3 = C_V * (Gamma-n) * (log(V2/V1)) # in kJ/kg-K\n", + "print \"Part (iv)\"\n", + "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U3\n", + "del_U4 = C_V * ((Gamma-n)/(n-1)) * (log(T1/T2)) # in kJ/kg-K\n", + "print \"Part (v)\"\n", + "print \"change in entropy = %0.3f kJ/kg \" %del_U4\n", + "del_U5 = C_V * ((Gamma-n)/n) * (log(P1/P2)) # in kJ/kg-K\n", + "print \"Part (vi)\"\n", + "print \"Change in entropy = %0.3f kJ/kg-k \" %del_U5" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i)\n", + "Change in entropy = -0.0456 kJ/K \n", + "Part (ii)\n", + "Change in entropy = -0.207 kJ/kg-K \n", + "Part (iii)\n", + "Change in entropy = -0.207 kJ/kg-K \n", + "Part (iv)\n", + "Change in entropy = -0.205 kJ/kg-K \n", + "Part (v)\n", + "change in entropy = -0.205 kJ/kg \n", + "Part (vi)\n", + "Change in entropy = -0.205 kJ/kg-k \n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.16 - Page No : 93 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 1# in bar\n", + "P2 = 15# in bar\n", + "T1 = 0# in degree C\n", + "T1 = T1 + 273# in K\n", + "T2 = 200# in degree C\n", + "T2 = T2 + 273# in K\n", + "C_P = 1.005# in kJ/kg-K\n", + "C_V = 0.718# in kJ/kg-K\n", + "R = C_P-C_V# in kJ/kg-K\n", + "del_U = C_P * (log(T2/T1)) - R*(log(P2/P1)) # in kJ/kg-K\n", + "print \"Change in entropy = %0.3f kJ/kg-K \" %del_U" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy = -0.225 kJ/kg-K \n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.17 - Page No : 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_V = 2.174# in kJ/kg-K\n", + "R = 0.5196# in kJ/kg-K\n", + "C_P = C_V+R# in kJ/kg-K\n", + "V2 = 1# in m**3\n", + "V1 = 8# in m**3\n", + "P1 = 0.7# in bar\n", + "P2 = 7# in bar\n", + "del_U = C_P * (log(V2/V1)) + C_V * (log(P2/P1)) # in kJ/kg-K\n", + "m = 0.9# in kg\n", + "del_U = m * del_U# in kJ/K\n", + "print \"Change in entropy = %0.3f kJ/K \" %del_U\n", + "print \"It is a loss of entropy\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in entropy = -0.536 kJ/K \n", + "It is a loss of entropy\n" + ] + } + ], + "prompt_number": 73 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.18 - Page No : 95 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_P = 1.005# in kJ/kg-K\n", + "C_V = 0.718# in kJ/kg-K\n", + "R = C_P - C_V# in kJ/kg-K\n", + "R= R*10**3#in J/kg-K\n", + "P1 = 3*10**5#in N/m**2\n", + "V1 = 1.5# m**3\n", + "T1 = 15# in degree C\n", + "T1 = T1 +273# in K\n", + "m1 = (P1*V1)/(R* T1) # in kg\n", + "m2 = m1+2#final mass of air in kg\n", + "P2 = P1 * (m2/m1) # in kN/m**2\n", + "T1 = T1 - 273# in degree C\n", + "T2 = 0# in degree C\n", + "m = 1# in kg\n", + "del_U = m * C_P * (T1-T2) # in kJ\n", + "print \"Total enthapy of air = %0.3f kJ \" %del_U" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total enthapy of air = 15.075 kJ \n" + ] + } + ], + "prompt_number": 75 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.19 - Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R = 0.287# in kJ/kg-K\n", + "P1 = 30# in bar\n", + "V1 = 0.12# in m**3\n", + "m = 1.8# in kg\n", + "U= 8.3143# in kJ/kg-mol-K\n", + "T1 = (P1 * 10**5 * V1)/(m*R*10**3) # in K\n", + "T1 = T1 - 273# in degree C\n", + "print \"The temperature = %0.0f degree C \" %int(T1)\n", + "m_m = U/R# in kg\n", + "print \"The molecular mass = %0.2f kg \" %m_m\n", + "V_s = V1/m# in m**3\n", + "print \"The Specific volume = %0.4f m**3 \" %V_s\n", + "V_m = V_s * m_m# in m**3\n", + "print \"Molecular volume = %0.2f m**3 \" %V_m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature = 423 degree C \n", + "The molecular mass = 28.97 kg \n", + "The Specific volume = 0.0667 m**3 \n", + "Molecular volume = 1.93 m**3 \n" + ] + } + ], + "prompt_number": 77 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.20 - Page No : 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T=15+273#in K\n", + "U= 8.3143# in kJ/kg-mol-K\n", + "GasConstant = 0.618# in kJ/kg-K\n", + "GasVolume= 1# in m**3 (assume)\n", + "AirVolume= 1.5*GasVolume# in m**3\n", + "P=760# in mm\n", + "P= P/750# in bar\n", + "P= P*10**5#in N/m**2\n", + "MixtureVolume= GasVolume+AirVolume#in m**3\n", + "PGM= GasVolume/MixtureVolume*100# in %\n", + "print \"Percentage of gas by volume in the mixture = %0.0f %%\" %PGM\n", + "PAM= AirVolume/MixtureVolume*100# in %\n", + "print \"Percentage of air by volume in the mixture = %0.0f %%\" %PAM\n", + "M1= U/0.287# in mol\n", + "M2= U/0.618# in mol\n", + "M= PAM/100*M1+PGM/100*M2# mass of mixture in mol\n", + "R= U/M# gas constant in kJ/kg-K\n", + "R= R*10**3#in J/kg-K\n", + "print \"The gas constant = %0.3f kJ/kg-K\" %(R*10**-3)\n", + "PAM1= PAM*M1/M# in %\n", + "print \"Percentage of air by mass in the mixture = %0.2f %%\" %PAM1\n", + "PGM1= PGM*M2/M# in %\n", + "print \"Percentage of gas by mass in the mixture = %0.2f %%\" %PGM1\n", + "Rho= P/(R*T) # kg/m**3\n", + "print \"The density of the gas = %0.3f kg/m**3\" %Rho" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of gas by volume in the mixture = 40 %\n", + "Percentage of air by volume in the mixture = 60 %\n", + "The gas constant = 0.365 kJ/kg-K\n", + "Percentage of air by mass in the mixture = 76.36 %\n", + "Percentage of gas by mass in the mixture = 23.64 %\n", + "The density of the gas = 0.963 kg/m**3\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.21 - Page No : 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given data\n", + "Gamma = 1.4#\n", + "P1 = 7# in bar\n", + "P1= P1*10**5# in N/m**2\n", + "V1 = 1.6# in m**3\n", + "V2 = 8# in m**3\n", + "P2 = (P1 * (V1)**(Gamma))/((V2)**(Gamma)) # in bar\n", + "W1 = (P1*V1-P2*V2)/(Gamma-1) # work done by the gas during isentropic expansion in J\n", + "Rho = V2/V1#\n", + "W2 = P1*V1*(log(Rho)) # work done by the gas during isothermal expansion in J\n", + "del_W = W2-W1# in J\n", + "del_W = del_W*10**-3 # in kJ\n", + "print \"Difference between the work done during isentropic and isothemal expansion = %0.0f kJ \" %del_W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference between the work done during isentropic and isothemal expansion = 473 kJ \n" + ] + } + ], + "prompt_number": 90 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.22 - Page No : 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 1# in bar\n", + "V1 = 400# in cm**3\n", + "V2 = 80# in Cm**3\n", + "T1 = 110# in degree C\n", + "T1 = T1 + 273# in K\n", + "Gamma = 1.3#\n", + "P2 = P1*((V1/V2)**(Gamma)) # in bar\n", + "print \"The pressure = %0.1f bar \" %P2\n", + "T2 = T1 * ((P2*V2)/(P1*V1)) # in K\n", + "T2 = int(T2-273)#in degree C\n", + "print \"The temperature = %0.0f degree C \" %T2\n", + "T2 = T2 + 273# in K\n", + "m = 1#\n", + "C_V = 0.75#\n", + "del_U = m*C_V*(T2-T1) # in kJ\n", + "print \"Change in internal energy = %0.2f kJ \" %del_U\n", + "P1= P1*10**5# in N/m**2\n", + "P2= P2*10**5# in N/m**2\n", + "V1= V1*10**-3# in litre\n", + "V2= V2*10**-3# in litre\n", + "W = (P1*V1-P2*V2)/(Gamma-1) # in J\n", + "W = abs(W * 10**-3) # in kJ\n", + "print \"Work done = %0.2f kJ \" %W\n", + "P3 = 40*10**5# in N/m**2\n", + "T3 = (P3/P2) * T2# in K\n", + "T3 = T3 - 273# in degree C\n", + "print \"Temperature of gas = %0.0f degree C \" %T3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pressure = 8.1 bar \n", + "The temperature = 347 degree C \n", + "Change in internal energy = 177.75 kJ \n", + "Work done = 82.75 kJ \n", + "Temperature of gas = 2787 degree C \n" + ] + } + ], + "prompt_number": 99 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.23 - Page No : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_P = 1.068# in kJ/kg-K\n", + "C_V = 0.775#in kJ/kg-K\n", + "R = C_P-C_V# in kJ/kg-K\n", + "R= R*10**3# in J/kg-K\n", + "P1 = 12# in bar\n", + "P1= P1*10**5# in N/m**2\n", + "V1 = 0.15#in m**3\n", + "V2= 0.28# in m**3\n", + "m = 1# in kg\n", + "T1 = (P1*V1)/(R* m) # in K\n", + "T2 = (T1 * (V2/V1)) # in K\n", + "print \"Temperature at the end of Constant pressure = %0.3f \u00b0C \" %(T2-273)\n", + "W = P1* (V2-V1) # in J\n", + "W = W * 10**-3# in kJ\n", + "Gamma = 1.38\n", + "V3 = 1.5# in m**3\n", + "T3 = T2/((V3/V2)**(Gamma-1)) # in K\n", + "T3 = (T3 - 273)# in degree C\n", + "print \"Temperature at the end of Isentropic = %0.0f \u00b0C \" %T3\n", + "T3 = T3 + 273# in K\n", + "W1 = m *C_V*(T2-T3) # work done during isentropic expansion in kJ\n", + "W2 = W+W1# in kJ\n", + "print \"Total Work done = %0.2f kJ \" %W2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at the end of Constant pressure = 873.758 \u00b0C \n", + "Temperature at the end of Isentropic = 333 \u00b0C \n", + "Total Work done = 575.08 kJ \n" + ] + } + ], + "prompt_number": 106 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.24 - Page No : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "# Given data\n", + "C_P = 1.005# in kJ/kg-K\n", + "C_V = 0.718# in kJ/kg-K\n", + "R = C_P-C_V# in kJ/kg-K\n", + "P1 = 20#in bar\n", + "P2 = 12# in bar\n", + "T1 = 200#in degree C\n", + "T1 = T1 + 273# in K\n", + "T2 = 125#in degree c\n", + "T2 = T2 + 273# in K\n", + "V1 = (R*10**3*T1)/(P1*10**5) # in m**3\n", + "V2 = (R*10**3*T2)/(P2*10**5) # in m**3\n", + "def integrand(V):\n", + " return -293*V+40\n", + "ans, err = quad(integrand, 0.0679,0.0952)\n", + "W = 10**5 * ans# in Joules\n", + "W = round(W * 10**-3) # in kJ\n", + "print \"Work done = %0.0f kJ \" %W\n", + "m = 1# in kg\n", + "del_U = m*C_V*(T2-T1) # change in internal energy in kJ\n", + "print \"Change in internal energy = %0.2f kJ \" %del_U\n", + "print \"Negative sign indicates that there is decrease in internal energy of the gas. \"\n", + "C_Enthalpy = m*C_P*(T2-T1) # change in enthalpy in kJ\n", + "print \"The change in enthalpy = %0.1f kJ\" %C_Enthalpy\n", + "print \"Negative sign indicates that there is decrease in enthalpy of the gas\"\n", + "Q = W+ del_U# in kJ\n", + "print \"Heat transfer = %0.2f kJ \" %Q\n", + "print \"Negative sign indicates that the heat is rejected by the air\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = 44 kJ \n", + "Change in internal energy = -53.85 kJ \n", + "Negative sign indicates that there is decrease in internal energy of the gas. \n", + "The change in enthalpy = -75.4 kJ\n", + "Negative sign indicates that there is decrease in enthalpy of the gas\n", + "Heat transfer = -9.85 kJ \n", + "Negative sign indicates that the heat is rejected by the air\n" + ] + } + ], + "prompt_number": 118 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.25 - Page No : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 14# in bar\n", + "P3 = 2.222# in bar\n", + "V3byV1 = P1/P3#\n", + "P2 = 1.05# in bar\n", + "Gamma = log(P1/P2)/log(V3byV1)\n", + "C_P = 1.005# in kJ/kg-K\n", + "C_V = C_P/Gamma# in kJ/kg-K\n", + "T3 = 343# in degree C\n", + "T3 = T3 + 273# in K\n", + "T2 = math.ceil(T3*P2)/P3# in K\n", + "m = 0.5# in kg \n", + "del_U = m*C_V*(T2-T3) # in kJ\n", + "print \"Change in internal energy = %0.3f kJ \" %del_U\n", + "print \"i.e. there is a loss of\",round(abs(del_U),3),\"kJ of internal energy\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Change in internal energy = -115.986 kJ \n", + "i.e. there is a loss of 115.986 kJ of internal energy\n" + ] + } + ], + "prompt_number": 125 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.26 - Page No : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R = 0.26# in kJ/kg-K\n", + "R = R * 10**3# in J/kg-K\n", + "Gamma = 1.4#\n", + "P1 = 3.1# MN/m**2\n", + "P1 = P1 * 10**6# N/m**2\n", + "P2 = 1.7# in MN/m**2\n", + "P2 = P2 * 10**6# in N/m**2\n", + "V1 = 500# in cm**3\n", + "T = 18# in degree C\n", + "T = T + 273# in K\n", + "T2 = 15# in degree C\n", + "T2 = T2 + 273# in K\n", + "m = (P1*V1)/(R*T)*10**-3# in kg\n", + "m_desh = (P2*V1)/(R*T2)*10**-3#in kg\n", + "M = m-m_desh# in kg\n", + "print \"The mass of oxygen = %0.2f kg \" %M\n", + "R = R * 10**-3# in kJ/kg-K\n", + "C_v = R/(Gamma-1) # in kJ/kg-K\n", + "Q = m_desh*C_v * (T-T2) # in kJ\n", + "print \"Heat transfered = %0.3f kJ \" %Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of oxygen = 9.13 kg \n", + "Heat transfered = 22.135 kJ \n" + ] + } + ], + "prompt_number": 128 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.27 - Page No : 103" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 1 * 10**5# in N/m**2\n", + "V1 = 0.1# in m**3\n", + "V2 = 0.01# in m**3\n", + "T1 = 90# in degree C\n", + "T1 = T1 +273# in K\n", + "R = 0.287# in kJ/kg-K\n", + "R = R *10**3#\n", + "C_v = 0.717# in kJ/kg-K\n", + "C_P = 1.005# in kJ/kg-K\n", + "m = (P1 * V1)/(R*T1) # in kg\n", + "Gamma = 1.4#\n", + "T2 = T1 * ((V1/V2)**(Gamma - 1)) # in K\n", + "del_U = m*C_v*(T1-T2) # in kJ\n", + "print \"The change in internal energy = %0.2f kJ\" %del_U\n", + "del_E = m * C_P*(T2-T1) # in kJ\n", + "print \"The change in enthalpy = %0.2f kJ\" %del_E\n", + "U2 = m*C_v*T2#Internal energy at 2 in kJ\n", + "T= 473# temp. of entering air\n", + "E = V1*C_P*T#Enthalpy of entering air in kJ\n", + "# U3= (m+V1)*C_v*T3 # (internal energy at 3)\n", + "# U3= U2+E\n", + "T3 = (E+U2)/( (m+V1)*C_v ) # in K\n", + "print \"Temperature = %0.0f K\" %T3\n", + "m=m+.1#\n", + "P3 =m* R*T3/V2# in N/m**2\n", + "print \"The pressure = %0.3f MN/m**2 \" %(P3*10**-6)\n", + "\n", + "# Note: There is a calculation error to evaluating the value of P3. So the answer in the book of P3 is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in internal energy = -37.77 kJ\n", + "The change in enthalpy = 52.94 kJ\n", + "Temperature = 785 K\n", + "The pressure = 4.415 MN/m**2 \n" + ] + } + ], + "prompt_number": 134 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.28 - Page No : 104" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T= 60+273# in K\n", + "T2= 25+273# in K\n", + "P1=3.5*10**6# in Pa\n", + "P2=1.7*10**6# in Pa\n", + "Gamma=0.4# value of Cp-Cv\n", + "m1=1# (assumed value)\n", + "# R= P1*V/(m*T) (i)\n", + "# R= P2*V/((m-m1)*T2) (ii)\n", + "# From eq(i) and (ii)\n", + "m= m1*P1*T2/(P1*T2-P2*T)\n", + "# U= m*Cv*T and U1= (m-m1)*Cv*T2+m1*Cv*T1\n", + "# U-U1= P1*V1= m1*R*T1 or\n", + "# m1*R*T1= m*Cv*T-[(m-m1)*Cv*T2+m1*Cv*T1]\n", + "T1= (m*T-(m-m1)*T2)/(m1*Gamma+m1) # in K\n", + "print \"The temperature of gas in the cylinder = %0.2f \u00b0C\" %(T1-273)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The temperature of gas in the cylinder = -5.47 \u00b0C\n" + ] + } + ], + "prompt_number": 136 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.29 - Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "U=180# energy received by system in kJ\n", + "RH= 200# rejected heat by system in kJ\n", + "RcHeat= 50# received heat by system in kJ\n", + "W= U-RH+RcHeat# in kJ\n", + "U1 = 0# in kJ\n", + "U2= U+U1# in kJ\n", + "U3 = RcHeat-RH+U2# in kJ\n", + "print \"Internal energy = %0.0f kJ \" %U3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Internal energy = 30 kJ \n" + ] + } + ], + "prompt_number": 138 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.30 - Page No : 105" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_P = 1.045# in kJ/kg-K\n", + "Q = 100# in kJ\n", + "del_T = Q/C_P# in degree C\n", + "T1 = 25# in degree C\n", + "T1 = T1 + 273# in K\n", + "T = 0# in degree C\n", + "T = T + 273# in K\n", + "T2 = T1 + del_T# in K\n", + "del_Phi = C_P * (log(T2/T1)) # in kJ/kg-K\n", + "print \"The change in entropy in the process = %0.3f kJ/kg-K \" %del_Phi\n", + "ini_entropy = C_P * (log(T1/T)) # initial entropy in kJ/kg-K\n", + "print \"The initial entropy = %0.3f kJ/kg-K \" %ini_entropy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The change in entropy in the process = 0.291 kJ/kg-K \n", + "The initial entropy = 0.092 kJ/kg-K \n" + ] + } + ], + "prompt_number": 139 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb new file mode 100644 index 00000000..debc04ae --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_4.ipynb @@ -0,0 +1,113 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 4 : Avaibility\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 4.1 - Page No : 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "Q= 1000 # in kJ\n", + "T1= 1000 # in K\n", + "T2= 400 # in K\n", + "delta_Qsource= -Q/T1 # in kJ/K\n", + "delta_Qsystem= Q/T2 # in kJ/K\n", + "delta_Qnet=delta_Qsystem+delta_Qsource # in kJ/K\n", + "print \"The entropy production accompanying the heat transfer = %0.1f kJ/K \" %delta_Qnet\n", + "T0= 300 # in K\n", + "Q1= Q-T0*abs(delta_Qsource) # in kJ\n", + "Q2= Q-T0*abs(delta_Qsystem) # in kJ\n", + "LossOfEnergy= Q1-Q2 # in kJ\n", + "print \"The decrease in available energy after heat transfer = %0.0f kJ \" %LossOfEnergy" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The entropy production accompanying the heat transfer = 1.5 kJ/K \n", + "The decrease in available energy after heat transfer = 450 kJ \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 4.2 - Page No : 122" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from scipy.integrate import quad\n", + "# Given data\n", + "T1= 800+273 # in K\n", + "T2= 400+273 # in K\n", + "T3= 179+273 # in K\n", + "T0= 25+273 # in K\n", + "Q= 2018.4 # heat taken by water in kJ/kg\n", + "# Formula mCp*(T1-T2)= Q\n", + "mCp= Q/(T1-T2)\n", + "def integrand(t):\n", + " return 1/t\n", + "ans, err = quad(integrand, T1, T2)\n", + "delta_Qgas= mCp*ans # in kJ/K\n", + "delta_Qwater= Q/T3 # in kJ/K\n", + "delta_Qnet= delta_Qwater+delta_Qgas # in kJ/K\n", + "print \"Net entropy changes = %0.3f kJ/K \" %delta_Qnet\n", + "E1= T0*abs(delta_Qgas) # Original unavailable energy in kJ\n", + "E2= T0*delta_Qwater #unavailable energy after heat transfer in kJ\n", + "E= E2-E1 # in increase in unavailable energy in kJ\n", + "print \"The increase in unavailable energy = %0.2f kJ \" %E\n", + "\n", + "# Note: In the book, the calculation is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Net entropy changes = 2.112 kJ/K \n", + "The increase in unavailable energy = 629.28 kJ \n" + ] + } + ], + "prompt_number": 11 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb new file mode 100644 index 00000000..a63f1328 --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_5.ipynb @@ -0,0 +1,579 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 5 : Air Standard Cycles\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.1 - Page No : 128" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "T1 = 550 # in degree C\n", + "T1 = T1 + 273 # in K\n", + "T2 = 27 # in degree C\n", + "T2 = T2 + 273 # in K\n", + "Eta = ((T1-T2)/T1)*100 # in %\n", + "print \"Maximum possible efficiency for staem turbine plant = %0.2f %% \" %Eta\n", + "T1 = 2500 # in degree C\n", + "T1 = T1 + 273 # in K\n", + "T2 = 400 # in degree C\n", + "T2 = T2 + 273 # in K\n", + "Eta = ((T1-T2)/T1)*100 # in %\n", + "print \"Maximum possible efficiency for internal combustion engine = %0.2f %% \" %Eta\n", + "T1 = 450 # in degree C\n", + "T1 = T1 + 273 # in K\n", + "T2 = 15 # in degree C\n", + "T2 = T2 + 273 # in K\n", + "Eta = ((T1-T2)/T1)*100 # in %\n", + "print \"Maximum possible efficiency for nuclear power plant = %0.2f %% \" %Eta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum possible efficiency for staem turbine plant = 63.55 % \n", + "Maximum possible efficiency for internal combustion engine = 75.73 % \n", + "Maximum possible efficiency for nuclear power plant = 60.17 % \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.2 - Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "D = 0.3 # in m\n", + "L = 0.45 # in m\n", + "V_s = (pi/4)*(D)**2*L # in m**3\n", + "V_c = 0.0114 # in m**3\n", + "V = V_c+V_s # in m**3\n", + "r = V/V_c \n", + "Gamma = 1.4 \n", + "Eta = (1-((1/r)**(Gamma-1)))*100 # in %\n", + "print \"Efficiency of engine = %0.1f %% \" %Eta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of engine = 41.3 % \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.3 - Page No : 133" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given data\n", + "P1 = 0.93 # in bar\n", + "T1 = 93 # in degree C\n", + "T1 = T1 + 273 # in K\n", + "V2 = 1 # assumed\n", + "V1 = 8.5*V2 \n", + "r = V1/V2 \n", + "Gamma = 1.4 \n", + "P2 = P1 * ((V1/V2)**(Gamma)) # in bar\n", + "print \"Pressure at the beginning of compression stroke = %0.1f bar \" %P2\n", + "T2 = (P2*V2*T1)/(P1*V1) # in K\n", + "print \"Temperature at the beginning of compression stroke = %0.0f \u00b0C\" %(T2-273)\n", + "P3 = 38 # in bar\n", + "T3 = T2 * (P3/P2) # in K\n", + "print \"Pressure at the beginning of expansion stroke = %0.0f bar\" %P3\n", + "print \"Temperature at the beginning of expansion stroke = %0.0f \u00b0C\" %(T3-273)\n", + "V3 = V2 \n", + "V4 = V1 \n", + "P4 = P3 * ((V3/V4)**(Gamma)) # in bar\n", + "T4 = T1 * (P4/P1) # in K\n", + "T4 = math.ceil(T4-273) # in degree C\n", + "print \"Pressure at the end of expansion stroke = %0.1f bar \" %P4\n", + "print \"Temperature at the end of expansion stroke = %0.0f \u00b0C\" %T4\n", + "Eta = 1 - (1/((r)**(Gamma-1))) \n", + "Eta = Eta * 100 # in %\n", + "print \"Standard air efficiency = %0.1f %% \" %Eta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the beginning of compression stroke = 18.6 bar \n", + "Temperature at the beginning of compression stroke = 588 \u00b0C\n", + "Pressure at the beginning of expansion stroke = 38 bar\n", + "Temperature at the beginning of expansion stroke = 1486 \u00b0C\n", + "Pressure at the end of expansion stroke = 1.9 bar \n", + "Temperature at the end of expansion stroke = 475 \u00b0C\n", + "Standard air efficiency = 57.5 % \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.4 - Page No : 135" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "CalorificValue= 14.887*10**3 # in kJ/m**3\n", + "Vs= 1 # in m**3 (assumed)\n", + "Vc= 0.25*Vs # clearance volume in m**3\n", + "V= Vs+Vc # in m**3\n", + "Ratio= V/Vc # ratio of compression\n", + "Gamma= 1.4 \n", + "r= 5 \n", + "Eta=1-1/(r**(Gamma-1)) \n", + "Eta= Eta*100 # in %\n", + "print \"Air standard efficiency = %0.1f %%\" %Eta\n", + "Eta_Th= Eta*60/100 # thermal efficiency\n", + "print \"Thermal efficiency = %0.2f %%\" %Eta_Th\n", + "Eta_br_th= Eta_Th*75/100 # break thermal efficiency\n", + "print \"Brake thermal efficiency = %0.2f %%\" %Eta_br_th\n", + "E= 3600 # energy equivalent of brake in kJ\n", + "GasConsumption= E/CalorificValue # in m**3\n", + "print \"The consumption of gas = %0.3f m**3\" %GasConsumption" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air standard efficiency = 47.5 %\n", + "Thermal efficiency = 28.48 %\n", + "Brake thermal efficiency = 21.36 %\n", + "The consumption of gas = 0.242 m**3\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.7 - Page No : \t142" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Gamma = 1.4 \n", + "r = 8 \n", + "Eta = 1 - (1/((r)**(Gamma-1))) \n", + "Eta = Eta * 100 # in %\n", + "print \"Otto engine efficiency = %0.1f %% \" %Eta\n", + "r = 13 \n", + "x = 1 \n", + "Rho = 2.5 \n", + "Eta = 1-(1/r)**(Gamma-1)*((Rho**Gamma-1)/(Gamma*(Rho-1)))\n", + "Eta = Eta * 100 # in %\n", + "print \"Diesel engine efficiency = %0.1f %% \" %Eta\n", + "r = 13 \n", + "x = 3.5 \n", + "Rho = 2.5 \n", + "Eta = 1-(1/r)**(Gamma-1)*((x*Rho**Gamma-1)/((x-1)+x*Gamma*(Rho-1))) \n", + "Eta = Eta * 100 # in %\n", + "print \"Dual engine efficiency = %0.1f %% \" %Eta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Otto engine efficiency = 56.5 % \n", + "Diesel engine efficiency = 55.5 % \n", + "Dual engine efficiency = 57.7 % \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.8 - Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "D = 15 \n", + "L = 25 \n", + "V_s = (pi/4) * (D)**2 * L # in cm**3\n", + "V_c = 400 # in cm**3\n", + "V = V_s+V_c # in cm**3\n", + "r = V/V_c \n", + "Rho = (V_c +( V_s*(5/100) ))/V_c \n", + "Gamma = 1.4 \n", + "Eta = 1-((1/r)**(Gamma-1)) * ( (((Rho)**(Gamma))-1)/(Gamma*(Rho-1)) ) \n", + "Eta = Eta * 100 # in %\n", + "print \"Efficiency of diesel cycle = %0.3f %% \" %Eta\n", + "\n", + "# Note: Calculation in the book is wrong, So the answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of diesel cycle = 59.335 % \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.9 - Page No : 143" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_P = 0.966 # in kJ/kg-K\n", + "C_v = 0.712 # in kJ/kg-K\n", + "T1 = 83 # in degree C\n", + "T1 =T1 + 273 # in K\n", + "T3 = 1800 # in degree C\n", + "T3 = T3+273 # in K\n", + "r = 13 \n", + "Gamma = 1.4 \n", + "T2 = T1 * (r)**(Gamma-1) # in K\n", + "print \"Temperature at the end of compression = %0.0f \u00b0C \" %(T2-273)\n", + "Rho = T3/T2 \n", + "T4 = ((Rho)**(Gamma)) * T1 # in K\n", + "print \"Temperature at the end of expansion = %0.0f \u00b0C \" %(T4-273)\n", + "Q = C_P * (T3-T2) # in kJ\n", + "print \"Heat supplied at constant pressure = %0.0f kJ \" %Q\n", + "Q1 = C_v * (T4-T1) # in kJ\n", + "print \"Heat rejected at constant volume = %0.1f kJ \" %Q1\n", + "Eta = ((Q-Q1)/Q) * 100 # in %\n", + "print \"Thermal efficiency = %0.1f %% \" %Eta\n", + "\n", + "# Note: The answer in the book is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature at the end of compression = 720 \u00b0C \n", + "Temperature at the end of expansion = 724 \u00b0C \n", + "Heat supplied at constant pressure = 1043 kJ \n", + "Heat rejected at constant volume = 456.6 kJ \n", + "Thermal efficiency = 56.2 % \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.11 - Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "r = 10 \n", + "Gamma = 1.4 \n", + "P1 = 1 # in bar\n", + "P2 = 1 * ((r)**(Gamma)) # in bar\n", + "P3 = 40 # in bar\n", + "P4 = P3 # in bar\n", + "T1 = 80 # in degree C\n", + "T1 = T1+273 # in K\n", + "T2 = T1 * ((r)**(Gamma-1)) # in K\n", + "T3 = (P3/P2)*T2 # in K\n", + "T4 = 1700 # in degree C\n", + "T4 = T4 + 273 # in K\n", + "Vc= 1 # in m**3(assumed)\n", + "V4= Vc*T4/T3 \n", + "V1= 10*Vc # volume at beginning of compression in m**3\n", + "Vs= V1-Vc # in m**3\n", + "PercentageStroke= (V4-Vc)/Vs*100 # in %\n", + "print \"Percentage of stroke at which heat reception must stop = %0.1f %%\" %PercentageStroke\n", + "r= V1/V4 \n", + "P5= P4/r**Gamma # in bar\n", + "ratio= (P4*V4-P5*V1)/(P2*Vc-P1*V1) \n", + "print \"Ratio of work done during expansion to that done during compression = %0.2f\" %ratio" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Percentage of stroke at which heat reception must stop = 4.4 %\n", + "Ratio of work done during expansion to that done during compression = 2.01\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.12 - Page No : 146" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 1 # in bar\n", + "T1 = 320 # in K\n", + "r= 11.6 \n", + "Vc= 1 # in m**3 (assumed)\n", + "Vs= 10.6*Vc #in m**3\n", + "V1= r*Vc # in m**3\n", + "Gamma= 1.4 \n", + "P2= P1*r**Gamma # in bar\n", + "V2= Vc # in m**3\n", + "V3= Vc # in m**3\n", + "V4=1.38*Vc # in m**3\n", + "P3= 1.53*P2 # in bar\n", + "P4= P3 # in bar\n", + "expansionRatio= V1/V4 \n", + "P5= P4/expansionRatio**Gamma # in bar\n", + "V5= r*Vc # in m**3\n", + "W= (P3*(V4-Vc)+(P4*V4-P5*V5)/(Gamma-1)-(P2*V2-P1*V1)/(Gamma-1))*10**5 # in joule\n", + "Pm= W/(Vs*10**4) # in N/cm**2\n", + "print \"The mean effective pressure of the cycle = %0.2f N/cm**2\" %Pm\n", + "\n", + "# Note: The calculation in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mean effective pressure of the cycle = 59.66 N/cm**2\n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.13 - Page No : 150" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Given data\n", + "C_P = 0.998 # in kJ/kg-K\n", + "C_v = 0.707 #in kJ/kg-K\n", + "T1 = 15 # in degree C\n", + "T1 = T1 +273 # in K\n", + "T2 = 400 # in degree C\n", + "T2 = T2 + 273 # in K\n", + "Eta = (1 - (T1/T2))*100 # in %\n", + "print \"The ideal efficiency when engine is fitted with a perfect regenerator = %0.2f %% \" %Eta\n", + "R = C_P-C_v # in kJ/kg-K\n", + "r = 3 \n", + "Eta_r = 0.8 \n", + "Eta = ((R*(log(r)))*(T2-T1))/( (R*(log(r))*T2) + (1-Eta_r) * C_v * (T2-T1) )*100 # in %\n", + "print \"The ideal efficicency when efficiency of the regenrator is 0.8 = %0.1f %% \" %Eta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The ideal efficiency when engine is fitted with a perfect regenerator = 57.21 % \n", + "The ideal efficicency when efficiency of the regenrator is 0.8 = 45.7 % \n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.14 - Page No : 155" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T1 = 15 # in degree C\n", + "T1 = T1 + 273 # in K\n", + "P1 = 1 # in bar\n", + "P2 = 5 # in bar\n", + "Gamma = 1.4 \n", + "T2 = T1 * ((P2/P1)**((Gamma-1)/Gamma)) # in K\n", + "C_P = 1.003 # in kJ/kg-K\n", + "CompWork = C_P*(T2 - T1) # Compressure work in kJ/kg\n", + "T3 = 800 # in degree C\n", + "T3 = T3 + 273 # in K\n", + "T4 = T3/((P2/P1)**((Gamma-1)/Gamma)) # in K\n", + "T4= round(T4) # in K\n", + "turbineWork = C_P * (T3-T4) # Turbine work in kJ/kg\n", + "Q = C_P * (T3-T2) # Heat input in kJ/kg\n", + "W = turbineWork-CompWork # in kJ/kg\n", + "W= round(W) #in kJ/kg\n", + "Eta = (W/Q)* 100 # in %\n", + "print \"the thermal efficiency of plant = %0.0f %% \" %round(Eta)\n", + "print \"Output of gas turbine installation\",int(W),\"kW per kg of flow per second\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " the thermal efficiency of plant = 37 % \n", + "Output of gas turbine installation 229 kW per kg of flow per second\n" + ] + } + ], + "prompt_number": 61 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 5.15 - Page No : 158" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C_v = 0.711 # in kJ/kg-K\n", + "T3 = 850 # in degree C\n", + "T3 = T3 + 273 # in K\n", + "T2 = 90 # in degree C\n", + "T2 = T2 + 273 # in K\n", + "E = C_v * (log(T3/T2)) # Entropy change in kJ/kg-K\n", + "print \"Entrophy change = %0.3f kJ/kg-K \" %E\n", + "W = (E * (T3-T2))/2 #output work in kJ/kg\n", + "Q = T2+E #rejected heat in kJ/kg\n", + "Q1 = W + Q #heat supplied in kJ/kg\n", + "Eta = (W/Q1) # in %\n", + "print \"The efficiency of cycle = %0.3f %% \" %Eta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Entrophy change = 0.803 kJ/kg-K \n", + "The efficiency of cycle = 0.456 % \n" + ] + } + ], + "prompt_number": 63 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb new file mode 100644 index 00000000..74d22d02 --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_6.ipynb @@ -0,0 +1,1446 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 6 : Properties Of Steam And Steam Cycle\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.1 - Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "P = 10 # in bar\n", + "P = P *10**5 # in N/m**2\n", + "V = 2 #volume of water in m**3\n", + "W = P * V # in J\n", + "W = W * 10**-6 # in MJ\n", + "print \"Work done = %0.0f MJ \" %W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Work done = 2 MJ \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.2 - Page No : 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P = 1.013 # atm pressure in bar\n", + "P = P * 10**5 # in N/m**2\n", + "area= 1000*10**-4 # in m**2\n", + "L_w = 1000 # in N\n", + "P_L = L_w/area # Pressure due to load in N/m**2\n", + "PressOnPiston = P_L+P # absolute pressure to piston in N/m**2\n", + "a = 10**-3 # in m**2\n", + "U = PressOnPiston*a # in Joules\n", + "print \"Energy required to pump 1 kg of water at 0\u00b0C into the cylinder = %0.1f joules\" %U \n", + "# Part (b)\n", + "absPressure= 111.3*10**3 # in N/m**2\n", + "increaseInVol= (1.02-1)*10**-3 # in m**3\n", + "u_f= increaseInVol*absPressure # in joules\n", + "print \"Energy required to effect the change in volume = %0.3f joules \" %u_f \n", + "# Part (c)\n", + "increaseInVol= (1.52-0.001) # in m**3\n", + "ExternalWorkDone= absPressure*increaseInVol # in joules\n", + "print \"External work done = %0.3f kJ\" %(ExternalWorkDone*10**-3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Energy required to pump 1 kg of water at 0\u00b0C into the cylinder = 111.3 joules\n", + "Energy required to effect the change in volume = 2.226 joules \n", + "External work done = 169.065 kJ\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.3 - Page No : 175" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "m_s = 92.3 # mass of steam in kg\n", + "m_w = 0.78 # mass of water in kg\n", + "m = m_s + m_w # total mass in kg\n", + "D_s = 92.3 # Dry steam in kg\n", + "D_F = D_s/m # Dryness fraction\n", + "print \"Dryness fraction = %0.2f \" %D_F" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction = 0.99 \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.4 - Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "L = 693.3 # Liquid heat in kJ/kg\n", + "L1 = 125.7 # Liquid heat of feed water in kJ/kg\n", + "m = 2 # mass of water in kg\n", + "Q = m * (L-L1) # in kJ\n", + "print \"Heat required to raise temperature = %0.1f kJ \" %Q\n", + "print \"The water is still liquid at the end of the heat supply\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat required to raise temperature = 1135.2 kJ \n", + "The water is still liquid at the end of the heat supply\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.5 - Page No : 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "x = 0.9 \n", + "h_f = 762.2 # in kJ/kg\n", + "h_fg = 2013.8 # in kJ/kg\n", + "H_wet = h_f + (x*h_fg) # in kJ/kg\n", + "En = 125.7 # Enthapy of liquid in kJ/kg\n", + "H_wet = H_wet - En # in kJ\n", + "print \"When dry fraction is 0.9, Heat required, to convert = %0.1f kJ \" %H_wet\n", + "# Part (b) when dry fraction is saturated\n", + "H_sat = h_f + h_fg # in kJ/kg\n", + "H_sat = H_sat-En # in kJ\n", + "print \"Heat required when steam is dry and saturated = %0.1f kJ \" %H_sat\n", + "C_P = 2.093 # in kJ/kg-K\n", + "t_sup = 300 # in degree C\n", + "t_sat = 179.9 # in degree C\n", + "H_sup = h_f + h_fg + C_P*(t_sup-t_sat) # in kJ\n", + "H_sup1 = H_sup - En # in kJ\n", + "print \"Heat required when the steam is super heated = %0.1f kJ \" %H_sup1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When dry fraction is 0.9, Heat required, to convert = 2448.9 kJ \n", + "Heat required when steam is dry and saturated = 2650.3 kJ \n", + "Heat required when the steam is super heated = 2901.7 kJ \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.6 - Page No : 177" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "x = 0.95 \n", + "v_f = 0.001 \n", + "v_g = 0.1238 # in m**3/kg\n", + "V_wet = ((1-x)*v_f)+(x*v_g) # in m**3 correction little diff in ans \n", + "print \"Specific volume of wet steam = %0.5f m**3 \" %V_wet\n", + "print \"When the steam is dry saturated, the specific volume = %0.4f m**3/kg \" %v_g\n", + "T_sat = 201.3 # in degree C\n", + "T_sat = T_sat + 273 # in K\n", + "T_sup = 300 # in degree C\n", + "T_sup = T_sup + 273 # in K\n", + "V_sup = v_g * (T_sup/T_sat) # in m**3\n", + "print \"When the steam is superheated, the specific volume = %0.2f m**3 \" %V_sup" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Specific volume of wet steam = 0.11766 m**3 \n", + "When the steam is dry saturated, the specific volume = 0.1238 m**3/kg \n", + "When the steam is superheated, the specific volume = 0.15 m**3 \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.7 - Page No : 178" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "h_f = 720.7 # in kJ\n", + "h_fg = 2046.6 # in kJ\n", + "v_g = 0.2405 # in m**3\n", + "x = 0.9 \n", + "P = 8*10**2 # in kN/m**2\n", + "U_sat = h_f+x*h_fg-x*v_g*P # in kJ\n", + "print \"When the steam is wet, the internal energy = %0.2f kJ \" %U_sat\n", + "En = 2767.3 # Enthalpy of dry saturated stream\n", + "U_sat = En-(v_g*P) #in kJ/kg\n", + "print \"When the steam is dry and saturated, the internal energy = %0.2f kJ/kg \" %U_sat\n", + "C_P = 2.093 \n", + "del_s = 100 # in degree C\n", + "H_sup = h_f + h_fg + (C_P*del_s) # in kJ/kg\n", + "t_sat = 170.4+273 # in K\n", + "V_sup = (v_g*(t_sat+del_s))/t_sat # in m**3\n", + "U_sup = H_sup - P*V_sup # in kJ/kg\n", + "print \"When the steam is super heated, the internal energy = %0.1f kJ/kg \" %U_sup" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "When the steam is wet, the internal energy = 2389.48 kJ \n", + "When the steam is dry and saturated, the internal energy = 2574.90 kJ/kg \n", + "When the steam is super heated, the internal energy = 2740.8 kJ/kg \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.8 - Page No : 179" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "x = 0.88 # dryness fraction\n", + "h_fg = 2392.7 # in kJ/kg\n", + "H_wet = x * h_fg # in kJ/kg\n", + "Vs = 14.67 # Specific volume in m**3/kg\n", + "V_wet = x * Vs # in m**3/kg\n", + "Q = H_wet/V_wet # in kJ/m**3\n", + "print \"Heat to be extracted = %0.1f kJ/m**3 \" %Q " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat to be extracted = 163.1 kJ/m**3 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.9 - Page No : 180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P = 12*10**2 # in kN/m**2\n", + "h_f = 798.1 # in kJ/kg\n", + "h_fg = 1984.5 # in kJ/kg\n", + "x = 0.8 \n", + "H_wet = h_f + (x*h_fg) # in kJ/kg\n", + "v_f = 0.001 # in m**3\n", + "v_g = 0.1684 # in m**3\n", + "V_wet = ((1-x)*v_f) + (x*v_g) # in m**3\n", + "En = H_wet/V_wet # kJ/m**3\n", + "print \"The enthalpy = %0.3f kJ/m**3 \" %En\n", + "U_wet = H_wet - ( V_wet * P ) # in kJ\n", + "U_wet1 = (U_wet/V_wet) # in kJ/m**3\n", + "print \"Internal energy = %0.3f kJ/m**3 \" %U_wet1\n", + "\n", + "# Note: There is calculation error to find the value of V_wet.( the correct value of V_wet is 0.13492 not 0.1308), \n", + "# so there is some difference between the output of coding and the answer of the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The enthalpy = 17682.330 kJ/m**3 \n", + "Internal energy = 16482.330 kJ/m**3 \n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.10 - Page No : 185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Given data\n", + "T = 0 # in degree C\n", + "T = T + 273 # in K\n", + "T_sat = 179.9 # in degree C\n", + "T_sat = T_sat + 273 # in K\n", + "x = 0.8 \n", + "h_fg = 2013.8 # in kJ/kg\n", + "c_f = 4.188 \n", + "Phi_wet = c_f*log(T_sat/T)+x*h_fg/T_sat # in kJ/kg-K\n", + "print \"The entropy of wet steam = %0.2f kJ/kg-K \" %Phi_wet\n", + "Phi_g = (c_f*(log(T_sat/T))) + (h_fg/T_sat) # in kJ/kg-K\n", + "print \"The entropy of dry saturated steam = %0.2f kJ/kg-K \" %Phi_g\n", + "C_P = 2.3 \n", + "T_sup = 200+273 # in K\n", + "Phi = c_f *log(T_sat/T) + h_fg/T_sat+ C_P*log(T_sup/T_sat) # in kJ/kg-K\n", + "print \"The entropy of superheated steam = %0.2f kJ/kg-K \" %Phi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The entropy of wet steam = 5.68 kJ/kg-K \n", + "The entropy of dry saturated steam = 6.57 kJ/kg-K \n", + "The entropy of superheated steam = 6.67 kJ/kg-K \n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.11 - Page No : 186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T_sat = 198.3 # in degree C\n", + "T_sat = T_sat + 273 # in K\n", + "T_sup = 300 # in degree C\n", + "T_sup = T_sup + 273 # in K\n", + "c_f = 4.188 \n", + "h_fg = 1945 # in kJ/kg-K\n", + "T = 273 # in K\n", + "C_P = 2.093 # in kJ/kg-K\n", + "Phi_sup =c_f *log(T_sat/T)+h_fg/T_sat+C_P*log(T_sup/T_sat) # in kJ/kg-K\n", + "print \"The value of specific entropy = %0.2f kJ/kg-K \" %Phi_sup" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of specific entropy = 6.82 kJ/kg-K \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.12 - Page No : \t195" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "P = 16 # in bar\n", + "m_w = 73 # in gm\n", + "m_s = 980 # in gm\n", + "x = m_s/(m_s+m_w) \n", + "print \"Dryness fraction of steam = %0.2f \" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of steam = 0.93 \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.13 - Page No : 196" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 7 # in bar\n", + "P2 = 1.2 # in bar\n", + "h_f1 = 696.9 # in kJ/kg\n", + "h_fg1 = 2065 # in kJ/kg\n", + "h_g2 = 2684.9 # in kJ/kg\n", + "T_sup = 112 # in degree C\n", + "T_sat = 104.77 # in degree C\n", + "C_P = 2.1 # in kJ/kg\n", + "x1 = (h_g2+(C_P*(T_sup-T_sat))-h_f1)/h_fg1 \n", + "print \"Dryness fraction of steam = %0.3f\"%x1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of steam = 0.970\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.14 - Page No : 197" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 14 # in bar\n", + "P2 = 1.2 # in bar\n", + "h_f1 = 830 \n", + "h_fg1 = 1958 \n", + "h_g2 = 2684.9 \n", + "x = (h_g2-h_f1)/h_fg1 \n", + "print \"Dryness fraction of steam = %0.4f\" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of steam = 0.9473\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.15 - Page No : 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "m_s = 2.2 # in kg \n", + "m_w = 0.18 # in kg\n", + "x1 = m_s/(m_s+m_w) \n", + "h_f1 = 743 \n", + "h_fg1 = 2031 \n", + "h_g2 = 2685 \n", + "C_P = 2 \n", + "T_sup = 115 # in degree C\n", + "T_sat = 104.8 # in degree C\n", + "x2 = (h_g2 + (C_P*(T_sup-T_sat)) - h_f1)/h_fg1 \n", + "x = x1 * x2 \n", + "print \"The dryness fraction of steam = %0.4f\" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The dryness fraction of steam = 0.8931\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.16 - Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "h_f1 = 232 # in kJ/kg\n", + "h_fg = 2369 # in kJ/kg\n", + "x = 0.8 \n", + "h_f2 = 167.5 # in kJ/kg\n", + "H_wet1 = h_f1 + (x*h_fg) # in kJ/kg\n", + "H_wet = H_wet1 - h_f2 # in kJ/kg\n", + "T1 = 38 # in degree C\n", + "T2 = 25 # in degree C\n", + "T = T1-T2 # in degree C\n", + "SpeHeat = 4.188 # in kJ/kg-K\n", + "m = H_wet/(T*SpeHeat) # in kJ/kg\n", + "print \"The quantity of circulating water required of condensed steam = %0.0f kJ/kg \" %round(m)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The quantity of circulating water required of condensed steam = 36 kJ/kg \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.17 - Page No : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V1 = 0.4 # volume of dry saturated steam\n", + "P1 = 1.5 # in MN/m**2\n", + "print \"Part (i) : For Isothermal operation :\"\n", + "Vs = 0.1318 # specific volume of dry steam\n", + "m = V1/Vs # quantity of steam present in the vessel in kg\n", + "h_f1= 844.6 # in kJ/kg\n", + "x1= 0.5 # dryness fraction\n", + "h_fg1= 1945.2 # in kJ/kg\n", + "Specific_Enth= h_f1+x1*h_fg1 # in kJ/kg\n", + "En= Specific_Enth*m # kJ\n", + "print \"Enthalpy of the fluid = %0.2f kJ \" %En\n", + "HeatLost= m*(1-x1)*h_fg1 # in kJ\n", + "print \"The loss of heat during the constant temperature process = %0.1f kJ \" % HeatLost\n", + "print \"Part (ii) : For Hyperbolic operation :\"\n", + "h_f2= 1008.3 # in kJ/kg\n", + "h_fg2= 1794 # in kJ/kg\n", + "Vs= 0.0659 # Specific volume after compression in m**3/kg\n", + "Vs1= 0.0666 # Specific volume of dry saturated steam in m**3/kg\n", + "x2=Vs/Vs1 \n", + "H_wet= h_f2+x2*h_fg2 # in kJ/kg\n", + "H= m*H_wet # in kJ\n", + "print \"Enthalpy of the fluid = %0.1f kJ\" %H\n", + "# Note : The calculation in the book is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) : For Isothermal operation :\n", + "Enthalpy of the fluid = 5515.02 kJ \n", + "The loss of heat during the constant temperature process = 2951.7 kJ \n", + "Part (ii) : For Hyperbolic operation :\n", + "Enthalpy of the fluid = 8447.5 kJ\n" + ] + } + ], + "prompt_number": 54 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.18 - Page No : 201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "P = 13.5 # power developed by engine in kW\n", + "P1 = 12 # Steam consumption of the engine in kg/kWh\n", + "S_C = P*P1 #steam consumed per hour in kg\n", + "S_C = S_C/60 # in kg/min\n", + "x = 0.85 \n", + "V_g = 1.430 \n", + "Volume = x * V_g # in m**3/kg\n", + "Volume = S_C * Volume # in m**3\n", + "d = 15*10**-2 #diameter of exhaust pipe in meter\n", + "A = (pi/4) * (d)**2 # in m**2\n", + "C = Volume/A # in meter/minute\n", + "print \"The velocity of steam = %0.1f metre/minute\" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The velocity of steam = 185.7 metre/minute\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.19 - Page No : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P = 2 #pressure of steam in bar\n", + "m = 0.1 #mass of steam in kg\n", + "V = 0.080 #volume of steam in m**3\n", + "V1 = 0.8872 #volume of 1kg dry saturated steam in m**3\n", + "x = V/(m*V1) \n", + "print \"Dryness fraction of steam = %0.3f\" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of steam = 0.902\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.20 - Page No : 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "# Given data\n", + "P1 = 7+ 1 # in bar\n", + "H = 2767 # Enthalpy in kJ/kg\n", + "P2 = 1.5+1 # in bar\n", + "H1 = 2717 # enthalpy of 1kg of dry steam in kJ/kg\n", + "H_sup = H - H1 # Superheated of 1kg of steam in kJ\n", + "S1 = 2.17 # super heated steam in kJ/kg-K\n", + "theta = H_sup/S1 # in degree C\n", + "T_sat = 127.4 # in degree C\n", + "T_sup = T_sat + theta # in degree C\n", + "print \"The super heated temperature = %0.0f degree C \" %(T_sup)\n", + "# Note : The calculation in the book is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The super heated temperature = 150 degree C \n" + ] + } + ], + "prompt_number": 67 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.21 - Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T_sat = 99.6 # in degree C\n", + "h_fg = 2258 # in kJ/kg\n", + "m = 1 # steam output of the boiler in (assumed)\n", + "m1 = 0.03 # exhaust steam\n", + "x = 0.9 \n", + "T1 = 21 # in degree C\n", + "Cp = 4.187 # kJ/kg-K\n", + "# Formula m1*(Cp*(T_sat-t)+x*h_fg)= m*Cp*(t-T1)\n", + "t= (m1*(Cp*T_sat+x*h_fg)+m*Cp*T1)/(Cp*(m+m1))\n", + "print \"Temperature of the feed water leaving the heater = %0.1f degree C \" %t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of the feed water leaving the heater = 37.4 degree C \n" + ] + } + ], + "prompt_number": 69 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.22 - Page No : 203" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T = 20 # in degree C\n", + "H1 = 3039 # Enthalpy in kJ/kg\n", + "H2 = 2725 # Enthalpy of 1kg dry saturated steam\n", + "H_sup = H1-H2 # superheat of 1kg of steam in kJ/kg\n", + "H= 2621.4 # heat required for 1kg or water in kJ\n", + "m = H_sup/H # in kg\n", + "print \"Quantity of water = %0.2f kg \" %m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantity of water = 0.12 kg \n" + ] + } + ], + "prompt_number": 71 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.23 - Page No : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "x = 0.9 \n", + "h_f1 = 1087.4 # in kJ/kg\n", + "h_fg1 = 1712.9 # in kJ/kg\n", + "H_wet1 = h_f1 + (x*h_fg1) # in kJ/kg\n", + "H_sup2 = 3095 # in kJ/kg\n", + "H = H_sup2 - H_wet1 # in kJ/kg\n", + "print \"Heat recieved = %0.0f kJ/kg \" %H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat recieved = 466 kJ/kg \n" + ] + } + ], + "prompt_number": 74 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.24 - Page No : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_fg =0.1632 # in m**3\n", + "T_sup = 200 # in degree C\n", + "T_sup = T_sup + 273 # in K\n", + "T_sat = 188 # in degree C\n", + "T_sat = T_sat + 273 # in K\n", + "V_sup = (V_fg*T_sup)/T_sat # in m**3/kg\n", + "V = 0.24 # Capacity of the vessel in m**3\n", + "Q = V/V_sup # in kg\n", + "V1 = 0.9774 #volume of 1kg dry saturated steam in m**3\n", + "x = V_sup/V1 \n", + "print \"Dryness fraction of steam = %0.4f\" %x" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Dryness fraction of steam = 0.1713\n" + ] + } + ], + "prompt_number": 76 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.25 - Page No : 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V = 0.6 # in m**3\n", + "P2 = 2*10**2 # in kN/m**2\n", + "P1 = 10*10**2 # in kN/m**2\n", + "m = V/0.1946 # in kg\n", + "V_s = 0.8872 # Specific volume of dry saturated steam in m**3\n", + "x = 0.1946/V_s \n", + "h_f1 = 505 # in kJ/kg\n", + "h_fg1 = 2202 # in kJ/kg\n", + "H2 = m*(h_f1 + (x*h_fg1)) # in kJ\n", + "H1 = m*2776 # in kJ\n", + "Q = (H2-H1) - (V*(P2-P1)) # in kJ\n", + "print \"The mass of steam in the vessel = %0.2f kg \" %m\n", + "print \"The dryness fraction of steam = %0.4f the vessel \" %x\n", + "print \"The amount o heat transferred = %0.0f kJ \" %int(Q)\n", + "print \"Thus during cooling process there is loss of heat\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of steam in the vessel = 3.08 kg \n", + "The dryness fraction of steam = 0.2193 the vessel \n", + "The amount o heat transferred = -5032 kJ \n", + "Thus during cooling process there is loss of heat\n" + ] + } + ], + "prompt_number": 81 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.26 - Page No : 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "x1 = 0.95 \n", + "P1 = 9 # in bar\n", + "P1= P1*10**2 # in kN/m**2\n", + "h_f1 = 743 # in kJ/kg\n", + "h_fg1 = 2030 # in kJ/kg\n", + "V = 0.204 # in m**3\n", + "x2 = 0.544\n", + "P2 = 5 # in bar\n", + "P2= P2*10**2 # in kN/m**2\n", + "h_f2 = 640 # in kJ/kg\n", + "h_fg2 = 2108 # in kJ/kg\n", + "H_wet1 = h_f1 + (x1*h_fg1) # in kJ/kg\n", + "print \"Total energy = %0.1f kJ/kg \" %H_wet1\n", + "U1 = H_wet1 - P1*V # in kJ/kg\n", + "print \"The internal energy = %0.1f kJ/kg \" %U1\n", + "V_g1 = 0.204 # in m**3\n", + "V1 = 0.3753 #volume of 1kg of dry stream in m**3\n", + "x2 = V_g1/V1 \n", + "H_wet2 = h_f2 + (x2*h_fg2) # in kJ\n", + "U2 = H_wet2 - P2*V # in kJ\n", + "del_U = U1-U2 # in kJ\n", + "H = del_U/V # in kJ\n", + "print \"Heat removed from 1 m**3 of steam = %0.1f kJ \" %H" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total energy = 2671.5 kJ/kg \n", + "The internal energy = 2487.9 kJ/kg \n", + "Heat removed from 1 m**3 of steam = 3941.5 kJ \n" + ] + } + ], + "prompt_number": 85 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.27 - Page No : 206" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 2.1 # in MN/m**2\n", + "P1= P1*10**3 #in kN/m**2\n", + "P2 = 0.7 # in MN/m**2\n", + "P2= P2*10**3 #in kN/m**2\n", + "V1 = 0.1281 # in m**3\n", + "x = 0.9 \n", + "n = 1.25 \n", + "h_f1= 920 # in kJ/kg\n", + "h_fg1= 1878.6 # in kJ/kg\n", + "h_f2= 697.0 # in kJ/kg\n", + "h_fg2= 2065.0 # in kJ/kg\n", + "V_wet1 = x * 0.0949 # in m**3/kg\n", + "m = V1/V_wet1 # in kg\n", + "print \"Mass of steam = %0.1f kg \" %m\n", + "V2 = V1*((P1/P2)**(1/n)) #in m**3\n", + "del_W = (P1*V1-P2*V2)/(n-1) # in kJ\n", + "print \"External work done = %0.1f kJ \" %del_W\n", + "V_2 = V2/m # in m**3/kg\n", + "x2 = V_2/0.273 \n", + "H1= h_f1+x*h_fg1 # in kJ/kg\n", + "U1= H1-P1*V_wet1 # in kJ/kg\n", + "H2= h_f2+x2*h_fg2 # in kJ/kg\n", + "U2= H2-P2*V_2 # in kJ/kg\n", + "del_E = m*(U2-U1) #in kJ\n", + "print \"Change in internal energy = %0.1f kJ \" %del_E\n", + "Q = del_W +del_E # in kJ\n", + "print \"Heat exchange = %0.1f kJ \" %Q\n", + "print \"Heat is lost to the surroundings.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass of steam = 1.5 kg \n", + "External work done = 212.3 kJ \n", + "Change in internal energy = -483.7 kJ \n", + "Heat exchange = -271.5 kJ \n", + "Heat is lost to the surroundings.\n" + ] + } + ], + "prompt_number": 91 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.28 - Page No : 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "h_f1 = 670 # in kJ/kg\n", + "h_fg1 = 2085 # in kJ/kg\n", + "h_f2 = 475 # in kJ/kg\n", + "h_fg2 = 2221 # in kJ/kg\n", + "P2 = 6*10**2 # in kJ/kg \n", + "P1 = 1.6*10**2 # in kJ/kg\n", + "n = 1.1 \n", + "x1 = 0.9 \n", + "V1 = 0.3159 # in m**3\n", + "V2 = 1.092 # in m**3\n", + "H_wet = h_f1 + (x1*h_fg1) # in kJ/kg\n", + "V_wet1 = x1*V1 # in m**3\n", + "V_wet2 = V_wet1*(P2/P1)**(1/n) # in m**3\n", + "x2 = V_wet2/V2 \n", + "H_wet2 = h_f2 + (x2*h_fg2) # in kJ/kg\n", + "U2= H_wet2-H_wet+P2*V_wet1-P1*V_wet2 # in kJ/kg\n", + "W= (P2*V_wet1-P1*V_wet2)/(n-1) # in kJ/kg\n", + "Q= U2+W # in kJ/kg\n", + "print \"Heat recieved by steam = %0.1f kJ/kg \" %Q" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Heat recieved by steam = 63.9 kJ/kg \n" + ] + } + ], + "prompt_number": 93 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.29 - Page No : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 0.85*10**3 # in kN/m**2\n", + "P2 = 0.17*10**3 # in kN/m**2\n", + "n = 1.13 \n", + "x1 = 0.95 \n", + "V1 = x1*0.227 # in m**3/kg\n", + "V2 = V1 * ((P1/P2)**(1/n)) # in m**3/kg\n", + "x2 = V2/1.032 \n", + "print \"Final dryness fraction of steam = %0.3f\" %x2\n", + "W = (P1*V1-P2*V2)/(n-1) # in kJ/kg\n", + "print \"Change in internal energy = %0.1f kJ/kg \" %W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final dryness fraction of steam = 0.868\n", + "Change in internal energy = 238.3 kJ/kg \n" + ] + } + ], + "prompt_number": 97 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.30 - Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Cp= 2.3 # in kJ/kg-K\n", + "T_sat= 179.9 # in \u00b0C\n", + "T_sat= T_sat+273 # in K\n", + "H= 3052 # enthalpy in kJ/kg\n", + "P= 10*10**2 # in kN/m**2\n", + "h_f= 763 # in kJ/kg\n", + "h_fg= 2015 # in kJ/kg\n", + "V= 0.1944 # in m**3\n", + "# Formula H= h_f+h_fg*Cp*(t_sup-T_sat)-P*V*(t_sup/T_sat)\n", + "t_sup= (h_f+h_fg-Cp*T_sat-H)/(P*V/T_sat-Cp) # in K\n", + "t_sup= t_sup-273 # in \u00b0C\n", + "print \"The final temperature of the steam = %0.0f \u00b0C \" %math.ceil(t_sup)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The final temperature of the steam = 431 \u00b0C \n" + ] + } + ], + "prompt_number": 103 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.31 - Page No : 209" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "m1 = 3 # in kg\n", + "m2 = 2 # in kg\n", + "T1 = 10 # in degree C\n", + "T2 = 80 # In Degree C\n", + "T = ((m1*T1)+(m2*T2))/(m1+m2) # in degree C\n", + "T = T + 273 # in K\n", + "T1 = T1 + 273 # in K\n", + "T2 = T2 + 273 # in K\n", + "c_f = 4.188 \n", + "del_phi1 = m1 * c_f*log(T/T1) # in kJ/K\n", + "del_phi2 = m2 * c_f*log(T/T2) # in kJ/K\n", + "Phi = del_phi1 + del_phi2 # in kJ/K\n", + "print \"Total change in entropy = %0.3f kJ/K \" %Phi" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total change in entropy = 0.124 kJ/K \n" + ] + } + ], + "prompt_number": 104 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.32 - Page No : 216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 15 # in bar\n", + "P2 = 0.15 # in bar\n", + "T_sat = 198.3 # in degree C\n", + "T_sat = T_sat + 273 # in K\n", + "h_fg1 = 1947 # in kJ/kg\n", + "h_fg2= 2369 # in kJ/kg\n", + "h_g1 = 845 # in kJ/kg\n", + "h_f2 = 232 # in kJ/kg\n", + "f_g2 = 7.985 # in kJ/kg-K\n", + "x1 = 0.8 \n", + "Phi_f1 = 2.315 # in kJ/kg-K\n", + "Phi_f2 = 0.772 # in kJ/kg-K\n", + "Phi1 = Phi_f1 + ((x1*h_fg1)/T_sat) # in kJ/kg-K\n", + "H1 = h_g1 + (x1*h_fg1) # in kJ/kg-K\n", + "Phi2 = Phi1 # in kJ/kg-K\n", + "x2 = (Phi1 - Phi_f2)/(f_g2 - Phi_f2) \n", + "H2 = h_f2 + (x2*h_fg2) # in kJ/kg\n", + "Eta = ((H1-H2)/(H1-h_f2))*100 # in %\n", + "print \"Part (i) When the steam supply is wet and dryness fraction is 0.8\"\n", + "print \"Rankine efficiency = %0.1f %% \" %Eta\n", + "delH = H1-H2 #theoretical work of steam in kJ/kg\n", + "W = delH*60/100 # in kJ/kg\n", + "Energy_Equivalent= 3600 # in kJ\n", + "Steam_C = Energy_Equivalent/W # Steam consumption in kg\n", + "print \"Steam consumption per kW-hr = %0.2f kg\" %Steam_C\n", + "print \"Part (ii) When the steam supply is dry and saturated\"\n", + "H_1 = 2792 # in kJ/kg\n", + "Phi_g1 = 6.445 # in kJ/kg-K\n", + "x_2 = (Phi_g1-Phi_f2)/(f_g2-Phi_f2) \n", + "H_2 = h_f2 + (x_2*h_fg2) # in kJ/kg\n", + "Eta1 = (H_1-H_2)/(H_1-h_f2) \n", + "print \"Rankine efficiency =\",round(Eta1,3),\"=\",round(Eta1*100,1),\"%%\" \n", + "W1 = (H_1-H_2)*60/100 # in kJ/kg\n", + "Steam_C= Energy_Equivalent/W1 # in kg\n", + "print \"Steam consumption per kW-hr = %0.2f kg is :\" %Steam_C\n", + "print \"Part (iii) When steam is superheated and temperature is 300\u00b0C\"\n", + "H_1 = 3039 # in kJ/kg\n", + "Phi_1 = 6.919 # in kJ/kg-K\n", + "x_2 = (Phi_1 - Phi_f2)/(f_g2-Phi_f2) \n", + "H_2 = h_f2 + (x_2 * h_fg2) # in kJ/kg\n", + "Eta = (H_1 - H_2)/(H_1-h_f2) \n", + "print \"Rankine efficiency =\",round(Eta,3),\"=\",round(Eta*100,1),\"%%\" \n", + "W2 = (H_1-H_2)*60/100 # in kJ/kg\n", + "Steam_C= Energy_Equivalent/W2 # in kg\n", + "print \"Steam consumption per kW-hr = %0.2f kg \" % Steam_C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i) When the steam supply is wet and dryness fraction is 0.8\n", + "Rankine efficiency = 26.6 % \n", + "Steam consumption per kW-hr = 10.37 kg\n", + "Part (ii) When the steam supply is dry and saturated\n", + "Rankine efficiency = 0.272 = 27.2 %%\n", + "Steam consumption per kW-hr = 8.61 kg is :\n", + "Part (iii) When steam is superheated and temperature is 300\u00b0C\n", + "Rankine efficiency = 0.281 = 28.1 %%\n", + "Steam consumption per kW-hr = 7.61 kg \n" + ] + } + ], + "prompt_number": 112 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.33 - Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T1 = 400 # in degree C\n", + "T1 = T1 + 273 # in K\n", + "T2 = 72.7 # in degree C\n", + "T2 = T2 + 273 # in K\n", + "Eta = ((T1-T2)/T1)*100 # in %\n", + "print \"For carnot cycle : \"\n", + "print \"Rankine efficiency = %0.1f %% \" %Eta\n", + "H1 = 3248 # in kJ/kg\n", + "h_f2 = 304.5 # in kJ/kg\n", + "del_H = 809.2 # in kJ/kg\n", + "Eta = (del_H/(H1-h_f2))*100 # in %\n", + "print \"For Rankine cycle : \"\n", + "print \"Rankine efficiency = %0.2f %% \" %Eta" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For carnot cycle : \n", + "Rankine efficiency = 48.6 % \n", + "For Rankine cycle : \n", + "Rankine efficiency = 27.49 % \n" + ] + } + ], + "prompt_number": 116 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 6.34 - Page No : 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "P1 = 15 # in bar\n", + "H1 = 3039 # in kJ/kg\n", + "V_g1 = 0.1697 # in m**3/kg\n", + "Phi1 = 6.919 # in kJ/kg-K\n", + "P2_desh = 3.5*10**2 # in kN/m**2\n", + "Phi_g2 = 6.941 # in kJ/kg-K\n", + "Phi_f2 = 1.727 # in kJ/kg-K\n", + "P2 = 0.15*10**2 # in kN/m**2\n", + "h_f2 = 232 # in kJ/kg\n", + "x = (Phi1-Phi_f2)/(Phi_g2 - Phi_f2) \n", + "h_f = 584 # in kJ/kg\n", + "h_fg = 2148 # in kJ/kg\n", + "H2 = h_f + (x*h_fg) # in kJ/kg\n", + "V = 0.5241 # in m**3\n", + "V2=x*V # in m**3/kg\n", + "W = (H1-H2) + (P2_desh-P2)*V2 #work output of the cycle in kJ/kg\n", + "Eta = W/(H1-h_f2)*100 # in %\n", + "print \"The efficiency of the cycle = %0.1f %% \" %Eta\n", + "Energy_equivalent= 3600 # in kJ\n", + "S_consumption = Energy_equivalent/W # in kg\n", + "V = S_consumption* V_g1 # in m**3\n", + "print \"Total volume of steam = %0.2f m**3 \" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The efficiency of the cycle = 17.5 % \n", + "Total volume of steam = 1.24 m**3 \n" + ] + } + ], + "prompt_number": 118 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb new file mode 100644 index 00000000..924d966a --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_7.ipynb @@ -0,0 +1,249 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 7 : Flow Process\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 7.1 - Page No : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "H1 = 2600 # in kJ/kg\n", + "H2 = 1850 # in kJ/kg\n", + "g = 9.81 \n", + "C1 = 10 # in meter/second\n", + "C2 = 20 # in meter/secon\n", + "Q = 120 # in kJ/kg\n", + "Z1 = 30 # in meter\n", + "Z2 = 10 # in meter\n", + "W = g*(Z1-Z2)/1000+H1-H2+(C1**2-C2**2)/(2*1000)+Q\n", + "print \"The work done = %0.0f kJ/kg \" %W" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The work done = 870 kJ/kg \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 7.2 - Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "H1 = 3100 # in kJ/kg\n", + "H2 = 1950 # in kJ/kg\n", + "C1 = 20 # in meter/second\n", + "C2 = 30 # in meter/secon\n", + "Q = 0 # in kJ/kg\n", + "Q_desh= 20 # in kJ/kg\n", + "Vs= 1.1 # in m**3/kg\n", + "W = H1-H2+(C1**2-C2**2)/(2*1000)+Q-Q_desh # in kJ/kg\n", + "m= 2 #mass flow rate in kg/sec\n", + "Power= m*W # in kW\n", + "print \"Power output of the turbine = %0.1f kW\" %Power\n", + "Area= m*Vs/C2 # in m**2\n", + "print \"Area of exhaust pipe = %0.3f m**2 \" %Area" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power output of the turbine = 2259.5 kW\n", + "Area of exhaust pipe = 0.073 m**2 \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 7.3 - Page No : 234" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "# Given data\n", + "H1 = 2940 # in kJ/kg\n", + "H2 = 2630 # in kJ/kg\n", + "C = sqrt((H1-H2)*1000*2) # in m/sec\n", + "print \"Velocity of the steam leaving the nozzle = %0.1f m/sec \" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity of the steam leaving the nozzle = 787.4 m/sec \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 7.4 - Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "H1 = 2800 # in kJ/kg\n", + "H2 = 2600 # in kJ/kg\n", + "C2 = sqrt(2*(H1-H2)*1000) # in m/s\n", + "print \"Exit velocity = %0.0f m/s\" %C2\n", + "m_f = 25 # mass flow rate in kg/sec\n", + "V = 0.154 # in m**3/kg\n", + "A = (m_f*V)/C2 # in m**2\n", + "print \"Total exit area = %0.4f m**2\" %A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exit velocity = 632 m/s\n", + "Total exit area = 0.0061 m**2\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 7.5 - Page No : 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Q = 20 # in kJ/kg\n", + "P = 10 # in MW\n", + "P = P * 10**3 # in kW\n", + "H1 = 3248 # in kJ/kg\n", + "H2 = 2552 # in kJ/kg\n", + "C1 = 20 # m/s\n", + "C2 = 40 # m/s\n", + "m = P/((H1-H2+(C1**2-C2**2)/(2*1000))-Q) # in kg/s\n", + "print \"Mass = %0.3f kg \" %m" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mass = 14.806 kg \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 7.6 - Page No : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "h_f1 = 2584 # in kJ/kg\n", + "h_fg1 = 2392 # in kJ/kg\n", + "H2 = 192 # in kJ/kg\n", + "x = 0.2 \n", + "H1 = round(h_f1- (x*h_fg1)) # in kJ/kg\n", + "x1 = 0.8 \n", + "Vs = 14.67 # in m**3\n", + "V1 = x1*Vs # in m**3/kg\n", + "A = 0.45 # in m**2\n", + "C1 = V1/A # in m/s\n", + "Q = 5 # kJ/s\n", + "C2 = 0 \n", + "W = 0 \n", + "Q_desh = W-H1 - C1**2/(2*1000)-Q+H2+C2**2/2 # in kJ/s\n", + "print \"Rate of heat transfer = % 0.3f kJ/s \" %Q_desh\n", + "# Note : The calculation in the book is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rate of heat transfer = -1919.340 kJ/s \n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb new file mode 100644 index 00000000..923f4357 --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/chapter_no_8.ipynb @@ -0,0 +1,958 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 8 : Fuels And Combustion\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.1 - Page No : 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "C= 85 # in %\n", + "H= 12.5 # in %\n", + "H1 = 35000 # heat liberated by carbon in kJ\n", + "H2 = 143000 # heat liberated by hydrogen in kJ\n", + "HCV = (C*H1+H*H2)/100 # Higher calorific value in kJ/kg\n", + "print \"Higher calorific value = %0.0f kJ/kg \" %HCV\n", + "ms = 9 \n", + "LCV= HCV -(ms*H*2442)/100 # Lower calorific value in kJ/kg\n", + "print \"Lower calorific value = %0.0f kJ/kg \" %LCV\n", + "\n", + "# Note: The calculated value in the book is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Higher calorific value = 47625 kJ/kg \n", + "Lower calorific value = 44878 kJ/kg \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.2 - Page No : 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "CH4 = 77 # in %\n", + "C2H6 = 22.5 #in %\n", + "H1 = 40.08 # heat liberated by CH4 in MJ/nm**3\n", + "H2 = 69.52 # heat liberated by C2H6 in MJ/nm**3\n", + "HCV = (CH4*H1+C2H6*H2)/100 # Higher calorific value in kJ/kg\n", + "print \"The higher calorific value = %0.3f MJ/nm**3\" %HCV\n", + "V1= CH4*2/100 # volume of water due to combustion of CH4 in m**3\n", + "V2= C2H6*3/100 # volume of water due to combustion of C2H6 in m**3\n", + "V= V1+V2 # total volume in m**3\n", + "ms= 18/22.41 # in kg\n", + "LCV= HCV-ms*V*2.242 # in MJ/nm**3\n", + "print \"The lower calorific value = %0.3f MJ/nm**3\" %LCV\n", + "print \"The word nm**3 means that cubic metre at normal temperature and pressure\"\n", + "\n", + "# Note: The calculated value in the book is not accurate" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The higher calorific value = 46.504 MJ/nm**3\n", + "The lower calorific value = 42.515 MJ/nm**3\n", + "The word nm**3 means that cubic metre at normal temperature and pressure\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.3 - Page No : 253" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "mw = 2.5 #mass of water in kg\n", + "mc= 0.744 #water equivalen of apparatus in kg\n", + "CoalMass = 1.01*10**-3 # in kg\n", + "T_r = 2.59 #temp. rise in degree C\n", + "C_c = 0.016 # Cooling correction in degree C\n", + "theta = T_r +C_c #corrected temp. rise in degree C\n", + "Cp = 4.1868 # in kJ/kg-K\n", + "m = mw+mc # in kg\n", + "Qw = m * Cp*theta #heat received by water in kJ\n", + "C = (Qw/CoalMass) # in kJ/kg\n", + "print \"Calorific value of the fuel = %0.0f kJ/kg \" %C" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Calorific value of the fuel = 35044 kJ/kg \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.4 - Page No : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T_r = 2.912 # temp. rise in degree C\n", + "C_c = 0.058 #cooling correction in degree C\n", + "theta = T_r + C_c # in degree C\n", + "HyCon= 14/100 # Hydrogen content\n", + "C_P = 4.1868 # in J/gm-K\n", + "Cc = 16750 #calorific value of cotton in J/gm\n", + "m_w = 1400 # in gm\n", + "m_c = 500 # in gm\n", + "m = m_w+m_c # in gm\n", + "m1 = 0.005 #mass of cotton in gm\n", + "m2 = 0.579 #mass of oil in gm\n", + "Qw = m*C_P*theta # in J\n", + "H1= m1*Cc # heat given out by combustion of cotton in J\n", + "Qin= Qw-H1 # in J\n", + "C= Qin/m2 # J/gm or kJ/kg\n", + "LCV= C-2442*9*HyCon # in J/gm or kJ/kg\n", + "print \"Higher Calorific value of the fuel = %0.0f J/gm or kJ/kg\" %C\n", + "print \"Lower Calorific value of the fuel = %0.0f J/gm or kJ/kg\" %LCV" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Higher Calorific value of the fuel = 40660 J/gm or kJ/kg\n", + "Lower Calorific value of the fuel = 37583 J/gm or kJ/kg\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.5 - Page No : 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "W_c = 500*10**-3 #water collected in kg\n", + "C_P = 4.1868 # in kJ/kg-K\n", + "T_o = 28.3 #outlet temp. in \u00b0C\n", + "T_i = 14 #inlet temp. in \u00b0C\n", + "P_bero= 785 # barometric pressure in mm\n", + "P_gas= P_bero+90/13.6 # in mm\n", + "T1=17+273 # gas temp. in K\n", + "T2= 15+273 # in K\n", + "theta = T_o-T_i #temp. rise in \u00b0C\n", + "Qw = W_c * C_P*theta # in kJ\n", + "Vgs= 2.8*10**-3 #volume of gas consumed in m**3\n", + "E = Qw/Vgs # in kJ\n", + "V1= P_gas/760*(T2/T1) # in m**3\n", + "CalorificValue= E/V1 # in kJ/standard m**3\n", + "print \"Calorific value = %0.2f kJ/m**3 \" %CalorificValue" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Calorific value = 10335.56 kJ/m**3 \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.6 - Page No : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C = 0.83 # in kg\n", + "H = 0.05 # in kg\n", + "O = 0.02 # in kg\n", + "S = 0.002 # in kg\n", + "AbyF_min = (11.6 * C) + +(34.8*(H-(O/8))) + (4.35 * S) # in kg\n", + "print \"The therotical mass of air = %0.2f kg \" %AbyF_min" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The therotical mass of air = 11.29 kg \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.7 - Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C = 0.86 # in kg\n", + "H = 0.14 # in kg\n", + "S = 0 # in kg\n", + "O = 0 # in kg\n", + "Vair = 0.77 #volume of 1kg of air in m**3\n", + "Spe_Gravity = 0.8 # specific gravity of petrol\n", + "maBYmf = (11.6*C)+(34.8*(H-O/8)) + (4.35*S) # in kg\n", + "print \"The therotical mass of air = %0.1f kg \" %maBYmf\n", + "V = maBYmf *Spe_Gravity*Vair # in m**3/litre\n", + "print \"Volume of air required = %0.3f m**3/litre \" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The therotical mass of air = 14.8 kg \n", + "Volume of air required = 9.146 m**3/litre \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.8 - Page No : 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C = 0.75 # in kg\n", + "H = 0.08 # in kg\n", + "O = 0.03 # in kg\n", + "S = 0 # in kg\n", + "P = 1.1 # in bar\n", + "P = P*10**5 # in N/m**2\n", + "maBYmf = (11.6*C) + (34.8 * (H-(O/8))) + (4.35 *S) # in kg\n", + "print \"The mass of air = %0.2f kg \" %maBYmf\n", + "m = 1.5*(maBYmf ) # in kg\n", + "T = 20+273 # in K\n", + "R = 29.27 \n", + "V = (m*R*T)/P # in m**3\n", + "print \"Volume = %0.3f m**3 \" %V\n", + "\n", + "# Note: The calculated value of V in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass of air = 11.35 kg \n", + "Volume = 1.328 m**3 \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.9 - Page No : 266" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "C = 0.82 # in kg\n", + "H2 = .12 # in kg\n", + "O2 = 0.02 # in kg\n", + "a = C/12 \n", + "b = H2/2 \n", + "y = (32*(a+(0.5*b))-O2)/0.23 \n", + "print \"Minimum quantity of air = %0.2f kg \" %y" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum quantity of air = 13.59 kg \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.10 - Page No : 267" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "mC= 0.88 #mass of carbon in kg\n", + "mH2= 0.03 #mass of H2 in kg\n", + "mS= 0.005 #mass of S in kg\n", + "O2_mass= 2.66*mC + 8*mH2 + 2*mS # in kg\n", + "Air_mass= O2_mass/0.23 # in kg\n", + "Air_mass= 1.5*Air_mass # in kg (as 50% excess air is supplied)\n", + "print \"Actual mass of air required per kg of fuel for complete combustion = %0.3f kg\" %Air_mass\n", + "# The flue gases per kg of fuel will be:\n", + "CO2= 3.226 # in kg\n", + "N2= 13.04 # in kg\n", + "O2= 1.298 # in kg\n", + "total_mass= CO2+N2+O2 # in kg\n", + "CO2_per_by_mass= CO2/total_mass*100 # in %\n", + "O2_per_by_mass= O2/total_mass*100 # in %\n", + "N2_per_by_mass= N2/total_mass*100 # in %\n", + "print \"Percentage of CO2 by mass is : %0.1f\" %CO2_per_by_mass\n", + "print \"Percentage of O2 by mass is : %0.1f\" %O2_per_by_mass\n", + "print \"Percentage of N2 by mass is : %0.1f\" %N2_per_by_mass\n", + "M_wt_CO2= 44 \n", + "CO2_Per_M_com_M_wt= CO2_per_by_mass/M_wt_CO2 # % Mass composition molecular weight\n", + "M_wt_O2= 32 \n", + "O2_Per_M_com_M_wt= O2_per_by_mass/M_wt_O2 # % Mass composition molecular weight\n", + "M_wt_N2= 28 \n", + "N2_Per_M_com_M_wt= N2_per_by_mass/M_wt_N2 # % Mass composition molecular weight\n", + "total= CO2_Per_M_com_M_wt + O2_Per_M_com_M_wt + N2_Per_M_com_M_wt \n", + "CO2_per_by_vol= CO2_Per_M_com_M_wt/total*100 # in %\n", + "O2_per_by_vol= O2_Per_M_com_M_wt/total*100 # in %\n", + "N2_per_by_vol= N2_Per_M_com_M_wt/total*100 # in %\n", + "print \"Percentage of CO2 by volume is : %0.2f\" %CO2_per_by_vol\n", + "print \"Percentage of O2 by volume is : %0.0f\" %O2_per_by_vol\n", + "print \"Percentage of N2 by volume is : %0.2f\" %N2_per_by_vol" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual mass of air required per kg of fuel for complete combustion = 16.897 kg\n", + "Percentage of CO2 by mass is : 18.4\n", + "Percentage of O2 by mass is : 7.4\n", + "Percentage of N2 by mass is : 74.2\n", + "Percentage of CO2 by volume is : 12.65\n", + "Percentage of O2 by volume is : 7\n", + "Percentage of N2 by volume is : 80.35\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.11 - Page No : 269" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Cp= 1 # in kJ/kg\n", + "H= 2.7*10**3 # total heat of vaport in flue gas in kJ/kg\n", + "CoalCalorific= 32.82*10**3 # in kJ/kg\n", + "T1= 310 # final gas flue temp. in \u00b0C\n", + "T2= 25 # boiler house temp. in \u00b0C\n", + "mC= 0.84 #mass of carbon in kg\n", + "mH2= 0.05 #mass of H2 in kg\n", + "O2_mass= 2.66*mC + 9*mH2 # in kg\n", + "Air_mass= O2_mass/0.23 # in kg\n", + "Air_mass= 1.5*Air_mass # in kg (as 50% excess air is supplied)\n", + "print \"Actual mass of air required per kg of fuel for complete combustion = %0.3f kg \" %Air_mass\n", + "# Analysis of dry flue gas by weight\n", + "CO2= 3.08 # in kg\n", + "N2= 13.24 # in kg\n", + "O2= 1.32 # in kg\n", + "total_mass= CO2+N2+O2 # in kg\n", + "CO2_per_by_mass= CO2/total_mass*100 # in %\n", + "O2_per_by_mass= O2/total_mass*100 # in %\n", + "N2_per_by_mass= N2/total_mass*100 # in %\n", + "print \"Percentage of CO2 by mass is : %0.2f\" %CO2_per_by_mass\n", + "print \"Percentage of O2 by mass is : %0.2f\" %O2_per_by_mass\n", + "print \"Percentage of N2 by mass is : %0.2f\" %N2_per_by_mass\n", + "M_wt_CO2= 44 \n", + "CO2_Per_M_com_M_wt= CO2_per_by_mass/M_wt_CO2 # % Mass composition molecular weight\n", + "M_wt_O2= 32 \n", + "O2_Per_M_com_M_wt= O2_per_by_mass/M_wt_O2 # % Mass composition molecular weight\n", + "M_wt_N2= 28 \n", + "N2_Per_M_com_M_wt= N2_per_by_mass/M_wt_N2 # % Mass composition molecular weight\n", + "total= CO2_Per_M_com_M_wt + O2_Per_M_com_M_wt + N2_Per_M_com_M_wt \n", + "CO2_per_by_vol= CO2_Per_M_com_M_wt/total*100 # in %\n", + "O2_per_by_vol= O2_Per_M_com_M_wt/total*100 # in %\n", + "N2_per_by_vol= N2_Per_M_com_M_wt/total*100 # in %\n", + "print \"Percentage of CO2 by volume is : %0.0f\" %CO2_per_by_vol\n", + "print \"Percentage of O2 by volume is : %0.0f\" %O2_per_by_vol\n", + "print \"Percentage of N2 by volume is : %0.0f\" %N2_per_by_vol\n", + "H_w_v= 9*mH2*H #heat carried away by water vapour in kJ\n", + "H_dry_flue= total_mass*Cp*(T1-T2) # in kJ\n", + "H_total= H_w_v+H_dry_flue # in kJ\n", + "H_available= CoalCalorific-H_total # in kJ\n", + "print \"Heat available for steam generation = %0.0f kJ\" %H_available" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual mass of air required per kg of fuel for complete combustion = 17.507 kg \n", + "Percentage of CO2 by mass is : 17.46\n", + "Percentage of O2 by mass is : 7.48\n", + "Percentage of N2 by mass is : 75.06\n", + "Percentage of CO2 by volume is : 12\n", + "Percentage of O2 by volume is : 7\n", + "Percentage of N2 by volume is : 81\n", + "Heat available for steam generation = 26578 kJ\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.12 - Page No : 271" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "mC= 0.86 #mass of carbon in kg\n", + "mH2= 0.14 #mass of H2 in kg\n", + "maBYmf= (2.66*mC + 8*mH2)/0.23 # in kg/kg of fuel\n", + "Air_supp_deficiency= maBYmf/10 # in kg/kg of fuel\n", + "Air_saved= 16/(12*0.23) # in kg/kg of carbon\n", + "m1= Air_supp_deficiency/Air_saved # mass of coal burns to carbon monoxide\n", + "m2= mC-m1 # mass of coal burns to carbon diooxide\n", + "CO2_formed= m2*3.66 # in kg\n", + "CO_formed= m1*28/12 # in kg\n", + "N2_formed= Air_supp_deficiency*0.77*9 # in kg\n", + "M_wt_CO2= 44 # molecular weight\n", + "M_wt_CO= 28 \n", + "M_wt_N2= 28 \n", + "CO2_rel_vol= CO2_formed/M_wt_CO2 \n", + "CO_rel_vol= CO_formed/M_wt_CO \n", + "N2_rel_vol= N2_formed/M_wt_N2 \n", + "total_rel_vol=CO2_rel_vol+CO_rel_vol+N2_rel_vol \n", + "CO2_vol= CO2_rel_vol/total_rel_vol*100 # in %\n", + "CO_vol= CO_rel_vol/total_rel_vol*100 # in %\n", + "N2_vol= N2_rel_vol/total_rel_vol*100 # in %\n", + "print \"Volumetric analysis of CO2 = %0.2f %%\" %CO2_vol\n", + "print \"Volumetric analysis of CO = %0.2f %% \" %CO_vol\n", + "print \"Volumetric analysis of N2 = %0.2f %% \" %N2_vol" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volumetric analysis of CO2 = 11.47 %\n", + "Volumetric analysis of CO = 4.86 % \n", + "Volumetric analysis of N2 = 83.67 % \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.13 - Page No : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "N = 83 #compositon of nitrogen in %\n", + "C = 81 #carbon mass in the fuel in %\n", + "C1 = 11 #compositon of CO2 in %\n", + "C2 = 2 # compositon of CO in %\n", + "O = 4 # composition of O2 in %\n", + "AirSupplied =N*C/(33*(C1+C2)) # in kg/kg\n", + "print \"The amount of air supplied = %0.1f kg per kg of fuel \" %AirSupplied\n", + "ExcessAir =79*O*C/(21*33*(C1+C2)) # in kg/kg\n", + "print \"Weight of excess air = %0.2f kg per kg of fuel \" %ExcessAir" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The amount of air supplied = 15.7 kg per kg of fuel \n", + "Weight of excess air = 2.84 kg per kg of fuel \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.14 - Page No : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "CO2= 10 # in %\n", + "O2= 6 # in %\n", + "N2= 84 # in %\n", + "# a= x/12 and b= (1-x)/2\n", + "# 0.23*y/32= a+b/2+c\n", + "abyc= CO2/O2 \n", + "# a/(0.77*y/28)= CO2/N2\n", + "x=0.835 \n", + "carbon_per= x*100 # in %\n", + "hydrogen_per= 100-carbon_per # in %\n", + "print \"The fuel consists of\",round(carbon_per,1),\"%% carbon and\",round(hydrogen_per,1),\"%% hydrogen.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The fuel consists of 83.5 %% carbon and 16.5 %% hydrogen.\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.15 - Page No : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "H2 = 50 # in %\n", + "CO = 5 # in %\n", + "CH4 = 35 # in %\n", + "V = ((0.5*(H2+CO))+(2*CH4))/21 # in m**3\n", + "print \"Quantity of air required for complete combustion of 1m**3 of gas = %0.2f m**3\" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quantity of air required for complete combustion of 1m**3 of gas = 4.64 m**3\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.16 - Page No : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "H2= 0.4 # in m**3\n", + "CH= 0.425 # in m**3\n", + "C2H4= 0.0253 # in m**3\n", + "C4H8= 0.0127 # in m**3\n", + "CO= 0.075 # in m**3\n", + "O2_vol= 0.5*H2 + 2*CH + 3*C2H4 + 6*C4H8 + 0.5*CO # in m**3\n", + "Air_vol= O2_vol/0.21 # in m**3\n", + "print \"The volume of air required for complete combustion = %0.1f m**3 \" %Air_vol\n", + "actualAirSupplied= 1.3*Air_vol # in m**3\n", + "print \"The actual quantity of air supplied = %0.2f m**3 \" %actualAirSupplied" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The volume of air required for complete combustion = 5.9 m**3 \n", + "The actual quantity of air supplied = 7.67 m**3 \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.17 - Page No : 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_H2= 0.15 # in m**3\n", + "V_CH4= 0.02 # in m**3\n", + "V_CO= 0.20 # in m**3\n", + "V_CO2= 0.06 # in m**3\n", + "V_O2= 0.03 # in m**3\n", + "V_N2= 0.54 # in m**3\n", + "V1= 0.5*V_H2 # quantity of O2 required for complete combustion of H2\n", + "V2= 2*V_CH4 # in m**3\n", + "V3= 0.5*V_CO # in m**3\n", + "V= V1+V2+V3 # total oxygen required in m**3\n", + "O2_supp= V-V_O2 # O2 to be supplied by air in m**3\n", + "Air_req_min= O2_supp/0.21 # minimum quantity of air required in m**3\n", + "Actual_Air_Supp= 1.5*Air_req_min # m**3 of air\n", + "print \"The volume of air supplied = %0.2f m**3\" %Actual_Air_Supp\n", + "Vol_Carbondioxide_inFlue= V_CO2+V_CH4+V_CO #total volume of carbon dioxide\n", + "Vol_O2_inFlue= (Actual_Air_Supp-Air_req_min)*0.21 # in m**3\n", + "N2_from_air_Supp= 0.79*Actual_Air_Supp # in m**3\n", + "Vol_N2_inFlue= N2_from_air_Supp+V_N2 # in m**3\n", + "total= Vol_Carbondioxide_inFlue+Vol_O2_inFlue+Vol_N2_inFlue # in m**3\n", + "Per_CarbonDioxide= Vol_Carbondioxide_inFlue/total*100 # in %\n", + "Per_Oxygen= Vol_O2_inFlue/total*100 # in %\n", + "Per_Nitrogen= Vol_N2_inFlue/total*100 # in %\n", + "print \"%% Carbon dioxide is : %0.1f %%\" %Per_CarbonDioxide\n", + "print \"%% Carbon dioxide is : %0.2f %%\" %Per_Oxygen\n", + "print \"%% Carbon dioxide is : %0.2f %%\" %Per_Nitrogen" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The volume of air supplied = 1.32 m**3\n", + "% Carbon dioxide is : 14.3 %\n", + "% Carbon dioxide is : 4.73 %\n", + "% Carbon dioxide is : 80.96 %\n" + ] + } + ], + "prompt_number": 55 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.18 - Page No : 281" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "V_CH4= 0.14 # in m**3\n", + "V_CO= 0.35 # in m**3\n", + "V_CO2= 0.06 # in m**3\n", + "V_N2= 0.03 # in m**3\n", + "V_H2= 0.42 # in m**3\n", + "a= V_CH4+V_CO2+V_CO \n", + "b= 2*V_CH4+V_H2 \n", + "# a+0.5*b+c= V_CO2+V_CO/2+0.21*5\n", + "c= V_CO2+V_CO/2+0.21*5-a-0.5*b \n", + "d=V_N2+5*0.79 \n", + "total= a+c+d \n", + "Vol_per_CO2= a/total*100 # in %\n", + "Vol_per_O2= c/total*100 # in %\n", + "Vol_per_N2= d/total*100 # in %\n", + "print \"Volume percentage of CO2 is : %0.2f\" %Vol_per_CO2\n", + "print \"Volume percentage of O2 is : %0.2f\" %Vol_per_O2\n", + "print \"Volume percentage of N2 is : %0.2f\" %Vol_per_N2\n", + "m_CO2= 44 # molecular mass\n", + "m_O2= 32 # molecular mass\n", + "m_N2=28 # molecular mass\n", + "mass_ratio_CO2= Vol_per_CO2/m_CO2 \n", + "mass_ratio_O2= Vol_per_O2/m_O2 \n", + "mass_ratio_N2= Vol_per_N2/m_N2 \n", + "total_mass_ratio= mass_ratio_CO2+mass_ratio_O2+mass_ratio_N2 \n", + "mass_per_CO2= mass_ratio_CO2/total_mass_ratio*100 \n", + "mass_per_O2= mass_ratio_O2/total_mass_ratio*100 \n", + "mass_per_N2= mass_ratio_N2/total_mass_ratio*100 \n", + "print \"Mass percentage of CO2 is : %0.2f\" %mass_per_CO2\n", + "print \"Mass percentage of O2 is : %0.2f\" %mass_per_O2\n", + "print \"Mass percentage of N2 is : %0.2f\"%mass_per_N2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume percentage of CO2 is : 11.19\n", + "Volume percentage of O2 is : 7.83\n", + "Volume percentage of N2 is : 80.98\n", + "Mass percentage of CO2 is : 7.50\n", + "Mass percentage of O2 is : 7.22\n", + "Mass percentage of N2 is : 85.28\n" + ] + } + ], + "prompt_number": 57 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.19 - Page No : 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "GCR= 110 # gas consumption rate in m**3/hour\n", + "rpm= 300 # round per minute\n", + "Vs= 0.1 # swept volume of engine in m**3\n", + "V_H2=0.50 # in m**3\n", + "V_CO= 0.05 # in m**3\n", + "V_CH4=0.25 # in m**3\n", + "V_CO2= 0.10 # in m**3\n", + "V_N2= 0.10 # in m**3\n", + "V_O2= 5.8 # in m**3\n", + "AirRequired= (0.5*(V_H2+V_CO)+2*V_CH4)/0.21 # in m**3\n", + "CO2_formed= V_CO+V_CH4 # in m**3\n", + "total_CO2= CO2_formed+V_CO2 # in m**3\n", + "N2_of_air= 0.79*AirRequired # in m**3\n", + "total_N2= N2_of_air+V_N2 # in m**3\n", + "TotalVolume= total_N2+total_CO2 # in m**3\n", + "V= TotalVolume # in m**3\n", + "ExcessAirSupplied= (V_O2*V)/(21-V_O2) # in m**3\n", + "TotalAirSupplied= ExcessAirSupplied+AirRequired # in m**3\n", + "AirFuel_ratio= round(TotalAirSupplied)/1 \n", + "print \"Air fuel ratio by volume is : %0.0f\" % AirFuel_ratio\n", + "# Let V1= Volume of air + gas aspirated per hour\n", + "V1= GCR*6 # in m**3\n", + "Vs_out= Vs*rpm/2*60 # in m**3\n", + "Ratio= V1/Vs_out \n", + "print \"The value of Ratio i.e.\"\n", + "print \"(Volume of air + gas aspirted per hour)/Volume swept out by piston per hour = %0.4f\" %Ratio" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Air fuel ratio by volume is : 5\n", + "The value of Ratio i.e.\n", + "(Volume of air + gas aspirted per hour)/Volume swept out by piston per hour = 0.7333\n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 8.20 - Page No : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "CO2= 9.9 # in %\n", + "CO= 7.2 # in %\n", + "H2= 3.3 # in %\n", + "CH4= 0.3 # in %\n", + "N2= 79.3 # in %\n", + "O2= N2*21/79 # in %\n", + "print \"Method 1 : By Carbon balance :- \"\n", + "Z= (CO2+CO+CH4)/8 \n", + "x= 8*Z \n", + "measured_air_fuel_ratio= 11.3 \n", + "mm1= 29 # molecular mass of air\n", + "mm2= 12*8+17 # molecular mass of C8H17\n", + "massOf_air= (O2+N2)*mm1 \n", + "massOf_fuel= Z*mm2 \n", + "air_fuel_ratio= massOf_air/massOf_fuel \n", + "print \"The air fuel ratio by mass is : %0.2f\" %air_fuel_ratio\n", + "Per_error= (air_fuel_ratio - measured_air_fuel_ratio)/measured_air_fuel_ratio*100 \n", + "print \"Percentage error is : %0.3f %%\" %Per_error\n", + "print \"Method 2 : By Hydrogen balance : \"\n", + "X= (O2-CO2-CO/2)*2 \n", + "Z= (4*CH4+2*H2+X*2)/17 \n", + "massOf_air= (O2+N2)*mm1 \n", + "massOf_fuel= Z*mm2 \n", + "air_fuel_ratio= massOf_air/massOf_fuel \n", + "print \"The air fuel ratio by mass is : %0.2f\" %air_fuel_ratio\n", + "Per_error= (air_fuel_ratio - measured_air_fuel_ratio)/measured_air_fuel_ratio*100 \n", + "print \"Percentage error is : %0.2f %%\" %Per_error\n", + "print \"Method 3 : By Carbon-Hydrogen balance : \"\n", + "y= (4*CH4+2*H2+X*2) \n", + "massOf_air= (O2+N2)*mm1 \n", + "massOf_fuel= x*12+y \n", + "air_fuel_ratio= massOf_air/massOf_fuel \n", + "print \"The air fuel ratio by mass is : %0.2f\" %air_fuel_ratio\n", + "Per_error= (air_fuel_ratio - measured_air_fuel_ratio)/measured_air_fuel_ratio*100 \n", + "print \"Percentage error is : %0.2f %%\" %Per_error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Method 1 : By Carbon balance :- \n", + "The air fuel ratio by mass is : 11.84\n", + "Percentage error is : 4.816 %\n", + "Method 2 : By Hydrogen balance : \n", + "The air fuel ratio by mass is : 11.49\n", + "Percentage error is : 1.67 %\n", + "Method 3 : By Carbon-Hydrogen balance : \n", + "The air fuel ratio by mass is : 11.79\n", + "Percentage error is : 4.33 %\n" + ] + } + ], + "prompt_number": 64 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.png b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.png Binary files differnew file mode 100644 index 00000000..225e656e --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file1.png diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.png b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.png Binary files differnew file mode 100644 index 00000000..56e36a59 --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file2.png diff --git a/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.png b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.png Binary files differnew file mode 100644 index 00000000..d4a9159d --- /dev/null +++ b/Engineering_Thermodynamics_by_Dr._S._S._Khandare/screenshots/file3.png diff --git a/sample_notebooks/MohdGufran/chapter_10.ipynb b/sample_notebooks/MohdGufran/chapter_10.ipynb new file mode 100644 index 00000000..7d0f1d7b --- /dev/null +++ b/sample_notebooks/MohdGufran/chapter_10.ipynb @@ -0,0 +1,355 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter No - 10 : Mass Transfer\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 10.1 - Page No. : 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "# Given data\n", + "P1=4 # in bar\n", + "P2=2 # in bar\n", + "T=25 # in degree C\n", + "Dhp=9*10**-8 # in m**2/s\n", + "S=3*10**-3 # in kg mole/m**3 bar\n", + "del_x=0.5*10**-3 # thickness in m\n", + "#(a) The molar concentration of a gas in terms of solubility\n", + "CH1=S*P1 # in kg mole/m**3\n", + "CH2=S*P2 # in kg mole/m**3\n", + "#(b) Molar diffusion flux of hydrogen through plastic memberence is given by Fick's law of diffision\n", + "#N_H= N_h/A = Dhp*(CH1-CH2)/del_x#\n", + "N_H= Dhp*(CH1-CH2)/del_x # in kg mole/s-m**2\n", + "print \"Molar diffusion flux of hydrogen through the membrane = %0.2e kg mole/s-m**2\" %N_H\n", + "#Mass_d_Flux= N_H*Molecular_Weight \n", + "Molecular_Weight=2#\n", + "Mass_d_Flux= N_H*Molecular_Weight \n", + "print \"Molar diffusion flux = %0.3e kg/s-m**2\" %Mass_d_Flux" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Molar diffusion flux of hydrogen through the membrane = 1.08e-06 kg mole/s-m**2\n", + "Molar diffusion flux = 2.160e-06 kg/s-m**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 10.2 - Page No. : 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T=25 # in degree C\n", + "T=T+273 # in K\n", + "P=1#\n", + "V1=12 #Molecular volume of H2 in cm**3/gm mole\n", + "V2=30 #Molecular volume of Air in cm**3/gm mole\n", + "M1=2 # Molecular weight of H2\n", + "M2=29 # Molecular weight of Air\n", + "#The diffusion coefficient for gases in terms of molecular volumes may be express as\n", + "D_AB= .0043*T**(3/2)/(P*(V1**(1/3)+V2**(1/3)))*(1/M1+1/M2)**(1/2)#\n", + "print \"The diffusion coefficient for gases in terms of molecular volumes = %0.3f cm**2/sec\" %D_AB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The diffusion coefficient for gases in terms of molecular volumes = 2.997 cm**2/sec\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 10.3 - Page No. : 322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "T=300 # temp of gas mixture in K\n", + "D_HN2=18*10**-6 # in m**2/s at 300 K, 1 bar\n", + "T1=300 # in K\n", + "D_HO2=16*10**-6 # in m**2/s at 273 K, 1 bar\n", + "T2=273 # in K\n", + "O_2=0.2#\n", + "N_2=0.7#\n", + "H_2=0.1#\n", + "#The diffusivity at the mixture temperature and pressure are calculated as \n", + "# D1/D2 = (T1/T2)**(3/2)*(P2/P1)\n", + "D_HO2= (T/T2)**(3/2)*1/4*D_HO2#\n", + "D_HN2= (T/T1)**(3/2)*1/4*D_HN2#\n", + "#The composition of oxygen and nitrogen on a H2 free basis is \n", + "x_O= O_2/(1-H_2)#\n", + "x_N= N_2/(1-H_2)#\n", + "\n", + "# The effective diffusivity for the gas mixture at given temperature and pressure is\n", + "D= 1/(x_O/D_HO2+x_N/D_HN2) # in m**2/s\n", + "print \"Effective diffusivity = %0.3e m**2/s\" %D" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Effective diffusivity = 4.524e-06 m**2/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 10.4 - Page No. : 323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from numpy import pi\n", + "# Given data\n", + "d=3 # in mm\n", + "d=d*10**-3 # in meter\n", + "T=25 # in \u00b0C\n", + "T=T+273 # in K\n", + "D= 0.4*10**-4 # in m**2/s\n", + "R= 8314#\n", + "P_A1=1 # in atm\n", + "P_A1=P_A1*10**5 # in w/m**2\n", + "P_A2=0#\n", + "C_A2=0#\n", + "x2= 15 # in meter\n", + "x1= 0#\n", + "A= pi/4*d**2#\n", + "M_A= D*A/(R*T)*(P_A1-P_A2)/(x2-x1) # in kg mole/sec\n", + "N_B= M_A#\n", + "M_B= M_A*29 # in kg/sec\n", + "print \"Value of N_B = %0.3e kg mole/sec\" %N_B\n", + "print \"Value of M_B = %0.3e kg /sec\" %M_B" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of N_B = 7.608e-13 kg mole/sec\n", + "Value of M_B = 2.206e-11 kg /sec\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 10.5 - Page No. : 325" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "# Given data\n", + "P=3 # in atm\n", + "P=P*10**5 # in N/m**2\n", + "r1=10 # in mm\n", + "r1=r1*10**-3 # in m\n", + "r2=20 # in mm\n", + "r2=r2*10**-3 # in m\n", + "R=4160 # in J/kg-K\n", + "T=303 # in K\n", + "D=3*10**-8 # in m**2/s\n", + "S=3*0.05# # Solubility of hydrogen at a pressure of 3 atm in m**3/m**3 of rubber tubing\n", + "del_x=r2-r1 # in m\n", + "L=1 # in m\n", + "Am=2*pi*L*del_x/log(r2/r1)#\n", + "#Formula P*V= m*R*T\n", + "V=S#\n", + "m=P*V/(R*T) # in kg/m**3 of rubber tubing at the inner surface of the pipe\n", + "C_A1=m#\n", + "C_A2=0#\n", + "#Diffusion flux through the cylinder is given\n", + "M=D*(C_A1-C_A2)*Am/del_x#\n", + "print \"Diffusion flux through the cylinder = %0.2e kg/sm\" %M" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diffusion flux through the cylinder = 9.71e-09 kg/sm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 10.6 - Page No. : 329" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "R=4160 # in J/kg-K\n", + "M=2#\n", + "D_AB=1.944*10**-8 # in m**2/s\n", + "R_H2=R/M#\n", + "S=2*0.0532# # Solubility of hydrogen at a pressure of 2 atm in cm**3/cm**3 of pipe\n", + "P=2 # in atm\n", + "P=P*1.03*10**5 # N/m**2\n", + "T=25 # in degree C\n", + "T=T+273 # in K\n", + "r1=2.5 # in mm\n", + "r1=r1*10**-3 # in m\n", + "r2=5 # in mm\n", + "r2=r2*10**-3 # in m\n", + "del_x=r2-r1 # in m\n", + "L=1 # in m\n", + "#Formula P*V= m*R*T\n", + "V=S#\n", + "m=P*V/(R*T) # in kg/m**3 of pipe\n", + "# So, Concentration of H2 at inner surface of the pipe\n", + "C_A1=0.0176 # in kg/m**3\n", + "# The resistance of diffusion of H2 away from the outer surface is negligible i.e.\n", + "C_A2=0#\n", + "Am=2*pi*L*del_x/log(r2/r1)#\n", + "# Loss of H2 by diffusion \n", + "M_A= D_AB*(C_A1-C_A2)*Am/del_x#\n", + "print \"Loss of H2 by diffusion = %0.2ef kg/s\" %M_A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Loss of H2 by diffusion = 3.10e-09f kg/s\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example No : 10.7 - Page No. : 330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# Given data\n", + "Px1= 0.14 # in bar\n", + "Px2= 0#\n", + "P=1.013 # in bar\n", + "Py1=P-Px1# # in bar\n", + "Py2=P-Px2# # in bar\n", + "D=8.5*10**-6 # in m**2/s\n", + "d=5 # diameter in meter\n", + "L=1 # in mm\n", + "L=L*10**-3 #in meter\n", + "M=78 # molecular weight\n", + "Am_x= 1/4*pi*d**2*M#\n", + "R=8314#\n", + "del_x=3 # thickness in mm\n", + "del_x=del_x*10**-3 # in m\n", + "T=20 # in degree C\n", + "T=T+273 # in K\n", + "P=P*10**5 # in N/m**2\n", + "m_x= D*Am_x*P*log(Py2/Py1)/(R*T*del_x)#\n", + "# The mass of the benzene to be evaporated\n", + "mass= 1/4*pi*d**2*L#\n", + "density=880 # in kg/m**3\n", + "m_b= mass*density#\n", + "toh=m_b/m_x # in sec\n", + "print \"Time taken for the entire organic compound to evaporate = %0.0f seconds\" %toh\n", + "\n", + "\n", + "# Note: Answer in the book is wrong" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken for the entire organic compound to evaporate = 644 seconds\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |