{ "metadata": { "name": "", "signature": "sha256:83a0af04c694ab4b0ad1a0fe252ffa0bd8e87abc642c64323f0c2a0d18dd9f5d" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "CHAPTER13:Gas Mixtures" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.1:Pg-480" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#ques1\n", "#Standard brayton cycle\n", "\n", "#1-Inlet for compressor\n", "#2-Exit for compressor\n", "#T-Temperature at a state\n", "#P-Pressure at a state\n", "T1=288.2;#K\n", "P2=1000.0;#kPa\n", "P1=100.0;#kPa\n", "k=1.4;\n", "T2=T1*(P2/P1)**(1.0-1/k);#K\n", "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", "wc=Cp*(T2-T1);#compressor work in kJ/kg;\n", "print\" Temperature T2 =\",round(T2,2),\"K\"\n", "print\" Compressor work =\",round(wc,1),\"kJ/kg\"\n", "#3-Turbine Inlet\n", "#4-Turbine Exit\n", "P4=P1;\n", "P3=P2;\n", "T3=1373.2;#K\n", "T4=T3*(P4/P3)**(1-1/k);#K\n", "wt=Cp*(T3-T4);\n", "wnet=wt-wc;\n", "print\" Temperature T3 =\",round(T3,2),\" K\"\n", "print\" Temperature T4 =\",round(T4),\"K\"\n", "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", "#2-Also high temperature heat exchanger Inlet\n", "#3-(-do-) Exit\n", "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", "#4-high temp heat exchanger inlet\n", "#1-(-do-) Exit\n", "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", "nth=wnet/qh;\n", "print\" Thermal Efficiency of cycle =\",round(nth*100,2),\"%\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Temperature T2 = 556.43 K\n", " Compressor work = 269.3 kJ/kg\n", " Temperature T3 = 1373.2 K\n", " Temperature T4 = 711.0 K\n", " Turbine work = 664.6 kJ/kg\n", " Net work = 395.3 kJ/kg\n", " Thermal Efficiency of cycle = 48.21 %\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.2:Pg-481" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Calculation mistake in book\n", "#ques2\n", "#Standard brayton cycle\n", "\n", "#Calculation mistake in book\n", "#1-Inlet for compressor\n", "#2-Exit for compressor\n", "#T-Temperature at a state\n", "#P-Pressure at a state\n", "T1=288.2;#K\n", "P2=1000.0;#kPa\n", "P1=100.0;#kPa\n", "k=1.4;\n", "T2s=T1*(P2/P1)**(1-1/k);#K\n", "nc=.80;#Compressor Efficiency\n", "T2=T1+(T2s-T1)/0.80;\n", "Cp=1.004;#Specific heat at constant pressure in kJ/kg\n", "wc=Cp*(T2-T1);#compressor work in kJ/kg\n", "wc=round(wc)\n", "print\" Temperature T2 =\",round(T2,2),\"K\"\n", "print\" Compressor work =\",(wc),\"kJ/kg\"\n", "#3-Turbine Inlet\n", "#4-Turbine Exit\n", "P4=P1;\n", "P3=P2;\n", "T3=1373.2;#K\n", "T4s=T3*(P4/P3)**(1-1.0/k);#K\n", "nt=0.85;#turbine Efficiency\n", "T4=T3-(T3-T4s)*0.85;\n", "wt=Cp*(T3-T4);\n", "wnet=wt-wc;\n", "print\" Temperature T3 =\",round(T3,1),\"K\"\n", "print\" Temperature T4 =\",round(T4,1),\"K\"\n", "print\" Turbine work =\",round(wt,2),\"kJ/kg\"\n", "print\" Net work =\",round(wt-wc,2),\"kJ/kg\"\n", "#2-Also high temperature heat exchanger Inlet\n", "#3-(-do-) Exit\n", "qh=Cp*(T3-T2);#Heat of source in kJ/kg\n", "#4-high temp heat exchanger inlet\n", "#1-(-do-) Exit\n", "ql=Cp*(T4-T1);#Heat of sink in kJ/kg\n", "nth=wnet/qh;\n", "print\" Thermal Efficiency of cycle =\",round(nth*100),\"percent\"\n", "#some answers are have acceptable difference beacause of approximization in book but here calculations are precise" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Temperature T2 = 623.48 K\n", " Compressor work = 337.0 kJ/kg\n", " Temperature T3 = 1373.2 K\n", " Temperature T4 = 810.5 K\n", " Turbine work = 564.91 kJ/kg\n", " Net work = 227.91 kJ/kg\n", " Thermal Efficiency of cycle = 30.0 percent\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.3:Pg-486" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#ques3\n", "#efficiency of the cycle\n", "\n", "wnet=395.2;#kJ/kg from example no 1\n", "#Tx=T4\n", "Tx=710.8;#K from example no 1\n", "T3=1373.2;#K from example no 1\n", "Cp=1.004;#specific heat in kJ/kg \n", "qh=Cp*(T3-Tx);\n", "nth=wnet/qh;\n", "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Thermal efficiency = 59.4 percent\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.4:Pg-486" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#ques4\n", "#Calculation of work in the given cycle\n", "import math\n", "R=0.287;#gas constant \n", "T1=288.2;#compressor temperature K\n", "T2=1373.2;#K turbine temperature K\n", "#Pe/Pi=c=10, Pi/Pe=1/c from example 12.1\n", "c=10.0;\n", "wc=-R*T1*math.log(c);\n", "print\" Isothermal work in compressor =\",round(wc,1),\"kJ/kg\"\n", "wt=-R*T2*math.log(1/c);\n", "print\" Isothermal work in turbine =\",round(wt,1),\"kJ/kg\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Isothermal work in compressor = -190.5 kJ/kg\n", " Isothermal work in turbine = 907.5 kJ/kg\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.5:Pg-491" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#ques5\n", "#air standard cycle for jet repulsion\n", "import math\n", "#1-compressor inlet\n", "#2-Compressor exit\n", "#P-Pressure at given point\n", "#T-Temperature at given point\n", "P1=100;#kPa\n", "P2=1000;#kPa\n", "T1=288.2;#K\n", "T2=556.8;#K\n", "wc=269.5;#from ex 12.1 work done in compressor in kJ/kg\n", "#2-Burner inlet\n", "#3-Burner exit\n", "P3=1000;#kPa\n", "T3=1373.2;#K\n", "#wc=wt\n", "Cp=1.004;#specific enthalpy of heat at constant pressure in kJ/kg\n", "k=1.4;\n", "T4=T3-wc/Cp;\n", "P4=P3*(T4/T3)**(1-1/k);\n", "#from s4=s5 and h4=h5+v2/2 we get\n", "T5=710.8#K, from second law\n", "v=math.sqrt(2*Cp*1000*(T4-T5));#m/s\n", "print\" Velocity of air leaving the nozel =\",round(v),\"m/s\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Velocity of air leaving the nozel = 889.0 m/s\n" ] } ], "prompt_number": 28 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.6:Pg-494" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#ques6\n", "#air standard refrigeration cycle\n", "\n", "#1-compressor inlet\n", "#2-compressor exit\n", "P1=100;#kPa\n", "P2=500;#kPa\n", "k=1.4;\n", "rp=P2/P1;\n", "cop=(rp**(1-1/k)-1)**-1;\n", "print\" Coefficient of performance =\",round(cop,2)\n", "#3-Expander inlet\n", "#4-Expander exit\n", "P3=P2;\n", "P4=P1;\n", "T3=288.23;#K, given and fixed\n", "T4=T3/(P3/P4)**(1-1/k);\n", "T1=253.2;#K, given\n", "Cp=1.004;#Specific heat at cons pressure in kJ/kg\n", "ql=Cp*(T1-T4);#heat released in kJ/kg\n", "P=1#power required in kW \n", "ms=P/ql;#kg/s\n", "print\" Rate at which the air enter the compressor =\",round(ms,3),\"kg/s\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Coefficient of performance = 1.71\n", " Rate at which the air enter the compressor = 0.014 kg/s\n" ] } ], "prompt_number": 36 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.7:Pg-498" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#ques7\n", "#the otto cycle\n", "\n", "#1-compressor inlet\n", "#2-compressor exit\n", "P1=100.0;#kPa\n", "T1=288.2;#K\n", "R=0.287;#gas constant\n", "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", "rv=10.0;#compression ratio given\n", "k=1.4;#constant\n", "T2=T1*rv**(k-1);#K\n", "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", "P2=P1*rv**k;#kPa\n", "print\" Pressure at compressor exit, P2 =\",round(P2/1000,2),\"MPa\"\n", "v2=v1/rv;#specific heat at exit in m^3/kg\n", "#23-heat addition process\n", "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", "q23=1800.0;#kJ/kg heat addition, given\n", "Cv=0.717;#specific heat at constant volume in kJ/kg\n", "T3=T2+q23/Cv;#K\n", "print\" Initial Temperature during heat additon process, T3 =\",round(T3,2),\"K\"\n", "P3=P2*(T3/T2);#kPa\n", "print\" Initial pressure during heat addition process, P3 =\",round(P3/1000,3),\"MPa\"\n", "r=10.0;#k=V4/V3=P3/P4\n", "T4=T3*(1/r)**(k-1);\n", "print\" Final temperature during heat addition process, T4 =\",round(T4,3),\"K\";\n", "P4=P3/r**k;#kPa\n", "print\" Final pressure during heat addition process, P4 =\",round(P4/1000,4),\"MPa\"\n", "nth=1-1/r**(k-1);#thermal efficiency\n", "print\" Thermal efficiency =\",round(nth*100,1),\" percent\"\n", "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", "wnet=q23+q41;\n", "mep=wnet/(v1-v2);#effective mean pressure n kPa\n", "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Temperature at compressor exit, T2 = 723.9 K\n", " Pressure at compressor exit, P2 = 2.51 MPa\n", " Initial Temperature during heat additon process, T3 = 3234.39 K\n", " Initial pressure during heat addition process, P3 = 11.223 MPa\n", " Final temperature during heat addition process, T4 = 1287.632 K\n", " Final pressure during heat addition process, P4 = 0.4468 MPa\n", " Thermal efficiency = 60.2 percent\n", " Mean effective pressure = 1455.37 kPa\n" ] } ], "prompt_number": 42 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12.8:Pg-501" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#ques8\n", "#the diesel cycle\n", "\n", "#1-compressor inlet\n", "#2-compressor exit\n", "P1=100;#kPa\n", "T1=288.2;#K\n", "R=0.287;#gas constant\n", "v1=R*T1/P1;#specific volume at inlet in m^3/kg\n", "rv=20;#compression ratio given\n", "k=1.4;#constant\n", "T2=T1*rv**(k-1);#K\n", "print\" Temperature at compressor exit, T2 =\",round(T2,1),\"K\"\n", "P2=P1*rv**k;#kPa\n", "print\" Pressure at compressor exit, P2 =\",round(P2/1000,3),\" MPa\"\n", "v2=v1/rv;#specific heat at exit in m^3/kg\n", "#23-heat addition process\n", "#q23=Cv*(T3-T2)=1800 kJ/kg given\n", "q23=1800;#kJ/kg heat addition, given\n", "Cv=.717;\n", "Cp=1.004;#specific heat at constant pressure in kJ/kg\n", "T3=T2+q23/Cp;#K\n", "print\" Initial Temperature during heat addition process, T3 =\",round(T3,2),\"K\"\n", "r=T3/T2;#T3/T2=V3/V2=r\n", "v3=r*v2;\n", "T4=T3/(v1/v3)**(k-1);\n", "print\" Final temperature during heat addition process, T4 =\",round(T4),\"K\"\n", "q41=Cv*(T1-T4);#/heat for process 4-1 in kJ/kg\n", "wnet=q23+q41;\n", "mep=wnet/(v1-v2);#effective mean pressure in kPa\n", "qh=1800;#heat transfer in kJ/kg\n", "nth=wnet/qh;#thermal efficiency\n", "\n", "print\" Thermal efficiency =\",round(nth*100,1),\"percent\"\n", "print\" Mean effective pressure =\",round(mep,2),\"kPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Temperature at compressor exit, T2 = 955.2 K\n", " Pressure at compressor exit, P2 = 6.629 MPa\n", " Initial Temperature during heat addition process, T3 = 2748.05 K\n", " Final temperature during heat addition process, T4 = 1265.0 K\n", " Thermal efficiency = 61.1 percent\n", " Mean effective pressure = 1399.18 kPa\n" ] } ], "prompt_number": 47 } ], "metadata": {} } ] }