From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 812/CH12/EX12.01/12_01.sce | 33 ++++++++++++++++++++++++++ 812/CH12/EX12.02/12_02.sce | 27 +++++++++++++++++++++ 812/CH12/EX12.03/12_03.sce | 29 +++++++++++++++++++++++ 812/CH12/EX12.04/12_04.sce | 32 +++++++++++++++++++++++++ 812/CH12/EX12.05/12_05.sce | 13 +++++++++++ 812/CH12/EX12.06/12_06.sce | 32 +++++++++++++++++++++++++ 812/CH12/EX12.07/12_07.sce | 34 +++++++++++++++++++++++++++ 812/CH12/EX12.08/12_08.sce | 34 +++++++++++++++++++++++++++ 812/CH12/EX12.09/12_09.sce | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 812/CH12/EX12.10/12_10.sce | 43 ++++++++++++++++++++++++++++++++++ 10 files changed, 335 insertions(+) create mode 100755 812/CH12/EX12.01/12_01.sce create mode 100755 812/CH12/EX12.02/12_02.sce create mode 100755 812/CH12/EX12.03/12_03.sce create mode 100755 812/CH12/EX12.04/12_04.sce create mode 100755 812/CH12/EX12.05/12_05.sce create mode 100755 812/CH12/EX12.06/12_06.sce create mode 100755 812/CH12/EX12.07/12_07.sce create mode 100755 812/CH12/EX12.08/12_08.sce create mode 100755 812/CH12/EX12.09/12_09.sce create mode 100755 812/CH12/EX12.10/12_10.sce (limited to '812/CH12') diff --git a/812/CH12/EX12.01/12_01.sce b/812/CH12/EX12.01/12_01.sce new file mode 100755 index 000000000..ede9ac151 --- /dev/null +++ b/812/CH12/EX12.01/12_01.sce @@ -0,0 +1,33 @@ +//pressure and area// +pathname=get_absolute_file_path('12.01.sce') +filename=pathname+filesep()+'12.01-data.sci' +exec(filename) +//Here the stagnation quantities are constant. +// Stagnation temperature(in K): +T0=T1*(1+(k-1)/2*M1^2) +//Stagnation pressure(in kPa): +p0=p1*((1+(k-1)/2*M1^2)^(k/(k-1))) +//Finding T2/T1: +T=t2/t1 +//Temperature at exit(in K): +T2=T*T1 +//Finding p2/p1: +P=P2/P1 +//Pressure at exit(in kPa): +p2=P2*p1 +//Density of air at exit(in kg/m^3): +d2=p2*10^3/R/T2 +//Velocity of air at exit(in m/sec): +V2=M2*sqrt(k*R*T2) +//Finding A2/A1: +a=a2/a1 +//Area at exit(in m^2): +A2=a*A1 +printf("\n\nRESULTS\n\n") +printf("\n\nStagnation temperature: %.3f K\n\n",T0) +printf("\n\nStagantion pressure: %.3f kPa\n\n",p0) +printf("\n\nTemperature a exit %.3f K\n\n",T2) +printf("\n\nPressure at exit: %.3f kPa\n\n",p2) +printf("\n\nDensity of air at exit: %.3f kg/m^3\n\n",d2) +printf("\n\nVelocity of air at exit: %.3f m/sec\n\n",V2) +printf("\n\nArea at exit: %.3f \n\n",A2) diff --git a/812/CH12/EX12.02/12_02.sce b/812/CH12/EX12.02/12_02.sce new file mode 100755 index 000000000..9410fab06 --- /dev/null +++ b/812/CH12/EX12.02/12_02.sce @@ -0,0 +1,27 @@ +//Mass flow// +pathname=get_absolute_file_path('12.02.sce') +filename=pathname+filesep()+'12.02-data.sci' +exec(filename) +//Checking for chocking: +c=pb/p0; +if(c<=0.528) + //choked +else + //Not choked + //Therefore pressure at exit = back pressure + pe=pb; + //Mach number at exit: + Me=(((p0/pe)^((k-1)/k)-1)*(2/(k-1)))^0.5 + //Temperature at exit(in K): + Te=T0/(1+(k-1)/2*Me^2) + //Velocity at exit(in m/sec): + Ve=Me*sqrt(k*R*Te) + //Density at exit(in kg/m^3): + de=pe*10^3/R/Te + //Mass flow rate of air(kg/sec): + m=de*Ve*Ae +end; +printf("\n\nRESULTS\n\n") +printf("\n\nMach number at exit: %.3f\n\n",Me) +printf("\n\nMass flow rate of air: %.3f kg/sec\n\n",m) + diff --git a/812/CH12/EX12.03/12_03.sce b/812/CH12/EX12.03/12_03.sce new file mode 100755 index 000000000..23bf28dac --- /dev/null +++ b/812/CH12/EX12.03/12_03.sce @@ -0,0 +1,29 @@ +//mass and area// +pathname=get_absolute_file_path('12.03.sce') +filename=pathname+filesep()+'12.03-data.sci' +exec(filename) +//Saturation pressure(in psia): +p0=p1*(1+(k-1)/2*M1^2)^(k/(k-1)) +//Checking for choking: +x=pb/p0; +if(x>0.528) + //Not choked +else + //choked +end +//As there is choking: +Mt=1; +//Velocity at entry: +V1=M1*sqrt(k*R*(T1+460)*32.2) +//Density at the entry(in lbm/ft^3): +d1=p1/(R*(T1+460))*144 +//Mass flow rate(in lbm/sec): +m=d1*V1*A1 +//Finding the valueof A1/A*; +A=1/M1*((1+(k-1)/2*M1^2)/(1+(k-1)/2))^((k+1)/(2*(k-1))) +//For choked flow, At=A* +At=A1/A +printf("\n\nRESULTS\n\n") +printf("\n\nMach number at throat: %.3f\n\n",Mt) +printf("\n\nMass flow rate: %.3f lbm/sec\n\n",m) +printf("\n\nArea at throat: %.3f ft^2\n\n",At) diff --git a/812/CH12/EX12.04/12_04.sce b/812/CH12/EX12.04/12_04.sce new file mode 100755 index 000000000..5839d27ec --- /dev/null +++ b/812/CH12/EX12.04/12_04.sce @@ -0,0 +1,32 @@ +//throat// +pathname=get_absolute_file_path('12.04.sce') +filename=pathname+filesep()+'12.04-data.sci' +exec(filename) +//Temperature at the throat(in K): +Tt=T0/(1+(k-1)/2*Mt^2) +//Pressure at throat(in kPa): +pt=p0*(Tt/T0)^(k/(k-1)) +//Density at throat(in kg/m^3): +dt=pt*1000/R/Tt +//Velocity at the throat(in m/s): +Vt=Mt*sqrt(k*R*Tt) +//Value of At/A*: +Ax=1/Mt*((1+(k-1)/2*Mt^2)/(1+(k-1)/2))^((k+1)/(2*(k-1))) +//Stagnation properties are constant +//As a result pressure at exit, +pe=pb; +//The Mach number at the exit is therefore given by +Me=sqrt(((p0/pe)^((k-1)/k)-1)*2/(k-1)) +//Calculating the value of Ae/A*: +Ay=1/Me*((1+(k-1)/2*Me^2)/(1+(k-1)/2))^((k+1)/(2*(k-1))) +//Value of A*(in m^2): +A_star=Ae/Ay +//Area at throat(in m^2): +At=Ax*A_star +printf("\n\nRESULTS\n\n") +printf("\n\nTemperature at the throat: %.3f K\n\n",Tt) +printf("\n\nPressure at throat: %.3f kPa\n\n",pt) +printf("\n\nDensity at throat: %.3f kg/m^3\n\n",dt) +printf("\n\nVelocity at the throat: %.3f m/sec\n\n",Vt) +printf("\n\nMach number at the exit: %.3f\n\n",Me) +printf("\n\nArea at throat: %.3f m^2\n\n",At) diff --git a/812/CH12/EX12.05/12_05.sce b/812/CH12/EX12.05/12_05.sce new file mode 100755 index 000000000..22d125b1b --- /dev/null +++ b/812/CH12/EX12.05/12_05.sce @@ -0,0 +1,13 @@ +//number and flow// +pathname=get_absolute_file_path('12.05.sce') +filename=pathname+filesep()+'12.05-data.sci' +exec(filename) +//Mach number at the exit: +Me=sqrt(((p0/pe)^((k-1)/k)-1)*2/(k-1)) +//Temperature at exit(in K): +Te=T0/(1+(k-1)/2*Me^2) +//Mass flow rate(in kg/s): +m=pe*1000*Me*sqrt(k/R/Te)*Ae +printf("\n\nRESULTS\n\n") +printf("\n\nMach number at the exit: %.3f \n\n",Me) +printf("\n\nMass flow rate: %.3f kg/sec\n\n",m) diff --git a/812/CH12/EX12.06/12_06.sce b/812/CH12/EX12.06/12_06.sce new file mode 100755 index 000000000..f7c00e5cd --- /dev/null +++ b/812/CH12/EX12.06/12_06.sce @@ -0,0 +1,32 @@ +//mass and volume// +pathname=get_absolute_file_path('12.06.sce') +filename=pathname+filesep()+'12.06-data.sci' +exec(filename) +//Mach umber at section 1: +M1=sqrt((2/(k-1)*((p0/p1)^((k-1)/k)-1))) +//Temperature at section 1(in K): +T1=T0/(1+(k-1)/2*M1^2) +//Density at section 1(in kg/m^3): +d1=p1*1000/R/T1 +//Velocity at section1(in m/sec): +V1=M1*sqrt(k*R*T1) +//Area at section 1(in m^2): +A1=%pi/4*D^2 +//Mass flow rate(in kg/sec): +m=d1*A1*V1 +//Mach number at section 2: +M2=sqrt((2/(k-1))*((T0/T2)-1)) +//Velocity at section 2(in m/sec): +V2=M2*sqrt(k*R*T2) +//Density at section 2(in kg/m^3): +d2=d1*V1/V2 +//Pressure at section 2(in kPa): +p2=d2/1000*R*T2 +//Stagnation pressure at section 2(in kPa): +p02=p2*(1+(k-1)/2*M2^2)^(k/(k-1)) +//Force exerted on control volume by duct wall(in N): +F=(p2-p1)*1000*A1+m*(V2-V1) +printf("\n\nRESULTS\n\n") +printf("\n\nMass flow rate: %.3f kg/sec\n\n",m) +printf("\n\nLocal isentropic stagnation pressure at section 2:%.3f kPa\n\n",p02) +printf("\n\nForce exerted on control volume by duct wall:%.3f N\n\n",F) diff --git a/812/CH12/EX12.07/12_07.sce b/812/CH12/EX12.07/12_07.sce new file mode 100755 index 000000000..44177a095 --- /dev/null +++ b/812/CH12/EX12.07/12_07.sce @@ -0,0 +1,34 @@ +//length// +pathname=get_absolute_file_path('12.07.sce') +filename=pathname+filesep()+'12.07-data.sci' +exec(filename) +//Mach number at section 1: +M1= sqrt(2/(k-1)*((p0/(p0+p1))^((k-1)/k)-1)) +//Temperature at section 1(in K): +T1=T0/(1+(k-1)/2*(M1)^2) +V1=M1*sqrt(k*R*T1) +//Pressure at section 1(in kPa): +p1=g*dHg*(760-18.9)*10^-3 +//Density at section 1(in kg/m^3): +d1=p1/R/T1 +//At M1=0.190, +//(p/p*)1: +P1=5.745 +// (fLmax/Dh)1: +F1=16.38 +//Value of L13(in m): +L13=F1*D/f +//Value of (p/p*)2: +P2=p2/p1*P1 +//For this value, Value of M2 is obtained as 0.4 +M2=0.4; +//For M=0.4, fLmX/D=2.309 +F2=2.309 +//Value of L23(in m): +L23=F2*D/f +//Length of duct between section 1 and 2(in m): +L12=L13-L23 +printf("\n\nRESULTS\n\n") +printf("\n\nLength of duct required for choking from section 1: %3f m\n\n",L13) +printf("\n\nMach number section 2: %.3f \n\n",M2) +printf("\n\Length of duct between section 1 and 2: %.3f m\n\n",L12) diff --git a/812/CH12/EX12.08/12_08.sce b/812/CH12/EX12.08/12_08.sce new file mode 100755 index 000000000..cd86a9749 --- /dev/null +++ b/812/CH12/EX12.08/12_08.sce @@ -0,0 +1,34 @@ +//velocity and entropy// +pathname=get_absolute_file_path('12.08.sce') +filename=pathname+filesep()+'12.08-data.sci' +exec(filename) +//Density at section 1(in lbm/ft^3): +d1=p1*144/R/T1 +//Velocity at section 2(in ft/sec): +V2=(p1-p2)*144/d1/V1*32.2+V1 +//Density at section 2(in lbm/ft3): +d2=d1*V1/V2 +//Temperature at section 2(in R): +T2=p2/d2/R*144 +//Mach number at section 2: +M2=V2/sqrt(k*R*32.16*T2) +//Stagnation Temperature at section 2(in R): +T02=T2*(1+(k-1)/2*M2^2) +//Stagnation pressure at section 2 (in psia): +p02=p2*(T02/T2)^(k/(k-1)) +//Mach Number at section 1: +M1=V1/sqrt(k*R*32.16*T1) +//Stagnation temperature at section 1(in R): +T01=T1*(1+(k-1)/2*M1^2) +//Energy added(in Btu/lbm): +E=Cp*(T02-T01) +//Change in entropy(in Btu/(lbm-R)): +dS=Cp*log(T2/T1)-(Cp-Cv)*log(p2/p1) +printf("\n\nRESULTS\n\n") +printf("\n\nVelocity at section 2: %.3f ft/sec\n\n",V2) +printf("\n\nDensity at section 2: %.3f lbm/ft^3\n\n",d2) +printf("\n\nTemperature at section 2: %.3f R\n\n",T2) +printf("\n\nStagnation Temperature at section 2: %.3f R\n\n",T02) +printf("\n\nStagnation pressure at section 2: %.3f psia\n\n",p02) +printf("\n\nEnergy added: %.3f Btu/lbm\n\n",E) +printf("\n\nChange in entropy: %.3f Btu/(lbm-R)\n\n",dS) diff --git a/812/CH12/EX12.09/12_09.sce b/812/CH12/EX12.09/12_09.sce new file mode 100755 index 000000000..d39b89a78 --- /dev/null +++ b/812/CH12/EX12.09/12_09.sce @@ -0,0 +1,58 @@ +//Temperature and entropy// +pathname=get_absolute_file_path('12.09.sce') +filename=pathname+filesep()+'12.09-data.sci' +exec(filename) +//Mach nuber at section 1: +M1=V1/sqrt(k*R*T1) +//For these value of M1 and M2,the following values are obtained: +//(To/T0*)1: +t01=0.7934; +//(T0/T0*)2: +t02=0.9787; +//(p0/p0*)1: +P01=1.503; +//(p0/p0*)2: +P02=1.019; +//(T/T*)1: +t1=0.5289; +//(T/T*)2: +t2=0.9119; +//(p/p*)1: +P1=0.3636; +//(p/p*)2: +P2=0.7958; +//(V/V*)1: +v1=1.455; +//(V/V*)2: +v2=1.146; +//Value of T2/T1: +t=t2/t1 +//Temperature at section 2(in K): +T2=t*T1 +//Value of p2/p1: +p=P2/P1 +//Pressure at section 2(in kPa): +p2=p*p1 +//Value of V2/V1: +v=v2/v1 +//Velocity at section 2(in m/sec): +V2=v*V1 +//Density at section 2(in kg/m^3): +d2=p2*1000/R/T2 +//At M1, T/T0=0.5556 +T01=T1/0.5556 +//At M2, T/T0=0.7764 +T02=T2/0.7764 +//Heat added(in kJ/kg): +E=Cp*(T02-T01) +//Change in entropy(kJ/kg-K): +dS=Cp*log(T2/T1)-R*log(p2/p1)/1000 +printf("\n\nRESULTS\n\n") +printf("\n\nTemperature at section 2: %.3f K\n\n",T2) +printf("\n\nPressure at section 2: %.3f kPa\n\n",p2) +printf("\n\nVelocity at section 2: %.3f m/sec\n\n",V2) +printf("\n\nDensity at section 2: %.3f kg/m^3\n\n",d2) +printf("\n\nStagnation temperature at section 2: %.3f K\n\n",T02) +printf("\n\nHeat added: %.3f kJ/kg\n\n",E) +printf("\n\nChange in entropy: %.3f kJ/kg\n\n",dS) + diff --git a/812/CH12/EX12.10/12_10.sce b/812/CH12/EX12.10/12_10.sce new file mode 100755 index 000000000..bff927440 --- /dev/null +++ b/812/CH12/EX12.10/12_10.sce @@ -0,0 +1,43 @@ +//Temperature// +pathname=get_absolute_file_path('12.10.sce') +filename=pathname+filesep()+'12.10-data.sci' +exec(filename) +//Density at section 1(in kg/m^3): +d1=p1*1000/R/T1 +//Mach number at section 1: +M1=V1/sqrt(k*R*T1) +//Stagnation temperature at section 1(in K): +T01=T1*(1+(k-1)/2*M1^2) +//Stagnation pressure at section 1(in kPa): +p01=p1*(1+(k-1)/2*M1^2)^(k/(k-1)) +//The following values are obtained from the appendix: +//po2/p01: +p0=0.7209; +//T2/T1: +T=1.687; +//p2/p1: +p=4.5; +//V2/V1: +V=0.3750; +//Temperature at section 2 (in K): +T2=T*T1 +//Pressure at section 2(in kPa): +p2=p*p1 +//Velocity at section 2(in m/sec): +V2=V*V1 +//Density at section 2 (in kg/m^3): +d2=p2*1000/R/T2 +//Stagnation pressure at section 2(in kPa): +p02=p0*p01 +//Stagnation temperature at section 2(in K): +T02=T01; +//Change in entropy(in kJ/(kg-K)): +dS=-R/1000*log(p0) +printf("\n\nRESULTS\n\n") +printf("\n\nTemperature at section 2 : %.3f K\n\n",T2) +printf("\n\nPressure at section 2: %.3f kPa\n\n",p2) +printf("\n\nVelocity at section 2: %.3f m/sec\n\n",V2) +printf("\n\nDensity at section 2 : %.3f kg/m^3\n\n",d2) +printf("\n\nStagnation pressure at section 2: %.3f kPa\n\n",p02) +printf("\n\nChange in entropy: %.3f kg-K\n\n",dS) +printf("\n\nStagnation temperature at section 2: %.3f K\n\n",T02) -- cgit