{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 1: Gas power cycles" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.10: Maximum_theoretical_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('Maximum power developed by the engine is %3.3f kW',P)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.11: Efficiencies_for_cut_off_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Thermal efficiency when cut off ratio is 1.25 is %3.2f percent\n (b)Thermal efficiency when cut off ratio is 1.50 is %3.0f percent\n (c)Thermal efficiency when cut off ratio is 2.00 is %3.1f percent\n',n1,n2,n3)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.12: Air_standard_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('Air standard efficiency of the diesel cycle is %3.2f percent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.13: Efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('Air standard efficiency is %3.1f percent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.14: Compression_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Compression ratio is %3.2f \n (b)Cut off ratio is %3.2f \n (c)Ideal efficiency of the diesel cycle is %3.2f percent',r,rho,n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.15: Pressure.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Pressure at point 1 in the cycle is %3.0f bar\n (b)Pressure at point 2 & 3 is %3.1f bar\n (c)Pressure at point 4 is %3.2f bar\n (d)Temperature at point 1 is %3.0f K\n (e)Temperature at point 2 is %3.0f K\n (f)Temperature at point 3 is %3.0f K\n (g)Temperature at point 4 is %3.0f K',p1,p2,p4,T1,T2,T3,T4) " ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.16: Thermal_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Thermal efficiency is %3.2f percent\n (b)Power developed is %3.0f kW',n,P)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.17: Air_standard_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('Air standard efficiency of the cycle is %3.1f percent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.18: Mean_effective_pressure.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "V4=V1;//Volume at the end of Isentropic expansion stroke in m^3\n", "V2=1;//Volume at the end of isentropic compression stroke in m^3\n", "Vs=V1-V2;//Swept volume in m^3\n", "\n", "//Calculations\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", "printf('Mean effective pressure of the cycle is %3.2f bar',Pm)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.19: Compression_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Compression ratio of the engine is %3.3f\n (b)Air standard efficiency is %3.2f percent',r,na)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.1: The_pressures.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)The pressures at 1 is %3.0fbar\n (b)Pressure at 2 is %3.0fbar\n (c)Pressure at 3 is %3.2fbar\n (d)Pressure at 4 is %3.2fbar\n (e)Temperature at 1 is %3.1fK\n (f)Temperature at 2 is %3.1fK\n (g)Temperature at 3 is %3.0fK\n (h)Temperature at 4 is %3.0fK\n (i)Volume at 1 is %3.0fm^3\n (j)Volume at 2 is %3.5fm^3\n (k)Volume at 3 is %3.5fm^3\n (l)Volume at 4 is %3.0fm^3',P1,P2,P3,P4,T1,T2,T3,T4,V1,V2,V3,V4)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.20: Loss_in_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The loss in efficiency is %3.2f percent',L)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.21: Compression_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Compression ratio is %3.2f \n (b)Temperature at the end of compression is %3.1f K\n (c)Temperature at the end of comstant pressure heat addition is %3.0f K \n (d)Air standard efficiency is %3.2f percent',r1,T2,T3,n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.22: Air_standard_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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 \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", "printf('The air standard efficiency of an oil engine working on the combustion cycle is %3.2f percent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.23: Cut_off_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "P4=P3;//Pressure at the start of constant pressure heat addition in bar\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", "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", "printf('(a)Temperature at the end of constant volume heat addition is %3.1f K\n (b)Cut off ratio is %3.3f',T3,rho)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.24: Work_done.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)The work done per kg of air is %3.1f kJ\n (b)Cycle efficiency is %3.2f percent',W,n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.25: Cycle_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Input data\n", "r=10.5;//Compression ratio\n", "P3=65;//Maximum pressure in bar\n", "P4=P3;//Pressure at the end of constant volume heat addition 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", "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", "printf('(a)Pressure at the end of compression stroke is %3.1f bar\n (b)Temperature at the end of compression stroke is %3.1f K\n (c)Temperature at the end of constant volume heat addition is %3.1f K\n (d)Temperature at the end of constant pressure heat addition is %3.2f K\n (e)Temperature at the end of expansion stroke is %3.2f K\n (e)Pressure at the end of expansion stroke is %3.2f bar\n (f)Efficiency of the cycle is %3.2f percent',P2,T2,T3,T4,T5,P5,n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.26: Air_standard_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The air standard efficiency is %3.2f percent',n1)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.27: Ideal_thermal_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The ideal thermal efficiency is %3.1f percent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.28: Temperature.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Temperature at the end of compression stroke is %3.0f K\n (b)Temperature at the end of constant volume heat addition is %3.0f K\n (c)Temperature at the end of constant pressure heat addition is %3.0f K\n (d)Temperature at the end of isentropic expansion process is %3.0f K\n (e)Efficiency of the cycle is %3.2f percent',T2,T3,T4,T5,n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.29: Pressure_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(1)Pressure ratio is %3.3f\n (2)Cut off ratio is %3.2f\n (3)Heat supplied per cycle is %3.0f kJ\n (4)Heat rejected per cycle is %3.2f kJ\n (5)Work done per cycle is %3.2f kJ\n (6)Thermal efficiency of the cycle is %3.0f percent\n (7)Mass of air contained in the cylinder is %3.4f kg\n (8)Mean effective pressure is %3.2f bar',a,rho,Qs,Qr,W,n,m,Mep)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.2: Compression_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The increase in efficiency due to change in compression ratio from 6 to 7 is %3.1fpercent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.30: Thermal_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('Thermal efficiency of the turbine unit is %3.2f percent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.31: Power_developed.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "P3=P2;//Pressure at the end of constant pressure stroke\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", "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", "printf('Power developed by the turbine assembly per kg of air supplied per second is %3.2f kW',P)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.32: Maximum_temperature.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)The maximum temperature of the cycle is %3.1f K\n (b)Cycle efficiency is %3.2f percent',T3,n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.33: Air_fuel_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)The net power output of the installation is %3.2f kW\n (b)Air fuel ratio is %3.1f',Wn,a)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.34: Net_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "P6=P1;//Pressure at 6 in bar\n", "\n", "//Calculations\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", "printf('The net power of the plant per kg of air/s is %3.2f kW',Pn)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.35: Maximum_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The maximum power that can be obtained from turbine installation is %3.0f kW',P)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.36: Mass_of_fluid.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Mass of fluid to be circulated in the turbine is %3.3f kg/s\n (b)The amount of heat supplied per second from the external source is %3.1f kJ/s',m,qs)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.37: Mass_of_air.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Mass of air circulating in the installation is %3.2f kg/s\n (b)Heat supplied by the heating chamber is %3.1f kJ/s',m,Q)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.38: Overall_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(1)Overall efficiency of the turbine is %3.0f percentage\n (2)Mass of air circulated by the turbine is %3.2f kg',n,m)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.39: Isentropic_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The isentropic efficiency of the turbine is %3.2f percent',nT)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.3: Air_standard_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)The compression ratio is %3.2f\n (b)Efficiency of the Otto cycle is %3.1f percent',r1,n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.40: Overall_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "P3=P2;//Since 2-3 is constant pressure process in bar\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", "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", "printf('Overall efficiency of the plant is %3.2f percent',nt)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.41: Overall_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The overall efficiency of the plant is %3.1f percent',nt)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.4: Air_standard_efficiency.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('The air standard efficiency of air is %3.2f percent',n)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.5: Mean_effective_pressure.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Compression ratio is %3.2f\n (b)The air standard efficiency is %3.1f percent\n (c)Mean effective pressure is %3.2f bar',r1,na,MEP)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.6: Compression_ratio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('(a)Clearance volume as percentage of stroke volume is %3.2f percent\n (b)Compression ratio is %3.2f\n (c)Air standard efficiency is %3.1f percent\n (d)Work done per cycle is %3.2f kJ',C,r1,na,W)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.7: Ideal_power.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('Ideal power developed by the engine is %3.0f kW',P)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.8: Mean_effective_pressure.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\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", "printf('Mean effective pressure is %3.3f bar',P)" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }