{
"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
}