diff options
author | hardythe1 | 2015-06-11 17:31:11 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-11 17:31:11 +0530 |
commit | 79c59acc7af08ede23167b8455de4b716f77601f (patch) | |
tree | 2d6ff34b6f131d2671e4c6b798f210b3cb1d4ac7 /Thermal_Engineering_by_K_K_Ramalingam | |
parent | df60071cf1d1c18822d34f943ab8f412a8946b69 (diff) | |
download | Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.tar.gz Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.tar.bz2 Python-Textbook-Companions-79c59acc7af08ede23167b8455de4b716f77601f.zip |
add books
Diffstat (limited to 'Thermal_Engineering_by_K_K_Ramalingam')
-rwxr-xr-x | Thermal_Engineering_by_K_K_Ramalingam/Chapter1.ipynb | 1978 | ||||
-rwxr-xr-x | Thermal_Engineering_by_K_K_Ramalingam/Chapter10.ipynb | 419 | ||||
-rwxr-xr-x | Thermal_Engineering_by_K_K_Ramalingam/Chapter7.ipynb | 1461 | ||||
-rwxr-xr-x | Thermal_Engineering_by_K_K_Ramalingam/Chapter8.ipynb | 289 | ||||
-rwxr-xr-x | Thermal_Engineering_by_K_K_Ramalingam/Chapter9.ipynb | 1013 |
5 files changed, 5160 insertions, 0 deletions
diff --git a/Thermal_Engineering_by_K_K_Ramalingam/Chapter1.ipynb b/Thermal_Engineering_by_K_K_Ramalingam/Chapter1.ipynb new file mode 100755 index 00000000..b1f558ad --- /dev/null +++ b/Thermal_Engineering_by_K_K_Ramalingam/Chapter1.ipynb @@ -0,0 +1,1978 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1 - Gas Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 - pg 1.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The pressures at 1 is (bar) = 1.0\n",
+ "(b)The pressures at 2 is (bar) = 12.0\n",
+ "(c)The pressures at 3 is (bar) = 22.38\n",
+ "(d)The pressures at 4 is (bar) = 1.86\n",
+ "(e)Temperature at 1 is (K) = 300.0\n",
+ "(f)Temperature at 2 is (K) = 610.2\n",
+ "(g)Temperature at 3 is (K) = 1138.0\n",
+ "(h)Temperature at 4 is (K) = 559.0\n",
+ "(i)Volume at 1 is (m^3) = 0.5\n",
+ "(j)Volume at 1 is (m^3) = 0.08475\n",
+ "(h)Volume at 1 is (m^3) = 0.08475\n",
+ "(k)Volume at 1 is (m^3) = 0.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.29\n",
+ "#calculate the pressure and temperature in all cases\n",
+ "import math\n",
+ "#Input data\n",
+ "V1=0.5;#Initial Volume before the commencement of compression in m**3\n",
+ "P1=1.;#Initial pressure before the commencement of compression in bar\n",
+ "T1=300.;#Initial temperature in K\n",
+ "P2=12.;#Final pressure at the end of compression stroke in bar\n",
+ "Q=220.;#Heat added during the constant volume process in kJ\n",
+ "r=1.4;#Isentropic constant for air\n",
+ "R=0.287;#Characteristic Gas constant in kJ/kg K\n",
+ "Cv=0.718;#Specific heat of mixture in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "r1=(P2/P1)**(1/r);#Compression ratio\n",
+ "T2=T1*(r1)**(r-1);#Final temperature after the end of compression stroke in K\n",
+ "V2=(P1*T2*V1)/(P2*T1);#Final volume after the end of compression stroke in m**3\n",
+ "m=(P1*10**5*V1)/(R*T1*1000);#Mass of air flowing in kg\n",
+ "T3=(Q/(m*Cv))+T2;#Temperature after constant volume heat addition in K\n",
+ "P3=(P2*T3)/T2;#Pressure after constant volume heat addition in K\n",
+ "V3=V2;#Volume at 3\n",
+ "P4=P3*(1/r1)**(r);#Pressure after isentropic expansion in bar\n",
+ "V4=V1;#Volume after isentropic expansion in m**3\n",
+ "T4=T3*(1/r1)**(r-1);#Temperature at the end of isentropic expansion in K\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The pressures at 1 is (bar) = ',round(P1,2)\n",
+ "print '(b)The pressures at 2 is (bar) = ',round(P2,2)\n",
+ "print '(c)The pressures at 3 is (bar) = ',round(P3,2)\n",
+ "print '(d)The pressures at 4 is (bar) = ',round(P4,2)\n",
+ "print '(e)Temperature at 1 is (K) = ',round(T1,2)\n",
+ "print '(f)Temperature at 2 is (K) = ',round(T2,1)\n",
+ "print '(g)Temperature at 3 is (K) = ',round(T3,0)\n",
+ "print '(h)Temperature at 4 is (K) = ',round(T4,0)\n",
+ "print '(i)Volume at 1 is (m^3) = ',round(V1,2)\n",
+ "print '(j)Volume at 1 is (m^3) = ',round(V2,5)\n",
+ "print '(h)Volume at 1 is (m^3) = ',round(V3,5)\n",
+ "print '(k)Volume at 1 is (m^3) = ',round(V4,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 - pg 1.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The increase in efficiency due to change in compression ratio from 6 to 7 is (percent) = 2.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.31\n",
+ "#calculate the increase in efficiency\n",
+ "#Input data\n",
+ "r1=6.;#Initial compression ratio\n",
+ "r2=7.;#Final compression ratio\n",
+ "r=1.4;#Isentropic coefficient of air\n",
+ "\n",
+ "#Calculations\n",
+ "nr1=(1-(1/r1)**(r-1))*100;#Otto cycle efficiency when compression ratio is 6 in percentage\n",
+ "nr2=(1-(1/r2)**(r-1))*100;#Otto cycle efficiency when compression ratio is 7 in percentage\n",
+ "n=nr2-nr1;#Increase in efficiency in percentage\n",
+ "\n",
+ "#Output\n",
+ "print 'The increase in efficiency due to change in compression ratio from 6 to 7 is (percent) = ',round(n,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 - pg 1.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The compression ratio is 5.007 \n",
+ "(b)Efficiency of the Otto cycle is (percent) = 47.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.31\n",
+ "#calculate the compression ratio and Efficiency of Otto cycle\n",
+ "#Input data\n",
+ "T1=315.;#Temperature at the beginning of isentropic compression in K\n",
+ "T2=600.;#Temperature at the end of isentropic compression in K\n",
+ "r=1.4;#Isentropic constant of air\n",
+ "\n",
+ "#Calculations\n",
+ "r1=(T2/T1)**(1/(r-1));#Compression ratio\n",
+ "n=(1-(1/r1**(r-1)))*100;#Efficiency of Otto cycle in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The compression ratio is ',round(r1,3),'\\n(b)Efficiency of the Otto cycle is (percent) = ',n\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 - pg 1.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The air standard efficiency of air is (percent) = 47.43\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.32\n",
+ "#calculate the standard efficiency of air\n",
+ "#Input data\n",
+ "D=0.1;#Diameter of the cylinder in m\n",
+ "L=0.15;#Stroke length in m\n",
+ "Vc=0.295*10**-3;#Clearance volume in m**3\n",
+ "r=1.4;#Isentropic constant of air\n",
+ "\n",
+ "#Calculations\n",
+ "Vs=(3.14/4)*(D**2*L);#Swept volume in m**3\n",
+ "r1=(Vc+Vs)/Vc;#Compression ratio\n",
+ "n=(1-(1/r1)**(r-1))*100.;#Otto cycle efficiency in percentage\n",
+ "\n",
+ "#Output\n",
+ "print 'The air standard efficiency of air is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 - pg 1.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Compression ratio is 7.56\n",
+ "(b)The air standard efficiency is (percent) = 55.5\n",
+ "(c)Mean effective pressure is (bar) = 4.86\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.33\n",
+ "#calculate the compression ratio, standard air efficiency and Mean effective pressure\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of air in bar\n",
+ "T1=300.;#Initial temperature in K\n",
+ "P2=17.;#Pressure at the end of isentropic compression in bar\n",
+ "P3=40.;#Pressure at the end of constant volume heat addition in bar\n",
+ "Cv=0.717;#Specific heat of mixture in kJ/kg K\n",
+ "M=28.97;#Molecular weight in kg\n",
+ "Ru=8.314;#Universial gas constant in kJ/kg mole K\n",
+ "m=1.;#Mass from which heat is extracted in kg\n",
+ "W=363.;#Work done in kN m\n",
+ "\n",
+ "#Calculations\n",
+ "Rc=Ru/M;#Characteristic gas constant in kJ/kg K\n",
+ "Cp=Rc+Cv;#Specific heat at constant pressure in kJ/kg K\n",
+ "r=Cp/Cv;#Isentropic gas constant\n",
+ "r1=(P2/P1)**(1/r);#Compression ratio\n",
+ "na=(1-(1/r1)**(r-1))*100;#Air standard efficiency in percentage\n",
+ "T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of isentropic compression process in K\n",
+ "T3=(P3/P2)*T2;#Temperature at the end of constant volume heat addition in K\n",
+ "Q=m*Cv*(T3-T2);#Heat supplied in kJ/kg\n",
+ "V1=(m*Rc*T1*1000)/(P1*10**5);#Initial volume before compression in m**3\n",
+ "V2=V1/r1;#Volume at the end of compression stroke in m**3\n",
+ "Vs=V1-V2;#Stroke volume in m**3\n",
+ "MEP=(W/Vs)/100;#Mean effective pressure in bar\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Compression ratio is',round(r1,2)\n",
+ "print '(b)The air standard efficiency is (percent) = ',round(na,1)\n",
+ "print '(c)Mean effective pressure is (bar) = ',round(MEP,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6 - pg 1.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Clearance volume as percentage of stroke volume is (percent) = 23.93\n",
+ "(b)Compression ratio is = 5.18\n",
+ "(c)Air standard efficiency is (percent) = 48.2\n",
+ "(d)Work done per cycle is (kJ) = 101.23\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.34\n",
+ "#calculate the clearance volume, compression ratio, standard efficiency, work done\n",
+ "#Input data\n",
+ "V1=0.6;#Initial volume of an engine working on otto cycle in m**3\n",
+ "P1=1.;#Initial pressure in bar\n",
+ "T1=308.;#Initial temperature in K\n",
+ "P2=10.;#Pressure at the end of compression stroke in bar\n",
+ "Q=210.;#Heat added during constant heat process in kJ\n",
+ "r=1.4;#Isentropic constant of air\n",
+ "\n",
+ "#Calculations\n",
+ "r1=(P2/P1)**(1/r);#Compression ratio\n",
+ "V2=V1/r1;#Clearance volume in m**3\n",
+ "C=(V2/(V1-V2))*100;#Percentage clearance in percent\n",
+ "na=(1-(1/r1)**(r-1))*100;#Air standard efficiency in percent\n",
+ "W=Q*(na/100);#Work done per cycle in kJ\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Clearance volume as percentage of stroke volume is (percent) = ',round(C,2)\n",
+ "print '(b)Compression ratio is = ',round(r1,2)\n",
+ "print '(c)Air standard efficiency is (percent) = ',round(na,1)\n",
+ "print '(d)Work done per cycle is (kJ) = ',round(W,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 - pg 1.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ideal power developed by the engine is (kW) = 1030.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.36\n",
+ "#calculate the Ideal power\n",
+ "#Input data\n",
+ "r=5.5;#Compression ratio of an engine working on the otto cycle\n",
+ "Q=250.;#Heat supplied during constant volume in kJ\n",
+ "N=500.;#Engine operating speed in rpm\n",
+ "r1=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "n=(1-(1/r)**(r1-1))*100;#Otto cycle efficiency in percent\n",
+ "W=Q*(n/100);#Work done per cycle in kJ\n",
+ "P=W*(N/60);#Work done per second i.e., Power developed in kJ/s or kW\n",
+ "\n",
+ "#Output data\n",
+ "print 'Ideal power developed by the engine is (kW) = ',round(P,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8 - pg 1.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mean effective pressure is (bar) = 2.377\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.36\n",
+ "#calculate the Mean effective pressure\n",
+ "#Input data\n",
+ "V1=0.53;#Volume of cylinder of an engine working on Otto cycle in m**3\n",
+ "V2=0.1;#Clearance volume in m**3\n",
+ "Q=210.;#Heat supplied during constant volume in kJ\n",
+ "r=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "r1=V1/V2;#Compression ratio\n",
+ "n=(1-(1/r1)**(r-1))*100;#Otto cycle efficiency in percentage\n",
+ "W=Q*(n/100);#Work done per cycle in kJ\n",
+ "P=W/((V1-V2)*100);#Mean effective pressure in bar\n",
+ "\n",
+ "#Output data\n",
+ "print 'Mean effective pressure is (bar) = ',round(P,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10 - pg 1.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Maximum power developed by the engine is (kW) = 2.194\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.38\n",
+ "#calculate the Maximum power\n",
+ "#Input data\n",
+ "T3=1500.;#Upper temperature limit of a otto cycle in K\n",
+ "T1=300.;#Lower temperature limit in K\n",
+ "a=0.4;#Rate of flow of air through the cycle in kg/min\n",
+ "Cv=0.718;#\n",
+ "\n",
+ "#Calculations\n",
+ "T2=(T1*T3)**(1./2);#Temperature at point 2 in K\n",
+ "T4=T2;#Temperature at point 4 in K\n",
+ "W=Cv*((T3-T2)-(T4-T1));#Work done per cycle in kJ/kg\n",
+ "P=W*(a/60);#Maximum power developed by the engine in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'Maximum power developed by the engine is (kW) = ',round(P,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11 - pg 1.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Thermal efficiency when cut off ratio is 1.25 is (percent) = 65.4\n",
+ "(b)Thermal efficiency when cut off ratio is 1.50 is (percent) = 64.0\n",
+ "(c)Thermal efficiency when cut off ratio is 2.00 is (percent) = 61.4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.39\n",
+ "#calculate the Thermal efficiency in all cases\n",
+ "#Input data\n",
+ "r=1.4;#Air standard ratio\n",
+ "p1=1.25;#Cut off ratio 1\n",
+ "p2=1.50;#Cut off ratio 2\n",
+ "p3=2.00;#Cut off ratio 3\n",
+ "rc=16;#Compression ratio\n",
+ "\n",
+ "#Calculations\n",
+ "n1=(1-((1/rc**(r-1)*(p1**r-1)/(r*(p1-1)))))*100;#Thermal efficiency of the diesel cycle for cut off ratio 1.25\n",
+ "n2=(1-((1/rc**(r-1)*(p2**r-1)/(r*(p2-1)))))*100;#Thermal efficiency of the diesel cycle for cut off ratio 1.50\n",
+ "n3=(1-((1/rc**(r-1)*(p3**r-1)/(r*(p3-1)))))*100;#Thermal efficiency of the diesel cycle for cut off ratio 2.00\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Thermal efficiency when cut off ratio is 1.25 is (percent) = ',round(n1,1)\n",
+ "print '(b)Thermal efficiency when cut off ratio is 1.50 is (percent) = ',round(n2,1)\n",
+ "print '(c)Thermal efficiency when cut off ratio is 2.00 is (percent) = ',round(n3,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12 - pg 1.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Air standard efficiency of the diesel cycle is (percent) = 61.94\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.40\n",
+ "#calculate the Air standard efficiency\n",
+ "r=15.;#Compression ratio of a diesel engine\n",
+ "Q=5.;#Heat supplied upto 5 percent of the stroke\n",
+ "r1=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "p=1+(Q/100)*(r-1);#Cut off ratio\n",
+ "n=(1-((1/r**(r1-1)*(p**r1-1)/(r1*(p-1)))))*100;#Efficiency of diesel cycle in percent\n",
+ "\n",
+ "#Output\n",
+ "print 'Air standard efficiency of the diesel cycle is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13 - pg 1.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Air standard efficiency is (percent) = 66.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.40\n",
+ "#calculate the air standard efficiency\n",
+ "#Input data\n",
+ "r=17.;#Compression ratio of a diesel engine\n",
+ "e=13.5;#Expansion ratio\n",
+ "r1=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "p=r/e;#Cut off ratio\n",
+ "n=(1-((1/r**(r1-1)*(p**r1-1)/(r1*(p-1)))))*100;#Air standard efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print 'Air standard efficiency is (percent) = ',round(n,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14 - pg 1.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Compression ratio = 14.45\n",
+ "(b)Cut off ratio = 2.49\n",
+ "(c)Ideal efficiency of the diesel cycle is (percent) = 54.78\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.41\n",
+ "#calculate the compression ratio, cut off ratio and Ideal efficiency\n",
+ "#Input data\n",
+ "T1=300.;#Temperature at the beggining of compression stroke in K\n",
+ "T2=873.;#Temperature at the end of compression stroke in K\n",
+ "T3=2173.;#Temperature at the beggining of expansion stroke in K\n",
+ "T4=1123.;#Temperature at the end of expansion stroke in K\n",
+ "r1=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "r=(T2/T1)**(1/(r1-1));#Compression ratio\n",
+ "rho=T3/T2;#Cut off ratio\n",
+ "n=(1-((1/r1)*((T4-T1)/(T3-T2))))*100;#Efficiency of diesel cycle in percent\n",
+ "\n",
+ "#Output data\n",
+ "print '(a)Compression ratio = ',round(r,2)\n",
+ "print '(b)Cut off ratio = ',round(rho,2)\n",
+ "print '(c)Ideal efficiency of the diesel cycle is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15 - pg 1.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Pressure at point 1 in the cycle is (bar) = 1.0\n",
+ "(b)Pressure at point 2 & 3 is (bar) = 57.3\n",
+ "(c)Pressure at point 4 is (bar) = 4.87\n",
+ "(d)Temperature at point 1 is (K) = 300.0\n",
+ "(e)Temperature at point 2 is (K0 = 955.0\n",
+ "(f)Temperature at point 3 is (K) = 2955.0\n",
+ "(g)Temperature at point 4 is (K) = 1460.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.42\n",
+ "#calculate the pressure at all points\n",
+ "#Input data\n",
+ "r=18.;#Compression ratio of diesel cycle\n",
+ "Q=2000.;#Heat added in kJ/kg\n",
+ "T1=300.;#Lowest temperature in the cycle in K\n",
+ "p1=1.;#Lowest pressure in the cycle in bar\n",
+ "Cp=1.;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "Cv=0.714;#Specific heat of air at constant volume in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "r1=Cp/Cv;#Isentropic ratio\n",
+ "v1=((1-Cv)*T1)/(p1*10**5);#Initial volume at point 1 in the graph in m**3/kg\n",
+ "v2=v1/r;#Volume at point 2 in m**3/kg\n",
+ "p2=p1*(v1/v2)**(r1);#Pressure at point 2 in bar\n",
+ "T2=T1*(v1/v2)**(r1-1);#Temperature at point 2 in K\n",
+ "T3=(Q/Cp)+T2;#Temperature at point 3 in K\n",
+ "v3=v2*(T3/T2);#Volume at point 3 in K\n",
+ "v4=v1;#Since Constant volume heat rejection in m**3/kg\n",
+ "T4=T3/(v4/v3)**(r1-1);#Temperature at point 4 in K for isentropic expansion\n",
+ "p4=p1*(T4/T1);#Pressure at point 4 in bar\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Pressure at point 1 in the cycle is (bar) = ',p1\n",
+ "print '(b)Pressure at point 2 & 3 is (bar) = ',round(p2,1)\n",
+ "print '(c)Pressure at point 4 is (bar) = ',round(p4,2)\n",
+ "print '(d)Temperature at point 1 is (K) = ',T1\n",
+ "print '(e)Temperature at point 2 is (K0 = ',round(T2,0)\n",
+ "print '(f)Temperature at point 3 is (K) = ',round(T3,0)\n",
+ "print '(g)Temperature at point 4 is (K) = ',round(T4,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16 - pg 1.43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Thermal efficiency is (percent) = 61.38\n",
+ "(b)Power developed is (kW) = 405.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.43\n",
+ "#calculate the Thermal efficiency and Power developed\n",
+ "#Input data\n",
+ "r=16.;#Compression ratio for the air standard diesel cycle\n",
+ "Q1=2200.;#Heat added in kJ/kg\n",
+ "T4=1500.;#Temperature at the end of isentropic expansion in K\n",
+ "T1=310.;#Lowest temperature in the cycle in K\n",
+ "m=0.3;#Air flow rate in kg/sec\n",
+ "Cv=0.714;#Specific heat at constant volume in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "Q2=Cv*(T4-T1);#Heat rejected in kJ/kg\n",
+ "n=((Q1-Q2)/Q1)*100;#Efficiency in percent\n",
+ "P=m*(Q1-Q2);#Power developed in kW\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Thermal efficiency is (percent) =',round(n,2)\n",
+ "print '(b)Power developed is (kW) = ',round(P,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17 - pg 1.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Air standard efficiency of the cycle is (percent) = 55.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.44\n",
+ "#calculate the air standard efficiency of the cycle\n",
+ "#Input data\n",
+ "T1=303;#Temperature at the beginning of compression in K\n",
+ "T2=823;#Temperature at the end of compression in K\n",
+ "T3=3123;#Temperature at the end of heat addition in K\n",
+ "T4=1723;#Temperature at the end of isentropic expansion in K\n",
+ "r=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "n=(1-((T4-T1)/(r*(T3-T2))))*100;#Efficiency of the cycle in percent\n",
+ "\n",
+ "#Output\n",
+ "print 'Air standard efficiency of the cycle is (percent) = ',round(n,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18 - pg 1.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mean effective pressure of the cycle is (bar) = 5.44\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.45\n",
+ "#calculate the Mean effective pressure\n",
+ "#Input data\n",
+ "r=15.;#Compression Ratio of a diesel engine\n",
+ "P1=1.;#Operating Pressure of a diesel engine in bar\n",
+ "r1=1.4;#Isentropic constant\n",
+ "V1=15.;#Volume at the start of compression stroke in m**3\n",
+ "V3=1.8;#Volume at the end of constant Pressure heat addition in m**3\n",
+ "V2=1.;#Volume at the end of isentropic compression stroke in m**3\n",
+ "\n",
+ "#Calculations\n",
+ "Vs=V1-V2;#Swept volume in m**3\n",
+ "V4=V1;#Volume at the end of Isentropic expansion stroke in m**3\n",
+ "P2=P1*(r)**r1;#Pressure at the end of Isentropic compression of air\n",
+ "P3=P2;#Pressure at the end of constant pressure heat addition in bar\n",
+ "P4=P3*(V3/V4)**r1;#Pressure at the end of Isentropic expansion stroke in bar\n",
+ "Pm=(V2/Vs)*(P2*((V3/V2)-1)+(P3*(V3/V2)-P4*(V4/V2))/(r1-1)-(P2-P1*(V1/V2))/(r1-1));#Mean effective pressure in bar\n",
+ " \n",
+ "#Output\n",
+ "print 'Mean effective pressure of the cycle is (bar) = ',round(Pm,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19 - pg 1.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Compression ratio of the engine = 23.454\n",
+ "(b)Air standard efficiency is (percent) = 63.48\n",
+ "The answers are a bit different due to rounding off error in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.46\n",
+ "#calculate the compression ratio and air standard efficiency\n",
+ "#Input data\n",
+ "P1=1.5;#Pressure at the 7/8th stroke of compression in bar\n",
+ "P2=16;#Pressure at the 1/8th stroke of compression in bar\n",
+ "n=1.4;#Polytropic index\n",
+ "c=8.;#Cutoff occurs at 8% of the stroke in percentage\n",
+ "\n",
+ "#Calculations\n",
+ "R1=(P2/P1)**(1./n);#Ratio of volumes\n",
+ "R2=(R1-1.)/((7./8)-(R1/8.));#Ratio of stroke volume to the clearance volume\n",
+ "r=1.+R2;#Compression ratio\n",
+ "rho=1+((c/100.)*r);#Cut off ratio\n",
+ "na=(1-((1./r**(n-1))*(((rho**n)-1.)/(n*(rho-1)))))*100;#Air standard efficiency in percentage\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Compression ratio of the engine = ',round(r,3)\n",
+ "print '(b)Air standard efficiency is (percent) = ',round(na,2)\n",
+ "print 'The answers are a bit different due to rounding off error in textbook'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 20 - pg 1.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The loss in efficiency is (percent) = 2.15\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.47\n",
+ "#calculate the loss in efficiency\n",
+ "#Input data\n",
+ "r=16.;#Compression ratio of diesel engine\n",
+ "r1=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "rho1=1+(r-1)*(6./100);#Cutoff ratio at 6% of stroke\n",
+ "rho2=1+(r-1)*(9./100);#Cutoff ratio at 9% of stroke\n",
+ "n1=(1-(1/r**(r1-1))*(1/r1)*(rho1**r1-1)/(rho1-1))*100;#Efficiency of the cycle at 6% of the stroke in percent\n",
+ "n2=(1-(1/r**(r1-1))*(1/r1)*(rho2**r1-1)/(rho2-1))*100;#Efficiency of the cycle at 9% of the stroke in percent\n",
+ "L=n1-n2;#The loss in efficiency in percent\n",
+ "\n",
+ "#Output \n",
+ "print 'The loss in efficiency is (percent) = ',round(L,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21 - pg 1.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Compression ratio = 13.65\n",
+ "(b)Temperature at the end of compression is (K) = 862.0\n",
+ "(c)Temperature at the end of comstant pressure heat addition is (K) = 1410.0\n",
+ "(d)Air standard efficiency is (percent) = 60.84\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.48\n",
+ "#calculate the compression ratio, temperature in all cases\n",
+ "#Input data\n",
+ "P1=1.03;#Pressure at the beginning of compression stroke in bar\n",
+ "T1=303.;#Initial temperature in K\n",
+ "P2=40.;#Maximum pressure in the cycle in bar\n",
+ "Q=550.;#The heat supplied during the cycle in kJ/kg\n",
+ "r=1.4;#Isentropic compression ratio\n",
+ "Cp=1.004;#Specific heat at constant pressure in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "r1=(P2/P1)**(1/r);#Compression ratio\n",
+ "T2=(P2/P1)**((r-1)/r)*T1;#Temperature at the end of compression stroke in K\n",
+ "T3=(Q/Cp)+T2;#Temperature at the end of heat addition in K\n",
+ "rho=T3/T2;#Cut off ratio\n",
+ "n=(1-(1/r1**(r-1))*(1/r)*(rho**r-1)/(rho-1))*100;#Air standard efficiency in percentage\n",
+ "\n",
+ "#Output\\n\n",
+ "print '(a)Compression ratio =',round(r1,2)\n",
+ "print '(b)Temperature at the end of compression is (K) =',round(T2,0)\n",
+ "print '(c)Temperature at the end of comstant pressure heat addition is (K) = ',round(T3,0)\n",
+ "print '(d)Air standard efficiency is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22 - pg 1.50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The air standard efficiency of an oil engine working on the combustion cycle is (percent) = 56.44\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.50\n",
+ "#calculate the air standard efficiency \n",
+ "#Input data\n",
+ "r=12.;#Compression ratio of an oil engine, working on the combustion cycle\n",
+ "r1=1.4;#Isentropic ratio\n",
+ "P1=1.;#Pressure at the beginning of compression\n",
+ "P3=35.;#Pressure at the end of constant volume heat addition in bar\n",
+ "\n",
+ "#Calculations\n",
+ "rho=1+(1/10.)*(r-1);#Cut off ratio at 1/10th of the stroke\n",
+ "P2=P1*(r)**r1;#Pressure at the end of isentropic compression in bar\n",
+ "a=P3/P2;#Pressure ratio\n",
+ "n=(1-(1/r**(r1-1))*(a*rho**r1-1)/((a-1)+(r1*a*(rho-1))))*100;#Air standard efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print 'The air standard efficiency of an oil engine working on the combustion cycle is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23 - pg 1.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Temperature at the end of constant volume heat addition is (C) = 938.85\n",
+ "(b)Cut off ratio = 1.38\n",
+ "The answer for cut off ratio is wrong in textbook. It doesnt convert C to kelvins\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.51\n",
+ "#calculate the temperature and cut off ratio\n",
+ "#Input data\n",
+ "P1=1.;#Pressure at the beginning of compression stroke of an oil engine working on a air standard dual cycle in bar\n",
+ "T1=303.;#Temperature at the beginning of compression stroke in K\n",
+ "P3=40.;#The maximum pressure reached in bar\n",
+ "T4=1673.;#Maximum temperature reached in K\n",
+ "Cp=1.004;#Specific heat at constant pressure in kJ/kg K\n",
+ "Cv=0.717;#Specific heat at constant volume in kJ/kg K\n",
+ "r1=10.;#Compression ratio\n",
+ "\n",
+ "#Calculations\n",
+ "P4=P3;#Pressure at the start of constant pressure heat addition in bar\n",
+ "r=Cp/Cv;#Isentropic ratio\n",
+ "T2=T1*r1**(r-1);#Temperature at the end of compression stroke in K\n",
+ "P2=P1*r1**r;#Pressure at the end of compression stroke in bar\n",
+ "T3=T2*(P3/P2);#Temperature at the end of constant volume heat addition in K\n",
+ "rho=T4/T3;#Cut off ratio\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Temperature at the end of constant volume heat addition is (C) = ',T3-273.15\n",
+ "print '(b)Cut off ratio = ',round(rho,2)\n",
+ "print 'The answer for cut off ratio is wrong in textbook. It doesnt convert C to kelvins'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24 - pg 1.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The work done per kg of air is (kJ) = 412.9\n",
+ "(b)Cycle efficiency is (percent) = 58.07\n",
+ "The answers are a bit different due to rounding off error in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.52\n",
+ "#calculate the work done and cycle efficiency\n",
+ "#Input data\n",
+ "P1=1.;#pressure at the beginning of compression stroke in bar\n",
+ "T1=298.;#Temperature at the beginning of compression stroke in K\n",
+ "P3=38.;#Pressure at the end of constant volume heat addition in bar\n",
+ "T4=1573.;#Temperature at the end of constant volume heat addition in K\n",
+ "r=9.5;#Compression ratio\n",
+ "Cp=1.004;#Specific heat of air at constant pressure\n",
+ "Cv=0.717;#Specific heat of air at constant volume\n",
+ "\n",
+ "#Calculations\n",
+ "r1=Cp/Cv;#Isentropic ratio\n",
+ "T2=T1*r**(r1-1);#Temperature at the end of compression stroke in K\n",
+ "P2=P1*r**r1;#Pressure at the end of compression stroke in bar\n",
+ "T3=T2*(P3/P2);#Temperature at the end of constant volume heat addition in K\n",
+ "rho=T4/T3;#Cut off ratio\n",
+ "T5=T4*(rho/r)**(r1-1);#Temperature at the end of expansion stroke in K\n",
+ "Qs=Cv*(T3-T2)+Cp*(T4-T3);#Heat supplied per kg in kJ\n",
+ "Qr=Cv*(T5-T1);#Heat rejected per kg in kJ\n",
+ "W=Qs-Qr;#Work done per kg of air in kJ\n",
+ "n=(W/Qs)*100;#Efficiency of the air standard dual cycle in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The work done per kg of air is (kJ) = ',round(W,1)\n",
+ "print '(b)Cycle efficiency is (percent) = ',round(n,2)\n",
+ "print 'The answers are a bit different due to rounding off error in textbook'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25 - pg 1.53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Pressure at the end of compression stroke is (bar) = 26.9\n",
+ "(b)Temperature at the end of compression stroke is (K) = 943.2\n",
+ "(c)Temperature at the end of constant volume heat addition is (K) = 2278.1\n",
+ "(d)Temperature at the end of constant pressure heat addition is (K) = 2968.22\n",
+ "(e)Temperature at the end of expansion stroke is (K) = 1287.47\n",
+ "(e)Pressure at the end of expansion stroke is (bar) = 3.5\n",
+ "(f)Efficiency of the cycle is (percent) = 60.04\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.53\n",
+ "#calculate the pressure, Temperature in all cases and Efficiency\n",
+ "#Input data\n",
+ "r=10.5;#Compression ratio\n",
+ "P3=65.;#Maximum pressure in bar\n",
+ "qs=1650.;#Heat supplied in kJ/kg\n",
+ "P1=1.;#Pressure at the beginning of compression stroke in bar\n",
+ "T1=368.;#Temperature at the beginning of compression stroke in K\n",
+ "Cp=1.004;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "Cv=0.717;#Specific heat of air at constant volume in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "P4=P3;#Pressure at the end of constant volume heat addition in bar\n",
+ "r1=Cp/Cv;#Compression ratio\n",
+ "P2=P1*r**r1;#Pressure at the end of compression stroke in bar\n",
+ "T2=T1*r**(r1-1);#Temperature at the end of compression stroke in K\n",
+ "T3=T2*(P3/P2);#Temperature at the end of constant volume heat addition in K\n",
+ "qv=Cv*(T3-T2);#Heat supplied at constant volume in kJ/kg\n",
+ "qp=qs-qv;#Heat supplied at constant pressure in kJ/kg\n",
+ "T4=(qp/Cp)+T3;#Temperature at the end of constant volume heat addition in K\n",
+ "rho=T4/T3;#Cut off ratio\n",
+ "T5=T4*(rho/r)**(r1-1);#Temperature at the end of expansion stroke in K\n",
+ "P5=P4*(rho/r)**r1;#Pressure at the end of expansion stroke in K\n",
+ "q=Cv*(T5-T1);#Heat rejected in kJ/kg\n",
+ "n=((qs-q)/qs)*100;#Efficiency of the cycle in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Pressure at the end of compression stroke is (bar) = ',round(P2,1)\n",
+ "print '(b)Temperature at the end of compression stroke is (K) = ',round(T2,1)\n",
+ "print '(c)Temperature at the end of constant volume heat addition is (K) = ',round(T3,2)\n",
+ "print '(d)Temperature at the end of constant pressure heat addition is (K) = ',round(T4,2)\n",
+ "print '(e)Temperature at the end of expansion stroke is (K) = ',round(T5,2)\n",
+ "print '(e)Pressure at the end of expansion stroke is (bar) = ',round(P5,2)\n",
+ "print '(f)Efficiency of the cycle is (percent) = ',round(n,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26 - pg 1.55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The air standard efficiency is (percent) = 44.88\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.55\n",
+ "#calculate the standard efficiency\n",
+ "#Input data\n",
+ "r=8.5;#Compression ratio\n",
+ "e=5.5;#Expansion ratio\n",
+ "P1=1;#Pressure at the beginning of compression stroke in bar\n",
+ "T1=313.;#Temperature at the beginning of compression stroke in K\n",
+ "n=1.3;#polytropic constant\n",
+ "Cp=1.004;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "Cv=0.717;#Specific heat of air at constant volume in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "rho=r/e;#Cut off ratio\n",
+ "T2=T1*r**(n-1);#Temperature at the end of compression stroke in K\n",
+ "T3=(2*Cv*T2)/(2*Cv-Cp*rho+1);#Temperature at the end of constant volume heat addition in K\n",
+ "T4=rho*T3;#Temperature at the end of constant pressure heat addition in K\n",
+ "a=T3/T2;#Pressure ratio i.e.,P3/P2\n",
+ "n1=(1-(1/r**(n-1))*(a*rho**n-1)/((a-1)+(n*a*(rho-1))))*100;#Air standard efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print 'The air standard efficiency is (percent) = ',round(n1,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27 - pg 1.56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The ideal thermal efficiency is (percent) = 59.18\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.56\n",
+ "#calculate the ideal thermal efficiency\n",
+ "#Input data\n",
+ "P1=1;#Initial pressure in a compression engine working on a dual combustion engine in bar\n",
+ "T1=300.;#Initial Temperature in K\n",
+ "P2=25.;#Pressure at the end of compression stroke in bar\n",
+ "Q=400.;#Heat supplied per kg of air during constant volume heating in kJ/kg\n",
+ "P5=2.6;#Pressure at the end of isentropic expansion in bar\n",
+ "Cp=1.005;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "Cv=0.715;#Specific heat of air at constant volume in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "r=Cp/Cv;#Isentropic index\n",
+ "r1=(P2/P1)**(1/r);#Compression ratio\n",
+ "T2=T1*(r1)**(r-1);#Temperature at the end of compression stroke in K\n",
+ "T3=(Q/Cv)+T2;#Temperature at the end of constant volume heat addition in K\n",
+ "a=T3/T2;#Pressure ratio\n",
+ "P3=a*P2;#Pressure ratio at the end of constant volume heat addition in bar\n",
+ "P4=P3;#Pressure at the end of constant pressure heat addition in bar\n",
+ "x=(P5/P4)**(1/r);#Ratio of volume at the end of constant pressure heat addition to the volume at the end of isentropic expansion\n",
+ "rho=x*(r1);#Cut off ratio\n",
+ "n=(1-(1/r1**(r-1))*(a*rho**r-1)/((a-1)+(r*a*(rho-1))))*100;#Air standard efficiency in percent of a dual combustion engine\n",
+ "\n",
+ "#Output\n",
+ "print 'The ideal thermal efficiency is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28 - pg 1.58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Temperature at the end of compression stroke is (K) = 914.0\n",
+ "(b)Temperature at the end of constant volume heat addition is (K) = 1828.0\n",
+ "(c)Temperature at the end of constant pressure heat addition is (K) = 3655.0\n",
+ "(d)Temperature at the end of isentropic expansion process is (K) = 1678.0\n",
+ "(e)Efficiency of the cycle is (percent) = 60.82\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.58\n",
+ "#calculate the temperature in all cases\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of an enfine working on a dual combustion cycle in bar\n",
+ "T1=318.;#Initial temperature before compression in K\n",
+ "r1=14.;#Compression ratio\n",
+ "r=1.4;#Isentropic index\n",
+ "a=2.;#Pressure ratio in the compression process\n",
+ "rho=2.;#Cut off ratio \n",
+ "\n",
+ "#Calculations\n",
+ "T2=T1*r1**(r-1);#Temperature at the end of compression stroke in K\n",
+ "T3=T2*a;#Temperature at the end of constant volume heat addition in K\n",
+ "T4=rho*T3;#Temperature at the end of constant pressure heat addition in K\n",
+ "T5=T4*(rho/r1)**(r-1);#Temperature at the end of isentropic compression in K\n",
+ "n=(1-((T5-T1)/(r*(T4-T3)+(T3-T2))))*100;#Efficiency of an engine working on a dual combustion cycle in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Temperature at the end of compression stroke is (K) = ',round(T2,0)\n",
+ "print '(b)Temperature at the end of constant volume heat addition is (K) = ',round(T3,0)\n",
+ "print '(c)Temperature at the end of constant pressure heat addition is (K) = ',round(T4,0)\n",
+ "print '(d)Temperature at the end of isentropic expansion process is (K) = ',round(T5,0)\n",
+ "print '(e)Efficiency of the cycle is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 29 - pg 1.59"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(1)Pressure ratio = 1.465\n",
+ "(2)Cut off ratio = 1.7\n",
+ "(3)Heat supplied per cycle is (kJ) = 15.0\n",
+ "(4)Heat rejected per cycle is (kJ) = 5.54\n",
+ "(5)Work done per cycle is (kJ) = 9.45\n",
+ "(6)Thermal efficiency of the cycle is (percent) = 63.0\n",
+ "(7)Mass of air contained in the cylinder is (kg) = 0.01204\n",
+ "(8)Mean effective pressure is (bar) = 9.45\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.59\n",
+ "#calculate the pressure ratio, cut off ratio, heat supplied, heat rejected, Work done, Thermal efficiency, Mass of air, Mean effective pressure\n",
+ "#Input data\n",
+ "r=15.;#Compression ratio\n",
+ "Vs=0.01;#Stroke volume in m**3\n",
+ "P1=1.;#Initial pressure in bar\n",
+ "T1=310.;#Initial temperature in K\n",
+ "P3=65.;#Pressure in constant pressure heat addition stroke in bar\n",
+ "Cp=1.;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "Cv=0.714;#Specific heat of air at constant volume in kJ/kg K\n",
+ "R=287.;#Molar gas constant\n",
+ "\n",
+ "#Calculations\n",
+ "r1=Cp/Cv;#Isentropic index\n",
+ "P2=P1*(r)**r1;#Pressure at the end of compression stroke in bar\n",
+ "a=P3/P2;#Pressure ratio\n",
+ "rho=1+((5./100)*(r-1))\n",
+ "V2=Vs/(r-1);#Volume at the end of compression stroke in m**3\n",
+ "V1=Vs+V2;#Initial volume in m**3\n",
+ "m=P1*10**5*V1/(R*T1);#Mass of air contained in the cylinder in kg\n",
+ "T2=T1*r**(r1-1);#Temperature at the end of compression stroke in K\n",
+ "a=P3/P2;#Pressure ratio\n",
+ "T3=T2*a;#Temperature at the end of constant volume heat addition in K\n",
+ "T4=T3*rho;#Temperature at the end of constant pressure heat addition in K\n",
+ "T5=T4/(r/rho)**(r1-1);#Temperature at the end of isentropic expansion in K\n",
+ "Qs=(Cv*(T3-T2)+Cp*(T4-T3))*m;#Heat supplied in kJ\n",
+ "Qr=m*Cv*(T5-T1);#Heat rejected in kJ\n",
+ "W=Qs-Qr;#Work done per cycle in kJ\n",
+ "n=(W/Qs)*100;#Efficiency of the cycle in percent\n",
+ "Mep=(W/Vs)/100;#Mean effective pressure in bar\n",
+ "\n",
+ "#Output\n",
+ "print '(1)Pressure ratio = ',round(a,3)\n",
+ "print '(2)Cut off ratio = ',rho \n",
+ "print '(3)Heat supplied per cycle is (kJ) = ',round(Qs,0)\n",
+ "print '(4)Heat rejected per cycle is (kJ) = ',round(Qr,2)\n",
+ "print '(5)Work done per cycle is (kJ) = ',round(W,2)\n",
+ "print '(6)Thermal efficiency of the cycle is (percent) = ',round(n,0)\n",
+ "print '(7)Mass of air contained in the cylinder is (kg) = ',round(m,5)\n",
+ "print '(8)Mean effective pressure is (bar) = ',round(Mep,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 30 - pg 1.62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Thermal efficiency of the turbine unit is (percent) = 38.56\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.62\n",
+ "#calculate the Thermal efficiency\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of air received by gas turbine plant in bar\n",
+ "T1=310.;#Initial tamperature in K\n",
+ "P2=5.5;#Pressure at the end of compression in bar\n",
+ "r=1.4;#isentropic index\n",
+ "\n",
+ "#Calculations\n",
+ "rp=P2/P1;#pressure ratio\n",
+ "n=(1-(1/rp)**((r-1)/r))*100;#Thermal efficiency of the turbine in percent\n",
+ "\n",
+ "#Output data\n",
+ "print 'Thermal efficiency of the turbine unit is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 31 - pg 1.62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power developed by the turbine assembly per kg of air supplied per second is (kW) = 242.51\n",
+ "The answer is a bit different from textbook due to rounding off error \n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.62\n",
+ "#calculate the Power developed\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of a simple closed cycle gas turbine plant in bar\n",
+ "T1=298.;#Initial temperature in K\n",
+ "P2=5.1;#Pressure of gas after compression in bar\n",
+ "T3=1123.;#Temperature at the end of compression in K\n",
+ "P4=1.;#Pressure of hot air after expansion in the turbine in bar\n",
+ "r=1.4;#Isentropic constant\n",
+ "Cp=1.005;#Specific heat of air in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "P3=P2;#Pressure at the end of constant pressure stroke\n",
+ "T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of process 1-2 in K\n",
+ "T4=T3*(P4/P3)**((r-1)/r);#Temperature at the end of process 3-4 in K\n",
+ "Wt=Cp*(T3-T4);#Work done by the turbine in kJ/kg\n",
+ "Wc=Cp*(T2-T1);#Work required by the compressor in kJ/kg\n",
+ "W=Wt-Wc;#Net work done by the turbine in kJ/kg\n",
+ "P=1*W;#Power developed by the turbine assembly per kg per second in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'Power developed by the turbine assembly per kg of air supplied per second is (kW) = ',round(P,2)\n",
+ "print 'The answer is a bit different from textbook due to rounding off error '\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 32 - pg 1.63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The maximum temperature of the cycle is (K) = 1148.97\n",
+ "(b)Cycle efficiency is (percent) = 41.42\n",
+ "The answers are a bit different from textbook due to rounding off error \n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.63\n",
+ "#calculate the maximum temperature and cycle efficiency\n",
+ "#Input data\n",
+ "P1=1.;#The pressure of air entering the compressor of a gas turbine plant operating on Brayton cycle in bar\n",
+ "T1=293.;#Initial temperature in K\n",
+ "r=6.5;#Pressure ratio of the cycle\n",
+ "r1=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "T2=T1*(r)**((r1-1)/r1);#Temperature at the end of compression in K\n",
+ "T4=2.3*(T2-T1)/0.708;#Temperature at point 4 in K\n",
+ "T3=T4*(r)**((r1-1)/r1);#Maximum temperature in K\n",
+ "n=(1-((T4-T1)/(T3-T2)))*100;#Turbine plant efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The maximum temperature of the cycle is (K) = ',round(T3,2)\n",
+ "print '(b)Cycle efficiency is (percent) = ',round(n,2)\n",
+ "print 'The answers are a bit different from textbook due to rounding off error '\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 33 - pg 1.64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The net power output of the installation is (kW) = 152.54\n",
+ "(b)Air fuel ratio is 108.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.64\n",
+ "#calculate the net power an dair fuel ratio\n",
+ "#Input data\n",
+ "P1=1.;#Pressure in an oil gas turbine installation in bar\n",
+ "T1=298.;#Initial Temperature in K\n",
+ "P2=4.;#Pressure after compression in bar\n",
+ "CV=42100.;#Calorific value of oil in kJ/kg\n",
+ "T3=813.;#The temperature reached after compression in K\n",
+ "m=1.2;#Air flow rate in kg/s\n",
+ "Cp=1.05;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "r=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "r1=P2/P1;#Pressure ratio\n",
+ "T2=(r1)**((r-1)/r)*T1;#Temperature at the end of compression stroke in K\n",
+ "T4=T3/(r1)**((r-1)/r);#Temperature at the end of isentropic expansion in K\n",
+ "Wt=m*Cp*(T3-T4);#Work done by the turbine in kJ/s or kW\n",
+ "Wc=m*Cp*(T2-T1);#Work to be supplied to the compressor in kJ/s or kW\n",
+ "Wn=Wt-Wc;#Net work done by the turbine unit in kW\n",
+ "qs=m*Cp*(T3-T2);#Heat supplied by the oil in kJ/s\n",
+ "M=qs/CV;#Mass of fuel burnt per second in kg/s\n",
+ "a=m/M;#Air fuel ratio\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The net power output of the installation is (kW) = ',round(Wn,2)\n",
+ "print '(b)Air fuel ratio is ',round(a,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 34 - pg 1.66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The net power of the plant per kg of air/s is (kW) = 324.42\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.66\n",
+ "#calculate the net power\n",
+ "#Input data\n",
+ "T1=300.;#Minimum temperature of the plant containing a two stage compressor with perfect intercooling and a single stage turbine in K\n",
+ "T5=1100.;#Maximum temperature of the plant in K\n",
+ "P1=1.;#Initial Pressure in bar\n",
+ "P5=15.;#Final pressure in bar\n",
+ "Cp=1.05;#Specific heat of air in kJ/kg K\n",
+ "r=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "P6=P1;#Pressure at 6 in bar\n",
+ "P3=(P1*P5)**(1./2);#The intermediate pressure for cooling in bar\n",
+ "P2=P3;#Pressure at point 2 in bar\n",
+ "T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of process 1-2\n",
+ "T3=T1;#Intermediate temperature in K\n",
+ "T4=1.473*T3;#Temperature at point 4 in K\n",
+ "T6=T5/(P5/P6)**((r-1)/r);#Temperature at point 6 in k\n",
+ "Wt=Cp*(T5-T6);#Work done by the turbine per kg of air in kJ/s\n",
+ "Wc=Cp*(T4-T3)+Cp*(T2-T1);#Work done by the compressor per kg of air in kJ/s\n",
+ "Wn=Wt-Wc;#Net work done in kJ/s\n",
+ "Pn=Wn;#Net power developed in kW\n",
+ "\n",
+ "#Output \n",
+ "print 'The net power of the plant per kg of air/s is (kW) = ',round(Pn,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 35 - pg 1.67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The maximum power that can be obtained from turbine installation is (kW) = 366.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.67\n",
+ "#calculate the maximum power\n",
+ "#Input data\n",
+ "P1=1.;#Initial Pressure of a gas turbine power plant in bar\n",
+ "P2=8.;#Final pressure in bar\n",
+ "T1=300.;#Initial temperature in K\n",
+ "T5=850.;#Temperature of air expanded in the turbine in K\n",
+ "m=1.8;#Mass of air circulated per second in kg\n",
+ "Cp=1.05;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "r=1.4;#Ratio of specific heat\n",
+ "\n",
+ "#Calculations\n",
+ "P4=(P1*P2)**(0.5);#Pressure for maximum power output in bar\n",
+ "P3=P2;#Pressure after the constant pressure process in bar\n",
+ "T3=T5;#For reheating condition Temperature in K\n",
+ "T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of constant entropy process in K\n",
+ "T4=T3/((P3/P4)**((r-1)/r));#Temperature after the process 3-4 in K\n",
+ "T6=T4;#Temperature at the end of process 5-6 in K\n",
+ "Wt=m*Cp*((T3-T4)+(T5-T6));#Work done by the turbine in kJ/s\n",
+ "Wc=m*Cp*(T2-T1);#Work absorbed by the compressor in kJ/s\n",
+ "P=Wt-Wc;#Power that can be obtained from gas turbine installation in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'The maximum power that can be obtained from turbine installation is (kW) = ',round(P,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 36 - pg 1.69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 39,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Mass of fluid to be circulated in the turbine is (kg/s) = 1.446\n",
+ "(b)The amount of heat supplied per second from the external source is (kJ/s) = 1212.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.69\n",
+ "#calculate the mass of fluid and amount of heat supplied\n",
+ "#Input data\n",
+ "P1=1.5;#Pressure at the inlet of the low pressure compressor in bar\n",
+ "T1=300.;#Temperature at the inlet of the low pressure compressor in K\n",
+ "P5=9.;#Maximum pressure in bar\n",
+ "T5=1000.;#Maximum temperature in K\n",
+ "P=400.;#Net power developed by the turbine in kW\n",
+ "Cp=1.0;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "r=1.4;#Ratio of specific heat \n",
+ "\n",
+ "#Calculations\n",
+ "P8=P1;#For perfect intercooling and perfect reheating in bar\n",
+ "P4=P5;#For perfect intercooling and perfect reheating in bar\n",
+ "P2=(P1*P4)**0.5;#Pressure at the end of Isentropic compression in LP compressor in bar\n",
+ "P6=P2;#Pressure at the end of process 5-6 in bar\n",
+ "T2=T1*(P2/P1)**((r-1)/r);#Temperature at the end of isentropic compression in K\n",
+ "T3=T1;#For perfect intercooling in K\n",
+ "T4=T2;#For perfect intercooling in K\n",
+ "T6=T5/(P5/P6)**((r-1)/r);#Temperature at the end of process 5-6 in K\n",
+ "T7=T5;#Temperature in K\n",
+ "T8=T6;#Temperature in K\n",
+ "Wt=Cp*((T5-T6)+(T7-T8));#Work done by the turbine in kg/s\n",
+ "Wc=Cp*((T2-T1)+(T4-T3));#Work absorbed by the compressor in kJ/s\n",
+ "Wn=Wt-Wc;#Net work output in kJ/s\n",
+ "m=P/Wn;#Mass of fluid flow per second in kg/s\n",
+ "qs=m*Cp*((T5-T4)+(T7-T6));#Heat supplied from the external source in kJ/s\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Mass of fluid to be circulated in the turbine is (kg/s) = ',round(m,3)\n",
+ "print '(b)The amount of heat supplied per second from the external source is (kJ/s) = ',round(qs,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 37 - pg 1.70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 40,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Mass of air circulating in the installation is (kg/s) = 4.24\n",
+ "(b)Heat supplied by the heating chamber is (kJ/s) = 2414.2\n",
+ "The answers are a bit different from textbook due to rounding off error \n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.70\n",
+ "#calculate the mass of air and heat supplied\n",
+ "#Input data\n",
+ "T1=293.;#Temperature of a constant pressure open cycle gas turbine plant in K\n",
+ "T3=1043.;#The maximum temperature in K\n",
+ "a=6.5;#The pressure ratio\n",
+ "P=1000.;#Power developed by the installation in kW\n",
+ "Cp=1.05;#Specific heat at constant pressure in kJ/kg K\n",
+ "r=1.4;#Isentropic ratio\n",
+ "\n",
+ "#Calculations\n",
+ "T2=T1*a**((r-1)/r);#Temperature after the isentropic compression stroke in K\n",
+ "T4=T3/a**((r-1)/r);#Temperature after the isentropic expansion process in K\n",
+ "Wt=Cp*(T3-T4);#Work done by the turbine per kg of air per second in kJ\n",
+ "Wc=Cp*(T2-T1);#Work absorbed by the compressor per kg of air per second in kJ\n",
+ "Wn=Wt-Wc;#Net work output in kJ/s\n",
+ "m=P/Wn;#Mass of fluid circulated per second in kg/s\n",
+ "Q=m*Cp*(T3-T2);#Heat supplied by the heating chamber in kJ/s\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Mass of air circulating in the installation is (kg/s) = ',round(m,2)\n",
+ "print '(b)Heat supplied by the heating chamber is (kJ/s) = ',round(Q,1)\n",
+ "print 'The answers are a bit different from textbook due to rounding off error '"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 38 - pg 1.72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 41,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(1)Overall efficiency of the turbine is (percentage) = 21.0\n",
+ "(2)Mass of air circulated by the turbine is (kg) = 23.85\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.72\n",
+ "#calculate the Overall efficiency and Mass of air circulated\n",
+ "#Input data\n",
+ "a=6.;#Pressure ratio of a gas turbine plant\n",
+ "T1=293.;#Inlet temperature of air in K\n",
+ "T3=923.;#Maximum temperature of the cycle in K\n",
+ "P=2000.;#Power developed in the cycle in kW\n",
+ "nc=85.;#Efficiency of the compressor in percentage\n",
+ "nt=85.;#Efficiency of the turbine in percentage\n",
+ "Cp=1.;#Specific heat of gas at constant pressure in kJ/kg K\n",
+ "Cv=0.714;#Specific heat of gas at constant volume in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "r=Cp/Cv;#Ratio of specific heats\n",
+ "T2a=a**((r-1)/r)*T1;#Temperature at 2' in K\n",
+ "T2=((T2a-T1)/(nc/100))+T1;#Temperature at point 2 in K\n",
+ "T4a=T3/a**((r-1)/r);#Temperature at the point 4' in K\n",
+ "T4=T3-((T3-T4a)*(nt/100));#Temperature at the point 4 in K\n",
+ "Wt=Cp*(T3-T4);#Work done by the turbine per kg of air in kJ\n",
+ "Wc=Cp*(T2-T1);#Work done by the compressor per kg of air in kJ\n",
+ "Wn=Wt-Wc;#Net work output of the turbine per kg of air in kJ\n",
+ "qA=Cp*(T3-T2);#Heat supplied per kg of air in kJ\n",
+ "n=(Wn/qA)*100;#Overall efficiency of the turbine plant in percentage\n",
+ "m=P/Wn;#Mass of air circulated per second in kg\n",
+ "\n",
+ "#Output\n",
+ "print '(1)Overall efficiency of the turbine is (percentage) = ',round(n,0)\n",
+ "print '(2)Mass of air circulated by the turbine is (kg) = ',round(m,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 39 - pg 1.73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 42,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The isentropic efficiency of the turbine is (percent) = 88.93\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.73\n",
+ "#calculate the isentropic efficiency\n",
+ "#Input data\n",
+ "T1=293.;#Initial temperature of a gas turbine plant in K\n",
+ "P1=1.;#Initial pressure in bar\n",
+ "P2=4.5;#Pressure after the compression in bar\n",
+ "nc=80.;#Isentropic efficiency of a compressor in percentage\n",
+ "T3=923.;#Temperature of the gas whose properties may be assumed to resemble with those of air in the combustion chamber in K\n",
+ "deltaP=0.1;#Pressure drop in a combustion chamber in bar\n",
+ "nt=20.;#Thermal efficiency of the plant in percentage\n",
+ "r=1.4;#Isentropic index\n",
+ "P4=1.;#Pressure at point 4 in bar\n",
+ "\n",
+ "#Calculations\n",
+ "P3=P2-deltaP;#Pressure at point 3 in bar\n",
+ "T21=T1*(P2/P1)**((r-1)/r);#Temperature after the compression process in K\n",
+ "T2=(T21-T1)/(nc/100)+T1;#Temperature at the point 2 in K\n",
+ "T41=T3/(P3/P4)**((r-1)/r);#Temperature at the end of expansion process in K\n",
+ "Ac=T2-T1;#Work done by the compressor per kg of air per specific heat at constant pressure Ac=Wc/Cp\n",
+ "At=T3;#Work done by the turbine per kg of air per specific heat at constant pressure At=Wt/Cp\n",
+ "An=At-Ac;#Net work done per kg of air\n",
+ "Bs=T3-T2;#Heat supplied per kg of air per specific heat at constant pressure Bs=qs/Cp;qs=heat supplied\n",
+ "T4=An-((nt/100)*Bs);#Temperature at point 4 in K\n",
+ "nT=((T3-T4)/(T3-T41))*100;#Isentropic efficiency of the turbine in percentage\n",
+ "\n",
+ "#Output\n",
+ "print 'The isentropic efficiency of the turbine is (percent) = ',round(nT,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 40 - pg 1.75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 43,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Overall efficiency of the plant is (percent) = 14.31\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.75\n",
+ "#calculate the Overall efficiency\n",
+ "#Input data\n",
+ "P1=1.;#Pressure of air received by the gas turbine plant in bar\n",
+ "T1=300.;#Initial Temperature in K\n",
+ "P2=5.;#Pressure of air after compression in bar\n",
+ "T3=850.;#Temperature of air after the compression in K\n",
+ "nc=80.;#Efficiency of the compressor in percent\n",
+ "nt=85.;#Efficiency of the turbine in percent\n",
+ "r=1.4;#Isentropic index of gas\n",
+ "P41=1.;#Pressure at the point 41 in bar\n",
+ "Cp=1.05;#Specific heat of the gas at constant pressure in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "P3=P2;#Since 2-3 is constant pressure process in bar\n",
+ "T21=T1*(P2/P1)**((r-1)/r);#Temperature at the point 21 on the curve in K\n",
+ "T2=(T21-T1)/(nc/100)+T1;#Temperature at the point 2 in K\n",
+ "T41=T3/(P3/P41)**((r-1)/r);#Temperature at the point 41 in K\n",
+ "T4=T3-((nt/100)*(T3-T41));#Temperature of gas at the point 4 in K\n",
+ "Wt=Cp*(T3-T4);#work done by the turbine in kJ/kg of air\n",
+ "Wc=Cp*(T2-T1);#Work done by the compressor in kJ/kg of air\n",
+ "Wn=Wt-Wc;#Net work done by the plant in kJ\n",
+ "nt=(Wn/(Cp*(T3-T2)))*100;#Thermal efficiency of the plant in percentage \n",
+ "\n",
+ "#Output\n",
+ "print 'Overall efficiency of the plant is (percent) = ',round(nt,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 41 - pg 1.76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 44,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The overall efficiency of the plant is (percent) = 20.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 1.76\n",
+ "#calculate the overall efficiency\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of a gas turbine plant in bar\n",
+ "T1=310.;#Initial temperature in K\n",
+ "P2=4.;#Pressure of air after compressing in a rotary compressor in bar\n",
+ "P3=P2;#Constant pressure process\n",
+ "P41=P1;#Since 1-41 is a constant pressure process in bar\n",
+ "T3=900.;#Temperature of air at the point 3 in constant process in K\n",
+ "nc=80.;#Efficiency of the compressor in percentage\n",
+ "nt=85.;#Efficiency of the turbine in percentage\n",
+ "E=70.;#Effectiveness of the plant in percentage\n",
+ "r=1.4;#Isentropic index\n",
+ "Cp=1.;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "T21=T1*(P2/P1)**((r-1)/r);#Temperature at the point 21 in the temperature versus entropy graph in K\n",
+ "T2=T1+((T21-T1)/(nc/100));#Temperature of air after the compression process in K\n",
+ "T41=T3/((P3/P41)**((r-1)/r));#Temperature at the point 41 after the isentropic expansion process in K\n",
+ "T4=T3-((T3-T41)*(nt/100));#Temperature at the point 4 in K\n",
+ "Wt=Cp*(T3-T4);#Work done by the turbine in kJ\n",
+ "Wc=Cp*(T2-T1);#Work done by the compressor in kJ\n",
+ "Wn=Wt-Wc;#Net work done in kJ\n",
+ "qs=Cp*(T3-T2);#Heat supplied in kJ\n",
+ "qa=Cp*(T4-T2);#Heat available in the exhaust gases in kJ\n",
+ "H=qa*(E/100);#Actual heat recovered from the exhaust gases in the heat exchanger in kJ\n",
+ "Hs=qs-(H);#Heat supplied by the combustion chamber in kJ\n",
+ "nt=(Wn/Hs)*100;#Thermal efficiency of the gas turbine plant with heat exchanger in percent\n",
+ "\n",
+ "#Output \n",
+ "print 'The overall efficiency of the plant is (percent) = ',round(nt,1)\n"
+ ]
+ }
+ ],
+ "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/Thermal_Engineering_by_K_K_Ramalingam/Chapter10.ipynb b/Thermal_Engineering_by_K_K_Ramalingam/Chapter10.ipynb new file mode 100755 index 00000000..b7a9f72f --- /dev/null +++ b/Thermal_Engineering_by_K_K_Ramalingam/Chapter10.ipynb @@ -0,0 +1,419 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10 - Refrigeration and Air Conditioning"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 - pg 10.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power rating of the compressor-motor unit if the cop of the plant is 2.1 is (kW) = 40.4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.42\n",
+ "#calculate the Power rating of compressor-motor\n",
+ "#Input data\n",
+ "T1=273.;#The temperature of ice in K\n",
+ "T2=298.;#Temperature of water at room in K\n",
+ "COP=2.1;#Cop of the plant\n",
+ "ne=90.;#Overall electrochemical efficiency in percentage\n",
+ "w=15.;#Weight of ice produced per day in tonnes\n",
+ "cw=4.187;#Specific heat of water in kJ/kg degrees celcius\n",
+ "Li=335.;#Latent heat of ice in kJ/kg\n",
+ "mi=1.;#Mass of ice produced at 0 degrees celcius\n",
+ "\n",
+ "#Calculations\n",
+ "m=(w*1000.)/(24*60);#Mass of ice produced in kg/min\n",
+ "h=(mi*cw*(T2-T1))+Li;#Heat extracted from 1kg of water at 25 degrees celcius to produce 1kg of ice at 0 degrees celcius in kJ/kg\n",
+ "Q=m*h;#Total heat extracted in kJ\n",
+ "W=Q/COP;#Work done by the compressor in kJ/kg\n",
+ "P=W/(60.*(ne/100));#Power of compressor in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'Power rating of the compressor-motor unit if the cop of the plant is 2.1 is (kW) = ',round(P,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 - pg 10.43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The refrigeration capacity of the plant is (TR) = 0.541\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.43\n",
+ "#calculate the refrigeration capacity\n",
+ "#Input data\n",
+ "m=400.;#Mass of fruits supplied to a cold storage in kg\n",
+ "T1=293.;#Temperature at which fruits are stored in K\n",
+ "T2=268.;#Temperature of cold storage in K\n",
+ "t=8.;#The time untill which fruits are cooled in hours\n",
+ "hfg=105.;#Latent heat of freezing in kJ/kg\n",
+ "Cf=1.25;#Specific heat of fruit\n",
+ "TR=210.;#One tonne refrigeration in kJ/min\n",
+ "\n",
+ "#Calculations\n",
+ "Q1=m*Cf*(T1-T2);#Sensible heat in kJ\n",
+ "Q2=m*hfg;#Latent heat of freezing in kJ\n",
+ "Q=Q1+Q2;#Heat removed from fruits in 8 hrs\n",
+ "Th=(Q1+Q2)/(t*60);#Total heat removed in one minute in kJ/kg\n",
+ "Rc=Th/TR;#Refrigerating capacity of the plant in TR\n",
+ "\n",
+ "#Output\n",
+ "print 'The refrigeration capacity of the plant is (TR) = ',round(Rc,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 - pg 10.44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)COP of the machine when it is operated as a refrigerating machine is 5.0\n",
+ "(b)COP when it is operated as heat pump is 6.0\n",
+ "(c)COP or efficiency of the Heat engine is (percent) = 16.67\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.44\n",
+ "#calculate the COP of machine in all cases\n",
+ "#Input data\n",
+ "T1=300.;#The maximum temperature at which carnot cycle operates in K\n",
+ "T2=250.;#The minimum temperature at which carnot cycle operates in K\n",
+ "\n",
+ "#Calculations\n",
+ "COPr=T2/(T1-T2);#COP of the refrigerating machine\n",
+ "COPh=T1/(T1-T2)#COP of heat pump\n",
+ "n=((T1-T2)/T1)*100;#COP or efficiency of the heat engine in percentage\n",
+ "\n",
+ "#Output data\n",
+ "print '(a)COP of the machine when it is operated as a refrigerating machine is ',COPr\n",
+ "print '(b)COP when it is operated as heat pump is ',COPh\n",
+ "print '(c)COP or efficiency of the Heat engine is (percent) = ',round(n,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 - pg 10.45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Capacity of the plant is (TR) = 48.31\n",
+ "(b)Time taken to achieve cooling is (hours) = 10.67\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.45\n",
+ "#calculate the capacity of the plant and time taken\n",
+ "#Input data\n",
+ "m=20000.;#The storage capacity of fish in a storage plant in kg\n",
+ "T1=298.;#Supplied temperature of fish in K\n",
+ "T2=263.;#Temperature of cold storage in which fish are stored in K\n",
+ "T3=268.;#Freezing point of fish in K\n",
+ "Caf=2.95;#Specific heat of fish above freezing point in kJ/kg K\n",
+ "Cbf=1.25;#Specific heat of below freezing point in kJ/kg K\n",
+ "W=75.;#Work required by the plant in kW\n",
+ "TR=210.;#One tonne refrigeration in kJ/min\n",
+ "hfg=230.;#Latent heat of fish in kJ/kg\n",
+ "\n",
+ "#Calculations\n",
+ "COPr=T2/(T1-T2);#COP of reversed carnot cycle\n",
+ "COPa=0.3*COPr;#Given that actual COP is 0.3 times of reversed COP\n",
+ "Hr=(COPa*W)*60;#Heat removed by the plant in kJ/min\n",
+ "C=Hr/TR;#Capacity of the plant in TR\n",
+ "Q1=m*Caf*(T1-T3);#Heat removed from the fish above freezing point in kJ\n",
+ "Q2=m*Cbf*(T3-T2);#Heat removed from fish below freezing point in kJ\n",
+ "Q3=m*hfg;#Total latent heat of the fish in kJ\n",
+ "Q=Q1+Q2+Q3;#Total heat removed by the plant in kJ\n",
+ "T=(Q/Hr)/60;#Time taken to achieve cooling in hrs \n",
+ "\n",
+ "#Output data\n",
+ "print '(a)Capacity of the plant is (TR) = ',round(C,2)\n",
+ "print '(b)Time taken to achieve cooling is (hours) = ',round(T,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 - pg 10.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Theoretical COP for a CO2 machine working at given temperatures = 4.39\n",
+ "The answer in textbook is wrong. Please check using a calculator\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.46\n",
+ "#calculate the Theoretical COP\n",
+ "#Input data\n",
+ "T2=298.;#Maximum temperature at which CO2 machine works in K\n",
+ "T1=268.;#Minimum temperature at which CO2 machine works in K\n",
+ "sf1=-0.042;#Liquid entropy at 268 K in kJ/kg K\n",
+ "hfg1=245.3;#Latent heat of gas at 268 K in kJ/kg\n",
+ "sf2=0.251;#Liquid entropy in kJ/kg K\n",
+ "hfg2=121.4;#Latent heat of gas at 298 K in kJ/kg\n",
+ "hf1=-7.54;#Liquid enthalpy at 268 K in kJ/kg\n",
+ "hf2=81.3;#Liquid enthalpy at 298 K in kJ/kg\n",
+ "hf3=81.3;#Enthalpy at point 3 in graph in kJ/kg\n",
+ "\n",
+ "#Calculations\n",
+ "s2=sf2+(hfg2/T2);#Entropy at point 2 from the graph in kJ/kg K\n",
+ "x1=(s2-sf1)/(hfg1/T1);#Dryness fraction at point 1\n",
+ "h1=hf1+(x1*hfg1);#Enthalpy at point 1 in kJ/kg\n",
+ "h2=hf2+hfg2;#Enthalpy at point 2 in kJ/kg\n",
+ "COP=(h1-hf3)/(h2-h1);#Coefficient of performance for a CO2 machine working at given temperatures\n",
+ "\n",
+ "#Output data\n",
+ "print 'Theoretical COP for a CO2 machine working at given temperatures = ',round(COP,2)\n",
+ "print 'The answer in textbook is wrong. Please check using a calculator'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6 - pg 10.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The capacity of refrigerator is (TR) = 24.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.48\n",
+ "#calculate the capacity of refrigerator\n",
+ "#Input data\n",
+ "T2=298.;#Maximum temperature at which ammonia refrigerating system works in K\n",
+ "T1=263.;#Minimum temperature at which ammonia refrigerating system works in K\n",
+ "mf=5.;#Fluid flow rate in kg/min\n",
+ "sf1=0.5443;#Liquid entropy at 298 K in kJ/kg K\n",
+ "sf2=1.1242;#Liquid entropy at 263 K in kJ/kg K\n",
+ "hfg1=1297.68;#Latent heat at 298 K in kJ/kg\n",
+ "hfg2=1166.94;#Latent heat at 263 K in kJ/kg\n",
+ "hf1=135.37;#Liquid enthalpy at point 1 in graph in kJ/kg\n",
+ "hf2=298.9;#Liquid enthalpy at point 2 in graph in kJ/kg\n",
+ "TR=210.;#One tonne refrigeration in TR\n",
+ "\n",
+ "#Calculations\n",
+ "s2=sf2+(hfg2/T2);#Entropy at point 2 in kJ/kg\n",
+ "x1=(s2-sf1)/(hfg1/T1);#Dryness fraction at point 1\n",
+ "h1=hf1+(x1*hfg1);#Enthalpy at point 1 in kJ/kg\n",
+ "h=h1-hf2;#Heat extracted of refrigerating effect produced per kg of refrigerant in kJ/kg\n",
+ "ht=mf*h;#Total heat extracted at a fluid flow rate of 5 kg/min in kJ/min\n",
+ "C=ht/TR;#Capacity of refrigerating in TR\n",
+ "\n",
+ "#Output\n",
+ "print 'The capacity of refrigerator is (TR) = ',round(C,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 - pg 10.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The theoretical COP of a ammonia refrigerating machine working between given temperatures = 5.56\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.49\n",
+ "#calculate the theoretical COP\n",
+ "#Input data\n",
+ "T1=263.;#Minimum temperature at which ammonia refrigerating machine works in K\n",
+ "T2=303.;#Maximum temperature at which ammonia refrigerating machine works in K\n",
+ "x1=0.6;#Dryness fraction of ammonia during suction stroke\n",
+ "sf1=0.5443;#Liquid entropy at 263 K in kJ/kg K\n",
+ "hfg1=1297.68;#Latent heat at 263 K in kJ/kg\n",
+ "sf2=1.2037;#Liquid entropy at 303 K in kJ/kg K\n",
+ "hfg2=1145.8;#Latent heat at 303 K in kJ/kg\n",
+ "hf1=135.37;#Liquid enthalpy at 263 K in kJ/kg\n",
+ "hf2=323.08;#Liquid enthalpy at 303 K in kJ/kg\n",
+ "\n",
+ "#Calculations\n",
+ "s1=sf1+((x1*hfg1)/T1);#Entropy at point 1 in kJ/kg K\n",
+ "x2=(s1-sf2)/(hfg2/T2);#Entropy at point 2 in kJ/kg K\n",
+ "h1=hf1+(x1*hfg1);#Enthalpy at point 1 in kJ/kg\n",
+ "h2=hf2+(x2*hfg2);#Enthalpy at point 2 in kJ/kg\n",
+ "COP=(h1-hf2)/(h2-h1);#Theoretical COP of ammonia refrigerating machine\n",
+ "\n",
+ "#Output\n",
+ "print 'The theoretical COP of a ammonia refrigerating machine working between given temperatures = ',round(COP,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8 - pg 10.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The amount of ice produced is (kg/kW hr) = 11.44\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 10.51\n",
+ "#calculate the amount of ice\n",
+ "#Input data\n",
+ "T1=263.;#Minimum temperature at which Vapour compression refrigerator using methyl chloride operates in K\n",
+ "T2=318.;#Maximum temperature at which Vapour compression refrigerator using methyl chloride operates in K\n",
+ "sf1=0.183;#Entropy of the liquid in kJ/kg K\n",
+ "hfg1=460.7;#Enthalpy of the liquid in kJ/kg\n",
+ "sf2=0.485;#Entropy of the liquid in kJ/kg K\n",
+ "hfg2=483.6;#Enthalpy of the liquid in kJ/kg\n",
+ "x2=0.95;#Dryness fraction at point 2\n",
+ "hf3=133.0;#Enthalpy of the liquid in kJ/kg\n",
+ "W=3600.;#Work to be spent corresponding to 1kW/hour\n",
+ "Cw=4.187;#Specific heat of water in kJ/kg degrees celcius\n",
+ "mi=1;#Mass of ice produced at 0 degrees celcius\n",
+ "Li=335.;#Latent heat of ice in kJ/kg\n",
+ "hf1=45.4;#Enthalpy of liquid at 263 K in kJ/kg\n",
+ "hf2=133.;#Enthalpy of liquid at 318 K in kJ/kg\n",
+ "\n",
+ "#Calculations\n",
+ "s2=sf2+((x2*(hfg2-hf2))/T2);#Enthalpy at point 2 in kJ/kg\n",
+ "x1=(s2-sf1)/((hfg1-hf1)/T1);#Dryness fraction at point 1\n",
+ "h1=hf1+(x1*hfg1);#Enthalpy at point 1 in kJ/kg\n",
+ "h2=hf2+(x2*hfg2);#Enthalpy at point 2 in kJ/kg\n",
+ "COP=(h1-hf3)/(h2-h1);#Theoretical COP\n",
+ "COPa=0.6*COP;#Actual COP which is 60 percent of theoretical COP\n",
+ "H=W*COPa;#Heat extracted or refrigeration effect produced per kW hour in kJ\n",
+ "Hw=(mi*Cw*10)+Li;#Heat extracted from water at 10 degrees celcius for the formation of 1 kg of ice at 0 degrees celcius\n",
+ "I=H/Hw;#Amount of ice produced in kg/kW hr\n",
+ "\n",
+ "#Output\n",
+ "print 'The amount of ice produced is (kg/kW hr) = ',round(I,2)\n"
+ ]
+ }
+ ],
+ "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/Thermal_Engineering_by_K_K_Ramalingam/Chapter7.ipynb b/Thermal_Engineering_by_K_K_Ramalingam/Chapter7.ipynb new file mode 100755 index 00000000..3e77394f --- /dev/null +++ b/Thermal_Engineering_by_K_K_Ramalingam/Chapter7.ipynb @@ -0,0 +1,1461 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 - Performance of IC Engines"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 1 - pg 7.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a) Brake torque is (Nm) = 971.2\n",
+ "(b)Power available at the brakes of the engine is (kW) = 152.48\n",
+ "The answers given in textbook are wrong. Please verify using a calculator\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.19\n",
+ "#calculate the brake torque and Power\n",
+ "#Input data\n",
+ "N=1500.;#Engine speed in rpm\n",
+ "p=110.;#Load on brakes in kg\n",
+ "L=900.;#Length of brake arm in mm\n",
+ "g=9.81;#Gravitational force in N/m**2\n",
+ "pi=3.14;#Mathematical constant\n",
+ "\n",
+ "#Calculations\n",
+ "T=((p*g)*(L/1000.));#Braking torque in Nm\n",
+ "P=((T/1000)*((2*3.14*N)/60));#Power available at the brakes of the engine in kW\n",
+ "\n",
+ "#Output\n",
+ "print '(a) Brake torque is (Nm) = ',round(T,1)\n",
+ "print '(b)Power available at the brakes of the engine is (kW) = ',round(P,2)\n",
+ "print 'The answers given in textbook are wrong. Please verify using a calculator'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 - pg 7.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The power available at the brakes is (kW) = 7.125\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.19\n",
+ "#calculate the power available\n",
+ "#Input data\n",
+ "N=700.;#Engine speed in rpm\n",
+ "D=0.6;#Diameter of brake drum in m\n",
+ "d=0.05;#Diameter of rope in m\n",
+ "W=35.;#Dead load on the brake drum in kg\n",
+ "S=4.5;#Spring balance reading in kg\n",
+ "g=9.81;#Gravitational constant in N/m**2\n",
+ "pi=3.14;#Mathematical constant\n",
+ "\n",
+ "#Calculations\n",
+ "P=(((W-S)*g*pi*(D+d))/1000)*(N/60);#Power in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'The power available at the brakes is (kW) = ',round(P,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 - pg 7.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ " Brake thermal efficiency of the engine is (percent) = 34.74\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.20\n",
+ "#calculate the brake thermal efficiency\n",
+ "#Input data\n",
+ "W=950.;#Load on hydraulic dynamometer in N\n",
+ "C=7500.;#Dynamometer constant\n",
+ "f=10.5;#Fuel used per hour in kg\n",
+ "h=50000.;#Calorific value of fuel in kJ/kg\n",
+ "N=400.;#Engine speed in rpm\n",
+ "\n",
+ "#Calculations\n",
+ "P=(W*N)/C;#Power available at the brakes in kW\n",
+ "H=P*60;#Heat equivalent of power at brakes in kJ/min\n",
+ "Hf=(f*h)/60;#Heat supplied by fuel per minute in kJ/min\n",
+ "n=(H/Hf)*100;#Brake thermal efficiency in percentage\n",
+ "\n",
+ "#Output\n",
+ "print ' Brake thermal efficiency of the engine is (percent) = ',round(n,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 - pg 7.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Specific fuel consumption is (kg/BHP hr) = 0.238\n",
+ "(b)Brake mean effective pressure is (kgf/cm^2) = 8.066\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.21\n",
+ "#calculate the specific fuel consumption and Brake mean effective pressure\n",
+ "#Input data\n",
+ "import math\n",
+ "n1=50.5;#Air standard efficiency in percentage\n",
+ "n2=50.;#Brake thermal efficiency in percentage\n",
+ "N=3000.;#Engine speed in rpm\n",
+ "H=10500.;#Heating value of fuel in kcal/kg\n",
+ "T=7.2;#Torque developed in kgf*m\n",
+ "B=6.3;#Bore diameter in cm\n",
+ "S=0.09;#stroke in m\n",
+ "\n",
+ "#Calculations\n",
+ "nbt=(n1/100)*(n2/100.);#Brake thermal efficiency in percentage\n",
+ "B1=(2*(22./7)*N*T)/4500.;#Brake horse power in kW\n",
+ "B2=B1/4;#Brake horse power per cylinder in kW\n",
+ "Bsf=(4500*60)/(H*427.*nbt);#Brake specific fuel consumption in kg/BHP hr\n",
+ "bmep=(B2*4500)/(S*(math.pi*B**2. /4.)*(N/2.));#Brake mean effective pressure in kgf/cm**2\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Specific fuel consumption is (kg/BHP hr) = ',round(Bsf,3)\n",
+ "print '(b)Brake mean effective pressure is (kgf/cm^2) = ',round(bmep,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 - pg 7.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mechanical efficiency of the engine is (percent) = 88.54\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.22\n",
+ "#calculate the Mechanical efficiency\n",
+ "#Input data\n",
+ "W=30.;#The net dynamometer load in kg\n",
+ "R=0.5;#Radius in m\n",
+ "N=2400.;#Speed in rpm\n",
+ "FHP=6.5;#Engine power in hp\n",
+ "\n",
+ "#Calculations\n",
+ "BHP=(2*3.14*R*N*W)/4500;#Brake horse power in kW\n",
+ "IHP=BHP+FHP;#Indicated horse power in kW\n",
+ "nm=(BHP/IHP)*100;#Mechanical efficiency in percentage\n",
+ "\n",
+ "#Output\n",
+ "print 'Mechanical efficiency of the engine is (percent) = ',round(nm,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6 - pg 7.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The indicated horse power is (kW) = 24.35\n",
+ "(b)The brake horse power is (kW) = 19.48\n",
+ "(c)Friction horse power is (kW) = 4.87\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.22\n",
+ "#calculate the indicated, brake and Friction horse powers\n",
+ "#Input data\n",
+ "import math\n",
+ "d=25.;#Diameter of cylinder in cm\n",
+ "l=0.4;#Stroke of piston in m\n",
+ "N=200.;#Speed in rpm\n",
+ "m=10.;#Misfires per minute\n",
+ "M=6.2;#Mean effective pressure in kgf/cm**2\n",
+ "nm=0.8;#Mechanical efficiency in percent\n",
+ "\n",
+ "#Calculations\n",
+ "np=(N/2)-m;#Number of power strokes per minute\n",
+ "A=(math.pi*d**2)/4;#Area of the cylinder\n",
+ "I=(M*l*A*np)/4500.;#Indicated horse power in kW\n",
+ "B=I*nm;#Brake horse power in kW\n",
+ "F=I-B;#Friction horse power in kW\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The indicated horse power is (kW) = ',round(I,2)\n",
+ "print '(b)The brake horse power is (kW) = ',round(B,2)\n",
+ "print '(c)Friction horse power is (kW) = ',round(F,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 - pg 7.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The average piston speed is (m/s) = 117.53\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.23\n",
+ "#calculate the average piston speed\n",
+ "#Input data\n",
+ "import math\n",
+ "I=5.;#Indicated power developed by single cylinder of 2 stroke petrol engine\n",
+ "M=6.5;#Mean effective pressure in bar\n",
+ "d=0.1;#Diameter of piston in m\n",
+ "\n",
+ "#Calculations\n",
+ "A=(math.pi*d**2)/4;#Area of the cylinder\n",
+ "LN=(I*1000*60.)/(M*10**5*A);#Product of length of stroke and engine speed\n",
+ "S=2*LN;#Average piston speed in m/s\n",
+ "\n",
+ "#Output\n",
+ "print 'The average piston speed is (m/s) = ',round(S,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8 - pg 7.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Diameter of the bore is (cm) = 35.43\n",
+ "(b)Stroke length of the piston is (cm) = 61.999\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.24\n",
+ "#calculate the diameter and stroke length\n",
+ "#Input data\n",
+ "P=60.;#Power developed by oil engine in kW\n",
+ "M=6.5;#Mean effective pressure in kgf/cm**2\n",
+ "N=85.;#Number of explosions per minute\n",
+ "r=1.75;#Ratio of stroke to bore diameter\n",
+ "nm=0.8;#Mechanical efficiency \n",
+ "\n",
+ "#Calculations\n",
+ "I=P/nm;#Indicated horse power\n",
+ "d=((I*100*4*4500.)/(M*r*3.14*N))**(1./3);#Bore diameter in cm\n",
+ "l=r*d;#Stroke length in cm\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Diameter of the bore is (cm) = ',round(d,2)\n",
+ "print '(b)Stroke length of the piston is (cm) = ',round(l,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9 - pg 7.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The bore diameter of the cylinder is (cm) = 11.46\n",
+ "(b)Stroke length of the piston is (cm) = 14.89\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.24\n",
+ "#calculate the bore diameter and stroke length\n",
+ "#Input data \n",
+ "I=45.;#Power developed by two cylinder internal combustion engine operating on two stroke principle\n",
+ "N=1100.;#Speed in rpm\n",
+ "M=6.;#Mean effective pressure in kgf/cm**2\n",
+ "r=1.3;#Ratio of stroke to the bore\n",
+ "nc=2.;#Number of cylinders\n",
+ "\n",
+ "#Calculations\n",
+ "d=((I*4500*4)/(M*(r/100)*3.14*N*nc))**(1./3);#Diameter of the bore in cm\n",
+ "l=1.3*d;#Stroke length in cm\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The bore diameter of the cylinder is (cm) = ',round(d,2)\n",
+ "print '(b)Stroke length of the piston is (cm) = ',round(l,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10 - pg 7.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The volumetric efficiency is (percent) = 78.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.25\n",
+ "#calculate the volumetric efficiency\n",
+ "#Input data\n",
+ "d=6.;#Diameter of the bore in cm\n",
+ "l=9.;#Length of the stroke in cm\n",
+ "m=0.00025;#Mass of charge admitted in each suction stroke\n",
+ "R=29.27;#Gas constant Kgfm/kg K\n",
+ "p=1.;#Normal pressure in kgf/cm**2\n",
+ "T=273.;#Temperature in K\n",
+ "\n",
+ "#Calculations\n",
+ "V=(m*R*T)*10**6/(p*10**4);#Volume of charge admitted in each cycle in m**3\n",
+ "Vs=(3.14*d**2*l)/4;#Swept volume of the cylinder\n",
+ "nv=(V/Vs)*100;#Volumetric efficiency in percentage\n",
+ "\n",
+ "#Output\n",
+ "print 'The volumetric efficiency is (percent) = ',round(nv,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11 - pg 7.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The volumetric efficiency of the engine is (percent) = 79.21\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.26\n",
+ "#calculate the volumetric efficiency of the engine\n",
+ "#Input data\n",
+ "import math\n",
+ "d=0.12;#Diameter of the bore in m\n",
+ "l=0.13;#Length of stroke in m\n",
+ "N=2500.;#Speed of the engine in rpm\n",
+ "d1=0.06;#Diameter of the orifice in m\n",
+ "Cd=0.70;#Discharge coefficient of orifice\n",
+ "hw=33.;#Heat causing air flow through orifice in cm of water\n",
+ "p=760.;#Barometric reading in mm of Hg\n",
+ "T1=298.;#Ambient temperature in degree K\n",
+ "p1=1.013;#Pressure of air at the end of suction in bar\n",
+ "T2=22.;#Temperature of air at the end of suction in degree C\n",
+ "R=0.287;#Universal gas constant\n",
+ "n=6.;#Number of cylinders in the engine\n",
+ "n1=1250.;#Number of strokes per minute for a four stroke engine operating at 2500 rpm\n",
+ "\n",
+ "#Calculations\n",
+ "V=(math.pi*d**2*l)/4;#Swept volume of piston in m**3\n",
+ "Ao=(math.pi*d1**2)/4;#Area of the orifice in m**2\n",
+ "rho=p1*10**5/((R*T1)*1000);#Density of air at 1.013 bar and 22 degrees C\n",
+ "Va=840.*Cd*Ao*(hw/rho)**(1./2);#Volume of air passing through the orifice in m**3/min\n",
+ "V1=8.734/n;#Actual volume of air per cylinder in m**3/min\n",
+ "As=V1/n1;#Air supplied per cycle per cylinder in m**3\n",
+ "nv=(As/V)*100;#Volumetric efficiency of the engine in percentage\n",
+ "\n",
+ "#Output\n",
+ "print 'The volumetric efficiency of the engine is (percent) = ',round(nv,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12 - pg 7.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The air standard efficiency is (percent) = 46.1\n",
+ "(b)Indicated power is (kW) = 9.093\n",
+ "(c)Indicated thermal efficiency is (percent) = 32.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.27\n",
+ "#calculate the air standard efficiency and Indicated power, thermal efficiency\n",
+ "#Input data\n",
+ "import math\n",
+ "d=0.15;#Diameter of the piston in m\n",
+ "l=0.19;#Length of the stroke in m\n",
+ "V=0.00091;#Clearance volume in m**3\n",
+ "N=250.;#Speed of the engine in rpm\n",
+ "M=6.5;#Indicated mean effective pressure in bar\n",
+ "c=6.3;#Gas consumption in m**3/hr\n",
+ "H=16000.;#Calorific value of the has in kJ/m**3\n",
+ "r1=1.4;#Polytropic index\n",
+ "\n",
+ "#Calculations\n",
+ "Vs=(math.pi*d**2*l)/4;#Swept volume in m**3\n",
+ "Vt=Vs+V;#Total cylinder volume in m**3\n",
+ "r=Vt/V;#Compression ratio\n",
+ "na=(1-(1/r**(r1-1)))*100;#Air standard efficiency in percent\n",
+ "A=(math.pi*d**2)/4;#Area of the bore in m\n",
+ "I=(M*10**5*l*A*N)/(1000*60);#Indicated power in kW\n",
+ "Hs=(c*H)/(60*60);#Heat supplied per second\n",
+ "nt=(I/Hs)*100;#Indicated thermal efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The air standard efficiency is (percent) = ',round(na,1)\n",
+ "print '(b)Indicated power is (kW) = ',round(I,3)\n",
+ "print '(c)Indicated thermal efficiency is (percent) = ',round(nt,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13 - pg 7.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The diameter of the venturi of the venturi if the air speed is 90 m/s is (cm) = 3.55\n",
+ "(b)The diameter of the jet if the pressure drop at the jet is 0.8 times the pressure drop at the venturi is (mm) = 2.218\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.28\n",
+ "#calculate the diameter in all cases\n",
+ "#Input data\n",
+ "import math\n",
+ "ma=6.;#Air supplied per minute by a single jet carburetor in kg/min\n",
+ "mf=0.44;#Mass flow rate of petrol in kg/min\n",
+ "s=0.74;#Specific gravity of petrol in kg/m**3\n",
+ "p1=1.;#Initial pressure of air in bar\n",
+ "T1=300.;#Initial temperature of air in K\n",
+ "Ci=1.35;#Isentropic coefficient of air\n",
+ "V=90.;#Speed of air in the venturi in m/s\n",
+ "Vc=0.85;#Velocity coefficient of the venturi in m/s\n",
+ "Cf=0.66;#Coefficient of discharge for the jet\n",
+ "Cp=1005.;#Coefficient of pressure in J/kg K\n",
+ "n=1.35;#Isentropic coefficient of air\n",
+ "R=0.281;#Real gas constant in Nm/kg K\n",
+ "rhof=740.;#Density of fuel in mm of Hg\n",
+ "\n",
+ "#Calculations\n",
+ "p2=(1-((V/Vc)**(2)/(2*T1*Cp)))**((n)/(n-1));#Pressure at the venturi in bar\n",
+ "V1=((R*T1)/(p1*10**5))*1000;#Initial volume in m**3/kg\n",
+ "V2=V1*((p1/p2)**(0.741));#Final volume in m**3/kg\n",
+ "A2=((ma*V2)/(V*60.))*10**4;#Throat area of venturi in cm**2\n",
+ "d=((A2*4.)/math.pi)**(0.5);#Diameter of venturi in cm\n",
+ "deltaPa=1-p2;#Pressure drop causing air flow in bar\n",
+ "deltaPf=0.8*deltaPa;#Pressure drop causing fuel flow in bar\n",
+ "Af=(mf/60.)*(10**4)/((Cf)*(2*rhof*deltaPf*10**5)**(1./2));#Area through which fuel flows in cm**2\n",
+ "df=((Af*(4/math.pi))**(1./2))*10.;#Diameter of fuel jet in mm\n",
+ "\n",
+ "print '(a)The diameter of the venturi of the venturi if the air speed is 90 m/s is (cm) = ',round(d,2)\n",
+ "print '(b)The diameter of the jet if the pressure drop at the jet is 0.8 times the pressure drop at the venturi is (mm) = ',round(df,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14 - pg 7.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The weight of fuel required per 1HP hr is (kg) = 0.1947\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.30\n",
+ "#calculate the weight of fuel\n",
+ "#Input data\n",
+ "r=14.;#The compression ratio of a diesel engine\n",
+ "Vc=1.;#Clearance volume in m**3\n",
+ "c=0.08;#Fuel supply cut off point\n",
+ "nr=0.55;#Relative efficiency\n",
+ "H=10000.;#Calorific value of fuel in kcal/kg\n",
+ "r1=1.4;#Ratio of specific heat of air\n",
+ "Vs=13.;#Stroke volume in m**3\n",
+ "\n",
+ "#Calculations\n",
+ "rho=Vc+(c*Vs);#Cut off ratio\n",
+ "na=1-(1*(rho**r1-1)/((r**(r1-1)*r1)*(rho-1)));#Air standard efficiency of diesel cycle in percent\n",
+ "In=(na*nr);#Indicated thermal efficiency in percent\n",
+ "H1=(4500*60)/(In*427.);#Heat in fuel supplied/1HP hr\n",
+ "W=H1/10**4;#Weight of fuel required/1HP hr\n",
+ "\n",
+ "#Output\n",
+ "print 'The weight of fuel required per 1HP hr is (kg) = ',round(W,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15 - pg 7.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The quantity of fuel to be injected per cycle per cylinder is (cc) = 0.0654\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.31\n",
+ "#calculate the quantity of fuel\n",
+ "#Input data\n",
+ "P=120;#Power developed by a six cykinder four stroke diesel engine\n",
+ "N=2400;#Speed in rpm\n",
+ "f=0.2;#Brake specific fuel consumption in kg/kWh\n",
+ "s=0.85;#Specific gravity of fuel\n",
+ "\n",
+ "#Calculations\n",
+ "F=f*P;#Fuel consumed per hour in kg\n",
+ "F1=F/6;#Fuel consumed per cylinder in kg/h\n",
+ "n=(N*60.)/2;#Number of cycles per hour\n",
+ "F2=(F1/n)*10**3;#Fuel consumption per cycle in gm\n",
+ "V=F2/s;#Volume of fuel to be injected per cycle in cc\n",
+ "\n",
+ "#Output\n",
+ "print 'The quantity of fuel to be injected per cycle per cylinder is (cc) = ',round(V,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16 - pg 7.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The diameter of the orifice is (mm) = 0.6165\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.32\n",
+ "#calculate the diameter of the orifice\n",
+ "#Input data\n",
+ "P=20.;#Power developed by a four stroke diesel engine per cylinder in kW\n",
+ "N=2000.;#Operating speed of the diesel engine in rpm\n",
+ "s=0.25;#Specific fuel consumption in kh/kW\n",
+ "p1=180.;#Pressure of fuel injected in bar\n",
+ "d=25.;#Distance travelled by crank in degrees\n",
+ "p2=38.;#Pressure in the combustion chamber in bar\n",
+ "Cd=0.85;#Coefficient of velocity\n",
+ "A=30.;#API in degrees\n",
+ "\n",
+ "#Calculations\n",
+ "T=d/(360.*(N/60));#Duration of fuel injection in s\n",
+ "SG=(141.5/(131.5+A))*10**3;#Specific gravity of fuel\n",
+ "V=Cd*(2*(p1-p2)*10**5/SG)**(1./2);#Velocity of fuel injection in m/s\n",
+ "Vf=(s/60.)*P/((N/2)*SG);#Volume of fuel injected per cycle in m**3/cycle\n",
+ "Na=Vf/(V*T);#Nozzle orifice area in m**2\n",
+ "d=(((4*Na)/3.14)**(1./2))*10**3;#Diameter of the orifice of the fuel injector in mm\n",
+ "\n",
+ "#Output\n",
+ "print 'The diameter of the orifice is (mm) = ',round(d,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17 - pg 7.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total orifice area required per injector if the injection takes place over 16 degree crank angle is (m^2) = 4.8796e-07\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.33\n",
+ "#calculate the total orifice area\n",
+ "#Input data\n",
+ "P=200.;#Power developed by a six cylinder diesel engine in kW\n",
+ "N=2000.;#Operating speed of the engine in rpm\n",
+ "bs=0.2;#The brake specific fuel consumption in kg/kWh\n",
+ "p1=35.;#The pressure of air in the cylinder at the beginning of injection in bar\n",
+ "p2=55.;#Maximum cylinder pressure in bar\n",
+ "p3=180.;#Initial injection pressure in bar\n",
+ "p4=520.;#Maximum pressure at the injector in bar\n",
+ "Cd=0.75;#Coefficient of discharge\n",
+ "S=850.;#Specific gravity of fuel\n",
+ "p5=1.;#Atmospheric pressure in bar\n",
+ "a=16.;#The crank angle over which injection takes place in degrees\n",
+ "\n",
+ "#Calculations\n",
+ "Po=P/6.;#Power output per cylinder in kW\n",
+ "F=(Po*bs)/60.;#Fuel consumed per cylinder in kg/min\n",
+ "Fi=F/(N/2.);#Fuel injected per cycle in kg\n",
+ "T=a/(360.*(N/60));#Duration of injection in s\n",
+ "deltaP1=p3-p1;#Pressure difference at the beginning of injection in bar\n",
+ "deltaP2=p4-p2;#Pressure difference at the end of injection in bar\n",
+ "avP=(deltaP1+deltaP2)/2;#Average pressure difference in bar\n",
+ "V=Cd*(2.*(avP*10**5)/S)**(1./2);#Velocity of injection of fuel jet in m/s\n",
+ "Vo=Fi/S;#Volume of fuel injected per cycle in m**3/cycle\n",
+ "A=(Vo/(V*T));#Area of fuel orifices in m**2\n",
+ "\n",
+ "#Output\n",
+ "print 'The total orifice area required per injector if the injection takes place over 16 degree crank angle is (m^2) = ',round(A,11)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18 - pg 7.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The indicated mean effective pressure is (bar) = 8.25\n",
+ "(b)Indicated power is (kW) = 2.81\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.34\n",
+ "#calculate the indicated mean effective pressure and indicated power\n",
+ "#Input data\n",
+ "A=450.;#Area of indicator diagram in mm^2\n",
+ "l=60.;#Length of indicator diagram in mm\n",
+ "s=1.1;#Spring number in bar/mm\n",
+ "d=0.1;#Diameter of piston in m\n",
+ "L=0.13;#Length of stroke in m\n",
+ "N=400.;#Operating speed of the engine in rpm\n",
+ "\n",
+ "#Calculations\n",
+ "Av=A/l;#Average height of indicator diagram in mm\n",
+ "pm=Av*s;#Mean effective pressure in bar\n",
+ "np=N/2.;#Number of power strokes per minute for a four stroke diesel engine\n",
+ "Ar=(3.14*d**2)/4;#Area of the piston in m^2\n",
+ "I=(pm*10**5*L*Ar*np)/(1000*60);#Indicated power in kW\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The indicated mean effective pressure is (bar) = ',pm\n",
+ "print '(b)Indicated power is (kW) = ',round(I,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19 - pg 7.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The brake horse power is (kW) = 28.26\n",
+ "(b)Indicated horse power is (kW) = 35.063\n",
+ "(c)Thermal efficiency on IHP basis is (percent) = 37.33\n",
+ "(d)Thermal efficiency on BHP basis is (percent) = 30.08\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.35\n",
+ "#calculate the brake, Indicated horse power and Thermal efficiency\n",
+ "#Input data\n",
+ "d=25.;#Diameter of the bore in cm\n",
+ "l=0.4;#Stroke length in m\n",
+ "N=300.;#Operating speed of the engine in rpm\n",
+ "n=120.;#Number of explosions per minute\n",
+ "pm=6.7;#Mean effective pressure in kgf/cm**2\n",
+ "Tnet=90.;#Net brake load in kg\n",
+ "R=0.75;#Radius of brake drum in m\n",
+ "f=0.22;#Fuel supplied per minute in m**3\n",
+ "C=4500.;#Calorific value of fuel in kcal/m**3\n",
+ "\n",
+ "#Calculations\n",
+ "BHP=(2*3.14*R*N*Tnet)/4500;#Brake horse power in kW\n",
+ "A=(3.14*d**2)/4;#Area of the cylinder in cm**2\n",
+ "IHP=(pm*l*A*n)/4500;#Indicated horse power in kW\n",
+ "H=f*C;#Heat supplied by fuel per minute in kcal\n",
+ "nt1=((IHP*C)/(990*427))*100;#Thermal efficiency on IHP basis in percent\n",
+ "nt2=((BHP*C)/(990*427))*100;#Thermal efficiency on BHP basis in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The brake horse power is (kW) = ',round(BHP,2)\n",
+ "print '(b)Indicated horse power is (kW) = ',round(IHP,3)\n",
+ "print '(c)Thermal efficiency on IHP basis is (percent) = ',round(nt1,2)\n",
+ "print '(d)Thermal efficiency on BHP basis is (percent) = ',round(nt2,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 20 - pg 7.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The brake horse power is (kW) = 3.62\n",
+ "(b)Indicated horse power is (kW) = 4.341\n",
+ "(c)Mechanical efficiency is (percent) = 83.4\n",
+ "(d)Indicated thermal efficiency is (percent) = 33.0\n",
+ "(e)Brake thermal efficiency is (percent) = 27.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.36\n",
+ "#calculate the brake, Indicated horse power and Thermal efficiency\n",
+ "#Input data\n",
+ "D=0.6;#Brake wheel diameter of a constant speed compression ignition engine operating on four stroke cycle in m\n",
+ "t=0.01;#Thickness of brake band in m\n",
+ "N=500.;#Operating speed of the engine in rpm\n",
+ "W=20.;#Load on brake band in kgf\n",
+ "S=3.;#Spring balance reading in kgf\n",
+ "l=6.25;#Length of indicator diagram in cm\n",
+ "A=4.35;#Area of indicator diagram in cm**2\n",
+ "Sn=11.;#Spring number in kgf/cm**2/cm\n",
+ "d=10.;#Diameter of the bore in cm\n",
+ "L=0.13;#Length of the stroke in m\n",
+ "F=0.23;#Specific fuel consumption in kg/BHP hr\n",
+ "CV=10000.;#Heating value of fuel in kcal/kg\n",
+ "\n",
+ "#Calculations\n",
+ "BHP=(3.14*(D+t)*N*(W-S))/4500;#Brake horse power in kW\n",
+ "MEP=(A*Sn)/l;#Mean effective pressure in kgf/cm**2\n",
+ "Ar=(3.14*d**2)/4;#Area of the cylinder in cm**2\n",
+ "np=N/2;#Number of explosions per minute\n",
+ "IHP=(MEP*L*Ar*np)/4500;#Indicated horse power in kW\n",
+ "nm=(BHP/IHP)*100;#Mechanical efficiency in percentage\n",
+ "Wf=F*BHP;#Fuel consumption per hr in kg/hr\n",
+ "nt=((IHP*4500*60)/(Wf*CV*427))*100;#Indicated thermal efficiency in percentage\n",
+ "nb=((BHP*4500*60)/(Wf*CV*427))*100;#Brake thermal efficiency in kW\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The brake horse power is (kW) = ',round(BHP,2)\n",
+ "print '(b)Indicated horse power is (kW) = ',round(IHP,3)\n",
+ "print '(c)Mechanical efficiency is (percent) = ',round(nm,1)\n",
+ "print '(d)Indicated thermal efficiency is (percent) = ',round(nt,0)\n",
+ "print '(e)Brake thermal efficiency is (percent) = ',round(nb,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21 - pg 7.38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The indicated thermal efficiency is (percent) = 30.9\n",
+ "Mechanical efficiency is (percent) = 82.0\n",
+ "Brake thermal efficiency is (percent) = 25.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.38\n",
+ "#calculate the indicated thermal efficiency\n",
+ "#Input data\n",
+ "N=1200.;#Operating speed of a four cylinder engine in rpm\n",
+ "BHP=25.3;#The brake horse power when all 4 cylinders are operating in kW\n",
+ "T=10.5;#The average torque when one cylinder was cut out in mkgf\n",
+ "CV=10000.;#Calorific value of the fuel used in kcal/kg\n",
+ "f=0.25;#The amount of petrol used in engine per BHP hour\n",
+ "J=427.;#\n",
+ "\n",
+ "#Calculations\n",
+ "BHP1=(2*3.14*N*T)/4500.;#BHP for 3 cylinders when 1 cylinder is cut out in kW\n",
+ "IHP=BHP-BHP1;#IHP of one cylinder in kW\n",
+ "IHPt=IHP*4.;#Total IHP of the engine with 4 cylinders\n",
+ "Wf=(f*BHP)/60.;#Fuel used per minute in kg\n",
+ "ni=((IHPt*4500.)/(Wf*CV*J))*100;#Indicated thermal efficiency in percent\n",
+ "nm=(BHP/IHPt)*100;#Mechanical efficiency in percent\n",
+ "nb=(IHPt*nm)/100;#Brake thermal efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print 'The indicated thermal efficiency is (percent) = ',round(ni,1)\n",
+ "print 'Mechanical efficiency is (percent) = ',round(nm,1)\n",
+ "print 'Brake thermal efficiency is (percent) = ',round(nb,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22 - pg 7.39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)The IHP of the engine is (kW) = 38.6\n",
+ "(b)Mechanical efficiency is (percent) = 82.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.39\n",
+ "#calculate the IHP of the engine and Mechanical efficiency\n",
+ "#Input data\n",
+ "B=32.;#Brake horse power in kW with all cylinders working\n",
+ "B1=21.6;#BHP with number 1 cylinder cut out in kW\n",
+ "B2=22.3;#BHP with number 2 cylinder cut out in kW\n",
+ "B3=22.5;#BHP with number 3 cylinder cut out in kW\n",
+ "B4=23.;#BHP with number 4 cylinder cut out in kW\n",
+ "\n",
+ "#Calculations\n",
+ "I1=B-B1;#Indicated horse power of number 1 cylinder in kW\n",
+ "I2=B-B2;#IHP of number 2 cylinder in kW\n",
+ "I3=B-B3;#IHP of number 3 cylinder in kW\n",
+ "I4=B-B4;#IHP of number 4 cylinder in kW\n",
+ "I=I1+I2+I3+I4;#Total IHP of the engine in kW\n",
+ "nm=(B/I)*100;#Mechanical efficiency in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)The IHP of the engine is (kW) = ',I\n",
+ "print '(b)Mechanical efficiency is (percent) = ',round(nm,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 23 - pg 7.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Compression ratio = 6.6\n",
+ "(b)Indicated thermal efficiency is (percent) = 34.45\n",
+ "(c)Brake specific fuel consumption is (kg/kW sec) = 7.59e-05\n",
+ "(d)Bore diameter of the engine is (mm) = 98.99\n",
+ "(e)Stroke length of the engine is (mm) = 128.7\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.40\n",
+ "#calculate the Compression ratio, indicated thermal efficiency, brake specific fuel consumption and bore diameter\n",
+ "#Input data\n",
+ "r=15.;#The air fuel ratio by weight\n",
+ "CV=45000.;#Calorific value of fuel in kJ/kg\n",
+ "nm=85.;#Mechanical efficiency of 4 stroke 4 cylinder engine in percent\n",
+ "na=53.;#Air standard efficiency of the engine in percent\n",
+ "nr=65.;#Relative efficiency of the engine in percent\n",
+ "nv=80.;#Volumetric efficiency of the engine in percent\n",
+ "r1=1.3;#Stroke to bore ratio\n",
+ "p1=1.;#Suction pressure in bar\n",
+ "T=303.;#Suction temperature in K\n",
+ "S=3000.;#The operating speed of the engine in rpm\n",
+ "P=75.;#Power at brakes in kW\n",
+ "r2=1.4;#Ratio of specific heats for air\n",
+ "R1=0.287;#Characteristic gas constant for air fuel mixture in kJ/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "R=(1/(1-(na/100)))**(1/(r2-1));#Compression ratio of the engine\n",
+ "nti=((na/100)*(nr/100))*100;#The indicated thermal efficiency in percent\n",
+ "Pi=P/(nm/100);#Indicated power in kW\n",
+ "F=Pi/((nti*CV)/100);#Fuel per second injected in kg/sec\n",
+ "B=F/P;#Brake specific fuel consumption in kg/kWsec\n",
+ "A=1+r;#Mass of fuel mixture entering the engine foe every one kg of fuel in kg\n",
+ "m=A*F;#Mass of air fuel mixture per second in kg\n",
+ "V=(m*R1*T)/(p1*10**5/1000);#Volume of air fuel mixture supplied to the engine per sec\n",
+ "Vs=V/(nv/100);#Swept volume per second in m**3/sec\n",
+ "d=((Vs*2*60*4)/(S*3.14*r1*4))**(1./3)*1000;#Diameter of the bore in mm\n",
+ "L=r1*d;#Stroke length in mm\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Compression ratio = ',round(R,1)\n",
+ "print '(b)Indicated thermal efficiency is (percent) = ',nti\n",
+ "print '(c)Brake specific fuel consumption is (kg/kW sec) = ',round(B,7)\n",
+ "print '(d)Bore diameter of the engine is (mm) = ',round(d,2)\n",
+ "print '(e)Stroke length of the engine is (mm) = ',round(L,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 24 - pg 7.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Power available at brakes is (kW) = 24.23\n",
+ "(b)Indicated power developed is (kW) = 34.19\n",
+ "(c)Mechanical efficiency is (percent) = 70.85\n",
+ "(d)Brake Thermal efficiency is (percent) = 27.69\n",
+ "(e)Indicated thermal efficiency is (percent) = 39.08\n",
+ "Heat balance :\n",
+ "Heat supplied by fuel (kJ/hr) = 315000.0\n",
+ "Heat equivalent of power of brakes (percent) = 26.9\n",
+ "Heat equivalent of loss in friction (percent) = 11.4\n",
+ "Heat equivalent of removed through jacket (percent) = 26.6\n",
+ "Heat equivalent of carried away by gases (percent) = 26.91\n",
+ "Heat equivalent of unaccounted (percent) = 7.4\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.42\n",
+ "#calculate the power and efficiency in all cases\n",
+ "#Input data\n",
+ "d=0.3;#Diameter of the bore in m\n",
+ "L=0.45;#Stroke length in m\n",
+ "N=220.;#Operating speed of the engine in rpm\n",
+ "T=3600.;#Duration of trial in sec\n",
+ "F=7.;#Fuel consumption in kg per minute\n",
+ "CV=45000.;#Calorific value of fuel in kJ/kg\n",
+ "A=320.;#Area of indicator diagram in mm**2\n",
+ "l=60.;#Length of indicator diagram in mm\n",
+ "S=1.1;#Spring index in bar/mm\n",
+ "W=130.;#Net load on brakes in kg\n",
+ "D=1.65;#Diameter of brake drum in m\n",
+ "W1=500.;#Total weight of jacket cooling water in kg\n",
+ "t=40.;#Temperature rise of jacket cooling water in degrees celsius\n",
+ "t1=300.;#Temperature of exhaust gases in degrees celsius\n",
+ "ma=300.;#Air consumption in kg\n",
+ "sg=1.004;#Specific heat of exhaust gas in kJ/kgK\n",
+ "sw=4.185;#Specific heat of water in kJ/kgK\n",
+ "t2=25.;#Room temperature in degrees celsius\n",
+ "g=9.81;#gravity\n",
+ "\n",
+ "#Calculations\n",
+ "P=(W*g*3.14*D*N)/(1000*60);#Power available at brakes in kW\n",
+ "pm=(A*S)/l;#Mean effective pressure in bar\n",
+ "I=(pm*10**5*L*((3.14*d**2)/4)*N)/(1000.*2*60);#Indicated power developed in kW\n",
+ "nm=(P/I)*100;#Mechanical efficiency in percent\n",
+ "nt=(P/((F/T)*CV))*100;#Brake thermal efficiency in percent\n",
+ "ni=(I/((F/T)*CV))*100;#Indicated thermal efficiency in percent\n",
+ "Hs=F*CV;#Heat supplied on one hour basis\n",
+ "Hp=P*T;#Heat equivalent of brake power in kJ\n",
+ "Hf=(I-P)*3600;#Heat lost in friction in kJ\n",
+ "Hc=W1*t*sw;#Heat carried away by cooling water in kJ\n",
+ "He=(ma+F)*(t1-t2)*sg;#Heat carried away by exhaust gas in kJ\n",
+ "Hu=Hs-(Hp+Hf+Hc+He);#Heat unaccounted in kJ\n",
+ "nb=(He/Hs)*100;#Heat equivalent of power at brakes in percent\n",
+ "nf=(Hf/Hs)*100;#Heat lost in friction in percent\n",
+ "nw=(Hc/Hs)*100;#Heat removed by jacket water in percent\n",
+ "ne=(He/Hs)*100;#Heat carried away by exhaust gases in percent\n",
+ "nu=(Hu/Hs)*100;#Heat unaccounted in percent\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Power available at brakes is (kW) = ',round(P,2)\n",
+ "print '(b)Indicated power developed is (kW) = ',round(I,2)\n",
+ "print '(c)Mechanical efficiency is (percent) = ',nm\n",
+ "print '(d)Brake Thermal efficiency is (percent) = ',round(nt,2)\n",
+ "print '(e)Indicated thermal efficiency is (percent) = ',round(ni,2)\n",
+ "print 'Heat balance :'\n",
+ "print 'Heat supplied by fuel (kJ/hr) = ',Hs\n",
+ "print 'Heat equivalent of power of brakes (percent) = ',round(nb,1)\n",
+ "print 'Heat equivalent of loss in friction (percent) = ',round(nf,1)\n",
+ "print 'Heat equivalent of removed through jacket (percent) = ',round(nw,1)\n",
+ "print 'Heat equivalent of carried away by gases (percent) = ',round(ne,2)\n",
+ "print 'Heat equivalent of unaccounted (percent) = ',round(nu,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 25 - pg 7.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Indicated horse power is (kcal) = 42.62\n",
+ "(b)Brake horse power developed is (kcal) = 34.93\n",
+ "(c)Heat equivalent of friction is (kcal) = 81.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.46\n",
+ "#calculate the Indicated, brake horse power\n",
+ "#Input data\n",
+ "d=25.;#The bore diameter of a single cylinder 4 stroke engine in cm\n",
+ "l=0.38;#Stroke length in m\n",
+ "t=3600.;#Duration of test in sec\n",
+ "r=19710.;#Total number of revolutions\n",
+ "F=6.25;#Fuel oil used in kg\n",
+ "A=5.7;#Area of indicator diagram in cm**2\n",
+ "L=7.6;#Length of indicator diagram in cm\n",
+ "S=8.35;#Spring number in kgf/cm**3\n",
+ "P=63.5;#Net load on brake drum in kg\n",
+ "R=1.2;#Radius of brake drum in m\n",
+ "Ww=5.7;#Rate of coolant flow in kg/min\n",
+ "deltaT=44.;#Temperature rise of coolant in degrees celsius\n",
+ "T1=15.5;#Atmospheric temperature in degrees celsius\n",
+ "As=30.;#Air supplied per kg of fuel\n",
+ "CV=10600.;#Calorific value of fuel in kcal/kg\n",
+ "Te=390.;#Exhaust gas temperature in degrees celsius\n",
+ "sm=0.25;#Mean specific heat of exhaust gas\n",
+ "\n",
+ "#Calculations\n",
+ "Hs=(F*CV)/60.;#Heat supplied by fuel per minute in kcal\n",
+ "pm=(A*S)/L;#Mean effective pressure in kgf/cm**2\n",
+ "I=(pm*l*(3.14*d**2)*r)/(4*60.*2*4500);#Indicated horse power in kW\n",
+ "B=(P*R*2*3.14*r)/(4500*60);#Brake horse power in kW\n",
+ "Hei=(I*4500)/427.;#Heat equivalent of IHP/min in kcal\n",
+ "Heb=(B*4500)/427.;#Heat equivalent of BHP/min in kcal\n",
+ "Hf=Hei-Heb;#Heat in friction per minute in kcal\n",
+ "Hc=Ww*deltaT;#Heat carried away by coolant in kcal\n",
+ "We=(F+(As*F))/60.;#Weight of exhaust gases per minute\n",
+ "He=We*(Te-T1)*sm;#Heat carried away by exhaust gases in kcal\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Indicated horse power is (kcal) = ',round(I,2)\n",
+ "print '(b)Brake horse power developed is (kcal) = ',round(B,2)\n",
+ "print '(c)Heat equivalent of friction is (kcal) = ',round(Hf,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 26 - pg 7.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage of heat carried away by exhaust gas is (percent) = 24.06\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.48\n",
+ "#calculate the percentage of heat carried away\n",
+ "#Input\n",
+ "F=10.;#Quantity of fuel supplied during the trial of a diesel engine in kg/hr\n",
+ "CV=42500.;#Calorific value of fuel in kJ/kg\n",
+ "r=20.;#Air fuel ratio\n",
+ "T=20.;#Ambient temperature in degrees celsius\n",
+ "mw=585.;#Water circulated through the gas calorimeter in litres/hr\n",
+ "T1=35.;#Temperature rise of water through the calorimeter in degrees celsius\n",
+ "T2=95.;#Temperature of gases at exit from the calorimeter in degrees celsius\n",
+ "se=1.05;#Specific heat of exhaust gases in kJ/kgK\n",
+ "sw=4.186;#Specific heat of water in kJ/kgK\n",
+ "\n",
+ "#Calculations\n",
+ "M=(F/60.)*(r+1);#Mass of exhaust gases formed per minute\n",
+ "H=((mw/60.)*sw*T1)+(M*se*(T2-T));#Heat carried away by the exhaust gases per minute in kJ/min\n",
+ "Hs=(F/60.)*CV;#Heat supplied by fuel per minute in kJ/min\n",
+ "nh=(H/Hs)*100;#Percentage of heat carried away by the exhaust gas\n",
+ "\n",
+ "#Output\n",
+ "print 'Percentage of heat carried away by exhaust gas is (percent) = ',round(nh,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 27 - pg 7.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage of heat carried away by exhaust gases is (percent) = 27.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.49\n",
+ "#calculate the Percentage of heat carried away\n",
+ "#Input data\n",
+ "F=11.;#Fuel used per hour observed during the trial of a single cylinder four stroke diesel engine in kg\n",
+ "mc=85.;#Carbon present in the fuel in percent\n",
+ "mh=14.;#Hydrogen present in the fuel in percent\n",
+ "mn=1.;#Non combustibles present in the fuel in percent\n",
+ "CV=50000.;#Calorific value of fuel in kJ/kg\n",
+ "Vc=8.5;#Percentage of carbon dioxide present in exhaust gas by Volumetric analysis\n",
+ "Vo=10.;#Oxygen present in exhaust gases in percent\n",
+ "Vn=81.5;#Nitrogen present in exhaust gases in percent\n",
+ "Te=400.;#Temperature of exhaust gases in degrees celsius\n",
+ "se=1.05;#Specific heat of exhaust gas in kJ/kg\n",
+ "Pp=0.030;#Partial pressure of steam in the exhaust in bar\n",
+ "Ta=20.;#Ambient temperature in degrees celsius\n",
+ "hs=2545.6;#Enthalpy of saturated steam in kJ/kg\n",
+ "Tsa=24.1;#Saturation temperature from graph in degrees celcius\n",
+ "Cp=2.1;#Specific heat in kJ/kg K\n",
+ "hst=3335.;#Enthalpy of super heated steam in kJ/kg\n",
+ "F1=9.\n",
+ "#Calculations\n",
+ "Ma=(Vn*mc)/(33.*Vc);#Mass of air supplied per kg of fuel in kg\n",
+ "Me=Ma+1;#Mass of exhaust gases formed per kg of fuel in kg\n",
+ "me=(Me*F)/60.;#Mass of exhaust gases formed per minute in kg\n",
+ "ms=F1*(mh/100.);#Mass of steam formed per kg of fuel in kg\n",
+ "ms1=(ms*F)/60.;#Mass of steam formed per minute in kg\n",
+ "mde=me-ms1;#Mass of dry exhaust gases formed per minute in kg\n",
+ "H=mde*se*(Te-Ta);#Heat carried away by the dry exhaust gases per minute in kJ/min\n",
+ "Es=hs+(Cp*(Te-Tsa));#Enthalpy of superheated steam in kJ/kg\n",
+ "He=ms1*hst;#Heat carried away by steam in the exhaust gases in kJ/min\n",
+ "Hl=H+He;#Total heat lost through dry exhaust gases and steam in kJ/min\n",
+ "Hf=(F/60.)*CV;#Heat supplied by fuel per minute in kJ/min\n",
+ "nh=(Hl/Hf)*100.;#Percentage of heat carried away by exhaust gases\n",
+ "\n",
+ "#Output\n",
+ "print 'Percentage of heat carried away by exhaust gases is (percent) = ',round(nh,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 28 - pg 7.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The net increase in brake power is (kW) = 29.15\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 7.51\n",
+ "#calculate the net increase in brake power\n",
+ "#Input data\n",
+ "C=0.0033;#The capacity of a four stroke engine of compression ignition type\n",
+ "I=13.;#Average indicated power developed in kW/m**3\n",
+ "N=3500.;#Operating speed of the engine\n",
+ "nv=80.;#Volumetric efficiency in percentage\n",
+ "p1=1.013;#Initial pressure in bar\n",
+ "T1=298.;#Initial temperature in K\n",
+ "r=1.75;#Pressure ratio of the engine\n",
+ "ni=75.;#The isentropic efficiency in percentage\n",
+ "nm=80.;#mechanical efficiency in percentage\n",
+ "r1=1.4;#Polytropic index\n",
+ "\n",
+ "#Calculations\n",
+ "Vs=(N/2.)*C;#Swept volume in m**3/min\n",
+ "Vi=Vs*(nv/100);#Unsupercharged engine inducted volume in m**3/min\n",
+ "Pb=p1*r;#Blower delivery pressure in bar\n",
+ "T2s=((r)**((r1-1)/r1))*T1;#Final temperature in K\n",
+ "T2=((T2s-T1)/(ni/100.))+T1;#Blower delivery temperature in K\n",
+ "Ve=((Pb*Vs)*T1)/(T2*p1);#Equivalent volume at 1.013 bar and 298K in m**3/min\n",
+ "Vin=Ve-Vi;#Increase in inducted volume of air in m**3/min\n",
+ "Pin=Vin*I;#Increase in indicated power due to extra air inducted in kW\n",
+ "Pinp=((Pb-p1)*Vs*100.)/60.;#Increase in indicated power due to increase in induction pressure in kW\n",
+ "Pt=Pin+Pinp;#Total increase in indicated power in kW\n",
+ "nb=Pt*(nm/100.);#Total increase in brake power efficiency in kW\n",
+ "ma=(Pb*Vs*100.)/(60*0.287*T2);#Mass of air delivered by the blower in kg/s\n",
+ "Wb=ma*1.005*(T2-T1);#Work input to air by blower in kW\n",
+ "Pb1=Wb/(nv/100.);#Power required to drive the blower in kW\n",
+ "Pb2=nb-Pb1;#Net increase in brake power in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'The net increase in brake power is (kW) = ',round(Pb2,2)\n"
+ ]
+ }
+ ],
+ "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/Thermal_Engineering_by_K_K_Ramalingam/Chapter8.ipynb b/Thermal_Engineering_by_K_K_Ramalingam/Chapter8.ipynb new file mode 100755 index 00000000..6e460479 --- /dev/null +++ b/Thermal_Engineering_by_K_K_Ramalingam/Chapter8.ipynb @@ -0,0 +1,289 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8 - Steam Nozzles and Turbines"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 - pg 8.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Final velocity of steam is (m/s) = 596.97\n",
+ "(b)Percentage reduction in velocity is (percent) = 7.87\n"
+ ]
+ }
+ ],
+ "source": [
+ "#calculate the Final velocity and percentage reduction in velocity\n",
+ "#Input data\n",
+ "P1=12.;#Pressure of Dry saturated steam entering a steam nozzle in bar\n",
+ "P2=1.5;#Discharge pressure of Dry saturated steam in bar\n",
+ "f=0.95;#Dryness fraction of the discharged steam\n",
+ "l=12.;#Heat drop lost in friction in percentage\n",
+ "hg1=2784.8;#Specific enthalpy of steam at 12 bar from steam tables in kJ/kg\n",
+ "hg2=2582.3;#Specific enthalpy of 0.95 dry steam at 1.5 bar from steam tables in kJ/kg\n",
+ "\n",
+ "#Calculations\n",
+ "hd=hg1-hg2;#Heat drop in kJ/kg\n",
+ "V1=44.72*(hd)**(0.5);#Velocity of steam at discharge from the nozzle in m/s\n",
+ "n=1-(l/100.);#Nozzle coefficient when 12 percent heat drop is lost in friction\n",
+ "V2=44.72*(n*hd)**(0.5);#Velocity of steam in m/s\n",
+ "percentV=((V2-550.)/V2)*100;#Percentage reduction in velocity\n",
+ "#Output\n",
+ "print '(a)Final velocity of steam is (m/s) = ',round(V2,2)\n",
+ "print '(b)Percentage reduction in velocity is (percent) = ',round(percentV,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 - pg 8.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Velocity (m/s) = 886.98\n",
+ "The mass of steam discharged,when the exit diameter of the nozzle is 12mm is (kg/hour) = 236.47\n",
+ "The answers given in textbook are wrong. Please check using a calculator\n"
+ ]
+ }
+ ],
+ "source": [
+ "#calculate the mass of steam\n",
+ "#Input data\n",
+ "P1=12.;#Initial pressure of dry saturated steam expanded in a nozzle in bar\n",
+ "P2=0.95;#Final pressure of dry saturated steam expanded in a nozzle in bar\n",
+ "f=10.;#Frictional loss in the nozzle of the total heat drop in percentage\n",
+ "d=12.;#Exit diameter of the nozzle in mm\n",
+ "hd=437.1;#Heat drop in kJ/kg from steam tables\n",
+ "q=0.859;#Dryness fraction of steam at discharge pressure\n",
+ "vg=1.777;#Specific volume of dry saturated steam at 0.95 bar\n",
+ "\n",
+ "#Calculations\n",
+ "n=1.-(f/100.);#Nozzle coefficient from moiller chart\n",
+ "V2=44.72*(n*hd)**(0.5);#Velocity of steam at nozzle exit in m/s\n",
+ "A=(3.14/4)*(0.012)**(2);#Area of the nozzle at the exit in mm**2\n",
+ "m=((A*V2)/(q*vg))*3600;#Mass of steam discharged through the nozzle per hour in kg/hour\n",
+ "\n",
+ "#Output\n",
+ "print 'Velocity (m/s) = ',round(V2,2)\n",
+ "print 'The mass of steam discharged,when the exit diameter of the nozzle is 12mm is (kg/hour) = ',round(m,2)\n",
+ "print 'The answers given in textbook are wrong. Please check using a calculator'"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 - pg 8.49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Throat area of steam nozzle is (cm^2) = 1.674\n",
+ "(b)Exit area of steam nozzle is (cm^2) = 2.016\n",
+ "(c)Exit velocity of the nozzle is (m/s) = 831.62\n"
+ ]
+ }
+ ],
+ "source": [
+ "#calculate the throat area of steam and exit area,exit velocity\n",
+ "#Input data\n",
+ "P1=12.;#Inlet pressure of steam nozzle in bar\n",
+ "T1=250.;#Inlet temperature of steam nozzle in degrees celcius\n",
+ "P2=2.;#Final pressure of the steam nozzle in bar\n",
+ "n=1.3;#Polytropic constant for superheated steam\n",
+ "St=6.831;#For isentropic expansion, entropy remains constant in kJ/kg\n",
+ "h1=2935.4#Enthalpy of steam at P1 from steam table in kJ/kg\n",
+ "ht=2860.;#Enthalpy of steam at pt in kJ/kg\n",
+ "vt=0.325;#Specific volume of steam at the throat conditions in m**3/kg\n",
+ "m=0.2;#Mass of steam discharged through the nozzle in kg/hour\n",
+ "q=0.947;#The dryness fraction of steam at exit from steam tables\n",
+ "hg=2589.6;#Enthalpy of steam at exit in kJ/kg\n",
+ "vs=0.8854;#Specific volume of saturated steam in m**3/kg\n",
+ "\n",
+ "#Calculations\n",
+ "pt=(P2/(n+1))**(n/(n-1))*P1;#Critical pressure ratio i.e.,Throat pressure in bar\n",
+ "Vt=(2*1000*(h1-ht))**(0.5);#Velocity of steam at throat in m/s\n",
+ "At=((m*vt)/Vt)*10**4;#Area of the throat in cm**2 from continuity equation\n",
+ "ve=q*vs;#Specific volume of steam at exit in m**3/kg\n",
+ "Ve=(2*1000*(h1-hg))**(0.5);#Velocity of steam at nozzle exit in m/s\n",
+ "Ae=((m*ve)/Ve)*10**4;#Exit area in cm**2\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Throat area of steam nozzle is (cm^2) = ',round(At,3)\n",
+ "print '(b)Exit area of steam nozzle is (cm^2) = ',round(Ae,3)\n",
+ "print '(c)Exit velocity of the nozzle is (m/s) = ',round(Ve,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 - pg 8.51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Final exit velocity of steam is (m/s) = 785.2\n",
+ "(b)Cross sectional area of the nozzle at exit for maximum discharge is (mm^2) = 678.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#calculate the Final exit velocity, Cross sectional area\n",
+ "#Input data\n",
+ "P1=10.;#Pressure of steam in bar\n",
+ "f=0.9;#Dryness fraction of steam\n",
+ "At=350.;#Throat area in mm**2\n",
+ "Pb=1.4;#Back pressure in bar\n",
+ "h1=2574.8;#Enthalpy of steam at nozzle inlet from steam tables in kJ/kg\n",
+ "ft=0.87;#Dryness fraction of steam at throat pressure\n",
+ "fe=0.81;#Dryness fraction of steam at exit pressure\n",
+ "ht=2481.;#Enthalpy of steam at throat pressure at ft in kJ/kg\n",
+ "vt=0.285;#Specific volume of steam at throat in m**3/kg\n",
+ "he=2266.2;#Enthalpy of steam at exit conditions in kJ/kg\n",
+ "ve=1.001;#Specific volume of steam at exit conditions in m**3/kg\n",
+ "\n",
+ "#Calculations\n",
+ "Pt=0.582*P1;#Steam pressure at the throat in bar\n",
+ "hd=h1-ht;#Enthalpy drop upto the throat in kJ/kg\n",
+ "Vt=44.7*(hd)**(0.5);#Velocity of steam at the throat in m/s\n",
+ "hde=h1-he;#Enthalpy drop from nozzle entrance to exit in kJ/kg\n",
+ "Ve=44.7*(hde)**(0.5);#Velocity of steam at nozzle exit in m/s\n",
+ "Ae=(At*Vt*ve)/(Ve*vt);#Exit area of nozzle from the mass rate of flow equation in mm**2\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Final exit velocity of steam is (m/s) = ',round(Ve,1)\n",
+ "print '(b)Cross sectional area of the nozzle at exit for maximum discharge is (mm^2) = ',round(Ae,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 - pg 8.52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Velocity of steam at throat is (m/s) = 531.0\n",
+ "(b)Temperature of steam at the throat is (degrees celcius) = 202.8\n",
+ "(c)Cone angle of the divergent portion is (degrees) = 2.134\n"
+ ]
+ }
+ ],
+ "source": [
+ "#calculate the Velocity of steam at throat, temperature and cone angle\n",
+ "#Input data\n",
+ "import math\n",
+ "P1=7.;#Inlet pressure of a convergent divergent steam nozzle in bar\n",
+ "T1=275.;#Inlet temperature of the nozzle in degrees celcius\n",
+ "P2=1.;#Discharge pressure of steam in bar\n",
+ "l=60.;#Length of diverging portion of the nozzle in mm\n",
+ "dt=6.;#Diameter of the throat in mm\n",
+ "f1=10.;#Percent of total available enthalpy drop lost in friction in the diverging portion in percentage\n",
+ "h1=3006.9;#Enthalpy of steam at 7bar pressure and 275 degrees celcius in kJ/kg\n",
+ "ht=2865.9;#Enthalpy at the throat from Moiller chart in kJ/kg\n",
+ "he=2616.7;#Enthalpy at the exit from moiller chart in kJ/kg\n",
+ "vt=0.555;#Specific volume of steam at throat in m**3/kg\n",
+ "Tt=202.8;#Temperature of steam at throat in degrees celcius from moiller chart\n",
+ "ve=1.65;#Volume of steam at exit in m**3/kg\n",
+ "\n",
+ "#Calculations\n",
+ "Pt=0.546*P1;#The throat pressure for maximum discharge in bar\n",
+ "hd=h1-ht;#Enthalpy drop upto throat in kJ/kg\n",
+ "Vt=44.7*(hd)**(0.5);#Velocity of steam at throat in m/s\n",
+ "hid=h1-he;#Total isentropic drop from 7 bar,275 degrees celcius to 1 bar in kJ/kg\n",
+ "hda=(1-(f1/100.))*(hid);#Actual heat drop in kJ/kg\n",
+ "Ve=44.7*(hda)**(0.5);#Velocity at exit in m/s\n",
+ "At=(3.14/4)*(6./1000)**(2);#Throat area of the nozzle in m**2\n",
+ "m=(At*Vt)/vt;#Mass flow rate at nozzle throat in kg/s\n",
+ "Ae=((m*ve)/Ve)*10**4;#Exit area of the nozzle in cm**2\n",
+ "de=(((Ae*4)/3.14)**(0.5))*10;#Diameter of the nozzle at exit in mm\n",
+ "alpha=math.atan((de-dt)/(2*60))*180/math.pi;#Half of the cone angle of the nozzle in degrees\n",
+ "alpha1=2*alpha;#Cone angle of the nozzle in degrees\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Velocity of steam at throat is (m/s) = ',round(Vt,0)\n",
+ "print '(b)Temperature of steam at the throat is (degrees celcius) =',Tt\n",
+ "print '(c)Cone angle of the divergent portion is (degrees) =',round(alpha1,3)\n"
+ ]
+ }
+ ],
+ "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/Thermal_Engineering_by_K_K_Ramalingam/Chapter9.ipynb b/Thermal_Engineering_by_K_K_Ramalingam/Chapter9.ipynb new file mode 100755 index 00000000..d492b399 --- /dev/null +++ b/Thermal_Engineering_by_K_K_Ramalingam/Chapter9.ipynb @@ -0,0 +1,1013 @@ +{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9 - Air Compressors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 - pg 9.18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Work required in a isothermal compression is (kJ/kg) = 155.813\n",
+ "(b)Work required in a polytropic compression is (kJ/kg) = 181.578\n",
+ "(c)Work required in a isentropic compression is (kJ/kg) = 203.47\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.18\n",
+ "#calculate the Work required in all cases\n",
+ "#Input data\n",
+ "import math\n",
+ "m=1.;#Mass of air that has to be compressed in kg\n",
+ "P1=1.;#Initial pressure of a single stage reciprocating air compressor in bar\n",
+ "P2=6.;#Final pressure in bar\n",
+ "T1=303.;#Initial temperature of air in K\n",
+ "n=1.2;#Polytropic index of air\n",
+ "R=287.;#Gas constant for air in J/kg K\n",
+ "r=1.4;#Isentropic index\n",
+ "\n",
+ "#Calculations\n",
+ "W1=(m*R*T1*math.log(P2/P1))/1000;#Work required for compression in kJ/kg in Isothermal compression process\n",
+ "W2=((n/(n-1))*m*R*T1*((P2/P1)**((n-1)/n)-1))/1000;#Work required for compression in a polytropic compression process in kJ/kg\n",
+ "W3=((r/(r-1))*m*R*T1*((P2/P1)**((r-1)/r)-1))/1000;#Work required for compression in a Isentropic compression process in kJ/kg\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Work required in a isothermal compression is (kJ/kg) = ',round(W1,3)\n",
+ "print '(b)Work required in a polytropic compression is (kJ/kg) = ',round(W2,3)\n",
+ "print '(c)Work required in a isentropic compression is (kJ/kg) = ',round(W3,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 - pg 9.19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Length of the cylinder is (m) = 0.625\n",
+ "(b)Diameter of the cylinder is (mm) = 351.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.19\n",
+ "#calculate the Length and diameter of the cylinder\n",
+ "#Input data\n",
+ "Pi=60000.;#Indicated power of a double acting air compressor in W\n",
+ "P1=1.;#Initial pressure in bar\n",
+ "T1=293.;#Initial temperature in K\n",
+ "n=1.2;#Polytropic index of the process\n",
+ "P2=8.;#Final pressure in bar\n",
+ "N=120.;#Speed at which the cylinder operates in rpm\n",
+ "S=150.;#Average piston speed in m/min\n",
+ "\n",
+ "#Calculations\n",
+ "L=S/(2*N);#Length of the stroke in m\n",
+ "X=(3.14*L)/4;#X=V/D**2 i.e.,Volume of air before compression/square of the diameter in m\n",
+ "Y=((n/(n-1))*P1*10**5*X*(((P2/P1)**((n-1)/n))-1));#Y=W/D**2 Work done by the compressor per cycle in N/m\n",
+ "Nw=2*N;#Number of working strokes per minute since it is a double acting cylinder\n",
+ "D=(((Pi*60)/(Y*Nw))**(0.5))*1000;#Diameter of the cylinder in mm\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Length of the cylinder is (m) = ',L\n",
+ "print '(b)Diameter of the cylinder is (mm) = ',round(D,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 -pg 9.20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The indicated power of the compressor is (kW) = 2.684\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.20\n",
+ "#calculate the Indicated power of compressor\n",
+ "#Input data\n",
+ "D=0.15;#Diameter of a cylinder of a single acting reciprocating air compressor in m\n",
+ "L=0.2;#Length of the stroke in m\n",
+ "P1=1.;#The pressure at which compressor sucks air in bar\n",
+ "P2=10.;#Final pressure in bar\n",
+ "T1=298.;#Initial Temperature in K\n",
+ "N=150.;#Operating speed of the compressor in rpm\n",
+ "n=1.3;#Polytropic index of the process\n",
+ "\n",
+ "#Calculations\n",
+ "V1=((3.14*D**2*L)/4);#Volume of air before compression in m**3\n",
+ "W=((n/(n-1))*P1*10**5*V1*((P2/P1)**((n-1)/n)-1));#Work done by the compressor for a polytropic compression of air in Nm\n",
+ "Pi=((W*N)/60)/1000;#Indicated power of the compressor in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'The indicated power of the compressor is (kW) = ',round(Pi,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 - pg 9.21"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of air delivered per minute is (kg/min) = 5.64\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.21\n",
+ "#calculate the mass of air delivered\n",
+ "#Input data\n",
+ "D=0.25;#Diameter of the cylinder of a single acting air compressor in m\n",
+ "L=0.4;#Length of the stroke in m\n",
+ "P1=1.;#Initial Pressure of the compressor in bar\n",
+ "T1=303.;#Initial temperature of the compressor in K\n",
+ "P2=6.;#Pressure during running in bar\n",
+ "N=250.;#Operating speed of the compressor in rpm\n",
+ "R=287.;#Gas constant in J/kg K \n",
+ "\n",
+ "#Calculations\n",
+ "V1=(3.14*D**2*L)/4;#Volume of air before compression in m**3\n",
+ "m=(P1*10**5*V1)/(R*T1);#Mass of air delivered by the compressor per stroke in kg/stroke\n",
+ "Nw=N;#Since single acting cylinder number of working stroke is equal to Operating speed of the compressor in rpm\n",
+ "ma=m*Nw;#Mass of air delivered per minute in kg/min\n",
+ "\n",
+ "#Output\n",
+ "print 'Mass of air delivered per minute is (kg/min) = ',round(ma,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 - pg 9.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Temperature of air delivered by the compressor is (K) = 546.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.22\n",
+ "#calculate the temperature of air\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of a single acting compressor in bar\n",
+ "P2=12.;#Final pressure in bar\n",
+ "N=500.;#Operating speed of the compressor in rpm\n",
+ "T1=308.;#Inlet air temperature in K\n",
+ "n=1.3;#Polytropic index\n",
+ "\n",
+ "#Calculations\n",
+ "T2=T1*(P2/P1)**((n-1)/n);#Temperature of air delivered by the compressor in K\n",
+ "\n",
+ "#Output\n",
+ "print 'Temperature of air delivered by the compressor is (K) = ',round(T2,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6 - pg 9.22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Temperature at the end of isentropic compression is (K) = 555.06\n",
+ "(b)Temperature at the end of polytropic compression is (K) = 486.49\n",
+ "(c)Temperature at the end of isotropic compression is (K) = 293.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.22\n",
+ "#calculate the temperature in all cases\n",
+ "#Input data\n",
+ "P1=1.;#Pressure at which air is sucked by a compressor in bar\n",
+ "T1=293.;#Initial temperature in K\n",
+ "P2=9.;#Delivery pressure after compression in bar\n",
+ "r=1.41;#Isentropic index\n",
+ "n=1.3;#Polytropic index\n",
+ "\n",
+ "#Calculations\n",
+ "T21=T1*((P2/P1)**((r-1)/r));#Temperature at the end of isentropic compression process in K\n",
+ "T22=T1*((P2/P1)**((n-1)/n));#Temperature at the end of isentropic compression process in K\n",
+ "T23=T1;#Temperature at the end of isotropic compression process in K (Temperature remains constant)\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Temperature at the end of isentropic compression is (K) = ',round(T21,2)\n",
+ "print '(b)Temperature at the end of polytropic compression is (K) = ',round(T22,2)\n",
+ "print '(c)Temperature at the end of isotropic compression is (K) = ',T23\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 - pg 9.23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Work done by air during suction is (J) = 7000.0\n",
+ "(b)Work done on air during compression is (J) = -14754.0\n",
+ "(c)Work done on air during delivery is (J) = 12902.0\n",
+ "(d)Net work done on air during the cycle is (kJ) = 20.656\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.23\n",
+ "#calculate the work done in all cases\n",
+ "#Input data\n",
+ "V1=0.07;#Displacement of the piston of a single stage single cylinder air compressor in m**3\n",
+ "P1=1;#Initial pressure in bar\n",
+ "T1=308;#Initial temperature of air in K\n",
+ "P2=8.5;#Pressure after the compression process in bar\n",
+ "r=1.4;#Isentropic compression \n",
+ "\n",
+ "#Calculations\n",
+ "V2=V1*((P1/P2)**(1/1.4));#Final volume of the cylinder in m**3\n",
+ "W1=P1*10**5*V1;#Work done by air during suction in Nm (or) J\n",
+ "W2=(P1*10**5*V1*(1-(P2/P1)**((r-1)/r)))/(r-1);#Work done by air during compression in Nm or J\n",
+ "Wa1=P2*10**5*V2;#Work done on air during delivery in Nm or J\n",
+ "Wa2=((-W2)+Wa1-W1)/1000;#Net work done on air during the cycle in kJ\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Work done by air during suction is (J) = ',W1\n",
+ "print '(b)Work done on air during compression is (J) = ',round(W2,0)\n",
+ "print '(c)Work done on air during delivery is (J) = ',round(Wa1,0)\n",
+ "print '(d)Net work done on air during the cycle is (kJ) = ',round(Wa2,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8 - pg 9.25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Work done by air during suction is (Nm) = 5000.0\n",
+ "(b)Work done on air during Isothermal compression is (Nm) = -9730.0\n",
+ "(c)Heat transferred during this process is (J) = 9730.0\n",
+ "(d)Work done on air during delivery is (Nm) = 5000.0\n",
+ "(e)Net work done during the cycle is (Nm) = 9729.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.25\n",
+ "#calculate the work done in all cases\n",
+ "import math\n",
+ "#Input data\n",
+ "V1=0.05;#displacement of a piston of a single cylinder single stage reciprocating compressor in m**3\n",
+ "P1=1.;#pressure of air sucked in the compressor in bar\n",
+ "T1=300.;#Initial Temperature of air in K\n",
+ "P2=7.;#Pressure after the compression process in bar\n",
+ "\n",
+ "#Calculations\n",
+ "V2=(P1*V1)/P2;#Volume after the compression in m**3\n",
+ "W1=P1*10**5*V1;#Work done by air during suction in Nm\n",
+ "W2=P1*10**5*V1*math.log(V2/V1);#Work done on sir during isothermal compression in Nm\n",
+ "H=-W2;#Heat transferred to the cylinder walls in Nm or J\n",
+ "W3=P1*10**5*V1;#Work done on air during delivery in Nm\n",
+ "Wn=W1+(-W2)-W3;#Net work done during the cycke in N m\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Work done by air during suction is (Nm) = ',W1\n",
+ "print '(b)Work done on air during Isothermal compression is (Nm) = ',round(W2,0)\n",
+ "print '(c)Heat transferred during this process is (J) = ',round(H,0)\n",
+ "print '(d)Work done on air during delivery is (Nm) = ',W3\n",
+ "print '(e)Net work done during the cycle is (Nm) = ',math.floor(Wn)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9 - pg 9.26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power required to compress and deliver 2kg of air per minute is (kW) = 7.296\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.26\n",
+ "#calculate the Power required\n",
+ "#Input data\n",
+ "m=2.;#Mass of air delivered per second in kg\n",
+ "P1=1.;#Initial pressure of a single stage compressor in bar\n",
+ "T1=293.;#Initial temperature in K\n",
+ "P2=7.;#Final pressure in bar\n",
+ "n=1.4;#Polytropic index\n",
+ "R=287.;#Gas constant in J/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "W=((n/(n-1))*m*R*T1*(((P2/P1)**((n-1)/n))-1))/(60*1000);#Work done by compressor in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'Power required to compress and deliver 2kg of air per minute is (kW) = ',round(W,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10 - pg 9.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Work done by the compressor per cycle is (Nm) = 781.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.27\n",
+ "#calculate the Work done\n",
+ "#Input data\n",
+ "import math\n",
+ "D=0.15;#Diameter of the bore of a single stage single acting reciprocating air compressor in m\n",
+ "L=0.225;#Stroke length in m\n",
+ "P1=1;#Pressure of air received in bar\n",
+ "T1=308.;#Temperature of initial air in K\n",
+ "P2=6.5;#Delivery pressure in bar\n",
+ "n=1.3;#Polytropic index\n",
+ "\n",
+ "#Calculations\n",
+ "Vs=(math.pi*D**2*L)/4;#Stroke volume of the compressor in m**3\n",
+ "Vc=0.05*Vs;#Clearance volume in m**3\n",
+ "V1=Vs+Vc;#Initial volume of air in m**3\n",
+ "V4=Vc*(P2/P1)**(1/n);#The air in the clearance volume expands during suction stroke in m**3\n",
+ "V=V1-V4;#Effective swept volume in m**3\n",
+ "W=((n/(n-1))*P1*10**5*(V1-V4)*(((P2/P1)**((n-1)/n))-1));#Work done by the compressor per cycle in Nm\n",
+ "\n",
+ "#Output\n",
+ "print 'Work done by the compressor per cycle is (Nm) = ',round(W,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11 - pg 9.28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Free air delivered per cycle is (m^3) = 0.000356\n",
+ "(b)Free air delivered per minute is (m^3/min) = 0.1424\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.28\n",
+ "#calculate the free air delivered\n",
+ "#Input data\n",
+ "D=0.1;#Diameter of the bore of a single acting compressor in m\n",
+ "L=0.1;#Length of the stroke in m\n",
+ "N=400.;#Operating speed of the compressor in in rpm\n",
+ "Vc=0.00008;#Clearance volume in m**3\n",
+ "n=1.2;#Polytropic index\n",
+ "T1=303.;#Initial temperature in K\n",
+ "Tf=293.;#Final temperature in K\n",
+ "P1=0.95;#Initial pressure in bar\n",
+ "P2=8.;#Final pressure in bar\n",
+ "Pf=1.013;#Free air pressure in bar\n",
+ "\n",
+ "#Calculations\n",
+ "Vs=(3.14*D**2*L)/4.;#Stroke volume of the compressors in m**3\n",
+ "V1=Vc+Vs;#Initial volume of air is equal to cylinder volume in m**3\n",
+ "V4=Vc*(P2/P1)**(1/n);#Air in the clearance volume expands during suction stroke to V4\n",
+ "Ve=V1-V4;#Effective swept volume in m**3\n",
+ "Vf=(P1*(V1-V4)*Tf)/(T1*Pf);#Free air delivered per cycle can be obtained in m**3\n",
+ "A=Vf*N;#Free air delivered per minute in m**3/min\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Free air delivered per cycle is (m^3) = ',round(Vf,6)\n",
+ "print '(b)Free air delivered per minute is (m^3/min) = ',round(A,4)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12 - pg 9.29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Power of the compressor when it runs at 300 rpm is (kW) = 10.718\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.29\n",
+ "#calculate the Power of the compressor\n",
+ "#Input data\n",
+ "P1=1.;#Pressure of air drawn by a two stage single acting reciprocating air compressor in bar\n",
+ "T1=293.;#Initial temperature in K\n",
+ "P3=60.;#Final pressure after the compression in bar\n",
+ "P2=10.;#Pressure after compression in the LP cylinder in bar\n",
+ "T2=303.;#Temperature after cooling in K\n",
+ "D=0.16;#Diameter of a cylinder in m\n",
+ "L=0.2;#Stroke length of the cylinder in m\n",
+ "n=1.3;#Polytropic index\n",
+ "N=300.;#Operating speed of the compressor in rpm\n",
+ "R=287.;#Gas constant in J/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "V1=(3.14*D**2*L)/4;#Volume of the LP cylinder in m**3\n",
+ "V2=(P1*V1*T2)/(T1*P2);#Volume of the HP cylinder in m**3\n",
+ "W=(n/(n-1))*(P1*10**5*V1*(((P2/P1)**((n-1)/n))-1)+(P2*10**5*V2*(((P3/P2)**((n-1)/n))-1)));#Work done by the compressor per working cycle in N m\n",
+ "P=(W*N)/(60.*1000);#Power of the compressor in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'Power of the compressor when it runs at 300 rpm is (kW) = ',round(P,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13 - pg 9.30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage saving in the work of compression of air in two stages instead of single stage is (percent) = 12.6\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.30\n",
+ "#calculate the percentage saving\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure in bar\n",
+ "P3=9.;#Final pressure in bar\n",
+ "n=1.3;#Compression index\n",
+ "\n",
+ "#Calculations\n",
+ "W1=(n/(n-1))*(P1*10**5*(((P3/P1)**((n-1)/n))-1));#Work done in compression in a single stage per unit volume per kg of air in N m \n",
+ "P2=(P1*P3)**(0.5);#Intercooler pressure for perfect intercooling in bar\n",
+ "W2=2*(n/(n-1))*(P1*10**5*(((P2/P1)**((n-1)/n))-1));#Work done in compression in a two stage compressor per unit volume per kg of air in N m\n",
+ "Wc=W1-W2;#Saving in work of compression in N m\n",
+ "nw=((W1-W2)/W1)*100;#Percentage saving in work of compression in percentage\n",
+ "\n",
+ "#Output\n",
+ "print 'Percentage saving in the work of compression of air in two stages instead of single stage is (percent) = ',round(nw,1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14 - pg 9.31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Minimum work required to compress 1kg of air for given conditions is (Nm) = 338979.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.31\n",
+ "#calculate the Minimum work required\n",
+ "#Input data\n",
+ "m=1.;#Mass of air to be compressed in kg\n",
+ "P1=1.;#Pressure of air before compression in bar\n",
+ "T1=303.;#Initial temperature in K\n",
+ "P3=25.;#Final pressure of air after compression in bar\n",
+ "n=1.3;#Polytropic index\n",
+ "R=287.;#Gas constant in J/kg K\n",
+ "\n",
+ "#Calculations\n",
+ "P2=(P1*P3)**(0.5);#Intermediate pressure in the case of perfect intercooling in bar\n",
+ "W=2*(n/(n-1))*(m*R*T1*(((P2/P1)**((n-1)/n))-1));#Work done in compression in a two stage compressor per unit volume per kg of air in N m\n",
+ "\n",
+ "#Output data\n",
+ "print 'Minimum work required to compress 1kg of air for given conditions is (Nm) = ',round(W,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15 - pg 9.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The minimum power required to drive the compressor is (kW) = 12.524\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.32\n",
+ "#calculate the minimum power\n",
+ "#Input data\n",
+ "V1=3;#Volume of air sucked in by a two stage compressor in m**3\n",
+ "P1=1.04;#Initial pressure in bar\n",
+ "T1=298;#Initial temperature in K\n",
+ "P2=9;#Delivery pressure in bar\n",
+ "n=1.25;#Polytropic index\n",
+ "\n",
+ "#Calculations\n",
+ "P2=(P1*P2)**(0.5);#Intermediate pressure for perfect intercooling and for minimum work of compression in bar\n",
+ "W=2*(n/(n-1))*(P1*10**5*V1*(((P2/P1)**((n-1)/n))-1));#Work done in compression in a two stage compressor per unit volume per kg of air in Nm\n",
+ "P=W/(60*1000);#Power required to drive the compressor in kW\n",
+ "\n",
+ "#Output\n",
+ "print 'The minimum power required to drive the compressor is (kW) = ',round(P,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 16 - pg 9.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mass of water to circulate in the intercooler for abstracting heat is (kg) = 2.098\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.32\n",
+ "#calculate the mass of water\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of a two stage air compressor in bar\n",
+ "P3=36.;#Final pressure in bar\n",
+ "T1=298.;#Initial temperature in K\n",
+ "n=1.35;#Polytropic index\n",
+ "T3=298.;#Temperature after intercooling in K\n",
+ "Tc=20.;#Permissible temperature rise of the cooling water in K\n",
+ "R=287.;#Gas constant in J/kg K\n",
+ "Cp=1.;#Specific heat of air in kJ/kg K\n",
+ "Cw=4.2;#Specific heat of water in kJ/kg K\n",
+ "ma=1.;#Mass of air in the compressor in kg\n",
+ "\n",
+ "#Calculations\n",
+ "P2=(P1*P3)**(0.5);#Intercooler pressure for complete intercooling and for minimum work of compression in bar\n",
+ "T2=T1*(P2/P1)**((n-1)/n);#Temperature after the compression process in K\n",
+ "mw=(ma*Cp*(T2-T3))/(Cw*(Tc));#Mass of water to circulate in the intercooler per kg of air in kg\n",
+ "\n",
+ "#Output\n",
+ "print 'Mass of water to circulate in the intercooler for abstracting heat is (kg) = ',round(mw,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 17 - pg 9.33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The volume ratio of LP to HP cylinders = 2.83\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.33\n",
+ "#calculate the volume ratio\n",
+ "#Input data\n",
+ "V1=0.2;#Volume of air flow per second in a two stage single acting reciprocating compressor in m**3\n",
+ "P1=0.1;#Intake pressure of air in MPa\n",
+ "T1=293.;#Initial temperature in K\n",
+ "P3=0.8;#Final pressure after the air is compressed in MPa\n",
+ "N=600.;#Operating speed of the compressor in rpm\n",
+ "\n",
+ "#Calculations\n",
+ "P2=(P1*P3)**(0.5);#Intercooler pressure for perfect intercooling and for minimum work of compression in bar\n",
+ "Vl=(V1*60)/600;#Volume of the LP cylinder in m**3\n",
+ "Vh=(P1*Vl)/P2;#Volume of the high pressure cylinder in m**3\n",
+ "R=Vl/Vh;#Ratio of cylinder volumes\n",
+ "\n",
+ "#Output\n",
+ "print 'The volume ratio of LP to HP cylinders = ',round(R,2)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 18 - pg 9.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The ratio of cylinder diameters for the efficiency of compression to be maximum = 2.236\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.34\n",
+ "#calculate the ratio required\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of air entering a two stage air compressor with complete intercooling in bar\n",
+ "P3=25.;#Delivery pressure of air toe the mains in bar\n",
+ "T1=303.;#Initial temperature in K\n",
+ "n=1.35;#Compression index\n",
+ "\n",
+ "#Calculations\n",
+ "P2=(P1*P3)**(0.5);#Inter cooler pressure for perfect intercooling in bar\n",
+ "R=(P2/P1)**(0.5);#Ratio of cylindrical diameters\n",
+ "\n",
+ "#Output\n",
+ "print 'The ratio of cylinder diameters for the efficiency of compression to be maximum = ',round(R,3)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 19 - pg 9.34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Number of stages = 4\n",
+ "(b)Intermediate pressures are, P2 = 3.31 bar, P3 = 10.95 bar, P4 = 36.26 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.34\n",
+ "#calculate the number of stages and Intermediate pressures\n",
+ "#Input data\n",
+ "import math\n",
+ "P1=1.;#Initial pressure of a multistage compression in bar\n",
+ "Pn1=120.;#Final pressure in bar\n",
+ "r=4;#Permissible pressure ratios per stage\n",
+ "\n",
+ "#Calculations\n",
+ "n=math.log(Pn1/P1)/math.log(r)\n",
+ "n1=4;#As n=3.45 say 4 stages\n",
+ "P5=Pn1;#Since number of stages is 4\n",
+ "P4=P5/(Pn1/P1)**(1./n1);#Pressure after the stage 3 in bar\n",
+ "P3=P4/(Pn1/P1)**(1./n1);#Pressure after the stage 2 in bar\n",
+ "P2=P3/(Pn1/P1)**(1./n1);#Pressure after the stage 1 in bar\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Number of stages = ',n1\n",
+ "print '(b)Intermediate pressures are, P2 = ',round(P2,2),'bar, P3 = ',round(P3,2),'bar, P4 =',round(P4,2),'bar'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 20 - pg 9.35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)Power required to deliver 15 m^3/min air at suction condition is (kW) = 106.6\n",
+ "(b)Intermediate pressures are P2 = 3.42 bar P3 = 11.696 bar\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.35\n",
+ "#calculate the Power required and Intermediate pressures\n",
+ "#Input data\n",
+ "P1=1.;#Initial pressure of a 3 stage compressor in bar\n",
+ "P4=40.;#Final pressure in bar\n",
+ "T1=293.;#Initial temperature in K\n",
+ "n=1.3;#Polytropic index\n",
+ "V1=15.;#Air delivered per minute in m**3/min\n",
+ "\n",
+ "#Calculations\n",
+ "W=((3*n)/(n-1))*P1*10**5*V1*(((P4/P1)**((n-1)/(3*n)))-1);#Work done by the compressor in kJ/min\n",
+ "P=W/(60*1000.);#Power required to deliver 15 m**3/min air in kW\n",
+ "P2=P1*(P4/P1)**(1./3);#Intermediate pressure after stage 1 in bar\n",
+ "P3=P2*(P4/P1)**(1./3);#Intermediate pressure after stage 2 in bar\n",
+ "\n",
+ "#Output\n",
+ "print '(a)Power required to deliver 15 m^3/min air at suction condition is (kW) = ',round(P,1)\n",
+ "print '(b)Intermediate pressures are P2 = ',round(P2,2),'bar P3 = ',round(P3,3),'bar'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 21 - pg 9.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Amount of heat rejected in each intercooler is (kJ) = 113.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.36\n",
+ "#calculate the Amount of heat rejected\n",
+ "#Input data\n",
+ "P1=1.;#Atmospheric pressure in bar\n",
+ "P4=60.;#Delivery pressure in bar\n",
+ "T1=303.;#Initial temperature in K\n",
+ "n=1.3;#Index of compression\n",
+ "Cp=1.005;#Specific heat of air at constant pressure in kJ/kg K\n",
+ "S=3.;#Number of stages\n",
+ "\n",
+ "#Calculations\n",
+ "P2=P1*(P4/P1)**(1./3);#Intermediate pressure in bar\n",
+ "T2=T1*(P2/P1)**((n-1)/n);#Temperature of air entering the intercoolers in K\n",
+ "H=Cp*(T2-T1);#Heat rejected in each intercooler in kJ\n",
+ "\n",
+ "#Output\n",
+ "print 'Amount of heat rejected in each intercooler is (kJ) = ',round(H,0)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 22 - pg 9.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(a)L.P. and I.P.compressor delivery pressure is P2 = 4.021 bar P3 = 16.17 bar\n",
+ "(b)Ratio of cylinder volumes is V1:V2:V3 = 16.17 : 4.021 : 1\n",
+ "(c)Total indicated power is (kW) = 72.2\n"
+ ]
+ }
+ ],
+ "source": [
+ "#pg 9.37\n",
+ "#calculate the compressor delivery pressure and Ratio of cylinder volumes\n",
+ "#Input data\n",
+ "P1=1.;#Pressure at the end of suction stroke in LP cylinder of a 3 stage single acting reciprocating compressor in bar\n",
+ "T1=293.;#Temperature at the end of suction stroke in LP cylinder in K\n",
+ "V=9.;#Free air delivered by the compressor in m**3\n",
+ "P4=65.;#Pressure delivered by the compressor in bar\n",
+ "n=1.25;#Polytropic index\n",
+ "\n",
+ "#Calculations\n",
+ "P2=P1*(P4/P1)**(1./3);#Intermediate pressure after stage 1 in bar\n",
+ "P3=P2*(P4/P1)**(1./3);#Intermediate pressure after stage 2 in bar\n",
+ "V3=1;#The volume of cylinder for the third stage in m**3\n",
+ "V2=V3*(P3/P2);#Volume of the cylinder for second stage in m**3\n",
+ "V1=(P2/P1)*V2;#Volume of the cylinder for first stage in m**3\n",
+ "W=(((3*n)/(n-1))*P1*10**5*V*(((P4/P1)**((n-1)/(3*n)))-1))/1000;#Work done by the compressor in kJ/min\n",
+ "Pi=W/60;#Indicated power in kW\n",
+ "\n",
+ "#Output\n",
+ "print '(a)L.P. and I.P.compressor delivery pressure is P2 = ',round(P2,3),'bar P3 =',round(P3,2),'bar'\n",
+ "print '(b)Ratio of cylinder volumes is V1:V2:V3 = ',round(V1,2),':',round(V2,3),':',V3\n",
+ "print '(c)Total indicated power is (kW) = ',round(Pi,2)\n"
+ ]
+ }
+ ],
+ "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
+}
|