diff options
author | Prashant S | 2020-04-14 10:25:32 +0530 |
---|---|---|
committer | GitHub | 2020-04-14 10:25:32 +0530 |
commit | 06b09e7d29d252fb2f5a056eeb8bd1264ff6a333 (patch) | |
tree | 2b1df110e24ff0174830d7f825f43ff1c134d1af /Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal | |
parent | abb52650288b08a680335531742a7126ad0fb846 (diff) | |
parent | 476705d693c7122d34f9b049fa79b935405c9b49 (diff) | |
download | all-scilab-tbc-books-ipynb-master.tar.gz all-scilab-tbc-books-ipynb-master.tar.bz2 all-scilab-tbc-books-ipynb-master.zip |
Initial commit
Diffstat (limited to 'Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal')
8 files changed, 8334 insertions, 0 deletions
diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/1-Compressible_Flow_Fundamentals.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/1-Compressible_Flow_Fundamentals.ipynb new file mode 100644 index 0000000..74defb6 --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/1-Compressible_Flow_Fundamentals.ipynb @@ -0,0 +1,1546 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1: Compressible Flow Fundamentals" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.10: To_find_sonic_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"SG_oil=0.8 //Specific gravity of crude oil \n", +"K_oil=153036*10^4 //Bulk modulus of Oil in N/m^2\n", +"K_hg=2648700*10^4 //Bulk modulus of Mercury in N/m^2\n", +"d_steel=7860 //Density of steel in kg/m^3\n", +"E_steel=200*10^9 //Modulus of elasticity in Pa\n", +"d_hg=13600 //Density of mercury in kg/m^3\n", +"d_water=1000 //Density of water in kg/m^3\n", +"\n", +"//Calculation\n", +"d_oil=SG_oil*d_water //Density of oil in kg/m^3\n", +"a_oil=sqrt(K_oil/d_oil) //Sonic velocity of crude oil in m/s\n", +"a_hg=sqrt(K_hg/d_hg) //Sonic velocity of mercury in m/s\n", +"a_steel=sqrt(E_steel/d_steel) //Sonic velocity of steel in m/s\n", +"\n", +"//Output\n", +"printf('(A)Sonic velocity of crude oil is %3.2f m/s\n (B)Sonic velocity of mercury is %3.2f m/s\n (A)Sonic velocity of steel is %3.1f m/s\n',a_oil,a_hg,a_steel)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.11: To_find_velocity_of_sound.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T=20+273 //Temperarture of medium in K\n", +"Cp_fr=678 //Specific heat capacity at constant pressure of freon in J/kg-K\n", +"Cv_fr=543 //Specific heat capacity at constant volime of freon in J/kg-K\n", +"T_air=0+273 //Temperature of air in K\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"mol_h=2 //Molecular weight of Hydrogen in kg/mol\n", +"mol_water=18 //Molecular weight of water in kg/mol\n", +"R_air=287 //Specific gas constant of air in J/kg-K\n", +"k=1.4 //Adiabatic constant of hydrogen\n", +"k_water=1.3 //Adiabatic constant of water\n", +"\n", +"//Calculation\n", +"R_h=Ri/mol_h //Specific gas constant of hydrogen in J/kg-K\n", +"a_h=sqrt(k*R_h*T) //Velocity of sound in hydrogen in m/s\n", +"R_water=Ri/mol_water //Specific gas constant of water in J/kg-K\n", +"a_water=sqrt(k_water*R_water*T) //Velocity of sound in water vapour in m/s\n", +"k_fr=Cp_fr/Cv_fr //Adiabatic constant of feoan\n", +"R_fr=Cp_fr-Cv_fr //Specific gas constant of freon in J/kg-K\n", +"a_fr=sqrt(k_fr*R_fr*T) //Velocity of sound in freon in m/s\n", +"a_air=sqrt(k*R_air*T_air) //Sonic Velocity of air at in m/s\n", +"\n", +"//Output\n", +"printf('(A)Velocity of sound in hydrogen is %3.2f m/s\n (B)Velocity of sound in water vapour is %3.2f m/s\n (C)Velocity of sound in freon is %3.2f m/s\n (D)Sonic Velocity of air at %3i K is %3.4f m/s',a_h,a_water,a_fr,T_air,a_air)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.12: To_find_highest_pressure_acting_on_surface_of_a_body.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=0.85 //Mach number\n", +"P=80 //Pressure in kPa\n", +"k=1.4 //Adiabatic Constant\n", +"\n", +"//Calculation\n", +"Po=P*(1+(((k-1)/2)*M^2))^(k/(k-1)) //Pressure acting on the surface of the body in kPa\n", +"\n", +"//Output \n", +"printf('The highest pressure acting on the surface of the body is %3.1f kPa',Po)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.13: To_find_air_velocity_for_different_types_of_flow.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P=96 //Pressure in kPa\n", +"T=27+273 //Temperature in K\n", +"dP=32 //Difference between pivot and static pressure\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific Gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"d=(P*10^3)/(R*T) //Density in kg/m^3\n", +"Ci=sqrt((2*(dP*10^3))/d) //Velocity of incompressible flow in m/s\n", +"pr=(dP)/P //Pressure ratio\n", +"p1=pr+1 //Stagnation to static pressure ratio\n", +"M=sqrt(((p1^((k-1)/k)-1)*2)/(k-1)) //Mach number\n", +"Cc=M*sqrt(k*R*T) //Velocity of compressible flow in m/s\n", +"\n", +"//Output\n", +"printf('(A)Air velocity in incompressible flow is %3.1f m/s\n (B)Air velocity if flow is compressible is %3.3f m/s',Ci,Cc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.14: To_find_number_of_nozzles.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T1=200+273 //Intial Temperature in K\n", +"P1=1.7 //Initial Pressure in bar\n", +"P2=1 //Final Pressure in bar\n", +"C1=30 //Inlet velocity in m/s\n", +"m=1 //Mass flow rate in kg/s\n", +"D=0.025 //Nozzle diameter in m\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific Gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"p1=P2/P1 //Pressure ratio\n", +"T2=T1*p1^((k-1)/k) //Final temperature in K\n", +"E1=T1+(C1^2/(2*Cp)) //LHS of Steady flow energy equation\n", +"C2=sqrt((E1-T2)*2*Cp) //Exit velocity of the air in m/s\n", +"d2=(P2*10^5)/(R*T2) //Density at outlet in kg/m^3\n", +"A2=%pi*D^2/4 //Area at outlet in m^2\n", +"n=ceil(m/(d2*A2*C2)) //Number of nozzles to be used\n", +"\n", +"//Output\n", +"printf('(A)Exit velocity of the air is %3.2f m/s\n (B)Number of nozzles to be used are %1.0f',C2,n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.15: To_find_properties_of_a_gas_in_vessel_at_a_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=300 //Pressure in the vessel in kPa\n", +"To=50+273 //Temperature in vessel in K\n", +"M=1 //Mach number \n", +"k=1.667 //Adiabatic constant\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"Mol=4 //Molecular weight of helium in kg/mol\n", +"\n", +"//Calculation\n", +"R=Ri/Mol //Specific gas constant in J/kg-K\n", +"Cp=(k*R)/(k-1) //Specific heat capacity at constant pressure in J/kg-K\n", +"p1=(2/(k+1))^(k/(k-1)) //Pressure ratio\n", +"Pt=Po*p1 //Pressure at test condition in kPa\n", +"t1=(2/(k+1)) //Temperature ratio \n", +"Tt=To*t1 //Temperature at test condition in K\n", +"at=sqrt(k*R*Tt) //Velocity of sound in m/s\n", +"Ct=at //Velocity of gas at test condition in m/s\n", +"Cmax=sqrt(2*Cp*To) //Maximum velocity due to expanding of gases through nozzle system in m/s\n", +"\n", +"//Output\n", +"printf('(A)At test point:\n Pressure is %3.2f kPa\n Temperature is %3.2f K\n Velocity is %3.1f m/s\n (B)Maximum velocity due to expanding of gases through nozzle system is %3.2f m/s',Pt,Tt,Ct,Cmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.16: To_find_mach_number_and_velocity_of_flow.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T=40+273 //Temperature in K\n", +"p1=0.5 //Static to Stagnation pressure ratio\n", +"k=1.67 //Adiabatic constant\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"Mol=39.94 //Molecular weight of argon in kg/mol\n", +"\n", +"//Calculation\n", +"R=Ri/Mol //Specific gas constant in J/kg-K\n", +"p2=1/p1 //Pressure ratio\n", +"M=sqrt(((p2^((k-1)/k)-1)*2)/(k-1)) //Mach number \n", +"C=M*sqrt(k*R*T) //Velocity in the flow in m/s\n", +"\n", +"//Output \n", +"printf('(A)Mach number is %3.3f\n (B)Velocity in the flow is %3.1f m/s',M,C)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.17: To_find_distance_covered_before_sonic_boom_is_heard_on_ground.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=2.5 //Mach number \n", +"h=10 //Height in km\n", +"\n", +"//Calculation\n", +"alp=asind(1/M) //Mach cone angle in degree\n", +"d=10/tand(alp) //Distance the jet would cover before a sonic boom is heard on ground in km\n", +"\n", +"//Output\n", +"printf('Distance the jet would cover before a sonic boom is heard on ground is %3.2f km',d)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.18: To_calculate_time_elapsed_to_feel_disturbance_due_to_aircraft.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"h=1100 //Height in m\n", +"M1=2.5 //Mach number of aircraft @h\n", +"T=280 //Temperature @h\n", +"M2=0.5 //Mach number of observer\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"alp=asind(1/M1) //Mach cone angle in degree\n", +"a=sqrt(k*R*T) //Velocity of sound in m/s\n", +"C1=M1*a //Velocity of aircraft when the observer is stationary in m/s\n", +"t1=h/(C1*tand(alp)) //Time elapsed when the observer is stationary in sec\n", +"C2=(M1-M2)*a //Velocity of aircraft when the observer is moving in the direction of aircraft in m/s\n", +"t2=h/(C2*tand(alp)) //Time elapsed when the observer is moving in the direction of aircraft in sec\n", +"C3=(M1+M2)*a //Velocity of aircraft when the observer is moving in the opposite direction in m/s\n", +"t3=h/(C3*tand(alp)) //Time elapsed when the observer is moving in the opposite direction in sec\n", +"\n", +"//Output\n", +"printf('(A)Time elapsed when the observer is stationary is %3.3f sec\n (B)Time elapsed when the observer is moving in the direction of aircraft with M=%3.1f is %3.2f sec\n (C)Time elapsed when the observer is moving in the opposite direction is %3.2f sec\n',t1,M2,t2,t3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.19: To_find_mach_number_at_a_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P=200 //Pressure in kPa\n", +"d=2.9 //Density in kg/m^3\n", +"C=50 //Velocity in m/s\n", +"mol=32 //Molecular weight of oxygen in kg/mol\n", +"k=1.4 //Adiabatic constant\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"\n", +"//Calculation\n", +"R=Ri/mol //Specific gas Constant in J/kg-k\n", +"T=(P*10^3)/(R*d) //Temperature in K\n", +"a=sqrt(k*R*T) //Velocity of sound in m/s \n", +"M=C/a //Mach number\n", +"\n", +"//Output\n", +"printf('Mach number is %3.4f',M)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1: To_calculate_the_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"m=0.75 //Mass of air in kg \n", +"T1=800 //Intial Temperature in K\n", +"P1=400 //Initial Pressure in kPa\n", +"P2=150 //Final Pressure in kPa\n", +"k=1.4 //Adiabatic constant\n", +"R=0.287 //Specific Gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"p1=P2/P1 //pressure ratio of process\n", +"T2=T1*p1^((k-1)/k) //Final temperature in K\n", +"W=((m*R*(T1-T2))/(k-1)) //Workdone in kJ\n", +"\n", +"//P-V Diagram\n", +"scf()\n", +"clf()\n", +"V1=(((m*R*T1)/P1)^(1/k))*10^3 //Inlet volume in cc\n", +"V2=(((m*R*T2)/P2)^(1/k))*10^3 //Final volume in cc\n", +"V = V1:(V2-V1)/100:V2 //Representing volume on graph, adiabatic expansion\n", +"P = P1*V1^k./V^k //Representing pressure on graph\n", +"plot(V, P) //Plotting \n", +"legend('P*V^k=C') //Defining curve\n", +"xtitle('PV Diagram', 'V (cc)', 'P (kPa)') //Titles of axes\n", +"\n", +"//Output\n", +"printf('Workdone is %3.2f kJ',W)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.20: To_find_Mach_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"C=200 //Velocity of object in m/s\n", +"mol=4 //Molecular weight of helium in kg/mol\n", +"k=1.67 //Adiabatic constant\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"T=288 //Temperature in K\n", +"\n", +"//Calculation\n", +"R=Ri/mol //Specific gas Constant in J/kg-k\n", +"a=sqrt(k*R*T) //Velocity of sound in m/s\n", +"M=C/a //Mach number \n", +"\n", +"//Output\n", +"printf('Mach number is %3.1f',M)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.21: To_find_speed_of_sound_and_Mach_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Z1=0 //Height from sea level in m\n", +"Z2=11 //Height from sea level in m\n", +"T1=288 //Temperature @Z1 in K, from gas tables\n", +"T2=216.5 //Temperature @Z2 in K, from gas tables\n", +"C=1000*(5/18) //Velocity in m/s\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity @Z1 in m/s\n", +"M1=C/a1 //Mach number @Z1\n", +"a2=sqrt(k*R*T2) //Sound velocity @Z2 in m/s\n", +"M2=C/a2 //Mach number @Z2\n", +"\n", +"//Output\n", +"printf('(A)Speed of sound at:\n sea level is %3.2f\n an altitude of %3i km is %3.2f m/s\n (B)Mach numbeer at:\n sea level is %3.2f\n an altitude of %3i km is %3.2f',a1,Z2,a2,M1,Z2,M2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.22: To_find_maximum_possible_velocity_of_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T=300+273 //Static Temperature in K\n", +"C=200 //Velocity in m/s\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"To=T+(C^2/(2*Cp)) //Stagnation Temperature in K\n", +"C_max=sqrt(2*Cp*To) //Maximum possible velocity obtained by air in m/s\n", +"\n", +"//Output\n", +"printf('Maximum possible velocity obtained by air is %3.2f m/s',C_max)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.23: To_find_exit_velocity_of_air.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"dT=37 //Temperature difference between air inside the tyre and nozzle exit\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"C=sqrt(2*Cp*dT) //Exit velocity of air in m/s\n", +"\n", +"//Output\n", +"printf('Exit velocity of air is %3.1f m/s',C)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.24: To_find_static_conditions_and_Flight_Mach_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"C=800*(5/18) //Velocity in m/s\n", +"Po=105 //Stagnation pressure in kPa\n", +"To=35+273 //Stagnation temperature in K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculation\n", +"T=To-(C^2/(2*Cp)) //Static temperature in K\n", +"P=Po*(T/To)^(k/(k-1)) //Static pressure in kPa\n", +"a=sqrt(k*R*T) //Sound Velocity in m/s \n", +"M=C/a //Mach number\n", +"\n", +"//Output\n", +"printf('(A)Static conditions:\n Pressure is %3.2f kPa\n Temperature is %3.2f K\n Sound Velocity is %3.2f m/s\n (B)Mach number is %3.2f',P,T,a,M)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.25: To_find_stagnation_pressure_and_mach_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"C=215 //Velocity in m/s\n", +"T=30+273 //Static temperature in K\n", +"P=5 //Static pressure in bar\n", +"R=287 //Specific gas constant in J/kg-k\n", +"k=1.4 //Adiabatic Constant\n", +"\n", +"//Calculations\n", +"a=sqrt(k*R*T) //Sound Velocity in m/s \n", +"M=C/a //Mach number\n", +"To=T*(1+(((k-1)/2)*M^2)) //Stagnation temperature in K\n", +"Po=P*(To/T)^(k/(k-1)) //Stagnation pressure in kPa\n", +"\n", +"//Output\n", +"printf('(A)Stagnation Pressure is %3.4f bar\n (B)Mach number is %3.3f',Po,M)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.26: To_determine_different_velocities_stagnation_enthalpy_and_crocco_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T=400 //Static temperature in K\n", +"k=1.4 //Adiabatic Constant\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculation\n", +"a=sqrt(k*R*T) //Sound velocity in m/s\n", +"C=a //Velocity of jet in m/s, Since jet has sonic velocity\n", +"To=T+(C^2/(2*Cp)) //Stagnation temperature in K\n", +"ao=sqrt(k*R*To) //Sound velocity at Stagnation condition in m/s \n", +"ho=(Cp*To)*10^-3 //Stagnation enthalpy in kJ/kg\n", +"C_max=sqrt(2*Cp*To) //Maximum velocity of jet in m/s\n", +"cr=C/C_max //Crocco number\n", +"\n", +"//Output\n", +"printf('(A)Velocity of sound at %3i K is %3.3f m/s\n (B)Velocity of sound at stagnation condition is %3.3f m/s\n (C)Maximum velocity of jet is %3.3f m/s\n (D)Stagnation enthalpy is %3.3f kJ/kg\n (E)Crocco number is %3.4f',T,C,ao,C_max,ho,cr)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.27: To_find_stagnation_conditions_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"C=250 //Velocity of air in m/s \n", +"D=10 //Diameter in duct in cm\n", +"T=5+273 //Static temperature in K\n", +"P=40 //Static pressure in kPa\n", +"k=1.4 //Adiabatic constant\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculation\n", +"To=T+(C^2/(2*Cp)) //Stagnation temperature in K\n", +"Po=P*(To/T)^(k/(k-1)) //Stagnation pressure in kPa\n", +"d=(P*10^3)/(R*T) //Density in kg/m^3\n", +"A=(%pi*D^2/4)*10^-4 //Area in m^2\n", +"m=d*A*C //Mass flow rate in kg/s\n", +"\n", +"//Output\n", +"printf('(A)Stagnation pressure is %3.2f kPa\n (B)Stagnation temperature is %3.2f K\n (C)Mass flow rate is %3.4f kg/s',Po,To,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.28: To_find_stagnation_conditions_and_velocity_at_dynamic_condition.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"C=300 //Velocity of air in m/s \n", +"P=1 //Static pressure in kPa\n", +"T=290 //Static temperature in K\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"To=T+(C^2/(2*Cp)) //Stagnation temperature in K\n", +"Po=P*(To/T)^(k/(k-1)) //Stagnation pressure in kPa\n", +"a=sqrt(k*R*T) //Sound velocity in m/s\n", +"Co=sqrt(k*R*To) //Sound velocity at Stagnation condition in m/s \n", +"\n", +"//Output\n", +"printf('(A)Stagnation pressure and temperature are %3.4f bar and %3.2f K\n (B)Velocity of sound in the dynamic and stagnation conditions are %3.2f m/s and %3.2f m/s',Po,To,a,Co)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.29: To_find_flow_velocity_for_compressible_and_incompressible_flow.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data \n", +"dP=490*(1.01325/760) //Pressure in pivot tube in bar\n", +"P=0.3546+1.01325 //Static pressure(absolute) in bar \n", +"To=25+273 //Stagnation temperature in K\n", +"k=1.4 //Adiabaatic constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"Po=dP+P //Stagnation pressure in bar\n", +"T=To*(P/Po)^((k-1)/k) //Static temperature\n", +"C1=sqrt(2*Cp*(To-T)) //Flow velocity for Compressible flow in m/s\n", +"di=Po/(R*To) //Density in kg/m^3\n", +"C2=sqrt((2*dP)/di) //Flow velocity for incompressible flow in m/s\n", +"\n", +"//Output\n", +"printf('Flow velocity for:\n (A)Compressible flow is %3.2f m/s\n (B)Incompressible flow is %3.2f m/s',C1,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.2: To_calculate_heat_transfer_internal_energy_change_and_work_done.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"V1=0.35 //Volume of gas in m^3\n", +"P1=110 //Initial Pressure in kPa\n", +"T1=300 //Intial Temperature in K\n", +"P2=600 //Final Pressure in kPa,missing data\n", +"k=1.4 //Adiabatic constant\n", +"Cv=718 //Specific heat at constant volume in J/kg-K\n", +"R=287 //Specific Gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"dQ=0 //Heat transfer in J, Since Adiabatic process\n", +"m=(P1*10^3*V1)/(R*T1) //Mass of air in kg \n", +"p1=P2/P1 //Pressure ratio\n", +"T2=T1*p1^((k-1)/k) //Final temperature in K\n", +"dU=(m*Cv*(T2-T1))*10^-3 //Change in internal energy in kJ\n", +"dW=-dU //Workdone in kJ, Since dQ=0\n", +"\n", +"//P-V Diagram\n", +"scf()\n", +"clf()\n", +"V1cc=V1*10^3 //Inlet volume in cc\n", +"V2cc=V1cc*(T2/T1)^(1/(k-1)) //Final volume in cc\n", +"V = V1cc:(V2cc-V1cc)/100:V2cc //Representing volume on graph, adiabatic expansion\n", +"P = P2*V1cc^k./V^k //Representing pressure on graph\n", +"plot(V, P) //Plotting \n", +"legend('P*V^k=C') //Defining curve\n", +"xtitle('PV Diagram', 'V (cc)', 'P (kPa)') //Titles of axes\n", +"\n", +"//Output\n", +"printf('(A)Heat transfer is %3i J\n (B)Change in internal energy is %3.3f kJ\n (C)Workdone is %3.3f kJ\n',dQ,dU,dW)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.30: To_find_Mach_number_velocity_and_area_at_a_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"To=27+273 //Stagnation temperature in K\n", +"Po=8 //Stagnation Pressure in bar\n", +"P=5.6 //Static pressure in bar, taken from diagram given\n", +"m=2 //Mass flow rate in kg/s\n", +"k=1.4 //Adiabaatic constant\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculation\n", +"T=To*(P/Po)^((k-1)/k) //Static temperature in K\n", +"a=sqrt(k*R*T) //Sound velocity in m/s\n", +"C=sqrt(2*Cp*(To-T)) //Velocity in m/s\n", +"M=C/a //Mach number\n", +"A=((m*R*T)/(P*10^5*C))*10^4 //Area at a point in the channal in cm^2\n", +"\n", +"//Output\n", +"printf('(A)Mach number is %3.4f\n (B)Velocity is %3.1f m/s\n (C)Area at a point in the channal is %3.3f cm^2',M,C,A)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.31: To_find_velocity_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=1.8 //Stagnation pressure in atm\n", +"To=20+273 //Stagnation temperature in K\n", +"P=1 //Surrounding pressure in atm\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculation\n", +"p1=0.528 //Static to Stagnation pressure ratio @Mach number=1, from gas tables\n", +"Pt=p1*Po //Critical pressure in atm, Since Pt<P the flow is not chocked \n", +"di=(Po*10^5)/(R*To) //Density in kg/m^3 \n", +"ao=sqrt(k*R*To) //Sound velocity at Stagnation condition in m/s\n", +"Cp=(k*R)/(k-1) //Specific heat capacity at constant pressure in J/kg-K\n", +"C=sqrt(2*Cp*To*(1-(P/Po)^((k-1)/k))) //Velocity of air flow which will take place from chamber to the outside through a unit area hole in m/s\n", +"G=di*ao*sqrt(2/(k-1))*(P/Po)^(1/k)*sqrt((1-(P/Po)^((k-1)/k))) //Mass flow rate per unit area in kg/s-m^2\n", +"\n", +"//Output\n", +"printf('(A)Velocity of air flow which will take place from chamber to the outside through a unit area hole is %3.3f m/s\n (B)Mass flow rate per unit area is %3.3f kg/s-m^2',C,G)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.32: To_find_various_properties_at_one_section_in_duct.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"A1=465.125 //Cross sectional area at entry in cm^2\n", +"T1=26.66+273 //Static temperature at section-1 in K\n", +"P1=3.4473 //Static Pressure at section-1 in bar\n", +"C1=152.5 //Velocity at section-1 in m/s\n", +"P2=2.06838 //Static Pressure at section-2 in bar\n", +"T2=277.44 //Static temperature at section-2 in K\n", +"C2=260.775 //Velocity at section-2 in m/s\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculations\n", +"To1=T1+(C1^2/(2*Cp)) //Stagnation temperature at entry in K\n", +"To2=T2+(C2^2/(2*Cp)) //Stagnation temperature at exit in K\n", +"//here To1=To2 from answers\n", +"d1=(P1*10^5)/(R*T1) //Density at section-1\n", +"d2=(P2*10^5)/(R*T2) //Density at section-2\n", +"ar=(d2*C2)/(d1*C1) //Ratio of inlet to outlet area\n", +"A2=A1/ar //Cross sectional area at exit in cm^2\n", +"C_max=sqrt(2*Cp*To1) //Maximum velocity at exit in m/s\n", +"m=d1*A1*C1*10^-4 //Mass flow rate in kg/s \n", +"F=((P1*10^5*A1*10^-4)-(P2*10^5*A2*10^-4))+(m*(C1-C2)) //Force acting on the duct wall between two sections in N\n", +"\n", +"//Output\n", +"printf('(A)Maximum velocity and stagnation temperature at exit are %3.2f m/s and %3.2f K\n (B)Since Stagnation temperature %3i K at entry and %3i K at exit are equal, the flow is adiabatic\n (C)Cross sectional area at exit is %3.2f cm^2\n (D)Force acting on the duct wall between two sections is %3.2f N',C_max,To2,To1,To2,A2,F)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.33: To_find_various_properties_at_one_section_in_duct.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P1=250 //Static Pressure at section-1 in kPa\n", +"T1=26+273 //Static temperature at section-1 in K\n", +"M1=1.4 //Mach number at entry\n", +"M2=2.5 //Mach number at exit\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"\n", +"//Calculation\n", +"C1=sqrt(k*R*T1)*M1 //Air velocity at entry in m/s \n", +"To=T1*(1+(((k-1)/2)*M1^2)) //Stagnation temperature in K\n", +"t1=(1+(((k-1)/2)*M2^2)) //Stagnation to exit Temperature ratio\n", +"T2=To/t1 //Exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Air velocity at exit in m/s \n", +"P2=P1*(T2/T1)^(k/(k-1)) //Exit static pressure in kPa\n", +"d2=(P2*10^3)/(R*T2) //Density at section-2 in kg/m^3\n", +"G=d2*C2 //)Mass flow rate through the duct per square metre in kg/s-m^2\n", +"\n", +"//Output\n", +"printf('(A)At second section:\n Temperature is %3.2f K\n Pressure is %3.2f kPa\n Velocity is %3.4f m/s\n (B)Mass flow rate through the duct per square metre is %3.1f kg/s-m^2',T2,P2,C2,G)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.34: To_find_maximum_temperature_encountered_by_skin.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=2 //Mach number\n", +"h=20 //Altitude in km\n", +"Tc=-56 //Ambient temperature in degree Centigrade\n", +"Ta=-56+273 //Ambient temperature in K\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Specific gas constant in J/kg-k\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"a=sqrt(k*R*Ta) //Sound velocity in m/s\n", +"C=M*a //Velocity of flight in m/s\n", +"To=Tc+(C^2/(2*Cp)) //The maximum temperature encountered is %3.1f degree Centigrade\n", +"\n", +"//Output\n", +"printf('The maximum temperature encountered is %3.1f degree Centigrade',To)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.35: To_find_rate_of_heat_transfer.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"W=20000 //Power developed in kW\n", +"m=12 //Mass flow rate in kg/s\n", +"C1=50 //Velocity of air entering in m/s\n", +"T1=700+273 //Temperature of air entering in K\n", +"T2=298 //Temperature of air leaving in K\n", +"C2=125 //Velocity of air leaving in m/s\n", +"Cp=1.005 //Specific heat capacity at constant pressure in kJ/kg-K\n", +"\n", +"//Calculation\n", +"dh=Cp*(T2-T1) //Change in enthalpy in kJ/kg\n", +"Q=((m*dh)+W-(m*(1/2000)*(C2^2-C1^2))) //The rate of heat transfer in kJ/s\n", +"\n", +"//Output\n", +"printf('The rate of heat transfer is %3.2f kJ/s',Q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.36: To_find_various_properties_in_a_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"mol=39.9 //Molecular weight of gas in kg/mol\n", +"k=1.67 //Adiabatic constant\n", +"Po=500 //Pressure in chamber in kPa\n", +"To=30+273 //Temperature in chamber in K\n", +"P1=80 //Pressure of nozzle at given section in kPa\n", +"D=0.012 //Cross section diameter of nozzle in m\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"\n", +"//Calculation\n", +"R=Ri/mol //Specific gas constant in J/kg-K\n", +"p1=Po/P1 //Stagnation to static pressure ratio\n", +"M1=sqrt((((p1^((k-1)/k))-1)*2)/(k-1)) //Mach number at section\n", +"T1=To*((1+(((k-1)/2)*M1^2))^(-1)) //Temperature at section in K\n", +"a=sqrt(k*R*T1) //Sound Velocity in m/s\n", +"C1=M1*a //Gas Velocity at section in m/s\n", +"d=(P1*10^3)/(R*T1) //Density in kg/m^3\n", +"A1=%pi*D^2/4 //Cross-sectional Area \n", +"m=d*A1*C1 //Mass flow rate through nozzle in kg/s\n", +"\n", +"//Output\n", +"printf('(A)At section:\n Mach number is %3.1f\n Temperature is %3.1f K\n Velocity is %3.3f m/s\n (B)Mass flow rate through nozzle is %3.3f kg/s',M1,T1,C1,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.37: To_find_Mach_number_velocity_and_pressure_at_a_section_in_duct.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"mol=4 //Molecular weight of gas in kg/mol\n", +"k=1.3 //Adiabatic constant\n", +"C1=150 //Gas Velocity at section-1 in m/s\n", +"P1=100 //Pressure of duct at section-1 in kPa\n", +"T1=15+273 //Temperature at section-1 in K\n", +"T2=-10+273 //Temperature at section-2 in K\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"\n", +"//Calculation\n", +"R=Ri/mol //Specific gas constant in J/kg-K\n", +"a1=sqrt(k*R*T1) //Sound velocity at section-1 in m/s\n", +"M1=C1/a1 //Mach number at section-1 \n", +"t1=0.9955 //Static to Stagnation temperature ratio at entry from gas tables @M1,k=1.3 \n", +"To=T1/t1 //Stagantion temperature in K\n", +"p1=0.9815 //Static to Stagnation pressure ratio at entry from gas tables @M1,k=1.3 \n", +"Po=P1/p1 //Stagnation pressure in kPa\n", +"t2=T2/To //Static to Stagnation temperature ratio at exit\n", +"M2=0.82 //Amch number at section-2 from gas tables @t2,k=1.3\n", +"p2=0.659 //Static to Stagnation pressure ratio at exit from gas tables @M2,k=1.3 \n", +"P2=Po*p2 //Pressure at section-2 in kPa\n", +"a2=sqrt(k*R*T2) //Sound velocity at section-2 in m/s\n", +"C2=M2*a2 //Gas Velocity at section-2 in m/s\n", +"\n", +"//Output\n", +"printf('At the second point:\n Mach number is %3.2f\n Pressure is %3.3f kPa\n Velocity is %3.2f m/s',M2,P2,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.38: To_find_mass_flow_rate_and_velocity_at_exit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"A1=10 //Inlet area in cm^2\n", +"C1=80 //Inlet Air velocity in m/s\n", +"T1=28+273 //Inlet temperature in K\n", +"P1=700 //Inlet Pressure in kPa\n", +"P2=250 //Exit pressure in kPa\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity at inlet in m/s\n", +"M1=C1/a1 //Mach number at inlet\n", +"t1=0.989 //Static to Stagnation temperature ratio at entry from gas tables @M1,k=1.4\n", +"To=T1/t1 //Stagantion temperature in K\n", +"p1=0.964 //Static to Stagnation pressure ratio at entry from gas tables @M1,k=1.4 \n", +"Po=P1/p1 //Stagnation pressure in kPa\n", +"p2=P2/Po //Static to Stagnation pressure ratio \n", +"M2=1.335 //Mach number at exit \n", +"t2=0.737 //Static to Stagnation temperature ratio at exit from gas tables @M2,k=1.4\n", +"T2=To*t2 //Stagnation temperatur in K\n", +"a2=sqrt(k*R*T2) //Sound velocity at exit in m/s\n", +"C2=M2*a2 //Exit Air velocity in m/s\n", +"d1=(P1*10^3)/(R*T1) //Density at inlet in kg/m^3\n", +"m=d1*A1*C1*10^-4 //Mass flow rate in kg/s\n", +"\n", +"//Output\n", +"printf('(A)Mass flow rate is %3.3f kg/s\n (B)Velocity at the exit is %3.2f m/s',m,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.39: To_find_time_required_for_a_value_of_pressure_decrease.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"V=5 //Volume of air in m^3\n", +"Ae=10*10^-4 //Exit area in cm^2\n", +"To=60+273 //Temperature inside in the tank in K\n", +"Po1=40 //Intial total pressure in bar \n", +"Po2=2 //Final total pressure in bar\n", +"P=1 //Discharge pressure in bar\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"//Here pressure ratios P/Po1 and P/Po2 are always less than critical pressure ratio therefore flow is choked i.e. M=1 at exit\n", +"Gp=(0.0404184*Ae)/sqrt(To) //Mass flow rate by Stagnation pressure i.e. m/Po\n", +"//Differentiating m=(P*V)/(R*To) w.r.t. time and intrgrating resulting equation we get following expression.\n", +"t=-(V/(R*To*Gp))*log(Po2/Po1) //The time required for tank pressure to decrease from Po1 to Po2 in sec\n", +"\n", +"//Output\n", +"printf('The time required for tank pressure to decrease from %i bar to %i bar is %3.2f sec',Po1,Po2,t)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.3: To_determine_temperature_enthalpy_drop_and_internal_energy_change.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P1=3.2 //Initial Pressure in bar\n", +"P2=1 //Final Pressure in bar\n", +"T1=475 //Initial temperature in K\n", +"Mol=44 //Molecular weight of carbondioxide in kg/mol\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"k=1.3 //Adiabatic constant\n", +"\n", +"//Calculation\n", +"R=Ri/Mol //Specific gas constant in J/kg-K\n", +"Cp=(k*R)/(k-1) //Specific heat capacity at constant pressure in J/kg-K\n", +"Cv=Cp/k //Specific heat capacity at constant volume in J/kg-K\n", +"p1=P2/P1 //Pressure ratio\n", +"T2=T1*p1^((k-1)/k) //Final Temperature\n", +"dh=Cp*(T1-T2)*10^-3 //Enthalpy drop in kJ/kg\n", +"dU=Cv*(T2-T1)*10^-3 //Change in internal energy in kJ/kg, -ve sign indicates loss\n", +"\n", +"//Output\n", +"printf('(A)Temperature is %3.3f K\n (B)Enthalpy drop is %3.3f kJ/kg\n (C)Change in internal energy is %3.2f kJ/kg i.e. %3.2f kJ/kg(loss)',T2,dh,dU,abs(dU))" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.4: To_determine_properties_at_outlet_and_area_ratio_of_diffuser.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P1=0.5 //Initial Pressure in bar\n", +"T1=50+273 //Intial Temperature in K\n", +"C1=240 //Inlet velocity in m/s\n", +"C2=120 //Outlet velocity in m/s, missing data\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"\n", +"//Calculation\n", +"T2=T1+((C1^2-C2^2)/(2*Cp)) //Final Temperature in K\n", +"t1=T2/T1 //Temperature ratio\n", +"P2=P1*t1^(k/(k-1)) //Final Pressure in bar\n", +"ar=(P1*T2*C1)/(P2*T1*C2) //Ratio of outlet to inlet area\n", +"\n", +"//Output\n", +"printf('(A)At outlet:\n Temperature is %3.2f K\n Pressure is %3.4f bar\n (B)Ratio of outlet to inlet area is %3.4f',T2,P2,ar)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.5: To_determine_static_pressure_and_axial_force_of_turbojet_engine.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"m=25 //Mass flow rate of air in kg/s\n", +"C2=115 //Outlet velocity in m/s\n", +"P1=100 ////Initial Pressure in kPa\n", +"T1=300 //Intial Temperature in K\n", +"C1=40 //Inlet velocity in m/s\n", +"R=0.287 //Specific gas constant in kJ/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"\n", +"//Calculation\n", +"T2=T1+((C1^2-C2^2)/(2*Cp)) //Final Temperature in K\n", +"t1=T2/T1 //Temperature ratio\n", +"P2=P1*t1^(k/(k-1)) //Final Pressure in bar\n", +"A1=(m*R*T1)/(P1*C1) //Area at inlet in m^2\n", +"A2=(m*R*T2)/(P2*C2) //Area at outlet in m^2\n", +"F=((P1*A1)-(P2*A2))+(m*(C1-C2))*10^-3 //Axial force on mouthpiece resulting from acceleration of air in kN\n", +"\n", +"//Output\n", +"printf('(A)Static pressure at intake face is %3.3f kPa\n (B)Magnitude of axial force on mouthpiece resulting from acceleration of air is %3.3f kN',P2,F)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.6: To_determine_mach_number_at_a_point.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P=200 //Pressure in kPa\n", +"C=50 //Velocity of air in m/s\n", +"d=2.9 //Density in kg/m^3\n", +"Mol=32 //Molecular weight of oxygen in kg/mol\n", +"k=1.4 //Adiabatic constant\n", +"Ri=8314 //Ideal gas constant in J/mol-K\n", +"\n", +"//Calculator\n", +"R=Ri/Mol //Specific gas constant in J/kg-K\n", +"T=P*10^3/(R*d) //Temperature in K\n", +"a=sqrt(k*R*T) //Velocity of sound in m/s \n", +"M=C/a //Mach number \n", +"\n", +"//Output\n", +"printf('Mach number is %3.2f',M)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.7: To_find_direction_of_flow.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Pa=1.3 //Pressure at section-A in bar\n", +"Ta=50+273 //Temperature at section-A in K\n", +"Pb=1 //Pressure at section-B in bar\n", +"Tb=13+273 //Temperature at section-B in K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"ds=((Cp*log(Tb/Ta))-(R*log(Pb/Pa)))*10^-3 //The change in the entropy is kJ/kg\n", +"//+ve sign indicates A to B\n", +"//-ve sign indicates B to A\n", +"\n", +"//Output\n", +"printf('The change in the entropy is %3.4f kJ/kg\n Since value is -ve, process must takes place from B to A',ds)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.8: To_calculate_the_bulk_modulus.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"V1=8 //Intial volume in litre\n", +"V2=7.8 //Final volume in litre\n", +"P1=0.7 //Intial Pressure in MPa\n", +"P2=2.7 //Final Pressure in MPa\n", +"\n", +"//Calculations\n", +"K=(P2-P1)/(log(V1/V2)) //Bulk modulus of liquid in kPa\n", +"\n", +"//Output\n", +"printf('Bulk modulus of liquid is %3.3f kPa',K)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.9: To_calculate_mass_of_water_to_be_pumped_to_obtain_desired_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"V1=0.5 //Voume of Water required to fill pressure vessel in m^3\n", +"P=3000 //Test pressure in bar\n", +"dv=0.6 //Change of empty volume of container due to pressurisation in percentage \n", +"K=20000 //Bulk modulus of water in MPa\n", +"\n", +"//Calculation\n", +"m1=V1*10^3 //Mass of water required to fill pressure vessel in kg\n", +"Vr=(P*V1)/K //Reduced volume of water due to compression in m^3\n", +"Vi=dv*V1/100 //Increased volume of container in m^3\n", +"V=Vr+Vi //Volume of additional water required in m^3\n", +"m=V*10^3 //Mass of additional water required in kg\n", +"mt=m1+m //Total mass of water required in litre, Since 1kg=1Lit\n", +"\n", +"//Output\n", +"printf('Mass of water to be pumped into the vesel to obtain the desired pressure is %3i lit',mt)" + ] + } +], +"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 +} diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/2-Flow_through_Variable_Area_Ducts.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/2-Flow_through_Variable_Area_Ducts.ipynb new file mode 100644 index 0000000..9966b50 --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/2-Flow_through_Variable_Area_Ducts.ipynb @@ -0,0 +1,1090 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2: Flow through Variable Area Ducts" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.10: To_determine_throat_and_exit_conditions_mass_flow_rate_through_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=1000 //Stagnation pressure in kPa\n", +"To=800 //Stagnation temperature in K\n", +"k=1.4 //Adiabatic Constant \n", +"M2=2 //Exit mach number\n", +"At=20 //Throat area in cm^2 \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from isentropic gas tables @M=1,k=1.4 \n", +"Tt=To*t1 //critical temperature in K\n", +"at=sqrt(k*R*Tt) //Velocity of sound at critical state in m/s\n", +"Ct=at //Velocity of air at critical state in m/s, Since M=1\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from isentropic gas tables @M=1,k=1.4 \n", +"Pt=Po*p1 //Critical pressure in bar\n", +"dt=(Pt*10^3)/(R*Tt) //Density at critical state in kg/m^3, Pt in Pa\n", +"m=dt*At*10^-4*Ct //Mass flow rate in kg/s, At in m^2\n", +"p2=0.128 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P2=Po*p2 //exit pressure in kPa\n", +"t2=0.555 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4\n", +"T2=To*t2 //exit temperature in K\n", +"a2=1.687 //Ratio of exit area to critical area from isentropic gas tables @M2,k=1.4\n", +"A2=At*a2 //Exit area in cm^2\n", +"C2=sqrt(k*R*T2)*M2 //Exit velocity in m/s\n", +"d2=P2*10^3/(R*T2) //Density at exit in kg/m^3, P2 in Pa\n", +"\n", +"//Output\n", +"printf('(A)At throat:\n Temperature is %3.1f K\n Velocity is %3.2f m/s\n Pressure is %3i kPa\n (B)At Exit:\n Temperature is %3i K\n Pressure is %3i kPa\n Area is %3.2f m^2\n Mass flow rate is %3.4f kg/s',Tt,Ct,Pt,T2,P2,A2,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.11: EX2_11.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M2=2 //Exit mach number\n", +"At=1000 //Throat area in cm^2 \n", +"Po=0.69 //Stagnation pressure in bar \n", +"To=310 //Stagnation temperature in K\n", +"k=1.4 //Adiabatic Constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1.005 //Specific heat capacity at constant pressure in kJ/kg-K \n", +"\n", +"//Calculation\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from isentropic gas tables @M=1,k=1.4\n", +"Tt=To*t1 //critical temperature in K\n", +"at=sqrt(k*R*Tt) //Velocity of sound at critical state in m/s\n", +"Ct=at //Velocity of air at critical state in m/s, Since M=1\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from isentropic gas tables @M=1,k=1.4 \n", +"Pt=Po*p1 //Critical pressure in bar\n", +"dt=(Pt*10^5)/(R*Tt) //Density at critical state in kg/m^3, Pt in Pa\n", +"m=dt*At*10^-4*Ct //Mass flow rate in kg/s, At in m^2\n", +"p2=0.128 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P2=Po*p2 //exit pressure in bar\n", +"t2=0.555 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4\n", +"T2=To*t2 //exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Exit velocity in m/s\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/m^3, P2 in Pa\n", +"A2=(m/(d2*C2))*10^4 //Exit area in cm^2\n", +"P=m*Cp*(To-T2) //Power required to drive the compressor in kW\n", +"\n", +"//Output\n", +"printf('(A)At throat:\n Temperature is %3.2f K\n Velocity is %3.2f m/s\n Pressure is %3.3f bar\n At Test section:\n Temperature is %3.2f K\n Velocity is %3.3f m/s\n Pressure is %3.3f bar\n (B)Area of cross section at test section is %3i cm^2\n (C)Mass flow rate is %3.3f kg/s\n (D)Power required to drive the compressor is %3.2f kW',Tt,Ct,Pt,T2,C2,P2,A2,m,P)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.12: To_find_cross_section_at_throat_and_exit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=10 //Stagnation pressure in bar \n", +"To=100+273 //Stagnation temperature in K\n", +"m=15 //mass flow rate in kg/s\n", +"P2s=1 //Back pressure in isentropic state in bar\n", +"eff=0.95 //efficiency of diverging nozzle\n", +"k=1.4 //Adiabatic Constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculation\n", +"//case I: isentropic\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from isentropic gas tables @M=1,k=1.4\n", +"Tt=To*t1 //critical temperature in K\n", +"at=sqrt(k*R*Tt) //Velocity of sound at critical state in m/s\n", +"Ct=at //Velocity of air at critical state in m/s, Since M=1\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from isentropic gas tables @M=1,k=1.4 \n", +"Pt=Po*p1 //Critical pressure in bar\n", +"dt=(Pt*10^5)/(R*Tt) //Density at critical state in kg/m^3, Pt in Pa\n", +"At=(m/(dt*Ct))*10^4 //Throat area in cm^2 \n", +"p2=P2s/Po //Pressure ratio\n", +"M2s=2.15 //Exit mach number from gas tables (isentropic state) @p2,k=1.4\n", +"t2=0.519 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2s,k=1.4\n", +"T2s=t2*To //exit temperature in K\n", +"a2s=sqrt(k*R*T2s) //Velocity of sound at exit in m/s\n", +"C2s=M2s*a2s //Exit air velocity in m/s\n", +"d2s=(P2s*10^5)/(R*T2s) //Density at exit in kg/m^3, P2 in Pa\n", +"A2s=(m/(d2s*C2s))*10^4 //Exit area in cm^2\n", +"//case II: isentropic upto throat\n", +"T2=To-(eff*(To-T2s)) //Exit tempareture in K\n", +"C2=sqrt(2*Cp*(To-T2)) //Exit air velocity in m/s\n", +"P2=P2s //Exit pressure in bar, Since it is diffuser\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/m^3, P2 in Pa\n", +"A2=(m/(d2*C2))*10^4 //Exit area in cm^2\n", +"\n", +"//Output\n", +"printf('(A)The nozzle cross section at throat in both cases is %3.2f cm^2\n (B)The nozzle cross section at exit in case I is %3.3f cm^2 and in case II is %3.2f cm^2',At,A2s,A2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.13: To_find_ratio_of_areas_velocity_and_back_pressure_in_CD_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=600 //Stagnation pressure in kPa\n", +"To=40+273 //Stagnation temperature in K\n", +"P2=100 //exit pressure in kPa\n", +"k=1.4 //Adiabatic Constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"p1=P2/Po //pressure ratio \n", +"M2=1.82 //Exit mach number from gas tables @p2,k=1.4\n", +"ar=1.461 //Ratio of nozzle exit area to nozzle throat area from gas tables @M2\n", +"t1=0.602 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4\n", +"T2=To*t1 //exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Exit air velocity in m/s\n", +"p2=3.698 //Ratio of static pressures after shock to before shock from normal shock gas tables @M2 \n", +"Py=p2*P2 //The back pressure at which normal shock acts at the exit plane of the nozzle in kPa\n", +"\n", +"//Output\n", +"printf('(A)Ratio of nozzle exit area to nozzle throat area is %3.3f\n (B)The discharge velocity from nozzle is %3.2f m/s\n (C)The back pressure at which normal shock acts at the exit plane of the nozzle is %3.1f kPa',ar,C2,Py)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.14: To_find_how_duct_acts.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"ar=2 //Ratio of nozzle exit area to nozzle throat area\n", +"Po=700 //Stagnation pressure in kPa\n", +"P2=400 //exit pressure in kPa\n", +"\n", +"//Calculation\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from gas tables @M=1\n", +"Pt=Po*p1 //critical pressure in bar\n", +"p2=P2/Po //Pressure ratio\n", +"M2=0.93 //Exit mach number from gas tables @p2,k=1.4\n", +"\n", +"//Output\n", +"printf('Since pressure decreases from %3i kPa to %3.1f kPa from inlet to throat, it acts as nozzle\n Since exit pressure %3i kPa is above critical pressure %3.1f kPa, it acts as diffuser with M=%3.2f\n Hence the duct acts as Venturi',Po,Pt,P2,Pt,M2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.15: EX2_15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"A1=0.15 //Inlet area in m^2\n", +"C1=240 //Inlet velocity in m/s \n", +"T1=300 //Inlet temperature in K\n", +"P1=0.7 //Inlet pressure in bar\n", +"C2=120 //Exit velocity in m/s\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculations\n", +"a1=sqrt(k*R*T1) //Velocity of sound at inlet in m/s\n", +"M1=C1/a1 //Inlet mach number \n", +"d1=(P1*10^5)/(R*T1) //Density at inlet in kg/s, P1 in Pa\n", +"m=d1*A1*C1 //Mass flow rate in kg/s\n", +"t1=0.913 //Ratio of inlet temperature to Stagnation temperature from gas tables @M1,k=1.4\n", +"To=T1/t1 //Stagnation temperature in K\n", +"p1=0.727 //Ratio of inlet pressure to Stagnation pressure from gas tables @M1,k=1.4\n", +"Po=P1/p1 //Stagnation pressure in bar\n", +"T2=To-(C2^2/(2*Cp)) //Exit temperature in K\n", +"t2=T2/To //Temperature ratio \n", +"M2=0.33 //Exit mach number from gas tables @t2,k=1.4\n", +"p2=0.927 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P2=Po*p2 //exit pressure in bar\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/s, P2 in Pa\n", +"A2=(m/(d2*C2)) //Exit area in m^2\n", +"ds=0 //Entropy change in kJ/kg-K, since process is isentropic\n", +"\n", +"//Output\n", +"printf('(A)Mass flow rate is %3.3f kg/s\n (B)Stagnation pressure at exit is %3.4f bar\n (C)Stagnation Temperature at exit is %3.3f K\n (D)Static exit pressure is %3.3f bar\n (E)Entropy change is %3i kJ/kg-K\n (F)Exit area is %3.3f m^2',m,Po,To,P2,ds,A2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.16: To_find_throat_area_reservoir_conditions_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"A2=645 //Exit area in mm^2\n", +"M2=2 //Exit mach number\n", +"P2=1 //exit pressure in bar\n", +"T2=185 //Exit temperature in K\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"t1=0.555 //Ratio of exit temperature to Stagnation temperature from gas tables @M2,k=1.4\n", +"To=T2/t1 //Stagnation temperature in K\n", +"p1=0.128 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"Po=P2/p1 //Stagnation pressure in bar\n", +"a1=1.687 //Ratio of exit area to critical area from isentropic gas tables @M2,k=1.4\n", +"At=A2/a1 //Critical area in mm^2\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/s, P2 in Pa\n", +"C2=sqrt(k*R*T2)*M2 //Exit air velocity in m/s\n", +"m=d2*A2*C2*10^-6 //Mass flow rate in kg/s, A2 in m^2\n", +"\n", +"//Output\n", +"printf('(A)Throat area is %3.2f mm^2\n (B)Reservoir pressure is %3.4f bar\n (C)Reservoir temperature is %3.2f K\n (D)Mass flow rate is %3.4f kg/s',At,Po,To,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.17: To_find_throat_conditions_ratio_of_velocities_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=20 //Stagnation pressure in kPa\n", +"To=1000 //Stagnation temperature in K\n", +"P2=3 //exit pressure in bar\n", +"A2=100 //Exit area in cm^2\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculations\n", +"p1=P2/Po //Pressure ratio\n", +"M2=1.9 //Exit mach number from gas tables @p1,k=1.4\n", +"t1=0.581 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4 \n", +"T2=To*t1 //exit temperature in K\n", +"C2=M2*sqrt(k*R*T2) //Exit velocity in m/s\n", +"a1=1.555 //Ratio of exit area to critical area from isentropic gas tables @M2,k=1.4\n", +"At=A2/a1 //critical area in cm^2\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from gas tables @M=1\n", +"Pt=Po*p1 //critical pressure in bar\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from gas tables @M=1\n", +"Tt=To*t1 //critical temperature in K\n", +"at=sqrt(k*R*Tt) //Sound velocity at throat in m/s \n", +"Ct=at //Air velocity t throat in m/s, Since M=1\n", +"dt=(Pt*10^5)/(R*Tt) //Density of air at throat in kg/m^3, Pt in Pa\n", +"m=dt*At*10^-4*Ct //Mass flow rate in kg/s, At in m^2\n", +"C_max=sqrt(2*Cp*To) //Maximum possible velocity in m/s\n", +"cr=C2/C_max //Ratio of velocities\n", +"\n", +"//Output\n", +"printf('(A)At Throat:\n Area is %3.2f cm^2\n Pressure is %3.2f bar\n Temperature is %3i K\n (B)Exit velocity is %3.4f times C_max in m/s\n (C)Mass flow rate is %3.2f kg/s',At,Pt,Tt,cr,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.18: To_find_mass_flow_rate_and_exit_conditions.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=7 //Stagnation pressure in bar\n", +"To=100+273 //Stagnation temperature in K\n", +"At=12 //Critical area in cm^2\n", +"A2=25.166 //Exit area in cm^2\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"a1=A2/At //Ratio of areas\n", +"//subsonic\n", +"M2=0.29 //Exit mach number from gas tables @a1,k=1.4\n", +"p1=0.943 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P2=Po*p1 //exit pressure in bar\n", +"t1=0.983 //Ratio of exit temperature to Stagnation temperature from gas tables @M2,k=1.4\n", +"T2=To*t1 //Exit temperature in K\n", +"C2=M2*sqrt(k*R*T2) //Exit air velocity in m/s\n", +"//supersonic\n", +"M_2=2.25 //Exit mach number from gas tables @a1,k=1.4\n", +"p2=0.0865 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P_2=Po*p2 //exit pressure in bar\n", +"t2=0.497 //Ratio of exit temperature to Stagnation temperature from gas tables @M2,k=1.4\n", +"T_2=To*t2 //Exit temperature in K\n", +"C_2=M_2*sqrt(k*R*T_2) //Exit air velocity in m/s\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/s, P2 in Pa\n", +"m=d2*A2*10^-4*C2 //Mass flow rate in kg/s, A2 in m^2\n", +"\n", +"//Output\n", +"printf('(A)Maximum mass flow rate is %3.3f kg/s\n (B)Subsonic exit condition:\n Temperature is %3.3f K\n Velocity is %3.2f m/s\n Pressure is %3.3f bar\n Mach number is %3.2f\n Supersonic exit condition:\n Temperature is %3.3f K\n Velocity is %3.2f m/s\n Pressure is %3.4f bar\n Mach number is %3.2f\n',m,T2,C2,P2,M2,T_2,C_2,P_2,M_2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.19: EX2_19.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T1=335 //Inlet temperature in K\n", +"P1=655 //Inlet pressure in kPa\n", +"C1=150 //Inlet velocity in m/s\n", +"P2=138 //Exit pressure in kPa\n", +"T2=222 //Exit temperature in K\n", +"m=9 //Mass flow rate in kg/s\n", +"Mol=32 //Molar mass of oxygen in kg/mol\n", +"Ri=8314 //Ideal gas constant in J/kg-k\n", +"k=1.4 //Adiabatic Constant\n", +"Cp=915 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculation\n", +"R=Ri/Mol //Specific gas constant in J/kg-K\n", +"a1=sqrt(k*R*T1) //Sound velocity at inlet in m/s \n", +"M1=C1/a1 //Inlet mach number\n", +"t1=0.964 //Ratio of inlet temperature to Stagnation temperature from gas tables @M1,k=1.4\n", +"To1=T1/t1 //Stagnation temperature at inlet in K\n", +"p1=0.881 //Ratio of inlet pressure to Stagnation pressure at entry from gas tables @M1,k=1.4 \n", +"Po1=P1/p1 //Stagnation pressure at entry in kPa\n", +"t2=0.834 //Ratio of critical temperature to Stagnation temperature from gas tables @M=1\n", +"Tt=To1*t2 //critical temperature in K\n", +"C2=sqrt(C1^2+(2*Cp*(T1-T2))) //Exit velocity in m/s, \n", +"a2=sqrt(k*R*T2) //Sound velocity at exit in m/s \n", +"M2=C2/a2 //Exit mach number \n", +"p2=0.208 //Ratio of exit pressure to Stagnation pressure at exit from isentropic gas tables @M2,k=1.4\n", +"Po2=P2/p2 //Stagnation pressure at exit in kPa\n", +"SPC=(Po1-Po2) //Change in the stagnation pressure between inlet and exit in kPa\n", +"ds=R*log(Po1/Po2) //Change in entropy in J/kg-K\n", +"T2s=T1*((P2/P1)^((k-1)/k)) //Exit temperature at isentropic state in K\n", +"eff=((T1-T2)/(T1-T2s))*100 //Nozzle efficiency in percent\n", +"\n", +"//Output\n", +"printf('(A)Exit mach number is %3.2f\n (B)Change in the stagnation pressure between inlet and exit is %3.2f kPa\n (C)Change in entropy is %3.3f J/kg-K\n (D)Static temperature at throat is %3.1f K\n (E)Nozzle efficiency is %3.2f percent',M2,SPC,ds,Tt,eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.1: To_find_mass_flow_rate_temperature_and_pressure_at_throat.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"do1=1.12 //Density of air i reservoir in kg/m^3\n", +"ao1=500 //Velocity of sound in reservoir in m/s\n", +"d=0.01 //Throat diameter in m \n", +"k=1.4 //Adiabatic Constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"To1=ao1^2/(k*R) //Stagnation temperature in K\n", +"Po1=do1*R*To1 //Stagnation pressure in Pa\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from gas tables @M=1\n", +"Pt=(Po1*p1)*10^-5 //Throat pressure in bar\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from gas tables @M=1\n", +"Tt=To1*t1 //critical temperature in K\n", +"d_t=(Pt*10^5)/(R*Tt) //Density of air at throat in kg/m^3\n", +"a_t=sqrt(k*R*Tt) //Sound velocity at throat in m/s \n", +"Ct=a_t //Air velocity t throat in m/s, Since M=1\n", +"A_t=%pi*d^2/4 //Throat area in m^2 \n", +"m=d_t*A_t*Ct //Maximum mass flow rate in kg/s\n", +"\n", +"//Output\n", +"printf('(A)Maximum mass flow rate is %3.5f kg/s\n (B)Pressure and temperarature at the throat are %3.3f bar and %3.4f K',m,Pt,Tt)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.20: To_find_pressure_rise_coefficient_and_ratio_of_area.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"C1=200 //Inlet velocity in m/s\n", +"Po1=400 //Stagnation pressure at entry in kPa\n", +"To1=500 //Stagnation temperature at inlet in K\n", +"C2=100 //Exit velocity in m/s\n", +"eff=0.9 //Nozzle efficiency \n", +"k=1.4 //Adiabatic Constant\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculation\n", +"T1=To1-(C1^2/(2*Cp)) //Inlet temperature in K\n", +"t1=T1/To1 //Temperature ratio \n", +"P1=Po1*t1^(k/(k-1)) //Inlet pressure in kPa\n", +"To2s=(eff*(To1-T1))+T1 //Exit Stagnation temperature at isentropic state in K\n", +"To2=To2s //Exit Stagnation temperature in K, Since adiabatic \n", +"T2=To2-(C2^2/(2*Cp)) //Exit temperature in K\n", +"t2=To2s/T1 //Temperature ratio \n", +"Po2=P1*t2^(k/(k-1)) //Stagnation pressure at exit in kPa\n", +"t3=T2/To2 //Temperature ratio \n", +"P2=Po2*t3^(k/(k-1)) //Exit pressure in kPa\n", +"Cpr=(P2-P1)/(Po1-P1) //Pressure raise coefficient\n", +"ar=(P1*T2*C1)/(P2*T1*C2) //Ratio of exit to inlet area\n", +"\n", +"//Output\n", +"printf('(A)Pressure raise coefficient is %3.3f\n (B)Ratio of exit to inlet area is %3.3f',Cpr,ar)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.21: EX2_21.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po1=4.9 //Stagnation pressure at entry in bar\n", +"P2=1.4 //Exit pressure in bar\n", +"To=810 //Stagnation temperature in K\n", +"m=1 //Mass flow rate in kg/s\n", +"eff=0.9 //Nozzle efficiency \n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculations\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from gas tables @M=1\n", +"Tt=To*t1 //critical temperature in K\n", +"at=sqrt(k*R*Tt) //Sound velocity at critical state in m/s \n", +"Ct=at //Air velocity t throat in m/s, Since M=1\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from gas tables @M=1\n", +"Pt=Po1*p1 //critical pressure in bar\n", +"dt=(Pt*10^5)/(R*Tt) //Density of air at throat in kg/m^3, Pt in Pa\n", +"At=(m/(dt*Ct))*10^4 //Throat area in cm^2 \n", +"p2=P2/Po1 //Pressure ratio\n", +"T2s=To*p2^((k-1)/k) //Exit temperature in K (at isentropic state)\n", +"T2=To-(eff*(To-T2s)) //Exit temperature in K\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/m^3, P2 in Pa\n", +"C2=sqrt(2*Cp*(To-T2)) //Exit air velocity in m/s\n", +"A2=(m/(d2*C2))*10^4 //Exit area in cm^2\n", +"a2=sqrt(k*R*T2) //Sound velocity at exit in m/s \n", +"M2=C2/a2 //Exit mach number\n", +"p3=0.332 //Static to stagnation pressure ratio at exit from isentropic gas tables @M2,k=1.4 \n", +"Po2=P2/p3 //stagnation pressure in bar\n", +"TPL=Po1-Po2 //Loss in total pressure is %3.3f bar\n", +"ds=R*log(Po1/Po2) //Increase in entropy in kJ/kg-K\n", +"\n", +"//Output\n", +"printf('(A)Throat and exit area are %3.2f cm^2 and %3.3f cm^2\n (B)Exit mach number is %3.2f\n (C)Loss in total pressure is %3.3f bar\n (D)Increase in entropy is %3.2f kJ/kg-K',At,A2,M2,TPL,ds)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.22: To_find_required_throat_and_exit_area_of_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=3.5 //Stagnation pressure in bar\n", +"To=425+273 //Stagnation temperature in K\n", +"P2=0.97 //Exit pressure in bar\n", +"m=18 //Mass flow rate in kg/s\n", +"Kd=0.99 //Coefficient of discharge\n", +"eff=0.94 //Nozzle efficiency \n", +"k=1.33 //Adiabatic Constant\n", +"Cp=1110 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculations \n", +"Pt=Po*(2/(k+1))^(k/(k-1)) //critical pressure in bar\n", +"Tt=To*(2/(k+1)) //critical temperature in K\n", +"R=Cp/(k/(k-1)) //Specific gas constant in J/kg-K\n", +"m_s=m/Kd //Isentropic mass\n", +"at=sqrt(k*R*Tt) //Sound velocity at throat in m/s\n", +"Ct=at //Air velocity t throat in m/s, Since M=1\n", +"dt=(Pt*10^5)/(R*Tt) //Density of air at throat in kg/m^3, Pt in Pa\n", +"At=(m_s/(dt*Ct))*10^4 //Throat area in cm^2 \n", +"p2=P2/Po //Pressure ratio\n", +"T2s=To*p2^(1/(k/(k-1))) //Exit temperature in K (at isentropic state)\n", +"T2=To-(eff*(To-T2s)) //Exit temperature in K\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/m^3, P2 in Pa\n", +"C2=sqrt(2*Cp*(To-T2)) //Exit air velocity in m/s\n", +"A2=(m_s/(d2*C2))*10^4 //Exit area in cm^2\n", +"\n", +"//Output\n", +"printf('Throat area and Exit area of nozzle are %3.1f cm^2 and %3.1f cm^2',At,A2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.2: To_find_properties_at_throat_and_exit_in_Convergent_Divergent_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P1=2 //Intial pressure in bar\n", +"C1=170 //Initial velocity of air in m/s\n", +"T1=473 //Intial temperature in K\n", +"A1=1000 //Inlet area in mm^2\n", +"P2=0.95 //Exit pressure in bar\n", +"k=1.4 //Adiabatic Constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"a_1=sqrt(k*R*T1) //Velocity of sound at inlet in m/s\n", +"M1=C1/a_1 //Inlet mach number\n", +"t1=0.970 //Ratio of inlet temperature to Stagnation temperature from gas tables @M=1\n", +"To1=T1/t1 //Stagnation temperature in K\n", +"p1=0.900 //Ratio of inlet pressure to Stagnation pressure from gas tables @M=1\n", +"Po1=P1/p1 //Stagnation pressure in bar\n", +"a1=1.623 //Ratio of inlet area to critical area from isentropic gas tables @M=1\n", +"At=A1/a1 //critical area in mm^2\n", +"p2=0.528 //Pressure ratio at critical state from isentropic gas tables @M=1\n", +"Pt=Po1*p2 //Throat pressure in bar\n", +"t2=0.834 //Temperature ratio at critical state from isentropic gas tables @M=1\n", +"Tt=To1*t2 //Throat temperature in K\n", +"a_t=sqrt(k*R*Tt) //Velocity of sound at throat in m/s\n", +"C_t=a_t //Critical velocity of air in m/s\n", +"p3=P2/Po1 //Pressure ratio at exit \n", +"M2=1.17 //Mach number at exit from isentropic gas tables @p3\n", +"t3=0.785 //Temperature ratio at exit from isentropic gas tables @M2\n", +"T2=To1*t3 //Exit temperature in K\n", +"a3=1.022 //Area ratio at exit from isentropic gas tables @M2\n", +"A2=At*a3 //Exit area in mm^2, wrong answer in textbook\n", +"C2=M2*sqrt(k*R*T2) //Exit velocity in m/s\n", +"\n", +"//Output\n", +"printf('(A)Stagnation temperature and pressure are %3.2f K and %3.3f bar\n (B)Sonic velocity and mach number at entry are %3.2f m/s and %3.2f\n (C)Velocity, Mach number and flow area at outlet section are %3.2f m/s, %3.2f and %3.2f mm^2\n (D)Pressure, area at throat of the nozzle are %3.5f bar and %3.3f mm^2',To1,Po1,a_1,M1,C2,M2,A2,Pt,At)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.3: EX2_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po1=10 //Stagnation pressure in bar\n", +"To1=798 //Stagnation temperature in K\n", +"Pt=7.6 //Throat pressure in bar \n", +"m=1.5 //Mass flow rate in kg/s\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +" \n", +"//Calculation\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from isentropic gas tables @M=1,k=1.4\n", +"Pc=p1*Po1 //Critical pressure in bar\n", +"P2=Pt //Exit pressure in bar, Since Pc<P2\n", +"p2=P2/Po1 //Pressure ratio\n", +"M2=0.64 //Exit mach number from isentropic gas tables @p2\n", +"t1=0.924 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2\n", +"T2=t1*To1 //exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Exit velocity in m/s\n", +"C_max=sqrt(2*Cp*To1) //Maximum possible velocity in m/s\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/m^3\n", +"At=(m/(d2*C2))*10^6 //Throat area in mm^2\n", +"\n", +"//Output\n", +"printf('(A)At the nozzle throat/exit:\n Pressure is %3.2f bar\n Temperature is %3.2f K\n Velocity is %3.2f\n (B)Maximum possible velocity is %3.2f m/s\n (C)Type of the nozzle is a convergent nozzle and its throat area is %3.3f mm^2',P2,T2,C2,C_max,At)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.4: To_find_properties_at_exit_in_Convergent_Divergent_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po1=3.344 //Stagnation pressure in bar\n", +"To1=900 //Stagnation temperature in K\n", +"P2=1.05 //Exit pressure in bar\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculation\n", +"p1=P2/Po1 //Pressure ratio\n", +"M2=1.40 //Exit mach number from gas tables @p1,k=1.4\n", +"t1=0.718 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4\n", +"T2=To1*t1 //exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Exit velocity in m/s\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/m^3\n", +"a1=1.115 //Ratio of exit area to critical area from isentropic gas tables @M2\n", +"M_2=0.6733 //Exit mach number when it acts as diffuser \n", +"t2=0.91633 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2\n", +"T_2=t2*To1 //exit temperature in K\n", +"C_2=sqrt(k*R*T_2)*M_2 //Exit velocity in m/s\n", +"p2=0.738 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2\n", +"P_2=Po1*p2 //exit pressure in bar\n", +"d_2=(P_2*10^5)/(R*T_2) //Density at exit in kg/m^3\n", +"\n", +"//Output\n", +"printf('(A)At exit:\n Temperaure is %3i K\n Velocity is %3.2f m/s\n Density is %3.3f kg/m^3\n (B)At diffuser:\n Temperaure is %3.3f K\n Velocity is %3.3f m/s\n Density is %3.4f kg/m^3\n Pressure is %3.4f bar\n',T2,C2,d2,T_2,C_2,d_2,P_2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.5: To_find_mass_flow_rate_and_pressure_of_a_CD_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po1=8 //Stagnation pressure in bar\n", +"To1=273+15 //Stagnation temperature in K\n", +"At=25 //Throat area in cm^2\n", +"A2=100 //Exit area in cm^2\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"a1=A2/At //Area ratio\n", +"M2=2.94 //Exit mach number from gas tables @a1,k=1.4\n", +"p1=0.0298 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P2=Po1*p1 //exit pressure in bar\n", +"M_2=0.146 //Exit mach number when it acts as diffuser\n", +"p2=0.9847 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2\n", +"P_2=Po1*p2 //exit pressure in bar\n", +"p3=0.528 //Ratio of critical pressure to Stagnation pressure from isentropic gas tables @M=1,k=1.4 \n", +"Pc=(Po1*p3) //Critical pressure in bar\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from isentropic gas tables @M=1,k=1.4 \n", +"Tt=To1*t1 //critical temperature in K\n", +"d_t=(Pc*10^5)/(R*Tt) //Density at critical state in kg/m^3\n", +"a_t=sqrt(k*R*Tt) //Velocity of sound at critical state in m/s\n", +"Ct=a_t //Velocity of air at critical state in m/s\n", +"m=d_t*At*Ct*10^-4 //Mass flow rate in kg/s\n", +"\n", +"//Output\n", +"printf('(A)Maximum mass flow rate is %3.3f kg/s\n (B)As nozzle:\n Pressure is %3.4f bar\n Mach number is %3.2f\n As diffuser:\n Pressure is %3.4f bar\n Mach number is %3.3f',m,P2,M2,P_2,M_2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.6: To_find_exit_properties_and_force_exerted_on_diffuser_walls.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"D1=15 //Entry diameter in cm\n", +"D2=30 //Exit diamater in cm \n", +"P1=0.96 //Inlet pressure in bar\n", +"T1=340 //Inlet temperature in K\n", +"C1=185 //INlet velocity in m/s\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"A1=%pi*D1^2/4 //Entry area in cm^2\n", +"A2=%pi*D2^2/4 //Exit area in cm^2\n", +"a_1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"M1=C1/a_1 //Inlet mach number \n", +"p1=0.843 //Ratio of inlet pressure to Stagnation pressure from gas tables @M1,k=1.4\n", +"Po1=P1/p1 //Stagnation pressure in bar\n", +"t1=0.952 //Ratio of inlet temperature to Stagnation temperature from gas tables @M1,k=1.4\n", +"To1=T1/t1 //Stagnation temperature in K\n", +"a1=1.34 //Ratio of inlet area to critical area from isentropic gas tables @M1,k=1.4\n", +"At=A1/a1 //critical area in cm^2\n", +"a2=A2/At //Area ratio\n", +"M2=0.1088 //Exit mach number from gas tables @a2,k=1.4\n", +"p2=0.992 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P2=Po1*p2 //exit pressure in bar\n", +"t2=0.9976 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4\n", +"T2=To1*t2 //exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Exit velocity in m/s\n", +"F1=P1*10^5*A1*10^-4*(1+(k*(M1^2))) //Force exerted at entry in kN\n", +"F2=P2*10^5*A2*10^-4*(1+(k*(M2^2))) //Force exerted at exit in kN\n", +"F=(F2-F1)*10^-3 //Force exerted on the diffuser walls in kN, wrong answer in textbook \n", +"\n", +"//Output\n", +"printf('(A)Exit pressure is %3.3f bar\n (B)Exit velocity is %3.2f m/s\n (C)Force exerted on the diffuser walls is %3.3f kN',P2,C2,F)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.7: To_find_properties_at_inlet_and_exit_of_diffuser.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M1=3.6 //Inlet mach number \n", +"M2=2 //Exit mach number\n", +"m=15 //Mass flow rate in kg/s\n", +"P1=1.05 //Inlet pressure in bar\n", +"T1=313 //Inlet temperature in K\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"p1=11.38*10^-3 //Ratio of inlet pressure to Stagnation pressure from gas tables @M1,k=1.4\n", +"Po=P1/p1 //Stagnation pressure in bar\n", +"t1=0.278 //Ratio of inlet temperature to Stagnation temperature from gas tables @M1,k=1.4\n", +"To=T1/t1 //Stagnation temperature in K\n", +"C1=sqrt(k*R*T1)*M1 //Inlet velocity in m/s\n", +"d1=(P1*10^5)/(R*T1) //Density at inlet in kg/s, P1 in Pa\n", +"A1=(m/(d1*C1))*10^4 //Inlet area in cm^2\n", +"p2=0.128 //Ratio of exit pressure to Stagnation pressure from isentropic gas tables @M2,k=1.4\n", +"P2=Po*p2 //exit pressure in bar\n", +"t2=0.555 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4\n", +"T2=To*t2 //exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Exit velocity in m/s\n", +"d2=(P2*10^5)/(R*T2) //Density at exit in kg/s\n", +"A2=(m/(d2*C2))*10^4 //Exit area in cm^2\n", +"\n", +"//Output \n", +"printf('(A)At Inlet:\n Area is %3.1f cm^2\n Total pressure %3.2f bar\n Total temperature is %3.1f K\n (B)At Exit:\n Area is %3.1f cm^2\n Total pressure %3.2f bar\n Total temperature is %3.2f K\n Static temperature is %3.2f K\n Static pressure is %3.2f bar',A1,Po,To,A2,Po,To,T2,P2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.8: To_find_properties_at_throat_and_exit_and_maximum_possible_velocity_of_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=6.91 //Stagnation pressure in bar\n", +"To=325+273 //Stagnation temperature in K\n", +"P2=0.98 //exit pressure in bar\n", +"m=3600/3600 //Mass flow rate in kg/s\n", +"k=1.4 //Adiabatic Constant\n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K \n", +"\n", +"//Calculation\n", +"p1=0.528 //Ratio of critical pressure to Stagnation pressure from gas tables @M=1\n", +"Pt=Po*p1 //critical pressure in bar\n", +"t1=0.834 //Ratio of critical temperature to Stagnation temperature from gas tables @M=1\n", +"Tt=To*t1 //critical temperature in K\n", +"at=sqrt(k*R*Tt) //Sound velocity at throat in m/s \n", +"Ct=at //Air velocity t throat in m/s, Since M=1\n", +"dt=(Pt*10^5)/(R*Tt) //Density of air at throat in kg/m^3, Pt in Pa\n", +"At=(m/(dt*Ct))*10^4 //Throat area in m^2 x10^-4 \n", +"p2=P2/Po //Pressure ratio \n", +"M2=1.93 //Exit mach number from gas tables @p2,k=1.4\n", +"t2=0.573 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.4\n", +"T2=To*t2 //exit temperature in K\n", +"a2=1.593 //Ratio of exit area to critical area from isentropic gas tables @M2,k=1.4\n", +"A2=a2*At //Exit area in m^2, At in m^2 x10^-4\n", +"C_max=sqrt(2*Cp*To) //Maximum possible velocity in m/s\n", +"\n", +"//Output\n", +"printf('(A)At throat:\n Area is %3.2fx10^-4 m^2\n Pressure is %3.2f bar\n Velocity is %3.1f m/s\n (B)At Exit:\n Area is %3.3fx10^-4 m^2\n Mach number is %3.2f\n (C)Maximum possible velocity is %3.2f m/s',At,Pt,Ct,A2,M2,C_max)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2.9: To_find_Stagnation_temperature_properties_at_exit_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P1=2.45 //Inlet pressure in bar\n", +"T1=26.5+273 //Inlet temperature in K\n", +"M1=1.4 //Inlet mach number \n", +"M2=2.5 //Exit mach number\n", +"k=1.3 //Adiabatic Constant\n", +"R=469 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"t1=0.773 //Ratio of inlet temperature to Stagnation temperature from gas tables @M1,k=1.3\n", +"To=T1/t1 //Stagnation temperature in K\n", +"t2=0.516 //Ratio of exit temperature to Stagnation temperature from isentropic gas tables @M2,k=1.3\n", +"T2=To*t2 //exit temperature in K\n", +"C2=sqrt(k*R*T2)*M2 //Exit velocity in m/s\n", +"a1=sqrt(k*R*T1) //Sound velocity at inlet in m/s\n", +"G=(P1*10^5*a1*M1)/(R*T1) //)Flow rate per square meter of the inlet cross section in kg/s-m^2\n", +"\n", +"//Output\n", +"printf('(A)Stagnation temperature is %3.2f K\n (B)At Exit:\n Temperature is %3.3f K\n Velocity is %3.2f m/s\n (C)Flow rate per square meter of the inlet cross section is %3.2f kg/s-m^2',To,T2,C2,G)" + ] + } +], +"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 +} diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/3-Flow_Through_Constant_Area_Duct_Adiabatic_Flow.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/3-Flow_Through_Constant_Area_Duct_Adiabatic_Flow.ipynb new file mode 100644 index 0000000..6ce16e1 --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/3-Flow_Through_Constant_Area_Duct_Adiabatic_Flow.ipynb @@ -0,0 +1,1096 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3: Flow Through Constant Area Duct Adiabatic Flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.10: EX3_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=0.25 //Mach number at entrance\n", +"f=0.01/4 //frictional factor\n", +"D=0.15 //inner pipe diameter in m\n", +"p1=0.8 //Stagnation pressure ratio at exit to entry when loss in stagnation pressure is 20%\n", +"M3=0.8 //Mach number at a section\n", +"\n", +"//calculation\n", +"p2=2.4065 //Ratio of Stagnation pressure at entry from gas tables @M1,k=1.4\n", +"X1=8.537 //frictional constant fanno parameter from gas tables,fanno flow tables @M1\n", +"p3=p1*p2 //Ratio of Stagnation pressure at exit\n", +"M2=0.32 //Exit mach number at p1=0.8\n", +"X2=4.447 //frictional constant fanno parameter from gas tables,fanno flow tables @M2\n", +"L1=(X1*D)/(4*f) //Length of the pipe in m\n", +"L2=(X2*D)/(4*f) //Length of the pipe in m\n", +"L=L1-L2 //Overall length of the duct in m\n", +"p4=1.038 //Stagnation pressure ratio from M=1 to M3\n", +"PL=(1-(p4/p2))*100 //Percentage of stagnation pressure from inlet to section at which M3 in percent\n", +"\n", +"//output\n", +"printf('(A)Length of the pipe is %3.2f m\n (B)Mach number at this exit is %3.2f\n (C)Percentage of stagnation pressure from inlet to section at which M=%3.1f is %3.2f percent\n (D)Maximum length to reach choking condition is %3.3f m',L,M2,M3,PL,L1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.11: To_find_length_of_the_pipe_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"D=0.3 //inner duct diameter in m\n", +"P1=10 //Static pressure at entrance in bar\n", +"T1=400 //Static temperature at entry in Kelvin\n", +"M1=3 //Mach number at entrance\n", +"M2=1 //Mach number at exit\n", +"k=1.3 //Adiabatic constant\n", +"R=287 //Specific Gas constant in J/kg-K, wrong printing in question\n", +"f=0.002 //frictional factor\n", +"\n", +"//calculation\n", +"p1=0.233 //Pressure ratio from gas tables (M=3,k=1.4,isentropic)\n", +"Pt=P1/p1 //Static pressure at entrance in bar\n", +"t1=0.489 //Temperature ratio from gas tables (M=3,k=1.4,isentropic)\n", +"Tt=T1/t1 //Static temperature at entrance in K\n", +"X1=0.628 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.3\n", +"L1=(X1*D)/(4*f) //Length of the pipe in m\n", +"d_t=(Pt*10^5)/(R*Tt) //Density at critical state in kg/m^3, Pt in Pa\n", +"at=sqrt(k*R*Tt) //Sound velocity in m/s, R in J/kg \n", +"Ct=at //air velocity in m/s\n", +"At=(%pi*D^2)/4 //Critical area in m^2\n", +"m=d_t*At*Ct //Mass flow rate in kg/s\n", +"\n", +"//output\n", +"printf('(A)Length of the pipe is %3.2f m\n (B)Mass flow rate is %3.3f kg/s',L1,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.12: To_find_length_and_Mach_number_of_given_pipe_and_at_required_section.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=0.25 //Mach number at entrance\n", +"f=0.04/4 //frictional factor\n", +"D=0.15 //inner duct diameter in m\n", +"p1=0.9 //Stagnation pressure ratio at exit to entry when loss in stagnation pressure is 10%\n", +"ds=190 ///Change in entropy in J/kg-K\n", +"k=1.3 //Adiabatic constant\n", +"R=287 //Specific Gas constant in J/kg-K, wrong printing in question\n", +"\n", +"//calculation\n", +"p2=2.4064 //Ratio of stagnation pressures at inlet to critical state from gas tables fanno flow tables @M1,k=1.3\n", +"X1=8.537 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.3\n", +"p3=p1*p2 //Ratio of stagnation pressures at exit to critical state from gas tables fanno flow tables @M1,k=1.3\n", +"M2=0.28 //Mach number at p1=0.9 from gas tables @p3\n", +"X2=6.357 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.3\n", +"X3=X1-X2 //overall frictional constant fanno parameter\n", +"L1=(X3*D)/(4*f) //Length of the pipe in m\n", +"p4=exp(ds/R) //Ratio of Stagnation pressure at entry to Stagnation pressure where ds=190 \n", +"p5=p1/p4 //Ratio of Stagnation pressures where ds=190 to critical state\n", +"M3=0.56 //Mach number where ds=190\n", +"X4=0.674 //frictional constant fanno parameter from gas tables,fanno flow tables @M3,k=1.3\n", +"X5=X1-X4 //overall frictional constant fanno parameter\n", +"L2=(X5*D)/(4*f) //Length of the pipe in m\n", +"\n", +"//output\n", +"printf('(A)Length of the pipe is %3.3f m\n (B)Length of the pipe would require to rise entropy by %3i J/kg-K is %3.5f m\n (C)Mach number is %3.2f',L1,ds,L2,M3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.13: EX3_13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"Po1=200 //Stagantion pressure at inlet in kPa\n", +"To1=303 //Stagnation temperature at inlet in K\n", +"M1=0.2 //Inlet Mach number from diagram\n", +"D=0.025 //inner tude diameter in m(missing data)\n", +"M2=0.8 //Outlet Mach number \n", +"f=0.005/4 //frictional factor\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"t1=0.992 //Static to Stagnation temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"T1=To1*t1 //Static temperature in K\n", +"p1=0.973 //Static to Stagnation pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"P1=Po1*p1 //Static pressure in kPa\n", +"p2=2.964 //Stagnation pressure ratio at inlet to critical state from gas tables (M1,k=1.4,fanno flow)\n", +"Pot=Po1/p2 //Stagnation pressure at critical state in kPa\n", +"X1=14.533 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"p3=1.038 //Stagnation pressure ratio at outlet to critical state from gas tables (M1,k=1.4,fanno flow)\n", +"Po2=Pot*p3 //Stagnation pressure at exit in kPa\n", +"X2=0.073 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4\n", +"X3=X1-X2 //overall frictional constant fanno parameter\n", +"L1=(X3*D)/(4*f) //Length of the pipe in m\n", +"SPL=(1-(p3/p2))*100 //Percentage decrease in stagnation pressure in percent\n", +"ds=R*log(Po1/Po2) //Change of entropy in kJ/kg-K\n", +"\n", +"//output\n", +"printf('(A)Length of the pipe is %3.1f m\n (B)Percentage decrease in stagnation pressure is %3.2f percent\n (C)Change of entropy is %3.3f kJ/kg-K',L1,SPL,ds)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.14: To_find_maximum_length_of_pipe_and_conditions_of_air_at_exit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"D1=0.03 //Inlet duct diameter in m\n", +"D2=0.015 //Throat diameter of duct in m \n", +"Po1=750 //Stagantion pressure at inlet in kPa\n", +"To1=450 //Stagnation temperature at inlet in K\n", +"f=0.02/4 //frictional factor\n", +"L=0.25 //Length of the duct in m\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"ar=(D1/D2)^2 //Ratio of areas\n", +"M1=2.94 //Mach number at inlet from gas tables (ar,k=1.4,isentropic)\n", +"p1=0.0298 //Static to Stagnation pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"P1=Po1*p1 //Static pressure at inlet in kPa\n", +"t1=0.367 //Static to Stagnation temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"T1=To1*t1 //Static temperature at inlet in K\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"C1=a1*M1 //Air velocity at inlet in m/s\n", +"X1=0.513 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"p2=0.226 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Pt=P1/p2 //Critical pressure in kPa\n", +"c1=1.949 //Static to Critical velocity ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"t2=0.439 //Static to Critical temperature ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Tt=T1/t2 //Critical temperature in K\n", +"L1=(X1*D1)/(4*f) //Length of the pipe from inlet to critical state in m\n", +"L2=L1-L //Length of the pipe from required point to critical state in m\n", +"X2=(4*f*L2)/D2 //frictional constant fanno parameter\n", +"M2=2.14 //Mach number at inlet from gas tables (X2,k=1.4,fanno flow)\n", +"p3=0.369 //Static to Critical pressure ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"P2=Pt*p3 //Exit pressure in kPa\n", +"c2=1.694 //Static to Critical velocity ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"C2=Ct*c2 //Exit velocity in m/s\n", +"t3=0.623 //Static to Critical temperature ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"T2=t3*Tt //Exit temperature in K\n", +"\n", +"//output\n", +"printf('(A)Maximum length of the pipe is %3.4f m\n (B)Condition of air at exit:\n Pressure is %3.2f kPa\n Velocity is %3.2f m/s\n Temperature is %3.2f K\n',L1,P2,C2,T2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.15: EX3_15.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"f=0.002 //frictional factor\n", +"C1=130 //Air velocity at inlet in m/s\n", +"T1=400 //Inlet temperature at inlet in K\n", +"P1=250 //Inlet pressure at inlet in kPa\n", +"D=0.16 //Inlet duct diameter in m\n", +"p1=0.8 //Stagnation pressure ratio at exit to entry when loss in stagnation pressure is 20%\n", +"L1=35 //Length of duct from inlet to required section\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"M1=C1/a1 //Mach number at inlet\n", +"p2=0.9295 //Static to Stagnation pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"Po1=P1/p2 //Stagantion pressure at inlet in kPa\n", +"Po2=0.8*Po1 //Stagantion pressure at outlet in kPa\n", +"p3=1.89725 //Stagnation pressure ratio at inlet to critical state from gas tables (M1,k=1.4,fanno flow)\n", +"Pot=Po1/p3 //Stagnation pressure at critical state in kPa\n", +"X1=4.273 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"p4=3.33725 //Static Pressure ratio from gas tables (fanno flow tables,k=1.4,M=0.5)\n", +"Pt=P1/p4 //Static critical pressure in kPa\n", +"t1=1.175 //Static temperature ratio from gas tables (fanno flow tables,k=1.4,M=0.5) \n", +"Tt=T1/t1 //Static critical temperature in K\n", +"c1=0.347 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M=0.5)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"p5=Po2/Pot //Pressure ratio\n", +"M2=0.43 //Mach number at p1=0.8\n", +"X2=1.833 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4\n", +"X3=X1-X2 //overall frictional constant fanno parameter\n", +"L2=(X3*D)/(4*f) //Length of the pipe in m, (from required section to critical state) \n", +"L3=(X1*D)/(4*f) //Length of the pipe in m, (from required inlet to critical state) \n", +"L4=L3-L1 //Length of the pipe in m\n", +"X4=(4*f*L3)/D //frictional constant fanno parameter\n", +"M3=0.39 //Mach number at L1=35m\n", +"p6=2.767 //Static to Critical pressure ratio at outlet from gas tables,fanno flow tables @M3,k=1.4\n", +"P2=Pt*p6 //Exit pressure in kPa\n", +"t2=1.1645 //Static to Critical temperature ratio at outlet from gas tables,fanno flow tables @M3,k=1.4\n", +"T2=Tt*t2 //Exit temperature in K\n", +"c2=0.42087 //Static to Critical velocity ratio at outlet from gas tables,fanno flow tables @M3,k=1.4\n", +"C2=Ct*c2 //Exit velocity in m/s\n", +"\n", +"//output\n", +"printf('(A)Length of pipe required for p=%3.1f m is %3.3f m\n (B)Properties of air at section %3i from inlet:\n Temperature is %3.3f K\n Pressure is %3.2f kPa\n Velocity is %3.1f m/s\n (C)Maximum length of the pipe is %3.2f m',p1,L2,L1,T2,P2,C2,L3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.16: To_find_exit_mach_number_and_inlet_temperature_and_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"D=0.3 //inner pipe diameter in m\n", +"Q=1000 //Discharge in m^3/min\n", +"P2=150 //Exit pressure in kPa\n", +"T2=293 //Exit temperature in K\n", +"L1=50 //Length of the pipe in m\n", +"f=0.005 //frictional factor\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"A=%pi*D^2/4 //Area of duct in m^2 \n", +"C2=Q/(A*60) //Exit air velocity in m/s\n", +"a2=sqrt(k*R*T2) //Sound velocity in m/s\n", +"M2=C2/a2 //Exit mach number \n", +"p1=1.54 ////Static to Critical pressure ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"Pt=P2/p1 //Critical pressure in kPa\n", +"t1=1.10 //Static to Critical temperature ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"Tt=T2/t1 //Critical temperature in K\n", +"X1=0.228 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4\n", +"L2=(X1*D)/(4*f) //Length of the pipe in m\n", +"L2=L1+L2 //Overall length of pipe from inlet to critical state in m\n", +"X2=(4*f*L2)/D //frictional constant fanno parameter for M1\n", +"M1=0.345 //Inlet Mach number from gas tables fanno flow tables @X2,k=1.4\n", +"p2=3.14 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"P1=Pt*p2 //Static pressure at inlet in kPa\n", +"t2=1.17 //Static to Critical temperature ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"T1=Tt*t2 //Static temperature at inlet in K\n", +"\n", +"//output\n", +"printf('(A)Mach number at the exit is %3.3f\n (B)Inlet pressure and temperature are %3.3f kPa and %3.2f K',M2,P1,T1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.17: EX3_17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"D=0.0254 //inner pipe diameter in m\n", +"f=0.003 //frictional factor\n", +"M1=2.5 //Inlet Mach number \n", +"To1=310 //Stagnation temperature at inlet in K\n", +"P1=0.507 //Static pressure at inlet in kPa\n", +"M2=1.2 //Exit mach number \n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"t1=0.4444 //Static to Stagnation temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"T1=To1*t1 //Static temperature at inlet in K\n", +"p1=0.05853 //Static to Stagnation pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"Po1=P1/p1 //Stagantion pressure at inlet in kPa\n", +"a1=sqrt(k*R*T1) //Sound velocity at inlet in m/s, R in J/kg\n", +"C1=a1*M1 //air velocity at inlet in m/s\n", +"c1=2.95804 //Static to Critical velocity ratio at inlet from gas tables,isothermal tables @M1,k=1.4\n", +"Ctt=C1/c1 //Critical velocity at isothermal state in m/s\n", +"p2=0.33806 //Static to Critical pressure ratio at inlet from gas tables,isothermal @M1,k=1.4\n", +"Ptt=P1/p2 //Critical pressure at isothermal state in bar\n", +"p3=3.61691 //Stagnation pressure ratio at inlet to isothermal state from gas tables,isothermal tables @M1,k=1.4\n", +"Pott=Po1/p3 //Critical pressure at isothermal state in K\n", +"t2=1.968748 //Stagnation temperature ratio at inlet to isothermal state from gas tables,isothermal tables @M1,k=1.4\n", +"Tott=To1/t2 //Critical temperature at isothermal state in K\n", +"X1=1.28334 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"c2=1.4186 //Static to Critical velocity ratio at exit from gas tables,isothermal tables @M2,k=1.4\n", +"C2=Ctt*c2 //Exit velocity in m/s\n", +"p4=0.7043 //Static to Critical pressure ratio at inlet from gas tables,isothermal @M2,k=1.4\n", +"P2=Ptt*p4 //Exit pressure in bar\n", +"p5=1.07026 //Stagnation pressure ratio at inlet to isothermal state from gas tables,isothermal tables @M2,k=1.4\n", +"Po2=Pott*p5 //Stagnation pressure at exit in bar \n", +"t3=1.127 //Stagnation temperature ratio at inlet to isothermal state from gas tables,isothermal tables @M2,k=1.4\n", +"To2=Tott*t3 //Stagnation temperature at exit in bar\n", +"T2=T1 //Exit temperature in K, Since isothermal flow\n", +"X2=0.19715 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4\n", +"X3=X1-X2 //Overall frictional constant fanno parameter\n", +"L1=(X3*D)/(4*f) //Length of the pipe in m\n", +"d1=(P1*10^5)/(R*T1) //Density of air in kg/m^3, P1 in Pa\n", +"A1=(%pi*D^2)/4 //Cross sectional area of pipe in m^2\n", +"m=d1*A1*C1 //Mass flow rate in kg/s\n", +"\n", +"//output\n", +"printf('At M=%3.1f :\n (A)Static pressure and static temperature are %3.5f bar and %3.3f K respectively\n (B)Stagnation pressure and temperature are %3.4f bar and %3.3f K respectively\n (C)Velocity of air is %3.3f m/s\n (D)Distance of the section from innlet is %3.3f m\n (E)Mass flow rate is %3.5f kg/s',M2,P2,T2,Po2,To2,C2,L1,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.18: EX3_18.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"D=0.12 //inner duct diameter in m\n", +"f=0.004 //frictional factor\n", +"M1=0.4 //Inlet Mach number \n", +"P1=300 //Static pressure at inlet in kPa\n", +"T1=310 //Static temperature at inlet in K\n", +"M2=0.6 //Exit mach number\n", +"k=1.4 //Adiabatic constant\n", +"\n", +"//calculation\n", +"p1=2.118 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Pt=P1/p1 //Critical pressure in kPa\n", +"X1=1.968 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"p2=1.408 //Static to Critical pressure ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"P2=Pt*p2 //Exit pressure in kPa\n", +"X2=0.299 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4\n", +"X3=X1-X2 //Overall frictional constant fanno parameter\n", +"L1=(X3*D)/(4*f) //Length of the pipe in m\n", +"T2=T1 //Exit temperature in K, Since isothermal flow\n", +"Ttt=T1 //Critical temperature at critical state, Since isothermal flow \n", +"Mtt=1/sqrt(k) //Limiting Mach number\n", +"L2=(X1*D)/(4*f) //Length of the duct required to attain limiting mach number in m\n", +"\n", +"//output\n", +"printf('(A)Length of the duct required to chnage the mach number to %3.1f is %3.4f m\n (B)Pressure and temperature at M=%3.1f is %3i kPa and %3i K respectively\n (C)Length of the duct required to attain limiting mach number is %3.3f m\n (D)State of air at limiting mach number %3.3f is subsonic',M2,L1,M2,P2,T2,L2,Mtt)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.19: To_find_diameter_of_pipe.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"m=0.32 //Mass flow rate in kg/s\n", +"L=140 //Length of the pipe in m\n", +"P1=800 //Inlet pressure in N/m^2, wrong units in textbook\n", +"T1=288 //Inlet temperature in K\n", +"P2=600 //Outlet pressure in N/m^2, wrong units in textbook\n", +"f=0.006 //frictional factor\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"//Using Adiabatic Equation d=1/((((((%pi*(d/2)^2)^2)/(2*m^2*R*T))*(P1^2-P2^2))-(log(P1/P2)))/(2*f*L)) and converting into 5th degree polynomial of d\n", +"a=(%pi^2*(P1^2-P2^2))/(32*m^2*R*T1) //Coefficient of power 5\n", +"b=log(P1/P2) //Coefficient of power 1\n", +"c=2*f*L //Coefficient of constant\n", +"p5=poly([-c -b 0 0 0 a],'d','coeff') //Solving polynomial of degree 5\n", +"d=roots(p5,'e') //Command to find roots\n", +"\n", +"//output\n", +"disp('Possible values for diameter of pipe are:\n') //Displays whatever within paranthesis \n", +"disp([d]) //To display roots\n", +"printf('\nTherefore Diameter of the pipe is 0.7 m')\n", +"\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.1: To_find_length_of_pipe.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=0.25 //Mach number at entrance\n", +"M2=1 //Mach number at exit\n", +"D=0.04 //inner tude diameter in m\n", +"f=0.002 //frictional factor\n", +"\n", +"//calculation\n", +"X1=8.537 //frictional constant fanno parameter at entry from gas tables @M1=0.25\n", +"X2=0 //frictional constant fanno parameter at exit from gas tables @M2=1\n", +"X=X1-X2 //overall frictional constant fanno parameter i.e. (4*f*L)/D\n", +"L=(X*D)/(4*f) //Length of the pipe in m\n", +"\n", +"//output\n", +"printf('(A)Length of the pipe is %3.3f m',L)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.20: To_determine_required_inlet_conditions.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"Q=225/60 //Discharge in m^3/s\n", +"T2=293 //Exit temperature in K\n", +"P2=1.25 //Exit pressure in bar\n", +"L1=30 //Length of the pipe in m\n", +"D=0.15 //Duct diameter in m\n", +"f=0.02/4 //frictional factor\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"A=%pi*D^2/4 //area in m^2\n", +"C2=Q/A //Exit air velocity in m/s\n", +"a2=sqrt(k*R*T2) //Exit sound velocity in m/s \n", +"M2=C2/a2 //Exit mach number \n", +"p1=1.703 //Static to Critical pressure ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"Pt=P2/p1 //Critical pressure in bar\n", +"c1=0.654 //Static to Critical velocity ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"Ct=C2/c1 //Critical velocity in m/s\n", +"t1=1.114 //Static to Critical temperature ratio at outlet from gas tables,fanno flow tables @M2,k=1.4\n", +"Tt=T2/t1 //Critical temperature in K\n", +"X1=0.417 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"X2=(4*f*L1)/D //frictional constant fanno parameter\n", +"X3=X1+X2 //overall frictional constant fanno parameter\n", +"M1=0.32 //Mach number at entrance\n", +"p2=3.385 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"P1=Pt*p2 //Static pressure at inlet in bar\n", +"c2=0.347 //Static to Critical velocity ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"C1=Ct*c2 //Air velocity at inlet in m/s\n", +"t2=1.176 //Static to Critical temperature ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"T1=Tt*t2 //Static temperature at inlet in K\n", +"\n", +"//output\n", +"printf('Required Inlet Condition:\n Pressure is %3.4f bar\n Velocity is %3.3f m/s\n Temperature is %3.1f K',P1,C1,T1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.21: To_find_mach_number_at_sections_and_mean_value_of_friction.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"D1=0.134 //Inlet duct diameter in m\n", +"Po1=7 //Stagnation pressure at inlet in bar\n", +"P1=0.245 //Static pressure at 5*D1 i.e. L1 in bar\n", +"P2=0.5 //Static pressure at 33*D1 i.e. L2 in bar\n", +"D2=0.0646 //throat diameter in m \n", +"L1=5*D1 //Length of nozzle till section-1 in m\n", +"L2=33*D1 //Length of nozzle till section-2 in m \n", +"\n", +"//calculation\n", +"ar=(D1/D2)^2 //Ratio of areas\n", +"p1=P1/Po1 //Pressure ratio\n", +"APR1=p1*ar //Area Pressure ratio i.e. (A1*P1)/(At*Po1)\n", +"M1=2.54 //Mach number at inlet from isentropic gas tables @APR1 \n", +"X1=0.44 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"APR2=0.3073 //Area Pressure ratio i.e. (A2*P2)/(At*Po1)\n", +"M2=1.54 //Exit mach number\n", +"X2=0.151 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4\n", +"X3=X1-X2 //overall frictional constant fanno parameter\n", +"L3=L2-L1 //Length of the nozzle (Section-1 to Section-2) in m \n", +"f=(X3*D1)/(4*L3) //frictional factor\n", +"\n", +"//output\n", +"printf('(A)Mach number at %3.3f m and %3.3f m are %3.2f and %3.2f respectively\n (B)Mean value of friction between two sections is %3.5f',L1,L2,M1,M2,f)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.2: To_find_length_of_required_duct_and_length_required_to_obtain_critical_condition.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=0.1 //Mach number at entrance\n", +"M2=0.5 //Mach number at a section\n", +"M3=1 //Mach number at critical condition\n", +"D=0.02 //Diameter of duct in m\n", +"f=0.004 //Frictional factor\n", +"\n", +"//calculation\n", +"X1=66.922 //frictional constant fanno parameter from gas tables @M1=0.1\n", +"X2=1.069 //frictional constant fanno parameter from gas tables @M2=0.5\n", +"X3=0 //frictional constant fanno parameter from gas tables @M3=1\n", +"X4=X1-X3 ////frictional constant fanno parameter from M2=0.1 to M3=1\n", +"L1=(X4*D)/(4*f) //Length of the pipe in m\n", +"X5=X2-X3 //frictional constant fanno parameter from M2=0.5 to M3=1\n", +"L2=(X5*D)/(4*f) //Addition length of the pipe required to accelerate into critical condition in m\n", +"L=L1-L2 //Length of the pipe required to accelerate the flow from M1=0.1 to M2=0.5 in m\n", +"\n", +"//output \n", +"printf('(A)Length of the pipe required to accelerate the flow from M1=%3.1f to M2=%3.1f is %3.3f m\n (B)Additional length required to accelerate into critical condition is %3.5f m',M1,M2,L,L2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.3: To_find_length_of_pipe_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"D=0.05 //inner pipe diameter in m\n", +"Po=10 //Stagnation Pressure at reservoir in bar\n", +"To=400 //Stagnation temperature at reservoir in K\n", +"f=0.002 //frictional factor \n", +"M1=3 //Mach number at entrance\n", +"M2=1 //Mach number at end of pipe\n", +"R=287 //Gas constant in J/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"\n", +"//calculation\n", +"X1=0.522 //frictional constant fanno parameter from gas tables @M1=3\n", +"X2=0 //frictional constant fanno parameter from gas tables @M2=1\n", +"X=X1-X2 //overall frictional constant fanno parameter\n", +"L=(X*D)/(4*f) //Length of the pipe in m\n", +"p1=0.0272 //Pressure ratio from gas tables (M=3,k=1.4,isentropic)\n", +"P1=p1*Po //Static pressure at entrance in bar\n", +"t1=0.3571 //Temperature ratio from gas tables (M=3,k=1.4,isentropic)\n", +"T1=t1*To //Static temperature at entrance in K\n", +"d1=(P1*10^5)/(R*T1) //Density of air in kg/m^3, P1 in Pa\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"C1=a1*M1 //air velocity in m/s\n", +"A1=(%pi*D^2)/4 //Cross sectional area of pipe in m^2\n", +"m=d1*A1*C1 //Mass flow rate in kg/s\n", +"\n", +"//output\n", +"printf('(A)Length of the pipe is %3.2f m\n (B)Mass flow rate is %3.4f kg/s',L,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.4: To_find_temperature_velocity_at_a_section_and_distance_between_two_sections.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"C1=235 //Velocity at entrance in m/s\n", +"P1=13 //Static Pressure at entry in bar\n", +"P2=10 //Static Pressure at a point in duct in bar\n", +"T1=543 //Static temperature at entry in Kelvin\n", +"D=0.15 //inner duct diameter in m\n", +"f=0.005 //frictional factor\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"M1=C1/a1 //Mach number at entry\n", +"p1=2.138 //Static Pressure ratio from gas tables (fanno flow tables,k=1.4,M=0.5)\n", +"Pt=P1/p1 //Static critical pressure in bar\n", +"t1=1.143 //Static temperature ratio from gas tables (fanno flow tables,k=1.4,M=0.5) \n", +"Tt=T1/t1 //Static critical temperature in K\n", +"c1=0.534 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M=0.5)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"p2=1.644 //Pressure ratio from gas tables (fanno flow tables,k=1.4)\n", +"M2=0.64 //Mach number from gas tables (fanno flow tables,k=1.4,p2)\n", +"c2=0.674 //Velocity ratio from gas tables (fanno flow tables,k=1.4,p2)\n", +"C2=Ct*c2 //Air velocity at P2 in m/s\n", +"t2=1.109 //Temperature ratio from gas tables (fanno flow tables,k=1.4,p2)\n", +"T2=t2*Tt //Satic temperature at P2 is K\n", +"X1=1.06922 //frictional constant fanno parameter from gas tables @M1\n", +"X2=0.353 //frictional constant fanno parameter from gas tables @M2\n", +"X=X1-X2 //overall frictional constant fanno parameter\n", +"L=(X*D)/(4*f) //Length of the pipe in m\n", +"\n", +"//output\n", +"printf('(A)Temperature and velocity at section of the duct where the pressure has dropped to %3i bar due to friction are %3.1f K and %3.2f m/s\n (B)The distance between two section is %3.3f m',P2,T2,C2,L)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.5: To_find_length_of_pipe_and_properties_of_air_at_exit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"P1=120 //Static pressure at entrance in bar\n", +"T1=313 //Static temperature at entry in Kelvin\n", +"M1=2.5 //Mach number at entrance\n", +"M2=1.8 //Mach number at exit\n", +"D=0.2 //inner pipe diameter in m\n", +"f=0.01/4 //frictional factor\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"C1=a1*M1 //air velocity in m/s\n", +"p1=0.292 //Static Pressure ratio from gas tables (fanno flow tables,k=1.4,M=2.5)\n", +"Pt=P1/p1 //Static critical pressure in kPa\n", +"t1=0.533 //Static temperature ratio from gas tables (fanno flow tables,k=1.4,M=2.5)\n", +"Tt=T1/t1 //Static critical temperature in K\n", +"c1=1.826 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M=2.5)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"X1=0.432 //frictional constant fanno parameter from gas tables,fanno flow tables @M1=3\n", +"X2=0 //frictional constant fanno parameter from gas tables @M2=1\n", +"X3=X1-X2 //overall frictional constant fanno parameter\n", +"L1=(X3*D)/(4*f) //Maximum length of the pipe in m\n", +"p2=0.474 //Static Pressure ratio from gas tables (fanno flow tables,k=1.4,M=1.8)\n", +"P2=Pt*p2 //Static pressure in kPa\n", +"t2=0.728 //static temperature ratio from gas tables (fanno flow tables,k=1.4,M=1.8)\n", +"T2=Tt*t2 //Static temperature in K\n", +"c2=1.536 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M=1.8)\n", +"C2=c2*Ct //Critical velocity in m/s\n", +"X4=0.242 //frictional constant fanno parameter from gas tables,fanno flow tables @M=1.8\n", +"X5=X4-X2 //overall frictional constant fanno parameter\n", +"L2=(X5*D)/(4*f) //Length between sonic and oulet section\n", +"L=L1-L2 //Length of the pipe in m\n", +"\n", +"//output\n", +"printf('(A)Maximum length of the pipe is %3.2f m\n (B)Properties of air at sonic condition:\n Pressure is %3i kPa\n Temperature is %3.2f K\n Velocity is %3.1f m/s\n (C)Length of the pipe is %3.1f m\n (D)Properties of air at M2=%3.1f:\n Pressure is %3i kPa\n Temperature is %3.2f K\n Velocity is %3.2f m/s\n',L1,Pt,Tt,Ct,L,M2,P2,T2,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.6: EX3_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=0.25 //Mach number at entrance\n", +"ds=0.124 //Change in entropy in kJ/kg-K\n", +"P1=700 //Static pressure at entrance in bar\n", +"T1=333 //Static temperature at entry in Kelvin\n", +"D=0.05 //inner pipe diameter in m\n", +"f=0.006 //frictional factor\n", +"k=1.4 //Adiabatic constant\n", +"R=0.287 //Gas constant in kJ/kg-K\n", +"\n", +"//calculation\n", +"p1=exp(ds/R) //Ratio of Stagnation pressure at inlet to outlet \n", +"t1=0.987 //Ratio of Static Temperature to Stagnation temperature at entry from gas tables @M1\n", +"To1=T1/t1 //Stagnation temperature at entry in K\n", +"p2=0.957 //Ratio of Static pressure to Stagnation pressure at entry from gas tables @M1\n", +"Po1=P1/p2 //Stagnation pressure at entry in kPa\n", +"Po2=Po1/p1 //Stagnation pressure at exit in kPa\n", +"a1=sqrt(k*R*10^3*T1) //Sound velocity in m/s, R in J/kg\n", +"C1=a1*M1 //air velocity in m/s\n", +"p3=4.3615 //Static Pressure ratio from gas tables (fanno flow tables,k=1.4,M=0.25)\n", +"Pt=P1/p3 //Static critical pressure in kPa\n", +"t1=1.185 //Static temperature ratio from gas tables (fanno flow tables,k=1.4,M=0.25)\n", +"Tt=T1/t1 //Static critical temperature in K\n", +"c1=0.272 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M=0.25)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"p4=2.4065 //Pressure ratio at entry from gas tables @M1,k\n", +"Pot=Po1/p4 //Stagnation pressure at critical state in kPa\n", +"X1=8.537 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k\n", +"p5=Po2/Pot //Pressure ratio \n", +"M2=0.41 //Mach number at exit from gas tables @p5\n", +"p6=2.629 //Pressure ratio at exit from gas tables @p5\n", +"P2=Pt*p6 //Exit pressure in kPa\n", +"t2=1.161 //Temperature ratio at exit from gas tables @p5\n", +"T2=Tt*t2 //Exit temperature in K\n", +"c2=0.4415 //Velocity ratio at exit from gas tables @p5\n", +"C2=Ct*c2 //Exit velocity in m/s\n", +"X2=2.141 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k\n", +"X3=X1-X2 //overall frictional constant fanno parameter\n", +"L=(X3*D)/(4*f) //Length of the pipe in m\n", +"\n", +"//output\n", +"printf('(A)Mach number at exit(section 2) is %3.2f \n (B)Properties at exit(section 2):\n Pressure is %3.2f kPa\n Temperature is %3i K\n Velocity is %3.3f m/s\n (C)Length of the duct is %3.3f m',M2,P2,T2,C2,L)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.7: TO_find_final_pressure_and_velocity_of_duct.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=0.25 //Initial Mach number \n", +"M2=0.75 //Final mach number \n", +"P1=1.5 //Inlet pressure in bar\n", +"T1=300 //Inlet temperature in K\n", +"k=1.4 //Adiabatic constant\n", +"R=0.287 //Gas constant in kJ/kg-K\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*10^3*T1) //Sound velocity in m/s, R in J/kg\n", +"C1=a1*M1 //air velocity in m/s\n", +"p1=4.3615 //Pressure ratio at entry from gas tables @M1,k\n", +"Pt=P1/p1 //Static critical pressure in kPa\n", +"c1=0.272 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M1)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"p2=1.385 //Pressure ratio at exit from gas tables @M2,k\n", +"P2=Pt*p2 //Exit pressure in bar\n", +"c2=0.779 //Velocity ratio at exit from gas tables @M2,k\n", +"C2=Ct*c2 //Exit velocity in m/s\n", +"\n", +"//output\n", +"printf('Final pressure and velocity are %3.4f bar and %3.2f m/s',P2,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.8: To_find_inlet_mach_number_mass_flow_rate_and_exit_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"T1=333 //Inlet temperature in K\n", +"D=0.05 //inner duct diameter in m\n", +"f=0.005/4 //frictional factor\n", +"L=5 //Length of the pipe in m\n", +"Pt=101 //Exit pressure in kPa, Pt=P2 Since flow is choked \n", +"M2=1 //Mach number at exit since pipe is choked \n", +"k=1.4 //Adiabatic constant\n", +"R=0.287 //Gas constant in kJ/kg-K\n", +"\n", +"//calculation\n", +"X=(4*f*L)/D //frictional constant fanno parameter \n", +"M1=0.6 //Inlet mach number \n", +"t1=1.119 //Temperature ratio at entry from fanno flow gas tables @M1,k\n", +"Tt=T1/t1 //Static critical temperature in K\n", +"at=sqrt(k*R*10^3*Tt) //Sound velocity in m/s, R in J/kg\n", +"Ct=at //air velocity in m/s\n", +"d_t=Pt/(R*Tt) //Density at exit in kg/m^3\n", +"At=%pi*D^2/4 //Critical area in m^2\n", +"m=d_t*At*Ct //Mass flow rate in kg/s\n", +"\n", +"//output\n", +"printf('(A)Mach number at inlet is %3.1f \n (B)Mass flow rate is %3.5f kg/s\n (C)Exit temperature is %3.3f K',M1,m,Tt)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3.9: EX3_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"m=8.25 //Mass flow rate in kg/s\n", +"M1=0.15 //Mach number at entrance\n", +"M2=0.5 //Mach number at exit\n", +"P1=345 //Static pressure at entrance in kPa\n", +"T1=38+273 //Static temperature at entry in Kelvin\n", +"f=0.005 //frictional factor\n", +"k=1.4 //Adiabatic constant\n", +"R=0.287 //Gas constant in kJ/kg-K\n", +"\n", +"//calcu;ation\n", +"d1=(P1*10^3)/(R*10^3*T1) //Density of air in kg/m^3, P1 in Pa\n", +"a1=sqrt(k*R*10^3*T1) //Sound velocity in m/s, R in J/kg\n", +"C1=a1*M1 //air velocity in m/s\n", +"A1=m/(d1*C1) //Inlet area in m^2\n", +"D=(sqrt((4*A1)/(%pi)))*10^3 //inner duct diameter in mm\n", +"p1=7.3195 //Static Pressure ratio from gas tables (fanno flow tables,k=1.4,M=0.15)\n", +"Pt=P1/p1 //Static critical pressure in kPa\n", +"t1=1.1945 //Static temperature ratio from gas tables (fanno flow tables,k=1.4,M=0.15)\n", +"Tt=T1/t1 //Static critical temperature in K\n", +"c1=0.164 //Velocity ratio from gas tables (fanno flow tables,k=1.4,M=0.15)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"p2=0.984 //Pressure ratio at entry from gas tables (fanno flow tables,k=1.4,M=0.15)\n", +"Po1=P1/p2 //Stagnation pressure at entry in kPa\n", +"p3=3.928 //Stagnation pressure ratio at entry from gas tables (fanno flow tables,k=1.4,M=0.15)\n", +"Pot=Po1/p3 //Stagnation pressure at critical state in kPa\n", +"X1=28.354 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k\n", +"p5=2.138 //Pressure ratio at exit from gas tables (fanno flow tables,k=1.4,M2)\n", +"P2=Pt*p5 //Exit pressure in kPa\n", +"t2=1.143 //Temperature ratio at exit from gas tables (fanno flow tables,k=1.4,M2)\n", +"T2=Tt*t2 //Exit temperature in K\n", +"c2=0.534 //Velocity ratio at exit from gas tables (fanno flow tables,k=1.4,M2) \n", +"C2=Ct*c2 //Exit velocity in m/s\n", +"p6=1.34 //Stagnation pressure ratio at exit from gas tables (fanno flow tables,k=1.4,M2)\n", +"Po2=Pot*p6 //Stagnation pressure at exit in kPa\n", +"SPL=Po1-Po2 //Stagnation Pressure lose in kPa\n", +"X2=1.069 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k\n", +"X3=X1-X2 //overall frictional constant fanno parameter\n", +"L=(X3*D*10^-3)/(4*f) //Length of the duct in m\n", +"\n", +"//verification\n", +"a2=sqrt(k*R*10^3*T2) //Sound velocity in m/s, R in J/kg\n", +"M2_v=C2/a2 //air velocity in m/s\n", +"\n", +"//output\n", +"printf('(A)Length of the duct is %3.2f m\n (B)Diameter of the duct is %3i mm\n (C)Pressure and diameter at exit are %3.2f kPa, and %3i mm respectively\n (D)Stagnation Pressure lose is %3i kPa\n (E)Using exit velocity %3.2f m/s, temperature %3.2f K Mach number is found to be %3.2f',L,D,P2,D,SPL,C2,T2,M2_v)" + ] + } +], +"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 +} diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/4-Flow_Through_Constant_Area_Ducts_Rayleigh_Flow.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/4-Flow_Through_Constant_Area_Ducts_Rayleigh_Flow.ipynb new file mode 100644 index 0000000..a4a4382 --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/4-Flow_Through_Constant_Area_Ducts_Rayleigh_Flow.ipynb @@ -0,0 +1,706 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4: Flow Through Constant Area Ducts Rayleigh Flow" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.10: EX4_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"T1=560 //Static Temperature at entry in K\n", +"P1=0.6 //Static Pressure at entry in bar\n", +"C1=75 //Air velocity into combustion chamber in m/s\n", +"mp=30 //air fuel ratio\n", +"CV=92000 //Calorific value of fuel in kJ/kg\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"M1=C1/a1 //Mach number at entry\n", +"t1=0.9949 //Temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"To1=T1/t1 //Total stagnation temperature at inlet in K\n", +"p1=0.982 //Pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"Po1=P1/p1 //Stagnation Pressure at entry in bar\n", +"q=CV/(mp+1) //The heat transferred per unit mass flow in kJ/kg of gas, mp+1=total amount of fuel=mf+ma\n", +"p2=2.317 //Static Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M1)\n", +"Pt=P1/p2 //Static critical pressure in bar\n", +"p3=1.246 //Stagnation Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M1)\n", +"Pot=Po1/p3 //Stagnation critical pressure in bar\n", +"t2=0.137 //Static temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M1) \n", +"Tt=T1/t2 //Static critical temperature in K\n", +"t3=0.115 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M1)\n", +"Tot=To1/t3 //Stagnation critical temperature in K\n", +"To2=(q/Cp)+To1 //Stagnation exit temperation in K\n", +"t4=To2/Tot //Ratio of stagnation temperature at exit and critical state \n", +"M2=0.33 //Mach number at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"p4=2.0825 //Static Pressure ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"P2=p4*Pt //Static Pressure at exit in bar, miscalculation in textbook\n", +"p5=1.186 //Stagnation Pressure ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"Po2=Pot*p5 //Stagnation Pressure at exit in bar\n", +"t5=0.472 //Static temperature ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"T2=t5*Tt //Static exit temperature in K\n", +"C2=M2*sqrt(k*R*T2) //exit velocity in m/s\n", +"SPL=((Po1-Po2)/Po1)*100 //Percentage of pressure loss in combustion chamber in %\n", +"\n", +"//output\n", +"printf('(A)At exit:\n Pressure is %3.5f bar \n Temperature is %3i K \n Velocity is %3.2f m/s \n Mach number is %3.2f \n (B)Maximum stagnation temperature available is %3.2f K\n (C)Percentage of pressure loss in combustion chamber is %3.1f percent\n (D)Intial Mach number is %3.2f \n',P2,T2,C2,M2,Tot,SPL,M1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.11: To_find_Mach_number_and_percentage_drop_in_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"To1=473 //Total stagnation temperature at inlet in K\n", +"To2=673 //Stagnation exit temperation in K\n", +"M1=0.5 //Mach number at entry\n", +"\n", +"//calculation\n", +"t1=0.6914 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M1)\n", +"p1=1.7778 //Static pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M1)\n", +"t2=(To2/To1)*t1 //Stagnation temperature ratio at exit \n", +"M2=0.867 //Mach number at exit from gas tables (Rayleigh,t2,k=1.4)\n", +"p2=1.16 //Static pressure ratio at exit from gas tables (Rayleigh,k=1.4,M2)\n", +"p=p2/p1 //ratio of static pressures at oulet and inlet\n", +"PL=(1-p)*100 //pressure loss in %\n", +"\n", +"//output\n", +"printf('(A)Mach number is %3.3f\n (B)Percentage drop in pressure is %3.1f percent',M2,PL) " + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.12: To_find_inlet_mach_number_and_percentage_loss_in_static_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"t1=3 //Stagnation temperature ratio\n", +"M2=0.8 //Mach number at exit\n", +"\n", +"//calculation\n", +"t2=0.964 //Ratio of stagnation temperature at exit and critical state (Rayleigh,M2,k=1.4) \n", +"p1=1.266 //Static Pressure ratio at exit from gas tables (Rayleigh,M2,k=1.4)\n", +"t3=t2/t1 //Stagnation temperature ratio at critical state \n", +"M1=0.29 //Mach number at entry from gas tables (Rayleigh,t3,k=1.4)\n", +"p2=2.147 //Static pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M1)\n", +"p=p1/p2 //ratio of static pressures at exit and entry\n", +"PL=(1-p)*100 //Percentage loss in static pressure in %\n", +"\n", +"//output\n", +"printf('(A)Mach number at entry is %3.2f\n (B)Percentage loss in static pressure is %3i percent',M1,PL)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.13: To_find_inlet_and_exit_mach_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"To1=300 //Total stagnation temperature at inlet in K\n", +"To2=310 //Stagnation exit temperation in K\n", +"G=1300 //Mass velocity in kg/m^2-s\n", +"P1=105*10^3 //Static Pressure at entry in Pa\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"T1=(((-2*P1^2*Cp)+sqrt(((-2*P1^2*Cp)^2)+(8*G^2*R^2*P1^2*Cp*To1)))/(2*G^2*R^2)) //Static temperature in K\n", +"t1=T1/To1 //Temperature ratio at entry\n", +"M1=1.4 //Mach number at entry from gas tables (isentropic,t1,k=1.4)\n", +"t2=0.934 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M1)\n", +"Tot=To1/t2 //Stagnation critical temperature in K\n", +"t3=To2/Tot //Stagnation temperature ratio at exit from gas tables (Rayleigh,k=1.4,M1)\n", +"M2=1.26 //Mach number at exit from gas tables (Rayleigh,t3,k=1.4)\n", +"\n", +"//output \n", +"printf('(A)The inlet mach number is %3.2f \n (B)The exit mach number is %3.2f',M1,M2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.14: EX4_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"k=1.3 //Adiabatic constant\n", +"R=466 //Gas constant in J/kg-K\n", +"P1=0.345 //Static Pressure at entry in Pa\n", +"T1=312 //Static Temperature at entry in K\n", +"C1=65.5 //Entry velocity in m/s\n", +"q=4592 //The heat transferred per unit mass flow in kJ/kg\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"M1=C1/a1 //Mach number at entry\n", +"t1=0.9965 //Temperature ratio at entry from gas tables (M1,k=1.3,isentropic)\n", +"To1=T1/t1 //Total stagnation temperature at inlet in K\n", +"p1=2.235 //Static Pressure ratio at critical state from gas tables (Rayleigh,k=1.3,M1)\n", +"Pt=P1/p1 //Static critical pressure in bar \n", +"c1=0.051 //Velocity ratio at critical state from gas tables (Rayleigh,k=1.3,M1)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"t2=0.112 //Static temperature ratio at critical state from gas tables (Rayleigh,k=1.3,M1) \n", +"Tt=T1/t2 //Static critical temperature in K\n", +"t3=0.098 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.3,M1)\n", +"Tot=To1/t3 //Stagnation critical temperature in K\n", +"Cp=(k*R)/(k-1) //Specific heat of dry air in kJ/kg-K\n", +"To2=(q/Cp)+To1 //Stagnation exit temperation in K\n", +"t4=(To2/Tot) //Stagnation Temperature ratio at exit\n", +"M2=0.60 //Mack number at exit from gas tables (Rayleigh,t4)\n", +"p2=1.567 //Static Pressure ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"P2=p2*Pt //Static Pressure at exit in bar \n", +"t5=0.884 //Static temperature ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"T2=t5*Tt //Static exit temperature in K\n", +"c2=0.564 //Velocity ratio at critical state from gas tables (Rayleigh,k=1.4,t4)\n", +"C2=Ct*c2 //exit velocity in m/s\n", +"qmax=Cp*(Tot-To1)/10^3 //Maximum possible heat transfer in kJ/kg \n", +"\n", +"//output\n", +"printf('(A)Heat required to accelerate the gas from the inlet condition to sonic condition is %3.2f kJ/kg\n (B)The pressure and temperature at sonic condition are %3.3f bar and %3.2f K respectively\n (C)The properties at exit are:\n Pressure is %3.3f bar\n Temperature is %3.2f K\n Velocity is %3i m/s',qmax,Pt,Tt,P2,T2,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.1: To_find_heat_transferred_per_unit_mass_flow_and_temperature_change.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"Pa=1*10^5 //Pressure of dry air in Pa\n", +"To1=288 //Total stagnation temperature at inlet in K\n", +"M1=1 //Mach number at inlet of pipe\n", +"M2=0.8 //Mach number at exit o pipe\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K \n", +" \n", +"//calculation\n", +"t1=0.834 //Temperature ratio at entry, i.e.entry static temperature to total temperature from gas tables at isentropic,M1=1 & adiabatic constant=1.4\n", +"T1=t1*To1 //Static temperature at entry in Kelvin\n", +"t2=0.964 //Temperature ratio at critical state, i.e. exit stagnation temperature to critical state temperature from gas tables at Rayleigh, M2=0.8 & adiabatic constant=1.4\n", +"To2=t2*To1 //Total stagnation temperature at exit in K\n", +"t3=1.025 //Temperature ratio at exit, i.e. exit static temperature to total temperature from gas tables at isentropic,M1=1 & adiabatic constant=1.4\n", +"T2=t3*T1 //Static temperature at exit in Kelvin\n", +"q=Cp*(To1-To2) //The heat transferred per unit mass flow in kJ/kg\n", +"dT=To1-T2 //Change in temperature in K\n", +"\n", +"//output\n", +"printf('(A)The heat transferred per unit mass flow is %3.3f kJ/kg (rejected)\n (B)Change in temperature is %3.3f K',q,dT)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.2: To_calculate_flow_properties_at_the_exit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=3 //Mach number at entry\n", +"P1=1 //Static Pressure at entry in atm\n", +"T1=300 //Static Temperature at entry in K\n", +"q=300 //The heat transferred per unit mass flow in kJ/kg\n", +"R=287 //Gas constant in J/kg-K\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"\n", +"//calculation\n", +"t1=2.8 //Temperature ratio at entry from gas tables (M=3,k=1.4,isentropic)\n", +"To1=t1*T1 //Total stagnation temperature at inlet in K\n", +"p1=0.0272 //Pressure ratio at entry from gas tables (M=3,k=1.4,isentropic)\n", +"Po1=P1/p1 //Stagnation Pressure at entry in atm\n", +"p2=0.176 //Static Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=3)\n", +"Pt=P1/p2 //Static critical pressure in atm \n", +"p3=3.424 //Stagnation Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=3)\n", +"Pot=Po1/p3 //Stagnation critical pressure in atm\n", +"t2=0.281 //Static temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=3) \n", +"Tt=T1/t2 //Static critical temperature in K\n", +"t3=0.654 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=3)\n", +"Tot=To1/t3 //Stagnation critical temperature in K\n", +"To2=(q/Cp)+To1 //Stagnation exit temperation in K\n", +"t4=(To2/Tot) //Stagnation Temperature ratio at exit\n", +"M2=1.6 //Mack number at exit from gas tables (Rayleigh,t4)\n", +"p4=0.524 //Static Pressure ratio at exit from gas tables (Rayleigh,t4=0.866,M=1.6)\n", +"P2=p4*Pt //Static Pressure at exit in atm\n", +"p5=1.176 //Stagnation Pressure ratio at exit from gas tables (Rayleigh,t4=0.866,M=1.6)\n", +"Po2=p5*Pot //Stagnation Pressure at exit in atm\n", +"t5=0.702 //Static temperature ratio at exit from gas tables (Rayleigh,t4=0.866,M=1.6)\n", +"T2=t5*Tt //Static exit temperature in K\n", +"d2=P2*101325/(R*T2) //density of air at exit in kg/m^3, P2 in N/m^2\n", +"\n", +"//outpur\n", +"printf('(A)The Mach numer at exit is %3.1f\n (B)Static Pressure at exit is %3.3f atm\n (C)Static exit temperature is %3.2f K\n (D)density of air at exit is %3.4f kg/m^3\n (E)Stagnation exit temperation is %3.2f K\n (F)Stagnation Pressure at exit is %3.2f atm',M2,P2,T2,d2,To2,Po2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.3: EX4_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=2 //Mach number at entry\n", +"P1=1.4 //Static Pressure at entry in bar\n", +"T1=323 //Static Temperature at entry in K\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"t1=0.555 //Temperature ratio at entry from gas tables (M=2,k=1.4,isentropic)\n", +"To1=T1/t1 //Total stagnation temperature at inlet in K\n", +"p1=0.364 //Pressure ratio at entry from gas tables (M=2,k=1.4,isentropic)\n", +"Po1=P1/p1 //Stagnation Pressure at entry in bar\n", +"t2=0.529 //Static temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=2) \n", +"Tt=T1/t2 //Static critical temperature in K\n", +"t3=0.793 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=2)\n", +"Tot=To1/t3 //Stagnation critical temperature in K\n", +"To2=Tot //Stagnation exit temperation in K\n", +"q=Cp*(To2-To1) //The heat transferred per unit mass flow in kJ/kg\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"C1=M1*a1 //Air velocity in m/s\n", +"d1=(P1*10^5)/(R*T1) //density of air in kg/m^3\n", +"ma=d1*C1 //Mass flow rate per unit area in kg/s-m^3\n", +"\n", +"//output\n", +"printf('(A)Mass flow rate per unit area is %3.2f kg/s-m^2\n (B)Final temperarure is %3.3f K\n (C)Heat added is %3.2f kJ/kg',ma,Tt,q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.4: To_calculate_pressure_and_Mach_number_after_combustion_in_combustion_chamber.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"C1=100 //Air velocity into combustion chamber in m/s\n", +"P1=3 //Static Pressure at entry in bar\n", +"T1=318 //Static Temperature at entry in K\n", +"q=630 //The heat transferred per unit mass flow in kJ/kg\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"M1=C1/a1 //Mach number at entry\n", +"t1=0.985 //Temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"To1=T1/t1 //Total stagnation temperature at inlet in K\n", +"p1=0.947 //Pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"Po1=P1/p1 //Stagnation Pressure at entry in bar\n", +"To2=(q/Cp)+To1 //Stagnation exit temperation in K\n", +"p2=2.163 //Static Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=0.28)\n", +"Pt=P1/p2 //Static critical pressure in bar \n", +"p3=2.206 //Stagnation Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=0.28)\n", +"Pot=Po1/p3 //Stagnation critical pressure in bar\n", +"t2=0.310 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=0.28)\n", +"Tot=To1/t2 //Stagnation critical temperature in K\n", +"t3=(To2/Tot) //Stagnation Temperature ratio at exit\n", +"M2=0.7 //Mack number at exit from gas tables (Rayleigh,t3)\n", +"p4=1.423 //Static Pressure ratio at exit from gas tables (Rayleigh,t3,M2)\n", +"P2=p4*Pt //Static Pressure at exit in bar\n", +"\n", +"//output \n", +"printf('(A)Pressure after combustion is %3.3f bar\n (B)Mach number after combustion is %3.1f',P2,M2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.5: EX4_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"clear\n", +"\n", +"//input data\n", +"M1=3 //Mach number at entry\n", +"To1=295 //Total stagnation temperature at inlet in K\n", +"P1=0.5 //Static Pressure at entry in bar\n", +"M2=1.5 //Mack number at exit\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"p1=0.0272 //Pressure ratio at entry from gas tables (M=3,k=1.4,isentropic)\n", +"Po1=P1/p1 //Stagnation Pressure at entry in bar\n", +"t1=0.357 //Temperature ratio at entry from gas tables (M=3,k=1.4,isentropic)\n", +"T1=t1*To1 //Static temperature at entry in Kelvin\n", +"p2=0.176 //Static Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=3)\n", +"Pt=P1/p2 //Static critical pressure in bar \n", +"p3=3.424 //Stagnation Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=3)\n", +"Pot=Po1/p3 //Stagnation critical pressure in bar\n", +"t2=0.654 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=3)\n", +"Tot=To1/t2 //Stagnation critical temperature in K\n", +"t3=0.280 //Static temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=3)\n", +"Tt=T1/t3 //Static critical temperature in K\n", +"p4=0.578 ////Static Pressure ratio at exit from gas tables (Rayleigh,M=1.5)\n", +"P2=p4*Pt //Static Pressure at exit in bar\n", +"p5=1.122 //Stagnation Pressure ratio at exit from gas tables (Rayleigh,M=1.5)\n", +"Po2=p5*Pot //Stagnation Pressure at exit in bar\n", +"t4=0.753 ////Static temperature ratio at exit from gas tables (Rayleigh,M=1.5)\n", +"T2=t4*Tt //Static exit temperature in K\n", +"t5=0.909 //Stagnation temperature ratio at exit from gas tables (Rayleigh,M=1.5)\n", +"To2=t5*Tot //Total stagnation temperature at exit in K\n", +"q=Cp*(To1-To2) //The heat transferred per unit mass flow in kJ/kg\n", +"SPC=Po1-Po2 //Change in stagnation pressure in bar\n", +"n=log(Po1/Po2)/(log(Po1/Po2)-log(To1/To2)) //Exponent of polytropic equation\n", +"qmax=Cp*(Tot-To1) //Maximum possible heat transfer in kJ/kg\n", +"ds=Cp*log(T2/T1)-(R*log(P2/P1)) //Change in entropy in kJ/kg-K\n", +"\n", +"//output\n", +"printf('(A)Total temperature at exit is %3.2f K\n (B)Static pressure at exit is %3.3f bar \n (C)Change in stagnation pressure is %3.2f bar\n (D)Exponent of polytropic equation is %3.2f',To2,P2,SPC,n)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.6: EX4_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M2=0.9 //Mack number at exit\n", +"P2=2.5 //Static Pressure at exit in bar\n", +"T2=1273 //Static exit temperature in K\n", +"t1=3.74 //ratio of stagnation temperatures at and exit entry\n", +"Cp=1.218 //Specific heat of dry air in kJ/kg-K\n", +"k=1.3 //Adiabatic constant\n", +"\n", +"//calculation\n", +"t2=0.892 //Temperauture ratio at exit from gas tables (isentropic,k=1.3,M=0.9)\n", +"To2=T2/t2 //Total stagnation temperature at exit in K\n", +"To1=To2/t1 //Total stagnation temperature at inlet in K\n", +"p1=1.12 //Static pressure ratio at critical state from gas tables (Rayleigh,k=1.3,M=1.5)\n", +"Pt=P2/p1 //Static critical pressure in bar\n", +"t3=1.017 //Static temperature ratio at critical state from gas tables (Rayleigh,k=1.3,M=1.5)\n", +"Tt=T2/t3 //Static critical temperature in K\n", +"t4=0.991 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.3,M=1.5)\n", +"Tot=To2/t4 //Stagnation critical temperature in K\n", +"t5=To1/Tot //Ratio of stagnation temperature at entry and critical state \n", +"M1=0.26 //Mach number at entry from gas tables (Rayleigh,t5,k=1.3)\n", +"p2=2.114 //Static Pressure ratio at entry from gas tables (Rayleigh,t5,k=1.3)\n", +"P1=Pt*p2 //Static Pressure at entry in bar\n", +"t6=0.302 //Static temperature ratio at entry from gas tables (Rayleigh,t5,k=1.3)\n", +"T1=Tt*t6 //Static temperature at entry in Kelvin\n", +"q=Cp*(To2-To1) //The heat transferred per unit mass flow in kJ/kg\n", +"qmax=Cp*(Tot-To1) //Maximum possible heat transfer in kJ/kg \n", +"\n", +"//output\n", +"printf('(A)Mach number at entry is %3.2f\n (B)Pressure at entry is %3.3f bar \n (C)Temperature of gas is %3i K\n (D)Amount of heat added is %3.2f kJ/kg\n (E)Maximum heat that can be heated is %3.3f kJ/kg',M1,P1,T1,q,qmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.7: To_determine_Mach_number_pressure_temperature_and_velocity_of_gas_at_exit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input\n", +"P1=0.343 //Static Pressure at entry in bar\n", +"T1=310 //Static temperature at entry in Kelvin\n", +"C1=60 //Velocity at entrance in m/s\n", +"q=1172.5 //The heat transferred per unit mass flow in kJ/kg\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"R=287 //Gas constant in J/kg-K\n", +"\n", +"//calculation\n", +"a1=sqrt(k*R*T1) //Sound velocity in m/s\n", +"M1=C1/a1 //Mach number at entry\n", +"t1=0.9943 //Temperature ratio at entry from gas tables (M=0.17,k=1.4,isentropic)\n", +"To1=T1/t1 //Total stagnation temperature at inlet in K\n", +"p1=2.306 //Static Pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=0.17)\n", +"Pt=P1/p1 //Static critical pressure in bar\n", +"t2=0.154 //Static temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=0.17) \n", +"Tt=T1/t2 //Static critical temperature in K\n", +"t3=0.129 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=0.17)\n", +"Tot=To1/t3 //Stagnation critical temperature in K\n", +"c1=0.0665 //Velocity ratio at critical state from gas tables (Rayleigh,k=1.4,M=0.17)\n", +"Ct=C1/c1 //Critical velocity in m/s\n", +"To2=(q/Cp)+To1 //Stagnation exit temperation in K\n", +"t4=To2/Tot //Ratio of stagnation temperature at exit and critical state \n", +"M2=0.45 //Mach number at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"p2=1.87 //Static Pressure ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"P2=p2*Pt //Static Pressure at exit in bar \n", +"t5=0.7075 //Static temperature ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"T2=t5*Tt //Static exit temperature in K\n", +"c2=0.378 //Velocity ratio at critical state from gas tables (Rayleigh,k=1.4,t4)\n", +"C2=Ct*c2 //exit velocity in m/s\n", +"\n", +"//output\n", +"printf('At exit conditions :\n (A)Mach number is %3.2f\n (B)Pressure is %3.3f bar\n (C)Temperature is %3.2f K\n (D)Exit velocity is %3.2f m/s',M2,P2,T2,C2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.8: To_find_Mach_number_pressure_and_temperature_after_cooling.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M1=2 //Mach number at entry\n", +"To1=523 //Total stagnation temperature at inlet in K\n", +"Po1=6 //Stagnation Pressure at entry in bar\n", +"To2=423 //Stagnation exit temperation in K\n", +"\n", +"//calculation\n", +"t1=0.555 //Temperature ratio at entry from gas tables (M=2,k=1.4,isentropic)\n", +"T1=t1*To1 //Static temperature at entry in Kelvin\n", +"p1=0.128 //Pressure ratio at entry from gas tables (M=2,k=1.4,isentropic)\n", +"P1=Po1*p1 //Static Pressure at entry in bar\n", +"p2=0.364 //Static pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=2)\n", +"p3=1.503 ////Stagnation pressure ratio at critical state from gas tables (Rayleigh,k=1.4,M=2), printing mistake in textbook\n", +"t2=0.529 //Static Temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=2)\n", +"t3=0.793 //Stagnation temperature ratio at critical state from gas tables (Rayleigh,k=1.4,M=2)\n", +"t4=(To2/To1)*t3 //Ratio of stagnation temperature at exit and critical state \n", +"M2=3.15 //Mach number at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"p4=0.161 //Static Pressure ratio at exit from gas tables (Rayleigh,t4,k=1.4), printing mistake in textbook\n", +"t5=0.258 //Static temperature ratio at exit from gas tables (Rayleigh,t4,k=1.4)\n", +"P2=(p4/p2)*P1 //Static Pressure at exit in bar \n", +"T2=(t5/t2)*T1 //Static exit temperature in K\n", +"\n", +"//output\n", +"printf('After Cooling :\n (A)Mach number is %3.2f\n (B)Pressure is %3.4f bar\n (C)Temperature is %3.2f K',M2,P2,T2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4.9: EX4_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"M2=0.8 //Mack number at exit\n", +"t1=4 //Ratio of stagnation temperature at exit and entry\n", +"T1=288 //Atmospheric temperature in K\n", +"P1=1 //Atmospheric Pressure in atm\n", +"Cp=1.005 //Specific heat of dry air in kJ/kg-K\n", +"\n", +"//calculation\n", +"t2=0.964 //Ratio of stagnation temperature at exit and critical state from gas tables\n", +"t3=t2/t1 //Ratio of stagnation temperature at entry and critical state\n", +"M1=0.24 ////Mach number at entry from gas tables (Rayleigh,t3,k=1.4)\n", +"t5=0.988 //Temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"To1=T1/t5 //Total stagnation temperature at inlet in K\n", +"To2=t1*To1 //Stagnation exit temperation in K\n", +"Tot=To1/t3 //Stagnation critical temperature in K\n", +"q=Cp*(To2-To1) //The heat transferred per unit mass flow in kJ/kg\n", +"qmax=Cp*(Tot-To1) //Maximum possible heat transfer in kJ/kg \n", +"t6=0.9775 //Ratio of stagnation temperature for maximum static temperature (M=1/sqrt(k),Rayleigh)\n", +"To3=Tot*t6 //maximum stagnation temperature in K\n", +"q_req=Cp*(To3-To1) //Heat transfer required to get maximum static temperature in kJ/kg\n", +"\n", +"//output\n", +"printf('(A)Heat added per kg of air flow is %3.2f kJ/kg\n (B)Maximum possible heat transfer is %3.2f kJ/kg\n (C)Heat transfer required to get maximum static temperature is %3.1f kJ/kg',q,qmax,q_req)" + ] + } +], +"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 +} diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/5-Normal_and_Oblique_Shock.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/5-Normal_and_Oblique_Shock.ipynb new file mode 100644 index 0000000..7fc9cc1 --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/5-Normal_and_Oblique_Shock.ipynb @@ -0,0 +1,1545 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5: Normal and Oblique Shock" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.10: To_determine_Mach_number_across_shock_and_area_at_shock.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"a1=0.4 //Ratio of throat area to exit area \n", +"p1=0.8 //Ratio of static pressure to Stagnation pressure at inlet\n", +"At=1 //Throat area in m^2\n", +"\n", +"//Calculation\n", +"a2=1/a1 //reciprocal of a1 to find in gas tables\n", +"//Pox=Po1=Po, Poy=Po2\n", +"a2p2=a2*p1 //Area pressure ratio i.e. (A2*P2)/(At2*Po2)\n", +"M2=0.28 //Exit mach number from gas tables @a2p2\n", +"a3=2.166 //Ratio of exit area to throat area after shock from gas tables @a2p2 \n", +"p2=0.947 //Static to stagnation pressure ratio at exit from gas tables @a2p2\n", +"p3=a2/a3 //Stagnation pressure ratio after and before shock \n", +"Mx=1.675 //Mach number before the shock @p3\n", +"My=0.647 //Mach number after the shock from gas tables @Mx\n", +"a4=1.14 //Ratio of area after shock to throat area after shock from isentropic gas tables @My\n", +"a5=1.315 //Ratio of area before shock to throat area before shock from isentropic gas tables @My\n", +"Ax=a5*At //Area at shock in m^2\n", +"\n", +"//Output \n", +"printf('(A)Mach number across the shock: Mx=%3.3f (My=%3.3f)\n (B)Area at shock is %3.3f m^2',Mx,My,Ax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.11: To_find_Mach_number_across_shock_Static_pressure_and_area_at_shock.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"a1=1/3 //Ratio of throat area to exit area \n", +"p1=0.4 //Ratio of static pressure to Stagnation pressure at inlet\n", +"\n", +"//Calculation\n", +"a2=1/a1 //reciprocal of a1 to find in gas tables\n", +"//we know Pox=Po1=Po, Poy=Po2, At=Atx and Aty=At2\n", +"a2p2=a2*p1 //Area pressure ratio i.e. (A2*P2)/(At2*Po2)\n", +"M2=0.472 //Exit mach number from gas tables @a2p2\n", +"a3=1.397 //Ratio of exit area to throat area after shock from gas tables @a2p2 \n", +"p2=0.858 //Static to stagnation pressure ratio at exit from gas tables @a2p2\n", +"p3=a3/a2 //Stagnation pressure ratio after and before shock \n", +"Mx=2.58 //Mach number before the shock @p3\n", +"My=0.506 //Mach number after the shock from gas tables @Mx\n", +"p4=9.145 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"a4=2.842 //Ratio of area before shock to throat area \n", +"p5=0.051 //Ratio of Pressure before shock to Stagnation pressure at entry\n", +"\n", +"//Output \n", +"printf('At section where shock occurs:\n (A)Mach number Mx=%3.2f and My=%3.3f\n (B)Static Pressure is %3.3f*Po1 (units depend on Po1)\n (C)Area of cross section is %3.3f*At (units depend on At)',Mx,My,p5,a4)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.12: To_find_properties_at_various_sections.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=300 //Pressure in reservoir in kPa\n", +"To=500 //Temperature in reservoir in K\n", +"At=1 //Throat area in m^2\n", +"Ax=2 //Area just before the shock in m^2\n", +"Ay=2 //Area just after the shock in m^2\n", +"A2=3 //Exit area in m^2\n", +"\n", +"//Calculation\n", +"a1=Ax/At //Area ratio \n", +"Mx=2.2 //Mach number upstream of shock\n", +"p1=0.0935 //Ratio of pressure before shock to stagnation pressure before shock from gas tables @Mx\n", +"Px=p1*Po //pressure before shock in kPa\n", +"t1=0.50 //Ratio of temperature before shock to stagnation pressure before shock from gas tables @Mx\n", +"Tx=t1*To //temperature before shock in K\n", +"My=0.547 //Mach number downstream of shock \n", +"p2=5.480 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=Px*p2 //Static pressure after shock in kPa\n", +"t2=1.857 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=t2*Tx //Temperature ratio after the shock in K\n", +"p3=6.716 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"Poy=Px*p3 //Stagnation pressure after shock in kPa\n", +"Po2=Poy //Exit stagnation pressure in kPa, Since total pressure remains same after shock\n", +"t3=0.943 //Static to stagnation pressure after shock from isentropic gas tables @My\n", +"Toy=Ty/t3 //Stagnation pressure after shock in K\n", +"To2=Toy //Exit stagnation temperature in K, Since temperature remains after shock\n", +"a2=1.255 //Ratio of area after shock to throat area after shock from isentropic gas tables @My\n", +"Aty=Ay/a2 //Throat area after shock in m^2\n", +"At2=Aty //Throat area at exit in m^2\n", +"a3=A2/At2 //Areas ratio\n", +"M2=0.33 //Exit mach number from gas tables @a3\n", +"p4=0.927 //Static to Stagnation pressure at exit from gas isentropic gas tables @a3\n", +"P2=Po2*p4 //Exit pressure in kPa\n", +"t4=0.978 //Static to Stagnation temperature at exit from gas isentropic gas tables @a3\n", +"T2=To2*t4 //Exit temperature in K\n", +"\n", +"//Output\n", +"printf('(A)Pressure at section (x) Px=%3.2f kPa\n (B)Pressure at section (y) Px=%3.3f kPa\n (C)Stagnation pressure at section (y) Poy=%3.2f kPa\n (D)Throat area of cross section at section (y) Aty=%3.4f m^2\n (E)Stagnation pressure at exit Po2=%3.2f kPa\n (F)Throat area of cross section at exit At2=%3.4f m^2\n (G)Static Pressure at exit P2=%3.2f kPa\n (H)Stagantion temperature at exit To2=%3i K\n (I)Temperature at exit T2=%3i k',Px,Py,Poy,Aty,Po2,At2,P2,To2,T2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.13: EX5_13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po1=500 //Stagnation pressure in kPa\n", +"To1=600 //Stagnation temperature in K\n", +"C1=100 //inlet velocity in m/s\n", +"A1=0.01 //Inlet Area in m^2\n", +"A2=0.01 //Exit Area in m^2\n", +"Mx=1.2 //Mach number before the shock\n", +"Ax=37.6 //Area just before the shock in cm^2\n", +"Ay=37.6 //Area just after the shock in cm^2\n", +"Px=109.9 //Pressure before the shock in kPa\n", +"Poy=350 //Stagnation pressure after shock in kPa\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant volume in J/kg-K\n", +"\n", +"//Calculation\n", +"T1=To1+(C1^2/(2*Cp)) //Inlet static temperature in K\n", +"ai_1=sqrt(k*R*T1) //Velocity of sound at inlet in m/s\n", +"M1=C1/ai_1 //Inlet Mach number \n", +"p1=0.973 //Static to Stagnation pressure ratio at entry from gas tables @M1 \n", +"P1=Po1*p1 //Inlet static pressure in kPa\n", +"d1=P1*10^3/(R*T1) //Density at inlet in kg/m^3, P1 in Pa\n", +"m=d1*A1*C1 //Mass flow rate at inlet in kg/s\n", +"p2=0.528 //Ratio of critical pressure to stagnation pressure from gas tables @M=1\n", +"Pt=Po1*p2 //Critical pressure in kPa\n", +"t1=0.834 //Ratio of critical temperature to stagnation temperature from gas tables @M=1\n", +"Tt=t1*To1 //critical temperature in K\n", +"ai_t=sqrt(k*R*Tt) //Velocity of sound at critical state in m/s\n", +"Ct=ai_t //Velocity of air at critical state in m/s\n", +"a1=2.964 //Ratio of inlet area to critical area from gas tables @M=1\n", +"At=A1/a1 //critical area in m^2\n", +"dt=Pt/(R*Tt) //Density at critical state in kg/m^3\n", +"mt=dt*At*Ct //Mass flow rate at critical satate in kg/s\n", +"//Sub-division (a)\n", +"a2=1.030 //Ratio of area after shock to critical area from gas tables @Mx\n", +"Ay_a=At*a2 //Area after shock in cm^2\n", +"p3=0.412 //Ratio of upstram of shock to stagnation pressures from isentropic gas tables @Mx\n", +"Px_a=Po1*p3 //Pressure upstram of shock in kPa\n", +"t2=0.776 //Ratio of upstram of shock to stagnation temperature from isentropic gas tables @Mx\n", +"Tx_a=To1*t2 //Temperature upstram of shock in K\n", +"My_a=0.84 //Mach number downstream of shock from normal shock gas tables @Mx\n", +"p4=1.497 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py_a=Px_a*p4 //Static pressure after shock in kPa\n", +"t3=1.099 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty_a=Tx_a*t3 //Temperature ratio after the shock in K\n", +"p5=2.407 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"Poy_a=Px_a*p5 //Stagnation pressure after shock in kPa\n", +"a3=1.204 //Ratio of area after shock to throat area after shock from isentropic gas tables @My\n", +"At2_a=(Ay_a/a3)*10^4 //Throat area at exit in m^2, calculation mistake in textbook\n", +"a4=A2/At2_a //Ratio of areas to find gas tables \n", +"M2_a=0.2 //Exit mach number at section-A from gas tables @a4\n", +"p5=0.973 //ratio of exit pressure to stagnation pressure after shock from gas tables\n", +"P2_a=p5*Poy_a //exit pressure in kPa\n", +"//Sub-division (b)\n", +"a5=Ax/At //Ratio of area before shock to critical area\n", +"Mx_b=1.4 //Mach number at section-B from gas tables @a5\n", +"p6=0.314 //Ratio of upstram of shock to stagnation pressures from isentropic gas tables @Mx_b\n", +"Px_b=Po1*p6 //Pressure upstram of shock in kPa\n", +"t4=0.718 //Ratio of upstram of shock to stagnation temperature from isentropic gas tables @Mx_b\n", +"Tx_b=To1*t4 //Temperature upstram of shock in K\n", +"p20=3.049 //Stagnation pressure ratio after shock to Static pressure before shock from gas tables \n", +"Poy_b=Px_b*p20 //Stagnation pressure after shock in kPa\n", +"My_b=0.735 //Mach number downstream of shock from normal shock gas tables @Mx_b\n", +"p7=2.085 //Static pressure ratio after and before the shock from gas tables @My_b\n", +"Py_b=Px_b*p7 //Static pressure after shock in kPa\n", +"t5=1.260 //Temperature ratio after and before the shock from gas tables @My_b\n", +"Ty_b=Tx_b*t5 //Temperature after the shock in K\n", +"a6=1.071 //Ratio of area after shock to throat area after shock from isentropic gas tables My_b=0.735\n", +"At2_b=Ay/a6 //Throat area at exit in m^2\n", +"a7=A2/At2_b //Ratio of areas\n", +"M2_b=0.21 //Exit mach number at section-B from gas tables @a7\n", +"p8=0.9697 //ratio of exit pressure to stagnation pressure after shock from gas tables\n", +"P2_b=p8*Poy_b //exit pressure in kPa\n", +"//Sub-division (c)\n", +"p9=Px/Po1 //Ratio of upstram of shock to stagnation pressures \n", +"Mx_c=1.65 //Mach number at section-B from gas tables @p9\n", +"a8=1.292 //Ratio of area before shock to critical area from gas tables @p9\n", +"Ax_c=At*a8*10^4 //Area before shock in cm^2\n", +"t6=0.647 //Ratio of upstram of shock to stagnation temperature from isentropic gas tables @p9\n", +"Tx_c=To1*t6 //Temperature upstram of shock in K\n", +"My_c=0.654 //Mach number downstream of shock from normal shock gas tables @Mx_c\n", +"p10=3.0095 //Static pressure ratio after and before the shock from gas tables @My_c\n", +"Py_c=Px*p10 //Pressure downstram of shock in kPa\n", +"t7=1.423 //Temperature ratio after and before the shock from gas tables @My_c\n", +"Ty_c=Tx_c*t7 //Temperature after the shock in K\n", +"p12=4 //Stagnation pressure after shock to Static pressure before shock from gas tables @Mx_c\n", +"Poy_c=Px*p12 //Stagnation pressure after shock in kPa\n", +"a9=1.136 //Ratio of area after shock to throat area after shock from gas tables My_c=0.654\n", +"At2_c=Ax_c/a9 //Throat area at exit in m^2\n", +"a8=A2/At2_c //Ratio of areas\n", +"M2_c=0.23 //Exit mach number at section-B from gas tables @a8\n", +"p11=0.964 //ratio of exit pressure to stagnation pressure after shock from gas tables\n", +"P2_c=p11*Poy_c //exit pressure in kPa\n", +"//Sub-division (D)\n", +"p13=Poy/Po1 //Pressure ratio, Since Pox=Po1\n", +"Mx_d=2.04 //Mach number upstream of shock from gas tables @p13\n", +"My_d=0.571 //Mach number downstream of shock from gas tables @p13\n", +"p14=4.688 //Static pressure ratio after and before the shock from gas tables @My_d\n", +"t8=1.72 //Temperature ratio after and before the shock from gas tables @My_d\n", +"p15=5.847 //Stagnation pressure after shock to Static pressure before shock from gas tables @Mx_d\n", +"p16=0.120 //Ratio of upstram of shock to stagnation pressures from isentropic tables @Mx_d\n", +"Px_d=Po1*p16 //Pressure upstram of shock in kPa\n", +"t9=0.546 //Ratio of upstram of shock to stagnation temperature from isentropic gas tables @Mx_d\n", +"Tx_d=To1*t9 //Temperature upstram of shock in K\n", +"p21=4.688 //Static pressure ratio after and before the shock from gas tables \n", +"Py_d=Px_d*p21 //Pressure downstram of shock in kPa\n", +"t12=1.72 //Ratio of upstram of shock to stagnation temperature from isentropic gas tables \n", +"Ty_d=Tx_d*t12 //Temperature after the shock in K\n", +"a9=1.745 //Ratio of area before shock to throat area from isentropic gas tables \n", +"Ax_d=At*a9*10^4 //Area before shock in cm^2\n", +"a10=1.226 //Ratio of area after shock to throat area after shock from isentropic tables @My_d\n", +"At2_d=(Ax_d/a10) //Throat area at exit in cm^2\n", +"a11=A2/At2_d //Ratio of areas\n", +"M2_d=0.29 //Exit mach number at section-B from gas tables @a11\n", +"p17=0.943 //ratio of exit pressure to stagnation pressure after shock from gas tables\n", +"P2_d=p17*Poy //exit pressure in kPa\n", +"//Sub-division (e)\n", +"a12=Ax/At //Ratio of areas\n", +"Mx_e=2.62 //Mach number upstream of shock from gas tables @a12\n", +"t10=0.421 //Ratio of upstram of shock to stagnation temperature from isentropic gas tables \n", +"Tx_e=To1*t10 //Temperature upstram of shock in K\n", +"p18=0.0486 //Ratio of upstram of shock to stagnation pressures from isentropic tables @Mx_e\n", +"Px_e=p18*Po1 //Pressure upstram of shock in kPa\n", +"My_e=0.502 //Mach number downstream of shock from gas tables @Mx_e\n", +"p19=7.842 //Static pressure ratio after and before the shock from gas tables @My_e\n", +"Py_e=Px_e*p19 //Pressure downstram of shock in kPa\n", +"P2_e=Py_e //Exit pressure in kPa\n", +"t11=2.259 //Temperature ratio after and before the shock from gas tables @My_d\n", +"Ty_e=Tx_e*t11 //Temperaure downstram of shock in K\n", +"T2_e=Ty_e //Exit temperature in K\n", +"\n", +"//Output \n", +"printf('At throat:\n Mass flow rate is %3.2f kg/s\n Area at throat is %3.5f m^2\n Pressure is %3i kPa\n Temperature is %3.1f K\n Velocity is %3.1f m/s\n (a)At section (A):\n Pressure upstream is %3i kPa\n Temperature upstream is %3.1f K\n Mack number downstream is %3.2f\n Pressure downstream is %3.3f kPa\n Temperature downstream is %3.3f K\n Stagnation pressure downstream is %3.1f kPa\n Area is %3.3f cm^2\n At exit:\n Mach number is %3.1f\n Pressure is %3.1f kPa\n (b)At section (B):\n Pressure upstream is %3i kPa\n Temperature upstream is %3.1f K\n Mack number upstream is %3.1f\n Mack number downstream is %3.3f\n Pressure downstream is %3.2f kPa\n Temperature downstream is %3.2f K\n Stagnation pressure downstream is %3.1f kPa\n Area is %3.3f cm^2\n At exit:\n Mach number is %3.2f\n Pressure is %3.1f kPa\n (c)At section (C):\n Area upstream is %3.2f cm^2\n Temperature upstream is %3.1f K\n Mack number upstream is %3.2f\n Mack number downstream is %3.3f\n Pressure downstream is %3.2f kPa\n Temperature downstream is %3.2f K\n Stagnation pressure downstream is %3i kPa\n Area is %3.4f cm^2\n At exit:\n Mach number is %3.2f\n Pressure is %3.1f kPa\n (d)At section (D):\n Pressure upstream is %3i kPa\n Temperature upstream is %3.1f K\n Area upstream is %3.3f cm^2\n Mack number upstream is %3.2f\n Mack number downstream is %3.2f\n Pressure downstream is %3.2f kPa\n Temperature downstream is %3.2f K\n Area is %3.3f cm^2\n At exit:\n Mach number is %3.2f\n Pressure is %3.2f kPa\n (e)At section (E):\n Pressure upstream is %3.1f kPa\n Temperature upstream is %3.1f K\n Mack number upstream is %3.2f\n Mack number downstream is %3.3f\n Pressure downstream is %3.1f kPa\n Temperature downstream is %3.2f K\n At exit:\n Temperature is %3.2f K\n Pressure is %3.1f kPa\n',m,At,Pt,Tt,Ct,Px_a,Tx_a,My_a,Py_a,Ty_a,Poy_a,At2_a,M2_a,P2_a,Px_b,Tx_b,Mx_b,My_b,Py_b,Ty_b,Poy_b,At2_b,M2_b,P2_b,Ax_c,Tx_c,Mx_c,My_c,Py_c,Ty_c,Poy_c,At2_c,M2_c,P2_c,Px_d,Tx_d,Ax_d,Mx_d,My_d,Py_d,Ty_d,At2_d,M2_d,P2_d,Px_e,Tx_e,Mx_e,My_e,Py_e,Ty_e,T2_e,P2_e)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.14: EX5_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T=300 //Temperature in K\n", +"P=1.01325*10^5 //Absolute pressure in Pa\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"C_1=60 //Velocity of air in m/s\n", +"C_2=200 //Velocity of air in m/s\n", +"C_3=500 //Velocity of air in m/s\n", +"d_hg=13600 //Density of mercury in kg/m^3\n", +"g=9.81 //Acceleration due to gravity in m/s^2\n", +"\n", +"//Calculation\n", +"a=sqrt(k*R*T) //Sound velocity in m/s\n", +"M_1=C_1/a //Mach number \n", +"dP1=(P*C_1^2)/(2*R*T) //Difference in mercury levels in Pa\n", +"dP1_hg=(dP1/(d_hg*g))*1000 //Difference in mercury levels in mm of Hg\n", +"M_2=C_2/a //Mach number \n", +"p1=(1+((k-1)/2)*M_2^2)^(k/(k-1)) //Stagnation to static pressure ratio \n", +"Po=p1*P //Stagnation pressure in Pa\n", +"dP2=abs(Po-P) //Difference in mercury levels in Pa\n", +"dP2_hg=(dP2/(d_hg*g))*1000 //Difference in mercury levels in mm of Hg\n", +"M_3=C_3/a //Mach number & M_3=Mach number just before shock\n", +"My=0.723 //Mach number just after shock\n", +"p1=2.2530 //Ratio of pressure after shock to before shock from gas tables @My\n", +"Py=p1*P //Pressure after shock in Pa\n", +"p2=0.706 //Ratio of pressure after shock to Stagnation pressure from gas tables @My\n", +"Po=Py/p2 //Stagnation pressure in Pa\n", +"dP3=Po-Py //Difference in mercury levels in Pa\n", +"dP3_hg=(dP3/(d_hg*g))*1000 //Difference in mercury levels in mm of Hg\n", +"\n", +"//Output\n", +"printf('Difference in mercury levels at velocity equal to:\n (A)%2i m/s is %3.3f mm of Hg\n (B)%3i m/s is %3.1f mm of Hg\n (C)%3i m/s is %3i mm of Hg',C_1,dP1_hg,C_2,dP2_hg,C_3,dP3_hg)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.15: To_estimate_Mach_number_and_properties_across_the_normal_shock_of_tube.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Px=16 //Pressure before the shock in kPa\n", +"Poy=70 //Stagnation pressure after shock in kPa\n", +"To=300+273 //Stagnation temperature in K\n", +"k=1.4 //Adiabatic constant \n", +"\n", +"//Calculation\n", +"p1=Poy/Px //Pressure ratio \n", +"Mx=1.735 //Mach number upstream of shock \n", +"My=0.631 //Mach number downstream of shock \n", +"p2=0.84 //Ratio of stagnation pressures after and before shock from gas tables\n", +"t1=1.483 //Temperature ratio after and before shock from gas tables\n", +"Tx=To/(1+((k-1)/2)*Mx^2) //Temperature upstream of shock in K\n", +"Ty=Tx*t1 //Temperature downstream of shock in K\n", +"Pox=Poy/p2 //Stagnation pressure before shock in kPa\n", +"\n", +"//Output\n", +"printf('(A)Mach number of the tunnal is Mx=%3.3f (My=%3.3f)\n (B)Upstream of the tube:\n Static temperature is %3i K\n Total pressure is %3.1f kPa\n (C)Downstream of the tube:\n Static temperature is %3i K\n Total pressure is %3i kPa',Mx,My,Tx,Pox,Ty,Poy)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.16: To_find_Mach_number_and_velocity_in_pitot_tube.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Py=455 //Pressure downstream of shock in kPa\n", +"Ty=65+273 //Temperature downstream of shock in K\n", +"dP=65 //Difference between dynamic and static pressure in kPa\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"Poy=dP+Py //Stagnation pressure after shock in kPa\n", +"p1=Py/Poy //Pressure ratio \n", +"My=0.44 //Mach number downstream of shock from isentropic gas tables @p1\n", +"Mx=3.8 //Mach number upstream of shock from normal shock gas tables @My\n", +"t1=3.743 //Temperature ratio after and before the shock from gas tables @My\n", +"Tx=Ty/t1 //Temperature before the shock in K\n", +"ax=sqrt(k*R*Tx) //Velocity of sound before the shock in m/s\n", +"Cx=Mx*ax //Air Velocity before the shock in m/s\n", +"\n", +"//Output \n", +"printf('(A)Mach number is Mx=%3.1f (My=%3.2f)\n (B)Velocity is %3.2f m/s',Mx,My,Cx)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.17: To_find_shock_speed_and_air_velocity_inside_the_shock.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"k=1.4 //Adiabatic constant \n", +"Px=1.01325 //Pressure before the shock in bar\n", +"Tx=15+273 //Temperature before the shock in K\n", +"Py=13.789 //Pressure just after the shock in bar\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"p1=Py/Px //Pressure ratio \n", +"Mx=3.47 //Mach number upstream of shock from normal shock gas tables @p1\n", +"My=0.454 //Mach number downstream of shock from isentropic gas tables @p1\n", +"t1=3.213 //Temperature ratio after and before the shock from gas tables @Mx\n", +"Ty=Tx*t1 //Temperature downstream of shock in K\n", +"p2=15.574 //Stagnation pressure after shock to Static pressure before shock from gas tables @Mx\n", +"Poy=Px*p2 //Stagnation pressure after shock in bar\n", +"ax=sqrt(k*R*Tx) //Velocity of sound before the shock in m/s\n", +"Cx=Mx*ax //Velocity of air before the shock in m/s \n", +"Csh=Cx //Since Csh=Cx, see dig.\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Cy=My*ay //Velocity of air after the shock in m/s\n", +"C_y=Cx-Cy //Air velocity just inside the shock in m/s\n", +"P_y=Py //Pressure of air in bar, Since a powerful explosion creates a brief but intense blast wind as it passes\n", +"a_y=sqrt(k*R*Ty) ////Velocity of sound after the shock in m/s\n", +"M_y=C_y/a_y //Mach number\n", +"\n", +"//Output\n", +"printf('(A)Shock speed is %3.2f m/s\n (B)Air velocity just inside the shock is %3.2f m/s',Cx,C_y)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.18: To_compute_speed_of_wave_pressure_and_temperature_of_air_at_rest.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"T=300 //Temperature in K\n", +"P=1.5 //Pressure in bar\n", +"C_y=150 //Air velocity just inside the shock in m/s\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +" \n", +"//Calculation\n", +"ax=sqrt(k*R*T) //Velocity of sound before the shock in m/s\n", +"Mx=sqrt(((C_y*(k+1))/(2*ax))+1) //Mach number before the shock\n", +"My=0.79 ////Mach number after the shock from normal shock gas tables \n", +"Cx=Mx*ax //Velocity of gas before the shock in m/s\n", +"p1=1.775 //Stagnation pressure ratio after and before the shock from gas tables @My\n", +"Py=P*p1 //Pressure just after the shock in bar\n", +"t1=1.1845 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=T*t1 //Temperature ratio after the shock in K\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Csh=My*ay //Speed of the wave in m/s\n", +"\n", +"//Output \n", +"printf('(A)Speed of the wave is %3.1f m/s\n (B)At rest condition:\n Pressure is %3.4f bar\n Temperature is %3.2f K',Csh,Py,Ty)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.19: To_find_Mach_number_pressure_temperature_at_exit_and_diffuser_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mx=2 //Mach number before the shock\n", +"a1=3 //Diffuser area ratio\n", +"Pox=0.1 //Stagnation pressure before shock in bar\n", +"Tx=300 //Temperature before the shock in K\n", +"k=1.4 //Adiabatic constant \n", +"\n", +"//Calculation\n", +"t1=0.555 //Static to stagnation temperature ratio before shock from isentropic gas tables @Mx,k=1.4\n", +"Tox=Tx/t1 //Stagnation temperature before shock in K\n", +"p1=0.128 //Static to stagnation pressure ratio before shock from isentropic gas tables @Mx,k=1.4\n", +"Px=Pox*p1 //Pressure before the shock in bar\n", +"My=0.577 //Mach number after the shock\n", +"p2=4.5 //Pressure ratio after and before the shock from gas tables @Mx\n", +"Py=Px*p2 //Pressure just after the shock in bar\n", +"t2=1.687 //Temperature ratio after and before the shock from gas tables @Mx\n", +"Ty=Tx*t2 //Temperature ratio after the shock in K\n", +"p3=0.721 //Stagnation pressure ratio after and before shock from gas tables @Mx\n", +"Poy=Pox*p3 //Stagnation pressure after shock in kPa\n", +"a2=1.2195 //Ratio of area after shock to throat area after shock from gas tables @My\n", +"a3=a2*a1 //Ratio of exit area to throat area at exit \n", +"M2=0.16 //Exit mach number from gas tables @a3\n", +"t3=0.9946 //Static to stagnation temperature ratio at exit from isentropic gas tables @Mx\n", +"T2=Tox*t3 //Exit Temperature in K, Since Tox=Toy=T02 in case of diffuser\n", +"p4=0.982 //Static to stagnation pressure ratio at exit from isentropic gas tables @Mx\n", +"P2=Poy*p4 //Exit pressure in bar, Calculation mistake in textbook\n", +"eff=((((Tox/Tx)*(Poy/Pox)^((k-1)/k))-1)/(((k-1)/2)*Mx^2))*100 //Diffuser efficiency including shock in percent\n", +"\n", +"//Output \n", +"printf('(A)At the diffuser exit:\n Mach number is %3.2f\n Pressure is %3.3f bar\n Temperature is %3.2f K\n (B)Diffuser efficiency including shock is %3.3f percent',M2,P2,T2,eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.1: EX5_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Px=150 //Pressure before the shock in kPa\n", +"Tx=25+273 //Temperature before the shock in K\n", +"Py=350 //Pressure just after the shock in kPa\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculations\n", +"p1=Py/Px //Pressure ratio \n", +"Mx=1.4638 //Mach number before the shock\n", +"My=0.716 //Mach number after the shock from gas tables @Mx\n", +"t1=1.294 //Temperature ratio after and before the shock from gas tables @p1\n", +"Ty=t1*Tx //Temperature ratio after the shock in K\n", +"ax=sqrt(k*R*Tx) //Velocity of sound before the shock in m/s\n", +"Cx=ax*Mx //Velocity of gas before the shock in m/s\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Cy=ay*My //Velocity of gas after the shock in m/s\n", +"p2=0.942 //Stagnation pressure ratio after and before the shock from gas tables @p1\n", +"ds=R*log(1/p2) //Change in entropy in J/kg-K\n", +"p3=3.265 //Stagnation pressure after shock to Static pressure before shock from gas tables @p1\n", +"Poy=p3*Px //Stagnation pressure after shock in kPa\n", +"Pox=Poy/p2 //Stagnation pressure before shock in kPa\n", +"pr_loss=Pox-Poy //Loss of stagnation pressure of air in kPa\n", +"dd=(1000/R)*((Py/Ty)-(Px/Tx)) //Increase in density of air in kg/m^3\n", +"\n", +"//Output\n", +"printf('(A)Mach number before shock is %3.4f\n (B)After shock:\n Mach number is %3.3f\n Static temperature is %3.3f K\n Velocity is %3.2f m/s\n (C)Increase in density of air is %3.2f kg/m^3\n (D)Loss of stagnation pressure of air is %3.2f kPa\n (E)Change in entropy is %3.3f J/kg-K',Mx,My,Ty,Cy,dd,pr_loss,ds)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.20: EX5_20.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"k=1.3 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"P1=1 //Inlet pressure in bar\n", +"T1=400 //Inlet temperature in K\n", +"D=0.3 //Duct diameter in m\n", +"M1=2 //Mach number at entry\n", +"Mx=1.5 //Mach number upstream of shock \n", +"M2=1 //Mach number at outlet\n", +"f=0.003 //Friction factor\n", +"\n", +"//Calculation\n", +"d1=P1*10^5/(R*T1) //Density at inlet in kg/m^3\n", +"a1=sqrt(k*R*T1) //Velocity of sound at inlet in m/s \n", +"C1=M1*a1 //Gas velocity at inlet in m/s\n", +"A1=%pi*D^2/4 //Inlet Area of the duct in m^2\n", +"m=d1*C1*A1 //Mass flow rate in kg/s\n", +"p1=0.131 //Static to Stagnation pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"Po1=P1/p1 //Stagantion pressure at inlet in bar\n", +"t1=0.625 //Static to Stagnation temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"To1=T1/t1 //Stagnation temperature at inlet in K\n", +"p2=0.424 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Pt1=P1/p2 //Critical pressure in bar\n", +"p3=1.773 //Stagnation pressure ratio at entry to critical state from gas tables,fanno flow tables @M1,k=1.4\n", +"Pto1=Po1/p3 //Stagnation pressure at critical state in bar \n", +"t2=0.719 //Static to Critical temperature ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Tt1=T1/t2 //Critical temperature in K\n", +"X1=0.357 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"p4=0.618 //Ratio of Static pressure before shock to critical pressure at entry from gas tables (fanno flow,Mx,k=1.4) \n", +"Px=Pt1*p4 //pressure before shock in bar\n", +"t3=0.860 //Ratio of Static temperature before shock to critical temperature at entry from gas tables (fanno flow,Mx,k=1.4) \n", +"Tx=Tt1*t3 //Temperature before shock in K\n", +"p5=1.189 //Ratio of Stagnation pressure before shock to Stagnation pressure at critical state at entry from gas tables (fanno flow,Mx,k=1.4) \n", +"Pox=Pto1*p5 //Stagnation pressure at critical state in bar\n", +"Xx=0.156 //frictional constant fanno parameter from gas tables,fanno flow tables @Mx,k=1.4\n", +"X3=X1-Xx //Overall frictional constant fanno parameter upstream of duct\n", +"L1=(X3*D)/(4*f) //Length upstream of duct in m\n", +"My=0.7 //Mach number downstream of shock from gas tables @Mx\n", +"p6=2.413 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=Px*p6 //Pressure after shock in bar\n", +"t4=1.247 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t4 //temperature after shock in K\n", +"p7=0.926 //Stagnation pressure ratio after and before the shock from gas tables @My\n", +"Poy=Pox*p7 //Stagnation pressure after shock in bar\n", +"p8=1.479 //Ratio of pressure after shock to pressure at critical state from gas tables @My\n", +"Pt=Py/p8 //Critical pressure in bar\n", +"p9=1.097 //Ratio of Stagnation pressure after shock to Stagnation pressure at critical state from gas tables @My\n", +"Pot=Poy/p9 //Stagnation pressure at critical state in bar\n", +"t5=1.071 //Ratio of temperature after shock to temperature at critical state from gas tables @My\n", +"Tt=Ty/t5 //Critical temperature in K\n", +"Xy=0.231 //frictional constant fanno parameter from gas tables,fanno flow tables @My,k=1.4\n", +"X2=0 //frictional constant fanno parameter from gas tables,fanno flow tables @M=1,k=1.4\n", +"X4=Xy-X2 //Overall frictional constant fanno parameter downstream of duct\n", +"L2=(X4*D)/(4*f) //Length downstream of duct in m\n", +"ds1=R*log(Po1/Pox) //Change of entropy upstream of the shock in J/kg-K\n", +"ds2=R*log(Pox/Poy) //Change of entropy across the shock in J/kg-K\n", +"ds3=R*log(Poy/Pot) //Change of entropy downstream of the shock in J/kg-K\n", +"\n", +"//Output\n", +"printf('(A)Length of the duct upstream and downstream of the duct is %3.3f m and %3.3f m respectively\n (B)Mass flow rate of the gas is %3.3f kg/s\n (C)Change of entropy:\n Upstream of the shock is %3.2f J/kg-K\n Across the shock is %3.3f J/kg-K\n Downstream of the shock is %3.4f J/kg-K',L1,L2,m,ds1,ds2,ds3)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.21: EX5_21.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P1=0.685 //Inlet pressure in bar\n", +"T1=310 //Inlet temperature in K\n", +"D=0.6 //Duct diameter in m\n", +"M1=3 //Mach number at entry\n", +"Mx=2.5 //Mach number upstream of shock \n", +"M2=0.8 //Mach number at outlet\n", +"f=0.005 //Friction factor\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"d1=P1*10^5/(R*T1) //Density at inlet in kg/m^3\n", +"a1=sqrt(k*R*T1) //Velocity of sound at inlet in m/s \n", +"C1=M1*a1 //Air velocity at inlet in m/s\n", +"A1=%pi*D^2/4 //Inlet Area of the duct in m^2\n", +"m=d1*C1*A1 //Mass flow rate in kg/s\n", +"p1=0.218 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Pt1=P1/p1 //Critical pressure in bar \n", +"t1=0.428 //Static to Critical temperature ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Tt1=T1/t1 //Critical temperature in K\n", +"X1=0.522 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"p2=0.292 //Ratio of Static pressure before shock to critical pressure at entry from gas tables (fanno flow,Mx,k=1.4)\n", +"Px=Pt1*p2 //pressure before shock in bar\n", +"t2=0.533 //Ratio of Static temperature before shock to critical temperature at entry from gas tables (fanno flow,Mx,k=1.4) \n", +"Tx=Tt1*t2 //Temperature before shock in K\n", +"Xx=0.432 //frictional constant fanno parameter from gas tables,fanno flow tables @Mx,k=1.4\n", +"X3=X1-Xx //Overall frictional constant fanno parameter upstream of duct\n", +"L1=(X3*D)/(4*f) //Length upstream of duct in m\n", +"My=0.513 //Mach number downstream of shock from gas tables @Mx\n", +"p3=7.125 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=Px*p3 //Pressure after shock in bar\n", +"t3=2.138 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t3 //temperature after shock in K\n", +"p4=2.138 //Ratio of pressure after shock to pressure at critical state from gas tables @My\n", +"Pt=Py/p4 //Critical pressure in bar\n", +"t4=1.143 //Ratio of temperature after shock to temperature at critical state from gas tables @My\n", +"Tt=Ty/t4 //Critical temperature in K\n", +"p5=1.289 //Ratio of pressure at exit to pressure at critical state from gas tables @M2\n", +"P2=Pt*p5 //Exit pressure in bar \n", +"t5=1.064 //Ratio of temperature at exit to temperature at critical state from gas tables @M2 \n", +"T2=Tt*t5 //Exit temperature in K\n", +"Xy=1.069 //frictional constant fanno parameter from gas tables,fanno flow tables @My,k=1.4\n", +"X2=0.073 //frictional constant fanno parameter from gas tables,fanno flow tables @M2,k=1.4\n", +"X4=Xy-X2 //Overall frictional constant fanno parameter downstream of duct\n", +"L2=(X4*D)/(4*f) //Length downstream of duct in m\n", +"\n", +"//Output\n", +"printf('(A)Length L1 and L2 are %3.1f m and %3.2f m respectively\n (B)State of air at exit:\n Pressure is %3.3f bar\n Temperature is %3.1f K\n (C)Mass flow rate through the duct is %3.2f kg/s',L1,L2,P2,T2,m)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.22: To_find_properties_after_shock_and_exit_and_exit_Mach_number.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"At=24 //Throat area in cm^2\n", +"A2=50 //Exit area in cm^2\n", +"Po=700 //Stagnation pressure in kPa\n", +"To=100+273 //Stagnation temperature in K\n", +"Ax=34 //Area before the shock in cm^2\n", +"Ay=34 //Area after the shock in cm^2\n", +"\n", +"//Calculation\n", +"a1=Ax/At //Ratio of areas\n", +"Mx=1.78 //Mach number upstream of shock from gas tables @a1\n", +"t1=0.61212 //Ratio of temperature before shock to critical state from isentropic gas tables @Mx\n", +"Tx=To*t1 //temperature before shock in K\n", +"p1=0.179 //Ratio of pressure before shock to critical state from isentropic gas tables @Mx\n", +"Px=Po*p1 //pressure before shock in kPa\n", +"My=0.621 //Mach number downstream of shock from gas tables @Mx\n", +"p2=3.5298 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=Px*p2 //Pressure after shock in kPa\n", +"t2=1.51669 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t2 //temperature after shock in K\n", +"p3=4.578 //Ratio of Stagnation pressure after the shock to static pressure before shock from gas tables @My\n", +"Po2=Px*p3 //Stagnation pressure at exit in bar\n", +"a2=1.16565 //Ratio of area after shock to critical area across shock from isentropic gas tables @My\n", +"At2=Ay/a2 //critical area at exit in cm^2\n", +"a3=A2/At2 //Ratio of areas \n", +"M2=0.36 //Exit mach number from gas tables (a3,k=1.4,isentropic)\n", +"p4=0.914 //Static to Stagnation pressure ratio at exit from gas tables (a3,k=1.4,isentropic) \n", +"P2=Po2*p4 //Stagnation pressure ratio at exit in kPa\n", +"t3=0.975 //Static to Stagnation temperature ratio at exit from gas tables (a3,k=1.4,isentropic)\n", +"T2=To*t3 //Stagnation temperature at exit in K\n", +"\n", +"//Output\n", +"printf('(A)Properties of fluid just after shock:\n Mach number My=%3.3f\n Temperature is %3.2f K\n Pressure is %3.2f kPa\n (B)Exit mach number is %3.2f\n (C)Properties of fluid at exit:\n Pressure is %3i kPa\n Temperature is %3.3f K',My,Ty,Py,M2,P2,T2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.23: To_find_length_diameter_of_pipe_and_properties_at_pipe_exit.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"D=0.4 //Duct diameter in m\n", +"Po=12 //Stagnation pressure in kPa\n", +"To=600 //Stagnation temperature in K\n", +"f=0.0025 //Friction factor\n", +"M1=1.8 //Mach number at entry\n", +"M2=1 //Mach number at outlet\n", +"Mx=1.22 //Mach number upstream of shock \n", +"\n", +"//Calculations\n", +"A2=%pi*D^2/4 //Exit area in cm^2\n", +"p1=0.174 //Static to Stagnation pressure ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"P1=Po*p1 //Inlet pressure in bar\n", +"t1=0.607 //Static to Stagnation temperature ratio at entry from gas tables (M1,k=1.4,isentropic)\n", +"T1=To*t1 //Inlet temperature in K\n", +"a1=1.094 //Ratio of area at exit to critical area across shock from isentropic gas tables @M1,k=1.4\n", +"Ax=A2/a1 //Area before the shock in cm^2\n", +"Dt=sqrt((Ax*4)/(%pi))*10^2 //Duct diameter at throat in cm\n", +"p2=0.474 //Static to Critical pressure ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Pt=P1/p2 //Critical pressure in bar \n", +"t2=0.728 //Static to Critical temperature ratio at inlet from gas tables,fanno flow tables @M1,k=1.4\n", +"Tt=T1/t2 //Critical temperature in K\n", +"X1=0.242 //frictional constant fanno parameter from gas tables,fanno flow tables @M1,k=1.4\n", +"p3=0.788 //Ratio of Static pressure before shock to critical pressure at entry from gas tables (fanno flow,Mx,k=1.4)\n", +"Px=Pt*p3 //pressure before shock in bar\n", +"t3=0.925 //Ratio of Static temperature before shock to critical temperature at entry from gas tables (fanno flow,Mx,k=1.4)\n", +"Tx=Tt*t3 //Temperature before shock in K\n", +"Xx=0.039 //frictional constant fanno parameter from gas tables,fanno flow tables @Mx,k=1.4\n", +"X3=X1-Xx //Overall frictional constant fanno parameter upstream of duct\n", +"L1=(X3*D)/(4*f) //Length upstream of duct in m\n", +"My=0.83 //Mach number downstream of shock from gas tables @Mx\n", +"p4=1.57 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=Px*p4 //Pressure after shock in bar\n", +"t4=1.141 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t4 //temperature after shock in K\n", +"p5=1.2375 //Ratio of pressure after shock to pressure at critical state from gas tables @My\n", +"Pt=Py/p5 //Critical pressure in bar\n", +"t5=1.055 //Ratio of temperature after shock to temperature at critical state from gas tables @My\n", +"Tt=Ty/t5 //Critical temperature in K\n", +"Xy=0.049 //frictional constant fanno parameter from gas tables,fanno flow tables @My,k=1.4\n", +"X2=0 //frictional constant fanno parameter from gas tables,fanno flow tables @M=1,k=1.4\n", +"X4=Xy-X2 //Overall frictional constant fanno parameter downstream of duct\n", +"L2=(X4*D)/(4*f) //Length downstream of duct in m\n", +"L=L1+L2 //Length of duct in m\n", +"\n", +"//Output\n", +"printf('(A)Length of the pipe is %3.2f m\n (B)Diameter of the nozzle throat is %3.3f cm\n (C)At the pipe exit:\n Pressure is %3.3f bar\n Temperature is %3.2f K',L,Dt,Pt,Tt)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.24: To_estimate_amount_of_heat_added_in_two_pipe_section_and_properties.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=700 //Stagnation pressure in kPa\n", +"To=500+273 //Stagnation temperature in K\n", +"a1=3.5 //Ratio of exit area to throat area\n", +"m=5.5 //Mass flow rate in kg/s\n", +"Cp=1.005 //Specific heat capacity at constant pressure in kJ/kg-K\n", +"k=1.4 //Adiabatic constant\n", +"\n", +"//Calculation\n", +"My=1/sqrt(k) //Mach number downstream of shock\n", +"M2=2.8 //Mach number at outlet from gas tables @a1 \n", +"t1=0.389 //Static to Stagnation temperature ratio at exit from gas tables (M1,k=1.4,isentropic)\n", +"T2=To*t1 //Exit temperature in K\n", +"p1=0.0369 //Static to Stagnation pressure ratio at exit from gas tables (M1,k=1.4,isentropic)\n", +"P2=Po*p1 //exit pressure in kPa\n", +"p2=0.2 //Ratio of pressure at exit to pressure at critical state at exit from Rayleigh flow gas tables @M2\n", +"Pt2=P2/p2 //Exit pressure at critical state in kPa\n", +"t2=0.315 //Ratio of temperature at exit to temperature at critical state at exit from Rayleigh flow gas tables @M2\n", +"Tt2=T2/t2 //Exit temperature at critical state in K\n", +"t3=0.674 //Ratio of Stagnation temperature at exit to stagnation temperature at critical state at exit from Rayleigh flow gas tables @M2\n", +"Tto2=To/t3 //Exit stagnation temperature at critical state in K\n", +"Mx=1.2 //Mach number upstream of shock from gas tables @My\n", +"p3=0.796 //Ratio of Static pressure before shock to critical pressure at exit from gas tables (Rayleigh flow,Mx,k=1.4)\n", +"Px=Pt2*p3 //Static pressure before shock in kPa\n", +"t4=0.912 //Ratio of Static temperature before shock to critical temperature at exit from gas tables (Rayleigh flow,Mx,k=1.4)\n", +"Tx=Tt2*t4 //Static temperature before shock in K\n", +"t5=0.978 //Ratio of Stagnation temperature before shock to critical Stagnation temperature at exit from gas tables (Rayleigh flow,Mx,k=1.4)\n", +"Tox=Tto2*t5 //Stagnation temperature before shock in K\n", +"p4=1.513 //Static pressure ratio after and before the shock from gas tables @Mx \n", +"Py=Px*p4 //Pressure after shock in kPa\n", +"t6=1.128 //Temperature ratio after and before the shock from gas tables @Mx\n", +"Ty=Tx*t6 //temperature after shock in K\n", +"t7=0.875 //Ratio of Temperature after the shock to Stagnation temperature after shock from gas tables @Mx \n", +"Toy=Ty/t7 //Stagnation temperature after shock in K,\n", +"p5=1.207 //Ratio of pressure after shock to pressure at critical state from gas tables @My\n", +"Pt=Py/p5 //Critical pressure in kPa\n", +"t8=1.028 //Ratio of temperature after shock to temperature at critical state from gas tables @My\n", +"Tt=Ty/t8 //Critical temperature in K\n", +"t9=0.978 //Ratio of Stagnation temperature after shock to Stagnation temperature at critical state from gas tables @My\n", +"Tot=Toy/t9 //Stagnation temperature at critical state in K, calculation mistake in textbbok \n", +"q1=Cp*(Tox-To) //Amount of heat added in upstream of shock in kJ/s\n", +"q2=Cp*(Tot-Toy) //Amount of heat added in downstream of shock in kJ/s\n", +"Q=m*(q1+q2) //Amount of heat added in two pipe section in kJ/s\n", +"\n", +"//Output\n", +"printf('(A)Amount of heat added in two pipe section is %3.2f kJ/s\n (B)Properties:\n Upstream of shock:\n Pressure is %3.1f kPa\n Temperature is %3.3f K\n Stagnation temperature is %3.2f K\n Mach number is %3.1f\n Downstream of shock:\n Pressure is %3.3f kPa\n Temperature is %3.3f K\n Stagnation temperature is %3.1f K\n Mach number is %3.3f\n At the throat:\n Pressure is %3.2f kPa\n Temperature is %3.3f K\n Stagnation temperature is %3.2f K\n At the exit:\n Pressure is %3.2f kPa\n Temperature is %3.2f K\n Mach number is %3.2f',Q,Px,Tx,Tox,Mx,Py,Ty,Toy,My,Pt,Tt,Tot,P2,T2,M2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.25: EX5_25.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M1=2.8 //Inlet mach number \n", +"sig=42 //Shock wave angle in degree\n", +"Px=1 //Pressure upstream of shock in bar(Assuming)\n", +"k=1.4 //Adiabatic constant \n", +"\n", +"//Calculations\n", +"Mx=M1*sind(sig) //Mach number before the shock\n", +"My=0.601 //Mach number after the shock from gas tables @Mx\n", +"p1=3.98 //Static pressure ratio after and before the shock from gas tables @Mx \n", +"Py=Px*p1 //Pressure after shock in bar\n", +"p2=4.994 //Stagnation pressure after shock to Static pressure before shock from gas tables @Mx\n", +"Poy=Px*p2 //Stagnation pressure after shock in bar\n", +"p3=0.788 //Stagnation pressure ratio after and before the shock from gas tables @Mx\n", +"Pox=Poy/p3 //Stagnation pressure before shock in kPa\n", +"dPl=Pox-Poy //Total pressure loss in bar\n", +"def=atand(((M1^2*sind(2*sig))-(2/tand(sig)))/(2+(M1^2*(k+cosd(2*sig))))) //Deflection angle in degree\n", +"M2=My/(sind(sig-def)) //Downstream mach number\n", +"\n", +"//Output \n", +"printf('(A)Deflection angle is %3i degree\n (B)Downstream mach number is %3.3f\n (C)Static pressure is %3.3f bar\n (D)Total pressure loss is %3.3f bar',def,M2,Py,dPl)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.26: To_determine_static_pressure_temperature_behind_wave_Mach_number_and_Wedge_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M1=2 //Inlet mach number \n", +"sig=40 //Shock wave angle in degree\n", +"Px=0.5 //Pressure upstream of shock in bar\n", +"Tx=273 //Temperature upstream of shock in K\n", +"k=1.4 //Adiabatic constant \n", +"\n", +"//Calculation\n", +"Mx=M1*sind(sig) //Mach number before the shock\n", +"My=0.796 //Mach number after the shock from gas tables @Mx\n", +"p1=1.745 //Static pressure ratio after and before the shock from gas tables @Mx \n", +"Py=p1*Px //Pressure after shock in bar\n", +"t1=1.178 //Static temperature ratio after and before the shock from gas tables @Mx \n", +"Ty=Tx*t1 //Temperature after shock in K\n", +"Ws=atand(((M1^2*sind(2*sig))-(2/tand(sig)))/(2+(M1^2*(k+cosd(2*sig))))) //Wedge semi angle in degree\n", +"W=2*Ws //Wedge angle in degree\n", +"\n", +"//Output\n", +"printf('(A)Static pressure is %3.4f bar\n (B)Temperature behind the wave is %3.2f K\n (C)Mach number of flow passing over wedge is %3.3f\n (D)Wedge angle is %3.2f degree',Py,Ty,Mx,W)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.27: To_find_property_ratios_at_strong_and_weak_shock_at_wedge.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"def=15\n", +"M1=2\n", +"k=1.4\n", +"\n", +"//Calculation\n", +"//Using relation def=atand(((M1^2*sind(2*sig))-(2/tand(sig)))/(2+(M1^2*(k+cosd(2*sig))))) and converting into 6th degree polynomial of sind(sig)=x\n", +"C=((2*tand(def))+((M1^2)*k*tand(def))+((M1^2)*tand(def))) //Constant value for convenience\n", +"D=(2*M1^2*tand(def)) //Constant value for convenience\n", +"a=4 //Value of constant in polynomial \n", +"b=0 //Coefficient of power 1 i.e. x^1\n", +"c=(4+C^2+(8*M1^2)) //Coefficient of power 2 i.e. x^2\n", +"d=0 //Coefficient of power 3 i.e. x^3\n", +"e=(4*(M1^4))+(2*C*D)+(8*M1^2) //Coefficient of power 4 i.e. x^4\n", +"f=0 //Coefficient of power 5 i.e. x^5\n", +"g=(4*M1^4)+D^2 //Coefficient of power 6 i.e. x^6\n", +"p4=poly([a b -c -d e f -g],'x','c') //Expression for solving 6th degree polynomial\n", +"disp('Values for sine of wave angle are:\n')\n", +"disp(roots(p4))\n", +"sig1=asind(0.9842) //Strong shock wave angle in degree, nearer to 90 degree\n", +"sig2=asind(0.7113) //Weak shock wave angle in degree, nearer to 45 degree\n", +"//(a)Strong Shock Wave\n", +"Mx_1=M1*sind(sig1) //Mach number before the shock of stong shock wave\n", +"My_1=0.584 //Mach number after the shock from gas tables @Mx_1\n", +"p1=4.315 //Static pressure ratio after and before the shock from gas tables @Mx_1\n", +"t1=1.656 //Static temperature ratio after and before the shock from gas tables @Mx_1\n", +"d1=p1/t1 //Density ratio after and before the shock of stong shock wave\n", +"M2_1=My_1/(sind(sig1-def)) //Exit mach number of stong shock wave\n", +"Mx_2=M1*sind(sig2) //Mach number before the shock of weak shock wave\n", +"My_2=0.731 //Mach number after the shock from gas tables @Mx_2\n", +"p2=2.186 //Static pressure ratio after and before the shock from gas tables @Mx_2\n", +"t2=1.267 //Static temperature ratio after and before the shock from gas tables @Mx_2\n", +"d2=p2/t2 //Density ratio after and before the shock of weak shock wave\n", +"M2_2=My_2/(sind(sig2-def)) //Exit mach number of weak shock wave\n", +"\n", +"//Output \n", +"printf('\nStrong Shock Wave:\n (A)Wave angle is %3.1f degree\n (B)Pressure ratio is %3.3f\n (C)Density ratio is %3.3f\n (D)Temperature ratio is %3.3f\n (E)Downstream Mach number is %3.3f\n Weak Shock Wave:\n (A)Wave angle is %3.1f degree\n (B)Pressure ratio is %3.3f\n (C)Density ratio is %3.3f\n (D)Temperature ratio is %3.3f\n (E)Downstream Mach number is %3.3f',sig1,p1,d1,t1,M2_1,sig2,p2,d2,t2,M2_2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.28: To_find_deflection_angle_final_Mach_number_and_temperature_of_gas.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"k=1.3 //Adiabatic constant \n", +"P1=0.345 //Inlet pressure in bar\n", +"T1=350 //Inlet temperature in K\n", +"M1=1.5 //Inlet mach number \n", +"P2=0.138 //Exit pressure in bar\n", +"\n", +"//Calculation\n", +"p1=0.284 //Pressure ratio at entry from gas tables @M1,k=1.3\n", +"Po=P1/p1 //Stagnation Pressure in bar\n", +"t1=0.748 //Temperature ratio at entry from gas tables @M1,k=1.3\n", +"To=T1/t1 //Stagnation temperature in K\n", +"p2=P2/Po //Pressure ratio\n", +"M2=2.08 //Final Mach number from isentropic gas tables @p2\n", +"t2=0.606 //Temperature ratio at exit from gas tables @M2,k=1.3\n", +"T2=To*t2 //The temperature of the gas in K\n", +"w1=12.693 //Prandtl Merger function at M1 \n", +"w2=31.12 //Prandtl Merger function at M2\n", +"def=w2-w1 //Deflection Angle in degree\n", +"\n", +"//Output\n", +"printf('(A)Deflection Angle is %3.3f degree\n (B)Final Mach number is %3.2f\n (C)The temperature of the gas is %3.3f K',def,M2,T2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.2: To_find_properties_across_normal_shock_and_entropy_change.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Tx=350 //Temperature before the shock in K\n", +"Px=137.8 //Pressure before the shock in kPa\n", +"Cx=750 //Velocity before the shock in m/s\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"ax=sqrt(k*R*Tx) //Velocity of sound before the shock in m/s\n", +"Mx=Cx/ax //Mach number before the shock\n", +"My=0.577 //Mach number after the shock from gas tables @Mx\n", +"p1=4.5 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=Px*p1 //Static pressure after shock in kPa\n", +"t1=1.687 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t1 //Temperature ratio after the shock in K\n", +"p2=5.641 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"Poy=Px*p2 //Stagnation pressure after shock in kPa\n", +"p3=0.721 //Stagnation pressure ratio after and before the shock from gas tables @My\n", +"Pox=Poy/p3 //Stagnation pressure before shock in kPa\n", +"ds=R*log(1/p3) //Change in entropy in J/kg-K\n", +"t2=0.555 //Static to Stagnation temperature ratio before shock from isentropic gas tables @Mx,k=1.4\n", +"Tox=Tx/t2 //Stagnation temperature before shock in K\n", +"p4=0.128 //Static to Stagnation pressure ratio from isentropic gas tables @Mx,k=1.4\n", +"Pox=Px/p4 //Stagnation pressure in kPa\n", +"t4=0.937 //Static to Stagnation temperature ratio before shock from normal shock gas tables @Mx,k=1.4 (Tox=Toy Checked)\n", +"Toy=Ty/t4 //Stagnation temperature after shock in K\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Cy=(My*ay) //Velocity of gas after the shock in m/s\n", +"\n", +"//Output\n", +"printf('(A)At inlet to shock:\n Stagnation pressure is %3.1f kPa\n Stagnation temperature is %3.2f K\n Mach number is %3.0f\n (B)After shock:\n Stagnation pressure is %3.2f kPa\n Stagnation temperature is %3.2f K\n Static pressure is %3.1f kPa\n Static temperature is %3.2f K\n Mach number is %3.3f\n Velocity is %3.2f m/s\n (C)Change in entropy across the shock is %3.2f J/kg-K',Pox,Tox,Mx,Poy,Toy,Py,Ty,My,Cy,ds)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.3: To_find_properties_downstream_of_shock.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Tx=0+273 //Temperature before the shock in K\n", +"Px=60 //Pressure before the shock in kPa\n", +"Cx=497 //Air Velocity before the shock in m/s\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"ax=sqrt(k*R*Tx) //Velocity of sound before the shock in m/s\n", +"Mx=Cx/ax //Mach number before the shock\n", +"My=0.70109 //Mach number after the shock from gas tables @Mx\n", +"p1=2.45833 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py= p1*Px //Static pressure after shock in kPa\n", +"t1=1.32022 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t1 //Temperature ratio after the shock in K\n", +"p2=3.41327 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"Poy=p2*Px //Stagnation pressure after shock in kPa\n", +"p3=0.92979 //Stagnation pressure ratio after and before the shock from gas tables @My\n", +"Pox=Poy/p3 //Stagnation pressure before shock in kPa\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Cy=ay*My //Velocity of air after the shock in m/s\n", +"\n", +"//Output\n", +"printf('After shock:\n (A)Mach number is %3.5f\n (B)Velocity is %3.3f m/s\n (C)Stagnation pressure is %3.3f kPa\n',My,Cy,Poy)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.4: To_find_velocities_across_shock_and_stagnation_pressure_change.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Px=30 //Pressure before the shock in kPa\n", +"Tx=-30+273 //Temperature before the shock in K\n", +"pr=2.6 //Pressure ratio across the shock wave\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"Mx=1.54 //Mach number before the shock from gas tables @pr\n", +"My=0.687 //Mach number after the shock from gas tables @Mx\n", +"t1=1.347 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=t1*Tx //Temperature ratio after the shock in K\n", +"p1=3.567 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"Poy=p1*Px //Stagnation pressure after shock in kPa\n", +"p2=0.917 //Stagnation pressure ratio after and before the shock from gas tables @My\n", +"Pox=Poy/p2 //Stagnation pressure before shock in kPa\n", +"dP=Pox-Poy //Change in stagnation pressure in kPa\n", +"ax=sqrt(k*R*Tx) //Velocity of sound before the shock in m/s\n", +"Cx=(Mx*ax) //Air Velocity before the shock in m/s\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Cy=(My*ay) //Velocity of air after the shock in m/s\n", +"\n", +"//Output\n", +"printf('(A)Velocities upstream and downstream of shock wave are %3.2f m/s and %3.2f m/s respectively\n (B)Change in stagnation pressure is %3.3f kPa',Cx,Cy,dP)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.5: To_find_properties_downstream_of_shock.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mol=39.9 //Molar mass of a gas in kg/mol\n", +"k=1.67 //Specific heat ratio \n", +"Mx=2.5 //Mach number before the shock \n", +"Px=40 //Pressure before the shock in kPa \n", +"Tx=-20+273 //Temperature before the shock in K\n", +"\n", +"//Calculation\n", +"My=0.554 //Mach number after the shock from gas tables @Mx\n", +"p1=7.567 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=p1*Px //Static pressure after shock in kPa\n", +"t1=2.805 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t1 //Temperature ratio after the shock in K\n", +"\n", +"//Output\n", +"printf('Downstream the normal shock:\n Mach number is %3.3f\n Pressure is %3.2f kPa\n Temperature is %3.3f K',My,Py,Ty)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.6: To_find_pressure_acting_on_front_of_the_body.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mx=2 //Mach number before the shock \n", +"Px=50 //Pressure before the shock in kPa \n", +"\n", +"//Calculation\n", +"p1=6.335 //Stagnation pressure after shock to Static pressure before shock from gas tables @Mx\n", +"Poy=p1*Px //Stagnation pressure after shock in kPa\n", +"\n", +"//Output\n", +"printf('Pressure acting on the front of the body is %3.2f kPa',Poy)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.7: To_find_mass_flow_rate_and_properties_at_exit_of_CD_nozzle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Po=800 //Pressure in reservoir in kPa\n", +"To=40+273 //Temperature in reservoir in K\n", +"M2a=2.5 //Mach number at exit from diagram\n", +"At=25 //Throat Area in cm^2 \n", +"Ax=40 //Area just before the shock in cm^2\n", +"Ay=40 //Area just after the shock in cm^2\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"t1=0.834 //Ratio of critical temperature and stagnation temperature from gas tables @M=1\n", +"Tt=To*t1 //Critical temperature in K\n", +"p1=0.528 //Ratio of critical pressure and stagnation pressure from gas tables @M=1\n", +"Pt=Po*p1 //Critical pressure in kPa\n", +"dt=Pt*10^3/(R*Tt) //Density in kg/m^3, Pt in Pa\n", +"at=sqrt(k*R*Tt) //Velocity of sound at throat in m/s\n", +"Ct=at //Air Velocity of sound at throat in m/s\n", +"m=dt*At*10^-4*Ct //Mass flow rate in kg/s\n", +"p2=0.0585 //Ratio of exit to stagnation pressure from isentropic gas tables @M2=2.5\n", +"a1=2.637 //Ratio of exit to critical area from isentropic gas tables @M2=2.5\n", +"A2=a1*At //Exit area in cm^2\n", +"a2=Ax/At //Area ratio\n", +"M=1.94 //Mach number upstream of shock from gas tables @a2\n", +"p3=0.140 //Ratio of upstram of shock to stagnation pressures from isentropic gas tables @M\n", +"Px=p3*Po //Pressure upstram of shock in kPa\n", +"t2=0.570 //Ratio of upstram of shock to stagnation temperature from isentropic gas tables @M\n", +"Tx=t2*To //Temperature upstram of shock in K\n", +"My=0.588 //Mach number downstream of shock from normal shock gas tables @M\n", +"p4=4.225 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=Px*p4 //Static pressure after shock in kPa\n", +"t3=1.639 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t3 //Temperature ratio after the shock in K\n", +"p5=2.338 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"Poy=p5*Px //Stagnation pressure after shock in kPa\n", +"p6=0.749 //Stagnation pressure ratio after and before the shock from gas tables @My\n", +"Pox=Poy/p6 //Stagnation pressure before shock in kPa \n", +"//Here At2=Aty, Po2=Poy, Toy=To2=To1=To\n", +"p7=0.79 //Static to stagnation pressure ratio after shock from isentropic gas tables @My\n", +"Po2=Py/p7 //Stagnation pressure at exit in kPa\n", +"t4=0.935 //Static to stagnation temperature ratio after shock from isentropic gas tables @My\n", +"To2=Ty/t4 //Stagnation temperature in K (checked)\n", +"a3=1.2 //Ratio of areas after shock i.e. (Ay/At2)\n", +"At2=Ay/a3 //Critical area after shock in cm^2\n", +"a4=A2/At2 //Ratio of areas \n", +"M2b=0.31 //Mach number at exit from gas tables @a4(as per section-b)\n", +"p8=0.936 //Static to stagnation pressure ratio at exit from isentropic gas tables @M2b\n", +"P2=Po2*p8 //Exit pressure in kPa\n", +"t5=0.981 //Static to stagnation temperature ratio after shock from isentropic gas tables @M2b\n", +"T2=To2*t5 //Exit temperature in K\n", +"\n", +"//Output\n", +"printf('CASE-I:\n (A)Mass flow rate is %3.2f kg/s\n (B)Exit area is %3.1f cm^2\n CASE-II:\n (A)Temperature is %3.3f K\n (B)Pressure is %3.1f kPa',m,A2,T2,P2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.8: To_find_properties_upstream_of_wave_front.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Px=1 //Pressure before the shock in bar\n", +"Tx=17+273 //Temperature before the shock in K\n", +"Cx=500 //Air Velocity before the shock in m/s\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"ax=sqrt(k*R*Tx) //Velocity of sound before the shock in m/s\n", +"Mx=Cx/ax //Mach number before the shock \n", +"My=0.715 //Mach number after the shock from gas tables @Mx\n", +"p1=2.335 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=p1*Px //Static pressure after shock in bar\n", +"t1=1.297 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t1 //Temperature ratio after the shock in K\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Cy=ay*My //Velocity of air after the shock in m/s\n", +"C_y=Cx-Cy //Velocity of air in m/s\n", +"M_y=C_y/ay //Mach number impared upstream of the wave front\n", +"t2=0.939 //Static to stagnation temperature ratio after shock from isentropic gas tables @M_y\n", +"T_oy=Ty/t2 //Stagnation temperature of air in K\n", +"\n", +"//Output\n", +"printf('(A)Pressure is %3.3f bar\n (B)Temperature is %3.2f K\n (C)Velocity of air is %3.2f m/s\n (D)Stagnation temperature is %3.2f K\n (E)Mach number is %3.3f',Py,Ty,C_y,T_oy,M_y)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5.9: EX5_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mx=3 //Mach number before the shock \n", +"Tx=27+273 //Temperature before the shock in K\n", +"Px=1 //Pressure before the shock in bar\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +" \n", +"//Calculation\n", +"My=0.475 //Mach number after the shock from gas tables @Mx\n", +"p1=10.333 //Static pressure ratio after and before the shock from gas tables @My\n", +"Py=p1*Px //Static pressure after shock in bar\n", +"t1=2.679 //Temperature ratio after and before the shock from gas tables @My\n", +"Ty=Tx*t1 //Temperature ratio after the shock in K\n", +"p2=12.061 //Stagnation pressure after shock to Static pressure before shock from gas tables @My\n", +"Poy=p2*Px //Stagnation pressure after shock in bar\n", +"p3=0.328 //Stagnation pressure ratio after and before the shock from gas tables @My\n", +"Pox=Poy/p3 //Stagnation pressure before shock in kPa\n", +"ay=sqrt(k*R*Ty) //Velocity of sound after the shock in m/s\n", +"Cy=ay*My //Velocity of air after the shock in m/s\n", +"ds=R*log(1/p3) //Change in entropy in J/kg-K\n", +"e=(Py-Px)/Px //Strength of shock\n", +"\n", +"//Output\n", +"printf('(I)Downstream of the shock:\n (A)Pressure is %3.3f bar\n (B)Temperature is %3.1f K\n (C)Gas velocity is %3.2f m/s\n (D)Mach number is %3.3f\n (II)Total head pressure ratio is %3.3f\n (III)Entropy change across the shock is %3.3f J/kg-K\n (IV)Strength of the shock is %3.3f',Py,Ty,Cy,My,p3,ds,e) " + ] + } +], +"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 +} diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/6-Aircraft_Propulsion_.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/6-Aircraft_Propulsion_.ipynb new file mode 100644 index 0000000..71a14aa --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/6-Aircraft_Propulsion_.ipynb @@ -0,0 +1,925 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6: Aircraft Propulsion " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.10: EX6_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"h=3000 //Altitude in m\n", +"Pi=0.701 //Inlet pressure in bar\n", +"Ti=268.65 //Inlet temperature in K\n", +"u=525*(5/18) //Flight velocity in m/s\n", +"eff_d=0.875 //Diffuser efficiency\n", +"eff_c=0.79 //Compressor efficiency\n", +"C1=90 //Velocity of air at compressor in m/s\n", +"dTc=230 //Temperature rise through compressor\n", +"k=1.4 //Adiabatic constant of air\n", +"Cp=1005 //Specific heat capacity at constant pressure of air in J/kg-K\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"ai=sqrt(k*R*Ti) //Sound velocity in m/s\n", +"Mi=u/ai //Inlet mach number \n", +"Toi=(1+((0.5*(k-1)*Mi^2)))*Ti //Stagnation temperature at diffuser inlet in K\n", +"To1=Toi //Inlet Stagnation temperature of compressor in K, since hoi=ho1 \n", +"T1=To1-(C1^2/(2*Cp)) //Temperature at inlet of compressor in K\n", +"P1=Pi*((1+(eff_d*((T1/Ti)-1)))^(k/(k-1))) //Inlet pressure of compressor in bar\n", +"dPc=P1-Pi //Pressure rise through inlet diffuser in bar\n", +"pr_c=(((eff_c*dTc)/To1)+1)^(k/(k-1)) //Pressure ratio of compressor\n", +"P=Cp*(dTc) //Power required by the compressor in kW/(kg/s)\n", +"eff=1-(1/pr_c^((k-1)/k)) //Air standard efficiency\n", +"\n", +"//Output\n", +"printf('(A)Pressure rise through diffuser is %3.4f bar\n (B)Pressure developed by compressure is %3.4f bar\n (C)Air standard efficiency of the engine is %3.4f',dPc,P1,eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.11: To_estimate_diameter_power_output_AFR_and_absolute_velocity_of_the_jet.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"h=9500 //Altitude in m\n", +"u=800*(5/18) //Flight velocity in m/s\n", +"eff_prop=0.55 //Propulsive efficiency of the cycle\n", +"eff_o=0.17 //Overall efficiency\n", +"F=6100 //Thrust in N\n", +"d=0.17 //Density in kg/m^3\n", +"CV=46000 //Calorific value in kJ/kg\n", +"\n", +"//Calculation\n", +"mf=(F*u)/(eff_o*CV*10^3) //Mass flow rate of fuel in kg/s\n", +"Cj=((2*u)/(eff_prop))-u //Jet velocity in m/s, wrong calculation in textbook\n", +"Ca=Cj-u //Absolute Jet velocity in m/s\n", +"ma=(F-(mf*Cj))/(Ca) //Mass flow rate of air in kg/s\n", +"m=ma+mf //Mass flow rate of gas in kg/s\n", +"f=ma/mf //Air fuel ratio\n", +"Q=m/d //Volume flow rate in m^3/s\n", +"Dj=sqrt((4*Q)/(%pi*Cj))*10^3 //Diameter of jet in mm, Cj value wrong in textbook \n", +"P=((F*u)/eff_prop)*10^-3 //Power output of engine in kW\n", +"\n", +"//Output\n", +"printf('(A)Diamter of the jet is %3.1f mm\n (B)Power output is %3.1f kW\n (C)Air-fuel ratio is %3.3f\n (D)Absolute velocity of the jet is %3i m/s\n',Dj,P,f,Ca)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.12: EX6_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=960*(5/18) //Flight velocity in m/s\n", +"ma=40 //Mass flow rate of air in kg/s\n", +"AFR=50 //Air fuel ratio\n", +"sig=0.5 //Jet speed ratio, for maximum thrust power\n", +"CV=43000 //Calorific value in kJ/kg\n", +"\n", +"//Calculation\n", +"mf=ma/AFR //Mass flow rate of fuel in kg/s\n", +"m=ma+mf //Mass flow rate of gas in kg/s\n", +"Cj=u/sig //Jet velocity in m/s\n", +"F=((m*Cj)-(ma*u))*10^-3 //Thrust in kN\n", +"Fs=F*10^3/m //Specific thrust in Ns/kg, F in N\n", +"Pt=F*u //Thrust power in kW\n", +"eff_prop=((2*sig)/(1+sig))*100 //Propulsive efficiency of the cycle in %\n", +"eff_ther=((0.5*m*(Cj^2-u^2))/(mf*CV*10^3))*100 //Efficiency of turbine in %\n", +"eff=(eff_prop/100)*(eff_ther/100)*100 //Overall efficiency in %\n", +"TSFC=mf*3600/(F*10^3) //Thrust specific fuel consumption in kg/Nhr\n", +"\n", +"//Output\n", +"printf('(A)Jet velocity is %3.1f m/s\n (B)Thrust is %3.3f kN\n (C)Specific thrust is %3.2f N-s/kg\n (D)Thrust power is %3.2f kW\n (E)propulsive, thermal and overall efficiency is %3.2f, %3.2f and %3.3f respectively\n (F)Thrust specific fuel consumption is %3.4f kg/Nhr',Cj,F,Fs,Pt,eff_prop,eff_ther,eff,TSFC)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.13: To_jet_velocity_fuel_rate_TSFC_propulsive_power_and_efficiencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=960*(5/18) //Flight velocity in m/s\n", +"ma=54.5 //Mass flow rate of air in kg/s\n", +"dh=200 //Change of enthalpy for nozzle in kJ/kg\n", +"Cv=0.97 //Velocity coefficient \n", +"AFR=75 //Air fuel ratio \n", +"eff_cc=0.93 //Combustion efficiency\n", +"CV=45000 //Calorific value in kJ/kg\n", +"\n", +"//Calculation\n", +"mf=ma/AFR //Mass flow rate of fuel in kg/s\n", +"Cj=Cv*sqrt(2*dh*10^3) //Jet velocity in m/s\n", +"F=ma*(Cj-u) //Thrust in kN\n", +"TSFC=mf*3600/(F) //Thrust specific fuel consumption in kg/Nhr\n", +"HS=mf*eff_cc*CV //Heat supplied in kJ/s\n", +"Pp=0.5*ma*(Cj^2-u^2)*10^-3 //Propulsive power in kW\n", +"Pt=F*u //Thrust power in kW\n", +"eff_p=Pt/(Pp*10^3) //Propulsive efficiency of the cycle\n", +"eff_t=Pp/HS //Efficiency of turbine\n", +"eff_o=Pt*10^-3/HS //Overall efficiency\n", +"\n", +"//Output\n", +"printf('(A)Exit velocity of the jet is %3.2f m/s\n (B)Fuel rate is %3.4f kg/s\n (C)Thrust specific fuel consumption is %3.5f kg/Nhr\n (D)Thermal efficiency is %3.3f\n (E)Propulsive power is %3.2f kW\n (F)Propulsive efficiency is %3.4f\n (G)Overall efficiency is %3.5f',Cj,mf,TSFC,eff_t,Pp,eff_p,eff_o)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.14: EX6_14.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=750*(5/18) //Flight velocity in m/s\n", +"h=10000 //Altitude in m\n", +"eff_p=0.5 //Propulsive efficiency of the cycle\n", +"eff_o=0.16 //Overall efficiency\n", +"d=0.173 //Density in kg/m^3\n", +"F=6250 //Thrust in N\n", +"CV=45000 //Calorific value in kJ/kg\n", +"\n", +"//Calculation\n", +"sig=eff_p/(2-eff_p) //Jet speed ratio\n", +"Cj=u/sig //Jet velocity in m/s\n", +"Ca=Cj-u //Absolute Jet velocity in m/s\n", +"ma=F/Ca //Mass flow rate of air in kg/s\n", +"Q=ma*60/d //Volume flow rate in m^3/min\n", +"A=Q/(Cj*60) //Area of flow in m^2\n", +"D=sqrt((4*A)/(%pi))*10^3 //Diameter in mm\n", +"Pt=F*u //Thrust power in W\n", +"Pp=(Pt/eff_p)*10^-3 //Propulsive power in kW\n", +"eff_t=eff_o/eff_p //Efficiency of turbine\n", +"HS=Pp/eff_t //Heat supplied in kJ/s\n", +"mf=HS/CV //Mass flow rate of fuel in kg/s\n", +"AFR=ma/mf //Air fuel ratio \n", +"\n", +"//Output\n", +"printf('(A)Absolute velocity of the jet is %3.2f m/s\n (B)Volume of air compressed per minute is %3.2f m^3/min\n (C)Diameter of the jet is %3i mm\n (D)Power unit of the unit is %3.3f kW\n (E)Air fuel ratio is %3.1f',Ca,Q,D,Pp,AFR)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.15: To_estimate_AFR_nozzle_thrust_propeller_thrust_and_mass_flow_rate.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P1=0.56 //Inlet pressure of compressor in bar\n", +"T1=260 //Temperature at inlet of compressor in K\n", +"pr_c=6 //Pressure ratio of compressor\n", +"eff_c=0.85 //Compressor efficiency\n", +"u=360*(5/18) //Flight velocity in m/s\n", +"D=3 //Propeller diameter in m \n", +"eff_p=0.8 //Efficiency of propeller \n", +"eff_g=0.95 //Gear reduction efficiency \n", +"pr_t=5 //Expansion ratio\n", +"eff_t=0.88 //Turbine efficiency\n", +"T3=1100 //temperature at turbine inlet in K\n", +"eff_n=0.9 //Nozzle efficiency \n", +"Cp=1005 //Specific heat capacity at constant pressure of air in J/kg-K\n", +"CV=40000 //Calorific value in kJ/kg\n", +"k=1.4 //Adiabatic constant of air\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"P2=pr_c*P1 //Exit pressure of compressor in bar\n", +"T2s=T1*(pr_c)^((k-1)/k) //Exit temperature of compressor at isentropic proces in K\n", +"T2=T1+((T2s-T1)/eff_c) //Exit temperature of compressor in K\n", +"Wc=Cp*(T2-T1)*10^-3 //Power input to compressor in kJ/kg of air\n", +"C1=u //Air velocity in m/s, since C1 is resultant of u\n", +"C=C1/eff_p //Average velocity in m/s\n", +"C2=(2*C)-C1 //Exit velocity from compressor in m/s\n", +"Ap=0.25*%pi*D^2 //Area of propeller passage in m^2\n", +"Q=Ap*C //Quantity of air inducted in m^3/s\n", +"mf=((T3-T2)*Cp)/((CV*10^3)-(Cp*T3)) //Mass flow rate of fuel in kg/s\n", +"f=mf //Fuel consumption in kg/kg of air\n", +"AFR=1/mf //Air fuel ratio\n", +"P3=P2 //Exit pressure of combustion chamber in bar, Since process is at constant pressure \n", +"P4=P3/pr_t //Exit pressure of turbine in bar\n", +"T4s=T3/((pr_t)^((k-1)/k)) //Exit temperature of turbine at isentropic proces in K, wrong calculation\n", +"T4=T3-(eff_t*(T3-T4s)) //Exit temperature of turbine in K\n", +"Po=(1+f)*Cp*(T3-T4)*10^-3 //Power output per kg of air in kJ/kg of air\n", +"Pa=Po-Wc //Power available for propeller in kJ/kg of air\n", +"Pe=P1 //Exit pressure in bar, Since exit is at ambient conditions\n", +"Tes=T4/((P4/Pe)^((k-1)/k)) //Exit temperature of nozzle at isentropic proces in K\n", +"Cj=sqrt(2*Cp*eff_n*(T4-Tes)) //Jet velocity in m/s\n", +"Fs=((1+f)*Cj)-u //Specific thrust in Ns/kg, F in N\n", +"Pp=((0.5*P1*10^5*Q*(C2^2-C1^2))/(R*T1))*10^-3 //Propulsive power by propeller in kJ/s\n", +"Ps=Pp/eff_g //Power supplied by the turbine in kW\n", +"ma=Ps/Pa //Air flow rate in kg/s\n", +"Fj=ma*Cj*10^-3 //Jet thrust in kN, calculation mistake\n", +"Fp=(Pp*eff_p)/u //Thrust produced by propeller in kN\n", +"\n", +"//Output\n", +"printf('(A)Air fuel ratio is %3.2f\n (B)Thrust produced by the nozzle is %3.3f kN\n (C)Thrust by the propeller is %3.3f kN\n (D)mass flow rate through the compressor is %3.2f kg/s',AFR,Fj,Fp,ma)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.16: To_find_various_parameters_of_ramjet_engine_through_out_its_operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M1=1.5 //Mach number \n", +"h=6500 //Altitude in m\n", +"D=0.5 //Diameter in m \n", +"To4=1600 //Stagnation temperature at nozzle inlet in K\n", +"CV=40000 //Calorific value in kJ/kg\n", +"k=1.4 //Adiabatic constant of air\n", +"R=287 //Specific gas constant in J/kg-K\n", +"eff_d=0.9 //Diffuser efficiency \n", +"eff_cc=0.98 //Combustion efficiency\n", +"eff_n=0.96 //Nozzle efficiency \n", +"pr_l=0.02 //Pressure ratio i.e. Stagnation pressure loss to Exit presure of compressor\n", +"Cp=1005 //Specific heat capacity at constant pressure of air in J/kg-K\n", +"\n", +"//Calculation\n", +"P1=0.44 //Inlet pressure of compressor in bar\n", +"T1=245.9 //Temperature at inlet of compressor in K\n", +"a1=314.5 //Sound velocity at compressor in m/s \n", +"d1=0.624 //Density at compressor in kg/m^3 \n", +"A1=0.25*%pi*D^2 //Area at diffuser inlet in m^2\n", +"u1=M1*a1 //Flight velocity in m/s\n", +"ma=d1*A1*u1 //Mass flow rate of air in kg/s\n", +"To2=T1*(1+(((k-1)/2)*M1^2)) //Stagnation temperature at commpressor inlet in K\n", +"To1=To2 //Stagnation temperature at commpressor outlet in K, (It is in case of diffuser)\n", +"pr_d=((eff_d*(((k-1)/2)*M1^2))+1)^(k/(k-1)) //Pressure ratio of diffuser \n", +"P2=pr_d*P1 //Exit pressure of compressor in bar\n", +"Po2=P2 //Stagnation pressure at exit of compressor in bar \n", +"Po3=(Po2-(pr_l*Po2)) //Stagnation pressure at exit of combustion chamber in bar \n", +"Poe=P1 //Exit stagnation pressure in kPa, Since exit is at ambient conditions\n", +"pr_n=Po3/Poe //Pressure ratio of nozzle\n", +"p1=1/pr_n //Inverse of pr_n to find in gas tables \n", +"M4s=1.41 //Mach number at turbine exit from gas tables \n", +"T4s=To4/(1+((0.5*(k-1)*M4s^2))) //Exit temperature of turbine at isentropic process in K\n", +"To3=To4 //Stagnation temperature at inlet turbine in K,\n", +"T4=To3-(eff_n*(To3-T4s)) //Exit temperature of turbine in K\n", +"C4=sqrt(2*Cp*(To4-T4)) //Flight velocity of air in m/s\n", +"a4=sqrt(k*R*T4) //Sound velocity in m/s\n", +"Me=C4/a4 //Nozzle jet mach number\n", +"f=(Cp*(To3-To2))/(eff_cc*CV*10^3) //Fuel air ratio\n", +"mf=ma*f //Mass flow rate of fuel in kg/s\n", +"m=ma+mf //Mass flow rate of gas in kg/s\n", +"eff_i=(1/(1+((2/(k-1))*(1/M1^2))))*100 //Efficiency of the ideal cycle in %\n", +"sig=u1/C4 //Jet speed ratio \n", +"eff_p=((2*sig)/(1+sig)) //Propulsive efficiency in %\n", +"F=((m*C4)-(ma*u1))*10^-3 //Thrust in kN\n", +"\n", +"//Output\n", +"printf('(A)Efficiency of the ideal cycle is %3i percent\n (B)Flight speed is %3.3f m/s\n (C)Air flow rate is %3.3f kg/s\n (D)Diffuser pressure ratio is %3.4f\n (E)Fuel air ratio is %3.5f\n (F)Nozzle pressure ratio is %3.2f\n (G)Nozzle jet mach number is %3.3f\n (H)Propulsive efficiency is %3.4f percent\n (I)Thrust is %3.3f kN',eff_i,C4,ma,pr_d,f,pr_n,Me,eff_p,F)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.17: EX6_17.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"ma=18 //Mass flow rate of air in kg/s\n", +"Mi=0.6 //Inlet mach number \n", +"h=4600 //Altitude in m\n", +"Pi=55 //Inlet pressure in \n", +"Ti=-20+273 //Inlet temperature in K\n", +"eff_d=0.9 //Diffuser efficiency \n", +"pr_d=5 //Diffuser pressure ratio \n", +"T3=1000+273 //Inlet turbine temperature in K\n", +"Pe=60 //Exit pressure in kPa\n", +"eff_c=0.81 //Compressor efficiency\n", +"eff_t=0.85 //Turbine efficiency\n", +"eff_n=0.915 //Nozzle efficiency\n", +"CV=46520 //Calorific value in kJ/kg\n", +"Cp=1005 //Specific heat capacity at constant pressure of air in J/kg-K\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"Ci=Mi*sqrt(k*R*Ti) //Velocity of air in m/s,\n", +"u=Ci //Flight velocity in m/s, Since it is reaction force of Ci\n", +"T1=Ti+(Ci^2/(2*Cp)) //Temperature at inlet of compressor in K\n", +"P1s=Pi*(T1/Ti)^(k/(k-1)) //Inlet pressure of compressor at isentropic process in kPa\n", +"P1=Pi+(eff_d*(P1s-Pi)) //Inlet pressure of compressor in kPa\n", +"P2=P1*pr_d //Outlet pressure of compressor in kPa\n", +"T2s=T1*(pr_d)^((k-1)/k) //Outlet temperature of compressor at isentropic process in K\n", +"T2=T1+((T2s-T1)/eff_c) //Exit temperature of compressor in K\n", +"Wc=Cp*(T2-T1)*10^-3 //Workdone on compressor in kJ/kg of air\n", +"Pc=ma*Wc //Power input in kW\n", +"Pt=Pc //Power out put of turbine for isentropic process in kW \n", +"f=(T3-T2)/((CV*10^3/Cp)-T3) //Fuel air ratio\n", +"Wt=Wc //Workdone by the turbine in kJ/kg of air\n", +"T4=T3-(Wt*10^3/Cp) //Exit temperature of turbine in K\n", +"T4s=T3-((T3-T4)/eff_t) //Exit temperature of turbine at isentropic process in K\n", +"P3=P2 //Exit pressure of combustion chamber in kPa, Since the process takes place at constant pressure process\n", +"P4=P3*(T4s/T3)^(k/(k-1)) //Pressure at outlet of turbine in kPa\n", +"pr_n=P4/Pe //Pressure ratio of nozzle\n", +"Tes=T4/(pr_n)^((k-1)/k) //Exit temperature of nozzle at isentropic process in K\n", +"Te=T4-(eff_n*(T4-Tes)) //Exit temperature of nozzle in K\n", +"Cj=sqrt(2*Cp*(T4-Te)) //Jet velocity in m/s\n", +"Ce=Cj //Flight velocity in m/s\n", +"ae=sqrt(k*R*Te) //Sound velocity at nozzle in m/s\n", +"Me=Ce/ae //Nozzle jet mach number\n", +"F=ma*(((1+f)*Cj)-u) //Thrust in N\n", +"P=F*u*10^-3 //Thrust power in kW\n", +"\n", +"//Output\n", +"printf('(A)Power input of compressor is %3.2f kW\n (B)Power output of turbine is %3.2f kW\n (C)F/A ratio on mass basis is %3.4f\n (D)Exit mach number is %3.3f\n (E)Thrust is %3.2f N\n (F)Thrust power is %3.1f kW',Pc,Pt,f,Me,F,P)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.1: To_calculate_thrust_and_specific_thrust_of_jet_propulsion.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"eff_com=0.8 //Compressor efficiency\n", +"eff_t=0.85 //Turbine efficiency\n", +"pr=4 //Pressure ratio including combustion pressure loss(Po2s/Po1)\n", +"eff_c=0.98 //Combustion efficiency\n", +"eff_m=0.99 //Mechanical transmission efficiency \n", +"eff_n=0.9 //Nozzle efficiency \n", +"Tmax=1000 //Maximum cycle temperature in K\n", +"To3=Tmax //Stagnation temperature before turbine inlet in K\n", +"w=220 //mass flow rate in N/s\n", +"Cp_air=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"k=1.4 //Adiabatic constant for air\n", +"Cp_gas=1153 //Specific heat capacity at constant pressure in J/kg-K\n", +"k_gas=1.3 //Adiabatic constant\n", +"To1=15+273 //Inlet Stagnation temperature of compressor in K\n", +"Po1=1 //Inlet Stagnation pressure in bar\n", +"Poe=Po1 //Exit stagnation pressure in bar, Since exit at ambient conditions\n", +"g=9.81 //Acceleration due to gravity in m/s^2\n", +"\n", +"//Calculation \n", +"To2s=To1*(pr)^((k-1)/k) //Exit Stagnation temperature of compressor at isentropic process in K\n", +"To2=((To2s-To1)/eff_com)+To1 //Exit Stagnation temperature of compressor in K\n", +"Wc=(Cp_air*(To2-To1)) //Work given to compressor in J/kg, Cp in J/kg-K\n", +"To4=To3-(Wc/Cp_gas*eff_m) //Exit Stagnation temperature of turbine in K\n", +"To4s=To3-((To3-To4)/eff_t) //Exit Stagnation temperature of turbine at isentropic process in K\n", +"Po2=Po1*pr //Exit Stagnation pressure of compressor in bar\n", +"Po3=Po2 //Exit Stagnation pressure of combustion chamber in bar, Since the process takes place at constant pressure process \n", +"p1=(To3/To4s)^(k_gas/(k_gas-1)) //Stagnation Pressure ratio of inlet and outlet of turbine \n", +"Po4s=Po3/p1 //Stagnation Pressure at outlet of turbine at isentropic process in bar \n", +"pr_n=Po4s/Poe //Pressure ratio of nozzle\n", +"Toes=To4/((pr_n)^((k_gas-1)/k_gas)) //Exit Stagnation temperature of nozzle at isentropic process in K\n", +"Toe=To4-((To4-Toes)*eff_n) //Exit Stagnation temperature of nozzle in K\n", +"Cj=sqrt(2*Cp_gas*(To4-Toe)) //Jet velocity in m/s\n", +"m=w/g //Mass flow rate of air in kg/s\n", +"F=m*Cj*10^-3 //Thrust in kN\n", +"Fs=(F*10^3)/m //Specific thrust in Ns/kg, F in N\n", +"Is=F/w //Specific impulse in sec\n", +"\n", +"//Output\n", +"printf('(A)Thrust is %3.3f kN\n (B)Specific thrust is %3.2f Ns/kg',F,Fs)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.2: To_find_thrust_developed_thrust_power_and_propulsive_efficiency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=800*(5/18) //Flight velocity in m/s\n", +"Pe=60 //Ambient pressure in kPa\n", +"Pn=300 //Pressure entering nozzle in kPa \n", +"Tn=200+273 //Temperature entering nozzle in K \n", +"m=20 //Mass flow rate of air in kg/s\n", +"Cp=1005 //Specific heat capacity at constant pressure in J/kg-K\n", +"k=1.4 //Adiabatic constant for air\n", +"\n", +"//Calculation\n", +"Te=Tn*(Pe/Pn)^((k-1)/k) //Exit temperature of nozzle in K\n", +"Cj=sqrt(2*Cp*(Tn-Te)) //Jet velocity in m/s\n", +"F=m*(Cj-u) //Thrust in N\n", +"P=F*u*10^-3 //Thrust power in kW\n", +"eff=((2*u)/(Cj+u))*100 //Propulsive efficiency in percent\n", +"\n", +"\n", +"//Output\n", +"printf('(A)Thrust developed is %3.1f N\n (B)Thrust developed is %3.2f kW\n (C)Propulsive efficiency is %3.3f percent',F,P,eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.3: EX6_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mi=0.8 //Inlet mach number \n", +"h=10000 //Altitude in m\n", +"pr_c=8 //Pressure ratio of compressor\n", +"To3=1200 //Stagnation temperature at turbine inlet in K\n", +"eff_c=0.87 //Compressor efficiency\n", +"eff_t=0.9 //Turbine efficiency\n", +"eff_d=0.93 //Diffuser efficiency \n", +"eff_n=0.95 //Nozzle efficiency \n", +"eff_m=0.99 //Mechanical transmission efficiency\n", +"eff_cc=0.98 //Combustion efficiency\n", +"pl=0.04 //Ratio of combustion pressure loss to compressor delivery pressure \n", +"k=1.4 //Adiabatic constant of air\n", +"R=287 //Specific gas constant in J/kg-K\n", +"k_g=1.33 //Adiabatic constant of gas \n", +"Cp_a=1005 //Specific heat capacity at constant pressure of air in J/kg-K\n", +"Cp_g=1100 //Specific heat capacity at constant pressure of gas in J/kg-K\n", +"CV=43000000 //Calorific value in J/kg (Assume)\n", +"\n", +"//Calculation\n", +"Ti=223.15 //Inlet temperature in K from gas tables\n", +"Pi=26.4 //Inlet pressure in kPa from gas tables \n", +"ai=sqrt(k*R*Ti) //Sound velocity in m/s\n", +"Ci=ai*Mi //Velocity of air in m/s,\n", +"u=Ci //Flight velocity in m/s, Since it is reaction force of Ci\n", +"t1=0.886 //Ratio of static to stagnation temperature a entry from gas tables at M=0.8 \n", +"To1s=Ti/t1 //Stagnation temperature at inlet of compressor at isentropic process in K\n", +"To1=((To1s-Ti)/eff_d)+Ti //Stagnation temperature at inlet of compressor in K\n", +"p1=(To1s/Ti)^(k/(k-1)) //Pressure ratio i.e. (Po1s/Pi)\n", +"Po1s=Pi*p1 //inlet Stagnation pressure of compressor at isentropic process in kPa\n", +"Po1=Po1s //Inlet Stagnation pressure of compressor in kPa\n", +"Po2=pr_c*Po1 //Exit Stagnation pressure of compressor in kPa\n", +"To2s=To1s*(Po2/Po1)^((k-1)/k) //Exit Stagnation temperature of compressor at isentropic process in K\n", +"To2=((To2s-To1)/eff_c)+To1 //Exit Stagnation temperature of compressor in K\n", +"P_los=pl*Po2 //combustion pressure loss in kPa\n", +"Po3=Po2-P_los //Exit Stagnation pressure of combustion chamber in kPa\n", +"To4=To3-((Cp_a*(To2-To1))/(eff_m*Cp_g)) //Exit Stagnation temperature of turbine in K\n", +"To4s=To3-((To3-To4)/eff_t) //Exit Stagnation temperature of turbine at isentropic process in K\n", +"p1=(To3/To4s)^(k_g/(k_g-1)) //Pressure ratio i.e. (Po3/Po4s)\n", +"Po4s=Po3/p1 //Stagnation Pressure at outlet of turbine at isentropic process in kPa\n", +"Poe=Pi //Exit stagnation pressure in kPa, Since exit is at ambient conditions\n", +"pr_n=Po4s/Poe //Pressure ratio of nozzle\n", +"Toes=To4/((pr_n)^((k_g-1)/k_g)) //Exit Stagnation temperature of nozzle at isentropic process in K\n", +"Toe=To4-((To4-Toes)*eff_n) //Exit Stagnation temperature of nozzle in K\n", +"Cj=sqrt(2*Cp_g*(To4-Toe)) //Jet velocity in m/s\n", +"Fs=Cj-u //Specific thrust in Ns/kg\n", +"f=((Cp_g*To3)-(Cp_a*To2))/((eff_cc*CV)-(Cp_g*To3)) //Fuel-air ratio\n", +"TSFC=(f/Fs)*10^5 //Thrust specific fuel consumption in kg/s-N x10^-5\n", +"\n", +"//Output\n", +"printf('(A)Specific thrust is %3.2f Ns/kg\n (B)Thrust specific fuel consumption is %3.3fx10^-5 kg/s-N',Fs,TSFC)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.4: To_estimate_properties_at_exit_and_propulsive_efficiency_of_a_turbojet_aircraft.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=300 //Flight velocity in m/s\n", +"Pi=35 //Inlet pressure in kPa\n", +"Ti=-40+273 //Inlet temperature in K\n", +"pr_c=10 //Pressure ratio of compressor\n", +"T3=1100+273 //Inlet turbine temperature in K\n", +"m=50 //Mass flow rate of air in kg/s\n", +"k=1.4 //Adiabatic constant of air\n", +"Cp=1005 //Specific heat capacity at constant pressure of air in J/kg-K\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"ai=sqrt(k*R*Ti) //Sound velocity at diffuser in m/s\n", +"C1=u //Velocity of air in m/s, Since it is reaction force of u\n", +"T1=Ti+(C1^2/(2*Cp)) //Temperature at inlet of compressor in K\n", +"P1=Pi*((T1/Ti)^(k/(k-1))) //Inlet pressure of compressor in kPa\n", +"P2=pr_c*P1 //Exit pressure of compressor in kPa\n", +"P3=P2 //Exit pressure of combustion chamber in kPa, Since the process takes place at constant pressure process \n", +"T2=T1*(P2/P1)^((k-1)/k) //Exit temperature of compressor in K\n", +"T4=T3-(T2-T1) //Exit temperature of turbine in K\n", +"P4=P3/((T3/T4)^(k/(k-1))) //Pressure at outlet of turbine in kPa\n", +"Pe=Pi //Exit pressure in kPa, Since exit is at ambient conditions\n", +"pr_n=P4/Pe //Pressure ratio of nozzle\n", +"Te=T4/((pr_n)^((k-1)/k)) //Exit temperature of nozzle in K\n", +"Cj=sqrt(2*Cp*(T4-Te)) //Jet velocity in m/s\n", +"sig=u/Cj //Jet speed ratio \n", +"eff_prop=((2*sig)/(1+sig))*100 //Propulsive efficiency of the cycle in %\n", +"\n", +"//Output\n", +"printf('(A)Temperature and pressure of gases at turbine exit is %3.2f K and %3i kPa\n (B)Velocity of gases is %3.2f m/s\n (C)Propulsive efficiency of the cycle is %3.2f percent',T4,P4,Cj,eff_prop)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.5: To_calculate_absolute_velocity_drag_overall_and_turbine_efficiency_of_jet.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"n=2 //Number of jets\n", +"D=0.25 //Diameter of turbojet in m\n", +"P=3000 //Net power at turbojet in W\n", +"mf_kWh=0.42 //Fuel consumption in kg/kWh \n", +"CV=49000 //Calorific value in kJ/kg\n", +"u=300 //Flight velocity in m/s\n", +"d=0.168 //Density in kg/m^3\n", +"AFR=53 //Air fuel ratio \n", +"\n", +"//Calculatioon\n", +"mf=mf_kWh*P/3600 //Mass flow rate of fuel in kg/s\n", +"ma=AFR*mf //Mass flow rate of air in kg/s\n", +"m=ma+mf //Mass flow rate of gas in kg/s\n", +"Q=m/d //Volume flow rate in m^3/s\n", +"Cj=(Q*4)/(2*%pi*D^2) //Jet velocity in m/s\n", +"Ca=Cj-u //Absolute Jet velocity in m/s\n", +"F=((m*Cj)-(ma*u))*10^-3 //Thrust in kN\n", +"eff=((F*u)/(mf*CV))*100 //Overall efficiency in %\n", +"eff_prop=((2*u)/(Cj+u))*100 //Propulsive efficiency of the cycle in %\n", +"eff_ther=(eff/eff_prop)*100 //Efficiency of turbine in %\n", +"\n", +"//Output\n", +"printf('(A)Absolute velocity of jet is %3.3f m/s\n (B)Resistance of the plane is %3.4f kN\n (C)Overall efficiency is %3.2f percent\n (D)Efficiency of turbine is %3.3f percent',Ca,F,eff,eff_ther)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.6: EX6_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=900*(5/18) //Flight velocity in m/s\n", +"ma=3000/60 //Mass flow rate of air in kg/s\n", +"dh=200 //Enthalpy drop of nozzle in kJ/kg\n", +"eff_n=0.9 //Nozzle efficiency \n", +"AFR=85 //Air fuel ratio \n", +"eff_cc=0.95 //Combustion efficiency\n", +"CV=42000 //Calorific value in kJ/kg\n", +"\n", +"//Calculation\n", +"mf=ma/AFR //Mass flow rate of fuel in kg/s\n", +"m=ma+mf //Mass flow rate of gas in kg/s\n", +"Cj=sqrt(2*eff_n*dh*10^3) //Jet velocity in m/s\n", +"sig=u/Cj //Jet speed ratio \n", +"F=((m*Cj)-(ma*u))*10^-3 //Thrust in kN\n", +"Pt=F*u //Thrust power in kW\n", +"Pp=0.5*((m*Cj^2)-(ma*u^2))*10^-3 //Propulsive power in kW\n", +"HS=eff_cc*mf*CV //Heat supplied in kW\n", +"eff_ther=(Pp/HS)*100 //Efficiency of turbine in %\n", +"eff_prop=(Pt/Pp)*100 //Propulsive efficiency of the cycle in %\n", +"eff=(Pt/HS)*100 //Overall efficiency in %\n", +"\n", +"//Output\n", +"printf('(A)Propulsive power is %3.2f kW\n (B)Thrust power is %3.1f kW\n (C)Propulsive efficiency is %3.3f percent\n (D)Thermal efficiency is %3.2f percent\n (E)Total fuel consumption is %3.3f kg/s\n (F)Overall efficiency is %3.3f percent',Pp,Pt,eff_prop,eff_ther,mf,eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.7: EX6_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=0.8 //Mach number \n", +"CV=42800 //Calorific value in kJ/kg\n", +"h=10 //Altitude in km\n", +"F=50 //Thrust in kN\n", +"ma=45 //Mass flow rate of air in kg/s\n", +"mf=2.65 //Mass flow rate of fuel in kg/s\n", +"\n", +"//Calculation\n", +"m=ma+mf //Mass flow rate of gas in kg/s\n", +"a=299.6 //Sound velocity in m/s, from gas tables\n", +"T=233.15 //Inlet temperature in K \n", +"u=a*M //Flight velocity in m/s\n", +"Cj=((F*10^3)+(ma*u))/m //Jet velocity in m/s\n", +"sig=u/Cj //Jet speed ratio \n", +"Fs=F*10^3/m //Specific thrust in Ns/kg, F in N\n", +"TSFC=mf*3600/(F*10^3) //Thrust specific fuel consumption in kg/N-hr, F in N\n", +"Pt=F*u //Thrust power in kW\n", +"Pp=0.5*((m*Cj^2)-(ma*u^2))*10^-3 //Propulsive power in kW\n", +"HS=mf*CV //Heat supplied in kW\n", +"eff_ther=(Pp/HS)*100 //Efficiency of turbine in %\n", +"eff_prop=(Pt/Pp)*100 //Propulsive efficiency of the cycle in %\n", +"eff=(Pt/HS)*100 //Overall efficiency in %\n", +"\n", +"//Output \n", +"printf('(A)Specific thrust is %3.2f N/kg\n (B)Thrust specific fuel consumption is %3.4f kg/N-hr\n (C)Jet velocity is %3.3f m/s\n (D)Thermal efficiency is %3.2f percent\n (E)Propulsive efficiency is %3.3f percent\n (F)Overall efficiency is %3.2f percent',Fs,TSFC,Cj,eff_ther,eff_prop,eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.8: To_calculate_fuel_air_and_pressure_ratios_and_Mach_number_of_jet.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mi=0.8 //Inlet mach number \n", +"h=10 //Altitude in km\n", +"To3=1200 //Stagnation temperature before turbine inlet in K\n", +"dTc=175 //Stagnation temperature rise through the compressor in K\n", +"CV=43000 //Calorific value in kJ/kg\n", +"eff_c=0.75 //Compressor efficiency\n", +"eff_cc=0.75 //Combustion efficiency\n", +"eff_t=0.81 //Turbine efficiency\n", +"eff_m=0.98 //Mechanical transmission efficiency\n", +"eff_n=0.97 //Nozzle efficiency \n", +"Is=25 //Specific impulse in sec\n", +"k=1.4 //Adiabatic constant of air\n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constant pressure of air in J/kg-K\n", +"g=9.81 //Acceleration due to gravity in m/s^2\n", +"\n", +"//Calculation\n", +"Ti=223.15 //Inlet temperature in K from gas tables\n", +"ai=sqrt(k*R*Ti) //Sound velocity in m/s\n", +"Toi=(1+((0.5*(k-1)*Mi^2)))*Ti //Stagnation temperature at diffuser inlet in K\n", +"To1=Toi //Inlet Stagnation temperature of compressor in K, since hoi=ho1 \n", +"To2=dTc+To1 //Exit Stagnation temperature of compressor in K\n", +"pr_c=(1+(eff_c*((To2-To1)/To1)))^(k/(k-1)) //Compressor pressure ratio \n", +"f=((Cp*To3)-(Cp*To2))/((eff_cc*CV*10^3)-(Cp*To3)) //Fuel-air ratio, calculation mistake in textbook\n", +"dTt=dTc/(eff_m*(1+f)) //Temperature difference across turbine\n", +"pr_t=1/((1-(dTt/(To3*eff_t)))^(k/(k-1))) //Turbine pressure ratio\n", +"To4=To3-dTc //Exit Stagnation temperature of turbine in K\n", +"u=ai*Mi //Flight velocity in m/s\n", +"sig=1/(((Is*g)/u)+1) //Jet speed ratio \n", +"Ce=u/sig //Exit velocity in m/s\n", +"Cj=Ce //Jet velocity in m/s, Since Cj is due to exit velociy\n", +"Te=To4-(Ce^2/(2*Cp)) //Exit temperature in K\n", +"Tes=To4-((To4-Te)*eff_n) //Exit temperature in K, (At isentropic process)\n", +"pr_n=(To4/Te)^(k/(k-1)) //Nozzle pressure ratio\n", +"ae=sqrt(k*R*Te) //Exit Sound velocity in m/s\n", +"Me=Ce/ae //Exit mach number \n", +"\n", +"printf('(A)Fuel-air ratio is %3.5f \n (B)Compressor, turbine, nozzle pressure ratio are %3.3f, %3.3f, %3.2f respectively\n (C)Mach number at exhaust jet is %3.3f',f,pr_c,pr_t,pr_n,Me)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6.9: EX6_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"D=2.5 //Diameter in m\n", +"u=500*(5/18) //Flight velocity in m/s\n", +"h=8000 //Altitude in m\n", +"sig=0.75 //Jet speed ratio \n", +"g=9.81 //Acceleration due to gravity in m/s^2\n", +"\n", +"//Calculation\n", +"d=0.525 //from gas tables\n", +"A=%pi*D^2*0.25 //Area of flow in m^2 \n", +"Cj=u/sig //Jet velocity in m/s\n", +"Vf=(u+Cj)/2 //Velocity of flow in m/s\n", +"ma=d*A*Vf //Mass flow rate of air in kg/s\n", +"F=ma*(Cj-u)*10^-3 //Thrust in kN\n", +"P=F*u //Thrust power in kW\n", +"Fs=F*10^3/ma //Specific thrust in Ns/kg\n", +"Is=Fs/g //Specific impulse in sec\n", +"\n", +"//Output\n", +"printf('(A)Flow rate of air through the propeller is %3.3f m/s\n (B)Thrust produced is %3.3f kN\n (C)Specific thrust is %3.2f N-s/kg\n (D)Specific impulse is %3.3f sec\n (E)Thrust power is %3.1f kW',ma,F,Fs,Is,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 +} diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/7-Rocket_Propulsion.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/7-Rocket_Propulsion.ipynb new file mode 100644 index 0000000..16d5c99 --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/7-Rocket_Propulsion.ipynb @@ -0,0 +1,605 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7: Rocket Propulsion" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.10: To_find_thrust_specific_impulse_and_efficiencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"Cj=1250 //effective exhaust velocity in m/s\n", +"s=0.8 //effective jet speed ratio i.e. flight to jet speed ratio\n", +"ma=3.5 //oxidizer flow rate in kg/s\n", +"mf=1 //fuel flow rate in kg/s\n", +"g=9.81 //acceleration due to gravity in m/s^2\n", +"q=2500*10^3 //heat of propellent per kg of propellant mixture in J/kg\n", +"\n", +"//calculation\n", +"u=s*Cj //flight velocity in m/s\n", +"mp=ma+mf //propellant mass flow in kg/s\n", +"F=Cj*mp*10^-3 //thrust in kN\n", +"wp=mp*g //weight flow rate of propellent in N/s\n", +"Is=(F*10^3)/(wp) //specific impulse in sec,F in N\n", +"np=(2*s)/(1+s^2) //propulsive efficiency\n", +"nth=0.5*mp*((Cj^2+u^2)/(mp*q)) //thermal efficiency\n", +"no=np*nth //overall efficiency\n", +"\n", +"//output\n", +"printf('(A)thrust is %3.3f kN\n (B)specific impulse is %3.2f sec\n (C)propulsive efficiency is %3.4f \n (D)thermal efficiency is %3.4f \n (E)overall efficiency is %3.1f',F,Is,np,nth,no)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.11: To_find_specific_impulse_SPC_effective_and_actual_jet_velocity_and_efficiencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"clear\n", +"\n", +"//input data\n", +"mp=193 //propellent flow rate in kg/s\n", +"P1=27*10^5 //pressure at throat section in Pa\n", +"T1=3000 //temperature at throat section in K\n", +"de=0.6 //nozzle exit diameter in m\n", +"Pe=1.1*10^5 //exhaust pressure in Pa\n", +"Pamb=1.013*10^5 //ambient pressure in Pa\n", +"F=380*10^3 //thrust of motor in N\n", +"u=694.44 //flight velocity in m/s\n", +"g=9.81 //acceleration due to gravity in m/s^2\n", +"q=6500*10^3 //heat of propellent per kg of propellant mixture in J/kg\n", +"\n", +"//calculation\n", +"Ae=(%pi*0.6^2)/4 //exit area in m^2\n", +"Cj=F/mp //average effective jet velocity in m/s\n", +"Ce=(F-((Pe-Pamb)*Ae))/mp //exhaust velocity in m/s, wrong answer in textbook\n", +"wp=mp*g //weight flow rate of propellent in N/s\n", +"Is=(F)/(wp) //specific impulse in sec\n", +"SPC=(wp/F)/10^-3 //specific propellent consumption in sec^-1 *10^-3\n", +"Pt=F*u*10^-6 //Thrust power in MW\n", +"Pl=(0.5*mp*((Cj-u)^2))*10^-6 //Power loss in exhaust in MW\n", +"Pe=Pt+Pl //engine output in MW\n", +"np=Pt/Pe //propulsive efficiency\n", +"nth=Pe*10^3/(mp*q*10^-3) //thermal efficiency and Pe,q in kW\n", +"no=np*nth //overall efficiency\n", +"\n", +"//output\n", +"printf('(A)effective jet velocity is %3.4f m/s\n (B)Actual jet velocity is %3.4f m/s\n (C)specific impulse is %3.1f sec\n (D)specific propellent consumption is %3.4f*10^-3 sec^-1\n (E)propulsive efficiency is %3.5f \n (D)thermal efficiency is %3.3f \n (E)overall efficiency is %3.5f',Cj,Ce,Is,SPC,np,nth,no)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.12: EX7_12.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"m1=3600 //internal mass in kg\n", +"Cj=2070 //average effective jet velocity in m/s\n", +"tp=80 //rocket operation duration in sec\n", +"g=9.81 //acceleration due to gravity in m/s^2\n", +"\n", +"//calculation\n", +"up=2*Cj //flight velocity in m/s\n", +"MR=1/exp((up+(g*tp))/Cj) //mass ratio\n", +"m2=MR*m1 //mass after rocket operation in kg\n", +"PMF=1-MR //propellant mass fraction\n", +"Mp=m1-m2 //mass of propellant in kg\n", +"mp=Mp/tp //propellent flow rate in kg/s\n", +"F=Cj*mp*10^-3 //thrust in kN\n", +"Zp=(((1+((1-(1/PMF))*log(1/MR)))*Cj*tp)-(0.5*g*tp^2))*10^-3 //powered altitude gain in km\n", +"Zc=((0.5*up^2)/g)*10^-3 //coasting altitude gain in km\n", +"Z=Zp+Zc //maximum altitude in km\n", +"\n", +"//output\n", +"printf('(A)flow rate of propellent is %3.2f kg/s\n (B)thrust developed is %3.3f kN\n (C)altitude gains during powered and coasting flights are %3.3f km and %3.3f km respectively',mp,F,Zp,Zc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.13: EX7_13.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"s=0.2105 //effective jet speed ratio\n", +"Is=203.88 //specific impulse in sec\n", +"tp=8 //rocket operation duration i.e. burn out time in sec\n", +"g=9.81 //acceleration due to kravity in m/s^2\n", +"\n", +"//calculation\n", +"Cj=g*Is //average effective jet velocity in m/s\n", +"up=s*Cj //maximum flight speed in m/s\n", +"MR=1/exp((up+(g*tp))/Cj) //mass ratio\n", +"PMF=1-MR //propellant mass fraction\n", +"Zp=(((1+((1-(1/PMF))*log(1/MR)))*Cj*tp)-(0.5*g*tp^2))*10^-3 //powered altitude gain in km\n", +"Zc=((0.5*up^2)/g)*10^-3 //coasting altitude gain in km\n", +"Z=Zp+Zc //maximum altitude in km\n", +"\n", +"//output \n", +"printf('(A)effective jet velocity is %3i m/s\n (B)mass ratio and propellent mass fraction are %3.2f and %3.2f respectively\n (C)maximum flight speed is %3.2f m/s\n (D))altitude gains during powered and coasting flights are %3.3f km and %3.3f km respectively',Cj,MR,PMF,up,Zp,Zc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.14: To_find_orbital_and_escape_velocities_of_a_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"R0=6341.6*10^3 //radius of earth at mean sea-level in m\n", +"g=9.809 //acceleration due to gravity in m/s^2\n", +"Z1=0 //altitude at sea-level in m\n", +"Z2=300*10^3 //altitude above sea-level in m\n", +"\n", +"//calculation\n", +"uorb1=R0*sqrt(g/(R0+Z1)) //orbit velocity of a rocket at mean sea level in m/s\n", +"uesc1=sqrt(2)*uorb1 //escape velocity of a rocket at mean sea level in m/s\n", +"uorb2=R0*sqrt(g/(R0+Z2)) //orbit velocity of a rocket at an altitude of 300 km in m/s\n", +"uesc2=sqrt(2)*uorb2 //escape velocity of a rocket at an altitude of 300 km in m/s\n", +"\n", +"//output \n", +"printf('(A)orbit and escape velocities of a rocket at mean sea level are %3i m/s and %3i m/s\n (B)orbit and escape velocities of a rocket at an altitude of 300 km are %3.1f m/s and %3.2f m/s',uorb1,uesc1,uorb2,uesc2 )" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.1: To_find_thrust_of_the_motor_of_a_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"mp=12 //flow rate in kg/s\n", +"Ae=335*10^-4 //exit area in m^2\n", +"Ce=2000 //exhaust velocity in m/s\n", +"h=10 //altitude in km\n", +"Pe=1*10^5 //exhaust pressure in Pa\n", +"P0=1*10^5 //p0=atomspheric pressure in Pa at h=0.\n", +"P10=0.25*10^5 //atmospheric pressure in Pa using gas tables\n", +"\n", +"//calculations\n", +"Fs=mp*Ce*10^-3 //thrust of motor at sea level since pe=p0 in kN\n", +"F10=((mp*Ce) + Ae*(Pe-P10))*10^-3 //thrust of motor at altitude of 10km in kN\n", +"\n", +"//output\n", +"printf('(A)thrust of motor at sea level is %3i kN (upwards) \n (B)thrust of motor at an altitude 10km is %3.4f kN',Fs,F10)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.2: EX7_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear \n", +"\n", +"//input data\n", +"P0=38*10^5 //combustion chamber pressure in Pa\n", +"T0=3500 //combustion chamber temperature in K\n", +"ma=41.67 //oxidizer flow rate in kg/s\n", +"MR=5 //mixture ratio\n", +"k=1.3 //adiabatic constant\n", +"R=287 //gas constant in J/kg-K\n", +"Pamb=0.0582*10^5 //ambient pressure in Pa\n", +"Pe=Pamb //exhaust pressure at sea level in Pa\n", +"\n", +"//calculation \n", +"mf=ma/MR //mass flow of fuel in kg/s \n", +"mp=mf+ma //propellant mass flow in kg/s\n", +"Cp=(k*R)/(k-1) //specific heat at constant pressure in J/kg-k\n", +"p=P0/Pe //ratio of pressures at combustion chamber and exhaust \n", +"Me=((((p^((k-1)/k))-1)*2)/(k-1))^0.5 //Mach number\n", +"t=1/(1+(((k-1)/2)*Me^2)) //ratio of exhaust temperature to combustion temperature\n", +"Te=t*T0 //exhaust temperature in Kelvin\n", +"a=(1/Me)*(((2/(k+1))+(((k-1)/(k+1))*Me^2))^((k+1)/(2*(k-1)))) //ratio of areas at exit section and throat section of the nozzle\n", +"Ce=(k*R*Te)^0.5*Me //exit velocity in the exhaust in m/s\n", +"Cj=Ce //average effective jet velocity in m/s, since Pe=Pamb\n", +"P1=P0*(2/(k+1))^(k/(k-1)) //pressure at throat section in Pa\n", +"T1=T0*(2/(k+1)) //temperature at throat section in K\n", +"d1=P1/(R*T1) //density of fuel at throat section in kg/m^3\n", +"C1=(k*R*T1)^0.5 //velocity at throat section in m/s\n", +"A1=(mp/(d1*C1))*10^4 //nozzle throat area in cm^2\n", +"Ae=a*A1 //exit area in cm^2\n", +"F=(mp*Ce)*10^-3 //thrust in kN\n", +"Cmax1=(2*Cp*T0)^0.5 //maximum possible velocity in m/s\n", +"Cf=(F*10^3)/(P0*A1*10^-4) //thrust coefficient, F in kN and A1 in m^2\n", +"Cch1=Cj/Cf //characteristic velocity in m/s\n", +"\n", +"//output\n", +"printf('(A)nozzle throat area is %3.2f cm^2 \n (B)thrust is %3.1f kN \n (C)thrust coefficient is %3.2f \n (D)characteristic velocity is %3i m/s \n (E)exit velocity in exhaust is %3i m/s\n (F)maximum possible exhaust velocity is %3i m/s\n',A1,F,Cf,Cch1,Ce,Cmax1)\n", +"" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.3: To_estimate_thrust_per_unit_area_and_specific_impulse.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc \n", +"clear\n", +"\n", +"//input data\n", +"a=3 //exit area to throat area ratio\n", +"T0=2973 //combustion chamber temperature in K\n", +"P0=20*10^5 //combustion chamber pressure in Pa\n", +"k=1.3 //adiabatic constant\n", +"R=248 //gas constant in J/kg-K\n", +"Pamb=1*10^5 //ambient pressure in Pa\n", +"Me=2.52 //mach number for k=1.3 and a=3 using gas tables \n", +"g=9.81 //acceleration due to gravity in m/s^2\n", +"\n", +"//calculation\n", +"p=1/((1+(((k-1)/2)*Me^2))^(k/(k-1))) //ratio of pressures at exhaust and combustion chamber \n", +"Pe=p*P0 //exhaust pressure in Pa\n", +"t=1/(1+(((k-1)/2)*Me^2)) //ratio of exhaust temperature to combustion temperature\n", +"Te=t*T0 //exhaust temperature in Kelvin\n", +"Ce=(k*R*Te)^0.5*Me //exit velocity in the exhaust in m/s\n", +"M=(Pe*Ce)/(R*Te) //propellant mass flow per unit area of exit in kg/m^2-s\n", +"Fa=((M*Ce)+(Pe-Pamb))*10^-3 //thrust per unit area of exit in N/m^2\n", +"Is=(Fa*10^3)/(M*g) //specific impulse in sec\n", +"\n", +"//output\n", +"printf('(A)thrust per unit area of exit is %3.2f kN/m^2 \n (B)specific impulse is %3.2f sec',Fa,Is)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.4: EX7_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"mp=5 //propellent flow rate in kg/s (missing data)\n", +"de=0.10 //nozzle exit diameter in m\n", +"Pe=1.02*10^5 //nozzle exit pressure in Pa\n", +"Pamb=1.013*10^5 //ambient pressure in Pa\n", +"P0=20 //thrust chamber pressure in Pa\n", +"F=7000 //thrust in N\n", +"u=1000 //rocket speed in m/s\n", +"g=9.81 //acceleration due to gravity in m/s^2\n", +"\n", +"//calculation\n", +"Cj=F/mp //effective jet velocity in m/s\n", +"Ca=Cj-u //absolute jet velocity in m/s\n", +"wp=mp*g //weight flow rate of propellent in N/s\n", +"Is=F/(wp) //specific impulse in sec\n", +"SPC=1/Is //specific propellent consumption in sec^-1\n", +"\n", +"//output\n", +"printf('(A)effective jet velocity is %3i m/s \n (B)specific impulse is %3.2f sec \n (C)specific propellent consumption is %3.3f s^-1 \n (D)absolute jet velocity is %3i m/s',Cj,Is,SPC,Ca)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.5: To_find_propulsive_efficiency_thrust_and_thrust_power_of_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data \n", +"Cj=2700 //average effective jet velocity in m/s\n", +"u=1350 //forward flight velocity in m/s\n", +"mp=78.6 //propellant mass flow in kg/s\n", +"\n", +"//calculation\n", +"s=u/Cj //effective jet speed ratio\n", +"np=(2*s)/(1+s^2) //propulsive efficiency\n", +"F=Cj*mp*10^-3 //thrust in kN\n", +"Pt=F*u*10^-3 //Thrust power in MW, F in N\n", +"\n", +"//output\n", +"printf('(A)thrust is %3.2f kN \n (B)Thrust power is %3.3f MW \n (C)propulsive efficiency is %3.1f',F,Pt,np)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.6: To_find_velocity_and_maximum_height_that_rocket_will_reach.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"mi=15000 //mass of the rocket in kg\n", +"mp=125 //propellant mass flow in kg/s\n", +"Cj=2000 //velocity of gases coming out in m/s\n", +"t=70 //time interval in sec\n", +"t0=0 //lower limit in integration in sec\n", +"t1=70 //upper limit in integration in sec\n", +"g=9.81 //acceleration due to gravity in m/s^2\n", +"\n", +"//calculation\n", +"u=(-Cj*(log(1-((mp*t)/mi))))-(g*t) //velocity attained in 70 sec in m/s\n", +"h1=(integrate('((-2000*(log(1-((125*t)/15000))))-(g*t))','t',t0,t1))*10^-3 //distance travelled through 70 sec obtained by integrating u w.r.t time with intervals 0 to 70 in km\n", +"h2=(u^2/(2*g))*10^-3 //distance reached after fuel last i.e. after 70 sec due to kinetic energy by using KE=PE in km\n", +"h=h1+h2 //maximum height the rocket will reach in km\n", +"\n", +"//output\n", +"printf('(A)velocity attained in %i sec is %3.2f m/s\n (B)maximum height the rocket will reach is %3.3f km',t,u,h)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.7: EX7_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"A1=18*10^-4 //throat area in m^2\n", +"P0=25*10^5 //combustion chamber pressure in Pa\n", +"Is=127.42 //specific impulse in sec\n", +"wp=44.145 //weight flow rate of propellent in N/s\n", +"g=9.81 //acceleration due to kravity in m/s^2\n", +"\n", +"//calculation\n", +"F=Is*wp //thrust in N\n", +"mp=wp/g //propellant mass flow in kg/s\n", +"Cj=F/mp //average effective jet velocity in m/s\n", +"Cf=F/(P0*A1) //thrust coefficient\n", +"Cw=wp/(P0*A1)/10^-3 //propellent weight flow coefficent *10^-3\n", +"SPC=(wp/F)/10^-3 //specific propellent consumption in sec^-1 *10^-3\n", +"Cch1=Cj/Cf //characteristic velocity in m/s\n", +"\n", +"//output\n", +"printf('(A)thrust coefficient is %3.2f \n (B)propellent weight flow coefficent is %3.2f*10^-3 \n (C)specific propellent consumption is %3.2f*10^-3 s^-1 \n (D)characteristic velocity is %3.0f m/s',Cf,Cw,SPC,Cch1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.8: To_find_various_parameters_of_rocket_projectile_during_its_operation.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"m1=200 //internal mass in kg\n", +"m2=130 //mass after rocket operation in kg\n", +"m3=110 //payload,non-propulsive structure, etc in kg\n", +"tp=3 //rocket operation duration in sec\n", +"Is=240 //specific impulse in sec\n", +"g=9.81 //acceleration due to kravity in m/s^2\n", +"\n", +"//calculation\n", +"MR=m2/m1 //mass ratio\n", +"Mp=m1-m2 //mass of propellant in kg\n", +"mp=Mp/tp //propellent flow rate in kg/s\n", +"wp=mp*g //weight flow rate of propellent in N/s\n", +"IMF=(m2-m3)/(m1-m3) //initial mass fraction\n", +"PMF=1-IMF //propellant mass fraction\n", +"F=Is*wp //thrust in N\n", +"TWRi=F/(m1*g) //initial thrust to weight ratio \n", +"TWRf=F/(m2*g) //final thrust to weight ratio\n", +"av=F/m2 //Maximum accelaration of the vechicle in m/s^2\n", +"Cj=Is*g //effective exhaust velocity in m/s\n", +"It=Is*Mp*g*10^-3 //total impulse in kN-s, units of the answer given in the book is wrong\n", +"IWR=(It*10^3)/((m1-m3)*g) //impulse to weighr ratio, It in N-s\n", +"\n", +"//output\n", +"printf('(A)mass ratio is %3.2f \n (B)propellent mass fraction is %3.3f \n (C)propellent flow rate is %3.1f kg/s\n (D)thrust is %3.1f N\n (E)thrust to weight ratio is %3.2f (intial) and %3.2f (final)\n (F)accelaration of the vechicle is %3.2f m/s^2\n (G)effective exhaust velocity is %3.1f m/s\n (H)total impulse is %3.3f kN-s\n (I)impulse to weighr ratio is %3.2f',MR,PMF,mp,F,TWRi,TWRf,av,Cj,It,IWR)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7.9: To_propulsive_power_engine_output_and_efficiencies.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//input data\n", +"u=2800 //rocket speed in m/s\n", +"Cj=1400 //effective exhaust velocity in m/s\n", +"mp=5 //propellent flow rate in kg/s\n", +"q=6500 //heat of propellent per kg of propellant mixture in kJ/kg\n", +"\n", +"//calculation\n", +"s=u/Cj //effective jet speed ratio\n", +"np=(2*s)/(1+s^2) //propulsive efficiency\n", +"F=Cj*mp*10^-3 //thrust in kN\n", +"Pt=F*10^3*u*10^-6 //Thrust power in MW, F in N\n", +"Pe=Pt/np //engine outputin MW\n", +"nth=Pe*10^3/(mp*q) //thermal efficiency, Pe in kW\n", +"no=np*nth //overall efficiency\n", +"\n", +"//output\n", +"printf('(A)propulsive efficiency is %3.1f \n (B)propulsive power is %3.1f MW\n (C)engine outut is %3.1f MW\n (D)thermal efficiency is %3.4f \n (E)overall efficiency is %3.3f',np,Pt,Pe,nth,no)" + ] + } +], +"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 +} diff --git a/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/8-Two_Marks_Questions_and_Answers_.ipynb b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/8-Two_Marks_Questions_and_Answers_.ipynb new file mode 100644 index 0000000..282fcd5 --- /dev/null +++ b/Gas_Dynamics_and_Jet_Propulsion_by_P_Murugaperumal/8-Two_Marks_Questions_and_Answers_.ipynb @@ -0,0 +1,821 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8: Two Marks Questions and Answers " + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1_34: To_find_Mach_angle.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"C=500 //Airplane velocity in m/s\n", +"T=20+273 //Temperature in K\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"a=sqrt(k*R*T) //Sound velocity in m/s\n", +"M=C/a //Mach number\n", +"alp=asind(1/M) //Mach angle in degree\n", +"\n", +"//Output\n", +"printf('Mach angle is %3.3f degree',alp)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1_35: To_find_values_of_back_pressure.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"a1=2.2 //Area ratio (A/At)\n", +"Po=10 //Stagnation Pressure in bar\n", +"\n", +"//Calculation\n", +"//Two values of mach number at a1 from gas tables\n", +"\n", +"M1=0.275 //Mach number from gas tables\n", +"p1=0.949 //Presure ratio (P/Po)\n", +"P1=Po*p1 //back pressure in bar\n", +"\n", +"M2=2.295 //Mach number from gas tables\n", +"p2=0.0806 //Presure ratio (P/Po)\n", +"P2=Po*p2 //back pressure in bar\n", +"\n", +"//Output\n", +"printf('(A)When M=%3.3f, back pressure is %3.2f bar\n (B)When M=%3.3f, back pressure is %3.3f bar',M1,P1,M2,P2)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1_37: To_find_temperature_at_nose_of_aircraft.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=0.8 //Mach number\n", +"T=20+273 //Temperature in K\n", +"k=1.4 //Adiabatic constant \n", +"\n", +"//Calculation \n", +"To=T*(1+(((k-1)/2)*M^2)) //Temperature of air at nose of aircraft in K\n", +"To1=To-273 //Temperature of air at nose of aircraft in degree Centigrade\n", +"\n", +"//Output \n", +"printf('Temperature of air at nose of aircraft is %3.1f degree Centigrade',To1)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1_38: To_determine_stagnation_pressure_and_stagnation_temperature.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"P=1 //Pressure in bar\n", +"T=400 //Temperature in K\n", +"C=400 //Air velocity in m/s\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"Cp=1005 //Specific heat capacity at constnat pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"To=T+(C^2/(2*Cp)) //Stagnation Temperature in K\n", +"Poi=P+((P*C^2)/(R*T*2)) //Stagnation Pressure (if it is incompressible) in bar\n", +"Poc=P*(To/T)^(k/(k-1)) //Stagnation Pressure (if it is compressible) in bar\n", +"\n", +"//Output\n", +"printf('(Stagnation Temperature is %3.1f K\n (C)Stagnation Pressure:\n If it is incompressible is %3.4f bar\n If it is compressible is %3.4f bar',To,Poi,Poc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1_39: To_calculate_bulk_modulus_of_elasticity_of_a_liquid.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"v1=8 //Intial volume in litres\n", +"P1=0.7 //Intial pressure in MPa\n", +"v2=7.8 //Final volume in litres\n", +"P2=2.7 //Final pressure in MPa\n", +"\n", +"//Calculation\n", +"k=(P2-P1)/(log(v1/v2)) //Bulk modulus of elasticity of a liquid in MPa\n", +"\n", +"//Output\n", +"printf('Bulk modulus of elasticity of a liquid is %3.3f MPa',k)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.1_40: To_find_highest_possible_velocity.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"To=15+273 //Air Temperature in K\n", +"Cp=1005 //Specific heat capacity at constnat pressure in J/kg-K\n", +"\n", +"//Calculation \n", +"Cmax=sqrt(2*Cp*To) //Highest possible velocity in m/s\n", +"\n", +"//Output\n", +"printf('Highest possible velocity is %3.2f m/s',Cmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3_10: To_find_the_length_of_the_pipe.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=0.25 //mach number\n", +"D=0.04 //Diamter in m\n", +"f=0.002 //frictional factor\n", +"\n", +"//Calculation\n", +"X=8.483 //fanno parameter from gas tables at M\n", +"Lmax=(X*D)/(4*f) //Lenggth of the pipe in m\n", +"\n", +"//Output\n", +"printf('Length of the pipe is %3.3f m',Lmax)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3_15: To_find_length_of_the_pipe_to_achieve_deceleration.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=3 //mach number\n", +"D=0.04 //Diamter in m\n", +"f=0.002 //frictional factor\n", +"\n", +"//Calculation\n", +"X=0.522 //fanno parameter from gas tables at M\n", +"L=(X*D)/(4*f) //Lenggth of the pipe in m\n", +"\n", +"//Output\n", +"printf('Lenggth of the pipe is %3.2f m',L)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3_31: To_find_maximum_possible_amount_of_heat_transfer_of_combustion_chamber.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=0.2 //Mach number\n", +"To=120+273 //Stagnation Temperature in K\n", +"Cp=1005 //Specific heat capacity at constnat pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"t1=0.174 //Temperature ratio (To/Tot) from Rayleigh gas tables\n", +"Tot=To/t1 //Critical stagnation temperature in K\n", +"q=Cp*(Tot-To)*10^-3 //Maximum amount of heat transfer in kJ/kg\n", +"\n", +"//Output\n", +"printf('Maximum amount of heat transfer is %3.2f kJ/kg',q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3_32: To_find_increase_in_specific_entropy_of_the_fluid.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"p1=0.75 //Pressure ratio (Po2/Po1) Since Stagnation pressure drop is 25%\n", +"Cp=1150 //Specific heat capacity at constnat pressure in J/kg-K\n", +"k=1.33 //Adiabatic constant \n", +"\n", +"//Calculation\n", +"ds=((k-1)/k)*Cp*log(1/p1) //Increase in entropy in J/kg-K\n", +"\n", +"//Output \n", +"printf('Increase in entropy is %3.2f J/kg-K',ds)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.3_33: To_pipe_maximum_heat_transfer_in_a_pipe.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mi=2.2 //Inlet Mach number\n", +"T=100+273 //Temperature in K\n", +"Cp=1005 //Specific heat capacity at constnat pressure in J/kg-K\n", +"\n", +"//Calculation\n", +"t1=0.508 //Temperature ratio (To/Tot) from isentropic gas tables @Mi\n", +"To=T/t1 //Stagnation Temperature in K\n", +"t2=0.756 //Temperature ratio (To/Tot) from Rayleigh gas tables @Mi\n", +"Tot=To/t2 //Critical stagnation temperature in K\n", +"q=Cp*(Tot-To)*10^-3 //Maximum amount of heat transfer in kJ/kg\n", +"\n", +"//Output\n", +"printf('Maximum amount of heat transfer is %3.4f kJ/kg',q)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5_16: To_find_pressure_acting_on_the_front_of_the_body.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mx=1.5 //Mach number\n", +"P=40 //Static pressure in kPa\n", +"\n", +"//Calculation\n", +"p1=3.413 //Pressure ratio in (Poy/Px) from normal shock gas tables @Mx\n", +"Poy=p1*P //Pressure acting on front of the body in kPa\n", +"\n", +"//Output\n", +"printf('Pressure acting on front of the body is %3.1f kPa',Poy)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5_17: To_find_strength_of_shock_wave.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"M=2 //Mach number at shock\n", +"\n", +"//Calculation\n", +"p1=4.5 //Pressure ratio (Py/Px) from normal shock gas tables @M\n", +"e=p1-1 //Strength of shock wave\n", +"\n", +"//Output\n", +"printf('Strength of shock wave is %3.1f',e)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5_20: To_find_irreversibility_of_duct.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Mx=7 //mach number upstream of shock\n", +"P=2 //pressure @Mx in bar\n", +"T=57+273 //Temperature @Mx in K\n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation \n", +"p1=0.72 //Pressure ratio (Poy/Pox) from normal shock gas tables @Mx\n", +"ds=R*log(1/p1) //Irreversibility in J/kg-K\n", +"\n", +"//Output\n", +"printf('Irreversibility is %3.2f J/kg-K',ds)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5_21: To_find_mach_number_and_air_velocity_of_pitot_tube.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Px=45 //Static pressure in kPa\n", +"T=-20+273 //Static temperature in K\n", +"Poy=395 //Stagnation pressure in kPa\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"p1=Poy/Px //Pressure ratio\n", +"Mx=2.536 //Mach number from normal shock gas tables @p1\n", +"Cx=Mx*sqrt(k*R*T) //Air velocity in m/s\n", +"\n", +"//Output\n", +"printf('Mach number is %3.3f\n Air velocity is %3i m/s',Mx,Cx)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.5_22: To_find_properties_downstream_of_the_shock.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Cx=750 //velocity upstream of shock in m/s\n", +"Px=1 //Pressure upstream of shock in bar\n", +"Tx=10+273 //Temperature upstream of shock in K\n", +"k=1.4 //Adiabatic constant \n", +"R=287 //Specific gas constant in J/kg-K\n", +"\n", +"//Calculation\n", +"Mx=Cx/sqrt(k*R*Tx) //Mach number upstream of shock\n", +"My=0.545 //Mach number downstream of shock from normal shock gas tables, Mistake in textbook\n", +"t1=1.875 //Temperature ratio (Ty/Tx)\n", +"Ty=Tx*t1 //Static temperature downstream of shock in K\n", +"p1=5.583 //Pressure ratio (Py/Px)\n", +"Py=Px*p1 //Static pressure downstream of shock in bar\n", +"Cy=My*sqrt(k*R*Ty) //velocity downstream of shock in m/s\n", +"\n", +"//Output\n", +"printf('Downstream of shock:\n Velocity is %3.3f m/s\n Pressure is %3.3f bar\n Temperature is %3.3f K',Cy,Py,Ty)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6_41: To_find_propulsive_efficiency_for_an_optimum_thrust_power.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Calculation \n", +"\n", +"//Differentiating P=m*(Cj-u)*u and equating it to zero we get jet speed ratio as 0.5\n", +"sig=0.5 //Jet speed ratio \n", +"eff_max=((2*sig)/(1+sig)) //Propulsive efficiency for optimum thrust power, wrong notation in textbook.\n", +"\n", +"//Output\n", +"printf('Propulsive efficiency for optimum thrust power is %3.3f',eff_max)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.6_42: To_find_propulsive_efficency.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input dat\n", +"u=1200*(5/18) //Flight velocity in m/s\n", +"Cj=800 //Effective jet velocity in m/s\n", +"\n", +"//Calculation\n", +"sig=u/Cj //jet speed ratio\n", +"eff=((2*sig)/(1+sig))*100 //Propulsive efficiency in %\n", +"\n", +"//Output\n", +"printf('Propulsive efficiency is %3.1f percent',eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7_42: To_find_thrust_of_the_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"m=5 //Propellent rate in kg/s\n", +"Pamb=1.013 //Ambient pressure in bar\n", +"Pe=1.02 //Nozzle exit pressure in bar\n", +"D=0.1 //Nozzle exit diameter in m\n", +"Ce=1400 //Exit jet velocity in m/s\n", +"\n", +"//Calculation\n", +"Ae=%pi*D^2/4 //Exit area in m^2\n", +"F=(m*Ce)+((Pe-Pamb)*Ae) //Thrust in N\n", +"\n", +"//Output\n", +"printf('Thrust is %3i N',F)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7_44: To_find_the_thrust_developed.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Is=230 //Specific Impulse in sec\n", +"m=1 //Propellent flow in kg/s\n", +"g=9.81 //Acceleration due to gravity in m/s^2\n", +"\n", +"//Calculation\n", +"F=m*Is*g //Thrust in N\n", +"\n", +"//Output\n", +"printf('Thrust is %3.1f N',F)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7_45: To_find_the_jet_velocity_of_a_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=1500 //Flight velocity in m/s\n", +"eff=0.75 //Propulsive efficiency\n", +"\n", +"//calculation\n", +"//Converting relation eff=(2*sig)/(1+sig^2) into 2nd degree polynomial of sig\n", +"sig=((2-(sqrt(4-(4*eff*eff))))/(2*eff)) //Jet speed ratio\n", +"Cj=u/sig //Jet velocity in m/s\n", +"\n", +"//Output\n", +"printf('Jet velocity is %3.2f m/s',Cj)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7_46: To_calculate_thrust_propulsive_efficiency_and_thrust_power_of_a_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"Cj=2700 //Jet velocity in m/s\n", +"u=1350 //Flight velocity in m/s\n", +"m=78.6 //Propellent flow in kg/s\n", +"\n", +"//Calculation\n", +"F=m*Cj*10^-3 //Thrust in kN\n", +"P=F*u*10^-3 //Thrust power in MW\n", +"sig=u/Cj //Jet speed ratio\n", +"eff=((2*sig)/(1+sig^2))*100 //Propulsive efficiency in %\n", +"\n", +"//Output\n", +"printf('Thrust is %3.1f kN\n Thrust power is %3.2f MW\n Propulsive efficiency is %3i percent',F,P,eff)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7_47: To_determine_orbital_velocity_and_escape_velocity_of_a_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"D=12683*1000 //Diameter of Earth in m\n", +"g=9.81 //Acceleration due to gravity in m/s\n", +"h=500*1000 //Altitude in m\n", +"\n", +"//Calculation\n", +"Uorb=(D/2)*sqrt(g/((D/2)+h)) //Orbital velocity in m/s\n", +"Uesc=sqrt(2)*Uorb //Escape velocity in m/s\n", +"\n", +"//Output\n", +"printf('Orbital velocity is %3.2f m/s\n Escape velocity is %3.2f m/s',Uorb,Uesc)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8.7_48: To_determine_propulsive_efficiency_and_propulsive_power_of_a_rocket.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"\n", +"//Input data\n", +"u=10080*(5/18) //Flight velocity in m/s\n", +"Cj=1400 //Jet velocity in m/s\n", +"m=5 //Propellent flow in kg/s\n", +"\n", +"//calculation\n", +"F=m*Cj*10^-3 //Thrust in kN\n", +"P=F*u*10^-3 //Thrust power in MW\n", +"sig=u/Cj //Jet speed ratio\n", +"eff=((2*sig)/(1+sig^2)) //Propulsive efficiency \n", +"\n", +"//Output\n", +"printf('Propulsive power is %3.1f MW\n Propulsive efficiency is %3.1f',P,eff)" + ] + } +], +"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 +} |