{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 13: One Dimensional Compressible Fluid Flow" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 13.1: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_13_Example_1.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Display mode\n", "mode(0);\n", "// Display warning for floating point exception\n", "ieee(1);\n", "clear;\n", "clc;\n", "disp('Engineering Thermodynamics by Onkar Singh Chapter 13 Example 1')\n", "To=(27+273);//stagnation temperature in K\n", "P=0.4*10^5;//static pressure in pa\n", "m=3000/3600;//air flowing rate in kg/s\n", "d=80*10^-3;//diameter of duct in m\n", "R=287;//gas constant in J/kg K\n", "y=1.4;//expansion constant\n", "disp('mass flow rate(m)=rho*A*C')\n", "disp('so rho*C=4*m/(%pi*d^2)')\n", "4*m/(%pi*d^2)\n", "disp('so rho=165.79/C')\n", "disp('now using perfect gas equation,p=rho*R*T')\n", "disp('T=P/(rho*R)=P/((165.79/C)*R)')\n", "disp('C/T=165.79*R/P')\n", "165.79*R/P\n", "disp('so C=1.19*T')\n", "disp('we know,C^2=((2*y*R)/(y-1))*(To-T)')\n", "disp('C^2=(2*1.4*287)*(300-T)/(1.4-1)')\n", "disp('C^2=602.7*10^3-2009*T')\n", "disp('C^2+1688.23*C-602.7*10^3=0')\n", "disp('solving we get,C=302.72 m/s and T=254.39 K')\n", "C=302.72;\n", "T=254.39;\n", "disp('using stagnation property relation,')\n", "disp('To/T=1+(y-1)*M^2/2')\n", "disp('so M=sqrt(((To/T)-1)/((y-1)/2))')\n", "M=sqrt(((To/T)-1)/((y-1)/2))\n", "M=0.947;//approx.\n", "disp('stagnation pressure,Po=P*(1+(y-1)*M^2/2)in bar')\n", "Po=P*(1+(y-1)*M^2/2)/10^5\n", "disp('so mach number=0.947,stagnation pressure=0.472 bar,velocity=302.72 m/s')\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 13.2: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_13_Example_2.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Display mode\n", "mode(0);\n", "// Display warning for floating point exception\n", "ieee(1);\n", "clear;\n", "clc;\n", "disp('Engineering Thermodynamics by Onkar Singh Chapter 13 Example 2')\n", "To=(273+1100);//stagnation temperature in K\n", "a=45;//mach angle over exit cross-section in degree\n", "Po=1.01;//pressure at upstream side of nozzle in bar\n", "P=0.25;//ststic pressure in bar\n", "y=1.4;//expansion constant \n", "R=287;//gas constant in J/kg K\n", "disp('mach number,M_a=(1/sin(a))=sqrt(2)')\n", "M_a=sqrt(2)\n", "M_a=1.414;//approx.\n", "disp('here,P/Po=0.25/1.01=0.2475.Corresponding to this P/Po ratio the mach number and T/To can be seen from air table as M=1.564 and T/To=0.6717')\n", "M=1.564;\n", "disp('T=To*0.6717 in K')\n", "T=To*0.6717\n", "disp('and C_max=M*sqrt(y*R*T) in m/s')\n", "C_max=M*sqrt(y*R*T)\n", "disp('corresponding to mach number(M_a=1.414)as obtained from experimental observation,the T/To can be seen from air table and it comes out as (T/To)=0.7145')\n", "disp('so T=0.7145*To in K')\n", "T=0.7145*To\n", "disp('and C_av=M_a*sqrt(y*R*T) in m/s')\n", "C_av=M_a*sqrt(y*R*T)\n", "disp('ratio of kinetic energy=((1/2)*C_av^2)/((1/2)*C_max^2)')\n", "((1/2)*C_av^2)/((1/2)*C_max^2)\n", "disp('so ratio of kinetic energy=0.869')\n", "\n", "\n", "\n", "\n", "\n", "\n", "" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 13.3: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_13_Example_3.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Display mode\n", "mode(0);\n", "// Display warning for floating point exception\n", "ieee(1);\n", "clear;\n", "clc;\n", "disp('Engineering Thermodynamics by Onkar Singh Chapter 13 Example 3')\n", "C=300;//aircraft flying speed in m/s\n", "P=0.472*10^5;//altitude pressure in Pa\n", "rho=0.659;//density in kg/m^3\n", "y=1.4;//expansion constant\n", "R=287;//gas constant in J/kg K\n", "disp('From bernoulli equation,Po-P=(1/2)*rho*C^2')\n", "disp('so Po=P+(1/2)*rho*C^2 in N/m^2')\n", "Po=P+(1/2)*rho*C^2\n", "disp('speed indicator reading shall be given by mach no.s')\n", "disp('mach no.,M=C/a=C/sqrt(y*R*T)')\n", "disp('using perfect gas equation,P=rho*R*T')\n", "disp('so T=P/(rho*R)in K')\n", "T=P/(rho*R)\n", "disp('so mach no.,M')\n", "M=C/sqrt(y*R*T)\n", "M=0.947;//approx.\n", "disp('considering compressibility effect,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))')\n", "disp('so stagnation pressure,Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))in N/m^2')\n", "Po=P*((1+(y-1)*M^2/2)^(y/(y-1)))\n", "disp('also Po-P=(1+k)*(1/2)*rho*C^2')\n", "disp('substitution yields,k=')\n", "k=((Po-P)/((1/2)*rho*C^2))-1\n", "disp('so compressibility correction factor,k=0.2437')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 13.4: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_13_Example_4.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Display mode\n", "mode(0);\n", "// Display warning for floating point exception\n", "ieee(1);\n", "clear;\n", "clc;\n", "disp('Engineering Thermodynamics by Onkar Singh Chapter 13 Example 4')\n", "Po=2;//total pressure in bar\n", "P=0.3;//static pressure in bar\n", "y=1.4;//expansion constant\n", "disp('we know that,Po/P=(1+(y-1)*M^2/2)^((y)/(y-1))')\n", "disp('so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))')\n", "M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", "disp('so mach number,M=1.89')" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 13.5: Engineering_Thermodynamics_by_Onkar_Singh_Chapter_13_Example_5.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "// Display mode\n", "mode(0);\n", "// Display warning for floating point exception\n", "ieee(1);\n", "clear;\n", "clc;\n", "disp('Engineering Thermodynamics by Onkar Singh Chapter 13 Example 5')\n", "To=305;//stagnation temperature of air stream in K\n", "y=1.4;//expansion constant\n", "R=287;//gas constant in J/kg K\n", "disp('actual static pressure(P)=1+0.3 in bar')\n", "P=1+0.3\n", "disp('It is also given that,Po-P=0.6,')\n", "disp('so Po=P+0.6 in bar')\n", "Po=P+0.6\n", "disp('air velocity,ao=sqrt(y*R*To)in m/s')\n", "ao=sqrt(y*R*To)\n", "disp('density of air,rho_o=Po/(R*To)in ')\n", "rho_o=Po*10^5/(R*To)\n", "disp('considering air to be in-compressible,')\n", "disp('Po=P+rho_o*C^2/2')\n", "disp('so C=sqrt((Po-P)*2/rho_o)in m/s')\n", "C=sqrt((Po-P)*10^5*2/rho_o)\n", "disp('for compressible fluid,Po/P=(1+(y-1)*M^2/2)^(y/(y-1))')\n", "disp('so M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))')\n", "M=sqrt((exp(log(Po/P)/(y/(y-1)))-1)/((y-1)/2))\n", "M=0.7567;//approx.\n", "disp('compressibility correction factor,k')\n", "disp('k=(M^2/4)+((2-y)/24)*M^4')\n", "k=(M^2/4)+((2-y)/24)*M^4\n", "disp('stagnation temperature,To/T=1+((y-1)/2)*M^2')\n", "disp('so T=To/(1+((y-1)/2)*M^2) in K')\n", "T=To/(1+((y-1)/2)*M^2)\n", "disp('density,rho=P/(R*T) in kg/m^3')\n", "rho=P*10^5/(R*T)\n", "disp('substituting Po-P=(1/2)*rho*C^2(1+k)')\n", "disp('C=sqrt((Po-P)/((1/2)*rho*(1+k)))in m/s')\n", "C=sqrt((Po-P)*10^5/((1/2)*rho*(1+k)))\n", "disp('so C=250.95 m/s')" ] } ], "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 }