{ "metadata": { "name": "", "signature": "sha256:66478056c6d699f5a89afa300d943ff97483cd2753d8c48646778e71c214a5f6" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter2-Compressible Flow with Friction and Heat: A Review" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex1-pg19" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#what is the gas constant of air and density of air\n", "import math\n", "#intilization variable\n", "p=3*10**6 ; #pressure in Pa\n", "t=298. ; #temperatue in kelvin\n", "mw= 29.; #molecular weight in kg/mol\n", "ru=8314.; #universal constant in J/kmol.K\n", "r=ru/mw ;\n", "#using perfect gas law to get density:\n", "rho=p/(r*t) ;\n", "print'%s %.2f %s'%('Gas constant of air in',r,'J/kg.K')\n", "print'%s %.1f %s'%('Density of air in',rho,'kg/m^3')" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Gas constant of air in 286.69 J/kg.K\n", "Density of air in 35.1 kg/m^3\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex2-pg23" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#find out the exit temperature and exit density by various methods \n", "import math\n", "t1=288.; #inlet temperture in Kelvin\n", "p1=100*10**3; #inlet pressure in Pa\n", "p2=1*10**6 #exit pressure in Pa\n", "gma=1.4; #gamma.\n", "rg=287.; #gas constant in J/kg.K\n", "t2=t1*(p2/p1)**((gma-1)/gma); #exit temperature \n", "print'%s %.5f %s'%('Exit temperature in',t2,'K')\n", "#first method to find exit density:\n", "#application of perfect gas law at exit\n", "rho=p2/(rg*t2); #rho= exit density.\n", "print'%s %.7f %s'%('exit density at by method 1 in',rho,'kg/m^3')\n", "#method 2: using isentropic relation between inlet and exit density.\n", "rho1=p1/(rg*t1); #inlet density.\n", "rho=rho1*(p2/p1)**(1/gma);\n", "print'%s %.2f %s'%('exit density by method 2 in',rho,'kg/m^3')\n", "\n", " " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Exit temperature in 556.04095 K\n", "exit density at by method 1 in 6.2663021 kg/m^3\n", "exit density by method 2 in 6.27 kg/m^3\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3-pg25" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#what is the rate of mass flow through exit \n", "import math\n", "d1=1.2 #inlet 1 density in kg/m^3.\n", "u1=25. # inlet 1 veocity in m/s.\n", "a1=0.25 #inlet 1 area in m^2.\n", "d2=0.2 #inlet 2 density in kg/m^3.\n", "u2=225. #inlet 2 velocity in m/s.\n", "a2=0.10 #inlet 2 area in m^2.\n", "m1=d1*a1*u1; #rate of mass flow entering inlet 1.\n", "m2=d2*u2*a2; #rate of mass flow entering inlet 2.\n", "#since total mass in=total mass out,\n", "m3=m1+m2; #m3=rate of mass flow through exit.\n", "print'%s %.f %s'%('Rate of mass flow through exit in',m3,' kg/s')\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Rate of mass flow through exit in 12 kg/s\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex4-pg27" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#what is the axial force needed to support the plate and lateral force needed to support the plate\n", "import math\n", "u1=2 #speed of water going on the plate. X-component in m/s.\n", "v1=0 #speed of water going on the plate. Y-component in m/s.\n", "u2=1 #speed of water going on the plate. X-component in m/s.\n", "v2=1.73 #speed of water going on the plate Y-coponent in m/s.\n", "m=0.1 #rate of flow of mass of the water on the plate in kg/s.\n", "#Using Newton's second law.\n", "Fx=m*(u2-u1); #X-component of force exerted by water\n", "print'%s %.1f %s'%('Axial force needed to support the plate in',Fx,'N')\n", "Fy=m*(v2-v1); #Y-component of force exerted by water.\n", "print'%s %.3f %s'%('Lateral force needed to support the plate in',Fy,'N')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Axial force needed to support the plate in -0.1 N\n", "Lateral force needed to support the plate in 0.173 N\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5-pg29" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate the Exit total and static temperature \n", "m=50 #mass flow rate in kg/s.\n", "T1=298 #inlet temperature in K.\n", "u1=150 #inlet velocity in m/s.\n", "cp1=1004 #specific heat at constant pressure of inlet in J/kg.K.\n", "gm=1.4 #gamma.\n", "u2=400 # exit velocity in m/s.\n", "cp2=1243. #specific heat at constant pressure of exit in J/kg.K.\n", "q=42*10**6 #heat transfer rate in control volume in Watt.\n", "me=-100*10**3 #mechanical power in Watt.\n", "#first calculate total enthalpy at the inlet:\n", "ht1=cp1*T1+(u1**2)/2; #ht1=Total inlet enthalpy.\n", "#now applying conservation of energy equation:\n", "ht2=ht1+((q-me)/m) #ht2=Total enthalpy at exit.\n", "Tt2=ht2/cp2; #Tt2=Total exit temperature.\n", "T2=Tt2-((u2**2)/(2*cp2)); #T2=static exit temperature.\n", "print'%s %.5f %s'%('Exit total temperature in',Tt2,'K')\n", "print'%s %.4f %s'%('Exit static temperature in',T2,'K')" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Exit total temperature in 927.14562 K\n", "Exit static temperature in 862.7852 K\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex6-pg65" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#intilization variable\n", "import math\n", "d=0.2 #Diameter in meters.\n", "M1=0.2 #inlet Mach no.\n", "p1=100*10**3 #inlet pressure in Pa\n", "Tt1=288. #total inlet temperature in K\n", "q=100*10**3 #rate of heat transfer to fluid in Watt.\n", "rg=287. #Gas constant in J/kg.K.\n", "gm=1.4 #gamma\n", "#(a)inlet mass flow:\n", "m=((gm/rg)**(1./2.))*(p1/(Tt1)**(1./2.))*3.14*(d*d)/4.*(M1/(1.+((gm-1.)/2.)*(M1**2.))**((gm+1.)/(2.*(gm-1.))));\n", "\n", "#(b)\n", "qm=q/m; #Heat per unit mass.\n", "#Tt1/Tcr=0.1736, pt1/Pcr=1.2346, ((Delta(s)/R)1=6.3402,p1/Pcr=2.2727)\n", "Tcr=Tt1/0.1736;\n", "\n", "Pcr=p1/2.2727;\n", "#From energy equation:\n", "cp=(gm/(gm-1.))*rg;\n", "Tt2=Tt1+(q/cp);\n", "q1cr=cp*(Tcr-Tt1)/1000.;\n", "M2=0.22;\n", "#From table : pt2/Pcr=1.2281, (Delta(s)/R)2=5.7395, p2/Pcr=2.2477.\n", "#The percent total pressure drop is (((pt1/Pcr)-(pt2/Pcr))/(pt1/Pcr))*100.\n", "p2=2.2477*Pcr;\n", "dp=((1.2346-1.2281)/1.2346)*100;\n", "#Entropy rise is the difference between (delta(s)/R)1 and (delta(s)/R)2.\n", "ds=6.3402-5.7395;\n", "#Static pressure drop in duct due to heat transfer is\n", "dps=((p1/Pcr)-(p2/Pcr))*Pcr/1000.;\n", "print'%s %.7f %s'%('Mass flow rate through duct in',m,'kg/s')\n", "print'%s %.4f %s'%('Critical heat flux that would choke the duct for the M1 in',q1cr,'kJ/kg')\n", "print'%s %.2f %s'%('The exit Mach No.',M2,'')\n", "print'%s %.7f %s'%('The percent total pressure loss',dp,'%')\n", "print'%s %.4f %s'%('The entropy rise',ds,'')\n", "print'%s %.7f %s'%('The static pressure drop in ',dps,'kPa')" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Mass flow rate through duct in 2.5235091 kg/s\n", "Critical heat flux that would choke the duct for the M1 in 1377.1556 kJ/kg\n", "The exit Mach No. 0.22 \n", "The percent total pressure loss 0.5264863 %\n", "The entropy rise 0.6007 \n", "The static pressure drop in 1.1000132 kPa\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7-pg67" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#what is total exit temperautre if exit is choked and maximum heat released and fule to air ratio to thermally choke the combustor exit and total pressure loss\n", "#intilization variable\n", "import math\n", "M1=3.0 ##Mach no. at inlet\n", "pt1=45*10**3 ##Total pressure t inlet in Pa\n", "Tt1=1800 ##Total temperature at inlet in K\n", "hv=12000 ##Lower heating value of hydrogen kJ/kg\n", "gm=1.3 ##gamma\n", "R=0.287 ##in kJ/kg.K\n", "##Using RAYLEIGH table for M1=3.0 and gamma=1.3, we get Tt1/Tcr=0.6032, pt1/Pcr=4.0073.\n", "Tcr=Tt1/0.6032\n", "Pcr=pt1/4.0073\n", "##if exit is choked, Tt2=Tcr\n", "Tt2=Tt1/0.6032;\n", "cp=gm*R/(gm-1);\n", "##Energy balance across burner:\n", "Q1cr=cp*(Tcr-Tt1);\n", "f=(Q1cr/120000);\n", "##total pressure loss:\n", "dpt=1-Pcr/pt1;\n", "print'%s %.4f %s'%('Total exit temperature if exit is choked in',Tt2,'K')\n", "print'%s %.4f %s'%('Maximum heat released per unit mass of air in',Q1cr, 'kJ/kg')\n", "print'%s %.7f %s'%('fuel-to-air ratio to thermally choke the combustor exit',f,'')\n", "print'%s %.7f %s'%('Total pressure loss (in fraction)',dpt,'')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Total exit temperature if exit is choked in 2984.0849 K\n", "Maximum heat released per unit mass of air in 1472.6069 kJ/kg\n", "fuel-to-air ratio to thermally choke the combustor exit 0.0122717 \n", "Total pressure loss (in fraction) 0.7504554 \n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex8-pg67" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate the new inlet mach no and spilled flow at the inlet\n", "#initilization variable \n", "import math\n", "Tt1=50.+460. ##Converting the inlet temp. to the absolute scale i.e. in degree R\n", "M1=0.5 ##Initial inlet Mach no.\n", "pt1=14.7 ##Units in psia\n", "gm=1.4 ##gamma\n", "R=53.34 ##units in ft.lbf/lbm.degree R\n", "Tcr=Tt1/0.69136 \n", "cp=gm*R/(gm-1)\n", "##using energy equation:\n", "Q1cr=cp*(Tcr-Tt1)\n", "##since heat flux is 1.2(Q1cr).\n", "q=1.2*Q1cr\n", "Tt1cr1=Tt1+(Q1cr/cp) ##new exit total temp.\n", "z=Tt1/Tt1cr1\n", "M2=0.473\n", "\n", "f=M1/(1+((gm-1)/2)*M1**2)**((gm+1)/(2*(gm-1)))\n", "\n", "sm=((f*(M1)-f*(M2))/f*(M1))*100. ##sm=The % spilled flow at the inlet\n", "print'%s %.5f %s'%('The new inlet Mach no.',M2,'')\n", "print'%s %.5f %s'%('The % spilled flow at the inlet',sm,'')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The new inlet Mach no. 0.47300 \n", "The % spilled flow at the inlet 1.35000 \n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex9-pg76" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#intilization variable\n", "#calculate choking length abd exit mach no and total pressure loss and the static pressure and impulse due to friction \n", "import math\n", "d=0.2 ##diameter in meters.\n", "l=0.2 ##length in meters.\n", "Cf=0.005 ##average wall friction coefficient.\n", "M1=0.24 ##inlet mach no.\n", "gm=1.4 ##gamma.\n", "##From FANNO tbale\n", "L1cr=(9.3866*d/2)/(4*Cf);\n", "L2cr=L1cr-l;\n", "##from FANNO table\n", "M2=0.3;\n", "x=2.4956;\n", "y=2.0351;\n", "a=4.5383;\n", "b=3.6191;\n", "i1=2.043;\n", "i2=1.698;\n", "##% total pressure drop due to friction:\n", "dpt=(x-y)/(x)*100;\n", "##static pressur drop:\n", "dps=(a-b)/a*100;\n", "##Loss pf fluid:\n", "lf=(i2-i1);\n", "print'%s %.3f %s'%('The choking length of duct in',L1cr,'m')\n", "print'%s %.1f %s'%('The exit Mach no.',M2,'')\n", "print'%s %.6f %s'%('% total pressure loss',dpt,'')\n", "print'%s %.5f %s'%('The static pressure drop in',dps,'%')\n", "print'%s %.3f %s'%('Loss of impulse due to friction(I* times)',lf,'')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The choking length of duct in 46.933 m\n", "The exit Mach no. 0.3 \n", "% total pressure loss 18.452476 \n", "The static pressure drop in 20.25428 %\n", "Loss of impulse due to friction(I* times) -0.345 \n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10-pg77" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#initilization variable\n", "import math \n", "#caluclate maximum length of the duct that will support given in inlet condition and the new inlet condition and flow drop \n", "M1=0.5\n", "a=2. ## area of cross section units in cm^2\n", "Cf=0.005 ##coefficient of skin friction\n", "gm=1.4 ##gamma\n", "##Calculations\n", "c=2.*(2.+1.); ##Parameter of surface.\n", "##From FANNO table: 4*Cf*L1cr/Dh=1.0691;\n", "Dh=4.*a/c; ##Hydrolic diameter.\n", "L1cr=1.069*Dh/(4.*Cf);\n", "##maximum length will be L1cr.\n", "##For new length(i.e. 2.16*L1cr), Mach no. M2 from FANNO table, M2=0.4;.\n", "M2=0.4;\n", "##the inlet total pressue and temp remains the same, therefore the mass flow rate in the duct is proportional to f(M):\n", "\n", "f=0.5/(1.+((gm-1.)/2.)*0.5**2.)**((gm+1.)/(2.*(gm-1.)))\n", "#endfunction\n", "dm=(f*(M1)-f*(M2))/f*(M1)*100.+10;\n", "print'%s %.3f %s'%(\"(a)Maximum length of duct that will support given inlet condition(in cm):\",L1cr,\"\")\n", "print'%s %.3f %s'%(\"(b)The new inlet condition mach no. M2:\",M2,\"\")\n", "print'%s %.3f %s'%(\"(c)% inlet mass flow drop due to the longer length of the duct:\",dm,\"\")\n", "\n", "\n", "\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a)Maximum length of duct that will support given inlet condition(in cm): 71.267 \n", "(b)The new inlet condition mach no. M2: 0.400 \n", "(c)% inlet mass flow drop due to the longer length of the duct: 15.000 \n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex11-pg78" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "import numpy\n", "M1=0.7;\n", "dpt=0.99; ##pt2/pt1=dpt.\n", "gm=1.4; ##gamma\n", "A2=1.237 \n", "a=1/1.237;\n", "import warnings\n", "warnings.filterwarnings('ignore')\n", "##Calculations:\n", "\n", "k=(1./dpt)*(a)*(M1/(1.+(0.2*(M1)**2.))**3.);\n", "po=([k*0.008,0,k*.12,0,k*.6,-1,k])\n", "W=numpy.roots(po)\n", "i=0;\n", "s=1;\n", "M2=W[4]\n", "print -M2,\"(a)The exit Mach no. M2:\"\n", "\n", "\n", "##p=p2/p1 i.e. static pressure ratio\n", "p=dpt*((1.+(gm-1.)*(M1)**2./2.)/(1.+(gm-1.)*(M2)**2./2.))**(gm/(gm-1.))\n", "##disp(p)\n", "Cpr=(2./(gm*(M1)**2.))*(p-1.) ##Cpr is static pressure recovery : (p2-p1)/q1.\n", "print\"%s %.2f %s\"%(\"(b)The static pressure recovery in the diffuser:\",-Cpr,\"\")\n", "##Change in fluid impulse:\n", "##Fxwalls=I2-I1=A1p1(1+gm*M1**2)-A2p2(1+gm*M2**2)\n", "##Let, u=Fxwall/(p1*A1)\n", "u=1.+gm*(M1)**2.-(1.237)*(p)*(1.+(gm*(M2)**2.))\n", "print\"%s %.2f %s\"%(\"(c)The force acting on the diffuser inner wall nondimensionalized by inlet static pressure and area:\",-u,\"\")\n", "\n", "\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(-1.70274823568-0j) (a)The exit Mach no. M2:\n", "(b)The static pressure recovery in the diffuser: 2.11 \n", "(c)The force acting on the diffuser inner wall nondimensionalized by inlet static pressure and area: 0.05 \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex13-pg85" ] }, { "cell_type": "code", "collapsed": false, "input": [ "print \"Example2.13\"\n", "import numpy\n", "M1=0.5 #inlet mach no.\n", "p=10. #(p=pt1/p0) whaere pt1 is inlet total pressure and p0 is ambient pressure.\n", "dpc=0.01 #dpc=(pt1-Pth)/pt1 i.e. total pressure loss in convergant section\n", "f=0.99 #f=Pth/pt1\n", "dpd=0.02 #dpd=(Pth-pt2)/Pth i.e. total pressure loss in the divergent section\n", "j=1/0.98 #j=Pth/pt2\n", "A=2. #a=A2/Ath. nozzle area expansion ratio.\n", "gm=1.4 # gamma\n", "R=287. #J/kg.K universal gas constant.\n", "#Calculations:\n", "#\"th\"\" subscript denotes throat.\n", "Mth=1. #mach no at thorat is always 1.\n", "\n", "k=(j)*(1./A)*(Mth/(1+(0.2*(Mth)**2))**3)\n", "po=([k*0.008,0,k*.12,0,k*.6,-1,k])\n", "W=numpy.roots(po)\n", "i=0;\n", "s=1;\n", "M2=W[4]\n", "print M2,\"(a)The exit Mach no. M2:\"\n", "#p2/pt2=1/(1+(gm-1)/2*M2**2)**(gm/(gm-1)) \n", "#pt2=(pt2/Pth)*(Pth/pt1)*(pt1/p0)*p0\n", "#let pr=p2/p0\n", "pr=((1/j)*f*p)/(1+(0.2*(M2)**2))**(gm/(gm-1))\n", "\n", "print pr,\"(b)The exit static pressure in terms of ambient pressure p2/p0:\"#Fxwall=-Fxliquid=I1-I2\n", "\n", "#let r=A1/Ath\n", "r=(f)*(1/M1)*(((1+((gm-1)/2)*(M1)**2)/((gm+1)/2))**((gm+1)/(2*(gm-1))))\n", "#disp(r)\n", "#Psth is throat static pressure.\n", "#z1=Psth/pt1=f/((gm+1)/2)**(gm/(gm-1))\n", "z1=f/((gm+1)/2)**(gm/(gm-1))\n", "#disp(z1)\n", "#p1 is static pressure at inlet\n", "#s1=p1/pt1\n", "s1=1/(1+((gm-1)/2)*(M1)**2)**(gm/(gm-1))\n", "#disp(s1)\n", "#let y=Fxcwall/(Ath*pt1), where Fxwall is Fx converging-wall\n", "y=s1*r*(1+(gm*(M1)**2))-(z1*(1+(gm*(Mth)**2)))\n", "print y,\"(c)The nondimensional axial force acting on the convergent nozzle:\"\n", "#similarly finding nondimensional force on the nozzle DIVERGENT section\n", "#y1=Fxdiv-wall/Ath*pt1\n", "#f1=p2/pt1\n", "f1=pr*(1/p)\n", "#disp(f1)\n", "y1=z1*(1+(gm*(Mth)**2))-f1*A*(1+(gm*(M2)**2))\n", "print y1,\"(d)The nondimensional axial force acting on the divergent nozzle:\"\n", "#total axial force acting on nozzle wall: Fsum=y+y1\n", "Fsum=y+y1\n", "print Fsum,\"(e)The total axial force(nondimensional) acting on the nozzle: \"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Example2.13\n", "(2.17433864456+0j) (a)The exit Mach no. M2:\n", "(0.944524245306+0j) (b)The exit static pressure in terms of ambient pressure p2/p0:\n", "0.254397897726 (c)The nondimensional axial force acting on the convergent nozzle:\n", "(-0.184039795857+0j) (d)The nondimensional axial force acting on the divergent nozzle:\n", "(0.070358101869+0j) (e)The total axial force(nondimensional) acting on the nozzle: \n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex14-pg87" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate non dimensional axial force and negative sign on the axial force experienced by the compressor \n", "p=20. ##p=p2/p1 i.e. compression ratio.\n", "gm=1.4 ## gamma\n", "##Vx1=Vx2 i.e. axial velocity remains same.\n", "##calculations:\n", "d=p**(1/gm) ##d=d2/d1 i.e. density ratio\n", "A=1./d ## A=A2/A1 i.e. area ratio which is related to density ratio as: A2/A1=d1/d2.\n", "##disp(A)\n", "Fx=1.-p*A ##Fx=Fxwall/p1*A1 i.e nondimensional axial force.\n", "print'%s %.7f %s'%(\"The non-dimensional axial force is :\",Fx,\"\")\n", "print'%s %.f %s'%(\"The negative sign on the axial force experienced by the compressor structure signifies a thrust production by this component.\",Fx,\" \")" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The non-dimensional axial force is : -1.3535469 \n", "The negative sign on the axial force experienced by the compressor structure signifies a thrust production by this component. -1 \n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex15-pg88" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "print(\"Example 2.15\")\n", "t=1.8 ##t=T2/T1\n", "d=1./t ##d=d2/d1 i.e. density ratio\n", "v=1./d ##v=Vx2/Vx1 axial velocity ratio\n", "ndaf=1.-(v) ##nondimensional axial force acting on the combustor walls\n", "print'%s %.1f %s'%(\"The nondimensional axial force acting on the combustor walls:\",ndaf,\"\")\n", "print(\"Negative sign signifies a thrust production by the device\")\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Example 2.15\n", "The nondimensional axial force acting on the combustor walls: -0.8 \n", "Negative sign signifies a thrust production by the device\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex16-pg89" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "print(\"Example 2.16\")\n", "t=0.79 ##T2/T1 i.e. turbione expansion\n", "gm=1.4 ##gamma\n", "##calculations:\n", "d=t**(1./(gm-1.))\n", "##print'%s %.1f %s'%(d)\n", "a=1./d ##area ratio\n", "p=d**gm ##pressure ratio\n", "ndaf=1.-p*a\n", "print'%s %.2f %s'%(\"The nondimensional axial force:\",ndaf,\"\")" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Example 2.16\n", "The nondimensional axial force: 0.21 \n" ] } ], "prompt_number": 16 } ], "metadata": {} } ] }