summaryrefslogtreecommitdiff
path: root/3720/CH12
diff options
context:
space:
mode:
Diffstat (limited to '3720/CH12')
-rw-r--r--3720/CH12/EX12.1/Ex12_1.sce22
-rw-r--r--3720/CH12/EX12.10/Ex12_10.sce9
-rw-r--r--3720/CH12/EX12.11/Ex12_11.sce23
-rw-r--r--3720/CH12/EX12.12/Ex12_12.sce23
-rw-r--r--3720/CH12/EX12.15/Ex12_15.sce37
-rw-r--r--3720/CH12/EX12.16/Ex12_16.sce37
-rw-r--r--3720/CH12/EX12.17/Ex12_17.sce31
-rw-r--r--3720/CH12/EX12.2/Ex12_2.sce16
-rw-r--r--3720/CH12/EX12.3/Ex12_3.sce24
-rw-r--r--3720/CH12/EX12.4/Ex12_4.sce17
-rw-r--r--3720/CH12/EX12.5/Ex12_5.sce41
-rw-r--r--3720/CH12/EX12.6/Ex12_6.sce25
-rw-r--r--3720/CH12/EX12.7/Ex12_7.sce43
-rw-r--r--3720/CH12/EX12.9/Ex12_9.sce47
14 files changed, 395 insertions, 0 deletions
diff --git a/3720/CH12/EX12.1/Ex12_1.sce b/3720/CH12/EX12.1/Ex12_1.sce
new file mode 100644
index 000000000..450f9e65c
--- /dev/null
+++ b/3720/CH12/EX12.1/Ex12_1.sce
@@ -0,0 +1,22 @@
+//Example 12_1
+clc;clear;funcprot(0);
+// Given values
+T_1=255.7;// The ambient air temperature in K
+P_1=54.05;//The atmospheric pressure in kPa
+V_1=250;// m/s
+h=5000;// m
+P_r=8;// Pressure ratio of the compressor
+// Properties
+C_p=1.005;//The constant-pressure specific heat C_p in kJ/kg.k
+k=1.4;// The specific heat ratio
+
+//Calculation
+//(a)
+T_01=T_1+(V_1^2/(2*C_p*1000));//The stagnation temperature at the compressor inlet in K
+P_01=P_1*(T_01/T_1)^(k/(k-1));//kPa
+printf('The stagnation pressure at the compressor inlet,P_01=%0.2f kPa\n',P_01);
+//(b)
+// P_r=(P_02/P_01)
+T_02=T_01*(P_r)^((k-1)/k);//The stagnation temperature of air at the compressor exit in K
+W_in=C_p*(T_02-T_01);//the compressor work per unit mass of air in kJ/kg
+printf('The compressor work per unit mass of air,W_in=%0.1f kJ/kg\n',W_in);
diff --git a/3720/CH12/EX12.10/Ex12_10.sce b/3720/CH12/EX12.10/Ex12_10.sce
new file mode 100644
index 000000000..8b7f3977f
--- /dev/null
+++ b/3720/CH12/EX12.10/Ex12_10.sce
@@ -0,0 +1,9 @@
+//Example 12_10
+clc;clear;
+// Given values
+mu=19;// Angle of Mach lines in degrees
+
+// Calculation
+// mu=asind(1/Ma_1)
+Ma_1=1/sind (19);// Mach number
+printf('Mach number ,Ma=%0.2f \n',Ma_1);
diff --git a/3720/CH12/EX12.11/Ex12_11.sce b/3720/CH12/EX12.11/Ex12_11.sce
new file mode 100644
index 000000000..f70db3859
--- /dev/null
+++ b/3720/CH12/EX12.11/Ex12_11.sce
@@ -0,0 +1,23 @@
+// Example 12_11
+clc;clear;funcprot(0);
+//Given values
+Ma_1=2;// Mach number
+delta=10;// degree
+P_1=75.0;// kPa
+//Properties
+k=1.4;// Specific heat ratio
+
+// Calculation
+theta=delta;// Deflection in degrees
+beta_w=39.3;// Oblique shock angle in degrees
+beta_s=83.7;// Oblique shock angle in degrees
+Ma_1nw=Ma_1*sind(beta_w);// Mach Number on upstream side
+Ma_1ns=Ma_1*sind(beta_s);// Mach Number on upstream side
+Ma_2nw=0.8032;// Mach number
+Ma_2ns=0.5794;// Mach number
+P_2w=P_1*((2*k*(Ma_1nw)^2)-k+1)/(k+1);// Pressure in kPa
+P_2s=P_1*((2*k*(Ma_1ns)^2)-k+1)/(k+1);// Pressure in kPa
+Ma_2w=(Ma_2nw)/(sind(beta_w-theta));// Mach Number on the downstream side
+Ma_2s=(Ma_2ns)/(sind(beta_s-theta));// Mach Number on the downstream side
+printf('\nThe pressure on the downstream side,P_2=%0.0f kPa(weak shock) & P_2=%0.0f kPa(strong shock)\nThe Mach number on the downstream side of the oblique shock,Ma_2=%0.2f (weak shock) & Ma_2=%0.3f (strong shock)',P_2w,P_2s,Ma_2w,Ma_2s);
+disp(Ma_1nw)
diff --git a/3720/CH12/EX12.12/Ex12_12.sce b/3720/CH12/EX12.12/Ex12_12.sce
new file mode 100644
index 000000000..1f2ce61eb
--- /dev/null
+++ b/3720/CH12/EX12.12/Ex12_12.sce
@@ -0,0 +1,23 @@
+// Example 12_12
+clc;clear;funcprot(0);
+//Given values
+Ma_1=2.0;// Mach number
+P_1=230;// kPa
+delta=10;// degree
+//Properties
+k=1.4//The specific heat ratio
+
+//Calculation
+theta=delta;
+v_1=(sqrt((k+1)/(k-1))*atand(sqrt(((k-1)*(Ma_1^2-1))/(k+1))))-atand(sqrt(Ma_1^2-1));// degree
+v_2=theta+v_1;// degree
+// Ma_2=y(1);
+function[X]=Machnumber(y);
+ X(1)=((sqrt((k+1)/(k-1))*atand(sqrt(((k-1)*(y(1)^2-1))/(k+1))))-atand(sqrt(y(1)^2-1))-v_2);
+endfunction
+y=[1];
+z=fsolve(y,Machnumber);
+printf('The downstream Mach number Ma_2=%0.3f\n',z(1));
+Ma_2=z(1);
+P_2=((((1+(((k-1)/2)*Ma_2^2)))^(-k/(k-1)))/(((1+(((k-1)/2)*Ma_1^2)))^(-k/(k-1))))*(P_1);
+printf('The downstream pressure,P_2=%0.0f kPa\n',P_2);
diff --git a/3720/CH12/EX12.15/Ex12_15.sce b/3720/CH12/EX12.15/Ex12_15.sce
new file mode 100644
index 000000000..417082dfb
--- /dev/null
+++ b/3720/CH12/EX12.15/Ex12_15.sce
@@ -0,0 +1,37 @@
+//Example 12_15
+clc;clear;
+//Properties
+k=1.4;
+C_p=1.005;// kJ/kg*K
+R=0.287;// kJ/kg*K
+// given values
+D=0.15;// m
+V_1=80;// m/s
+T_1=550;// K
+P_1=480;// kPa
+HV=42000;// kJ/kg
+AF=40;
+
+//Calculation
+rho_1=P_1/(R*T_1);// kg/m^3
+A=%pi*D^2*V_1;// m^2
+m_air=rho_1*A*V_1; // kg/s
+m_f=m_air/AF;// kg/s
+Q=m_f*HV;// kW
+q=Q/m_air;// kJ/kg
+T_01=T_1+(V_1^2/(2*C_p*1000));// K
+c_1=sqrt(k*R*T_1); // m/s
+Ma_1=V_1/c_1;
+T_02=+(q+C_p);// K
+// From Table A-15
+T_c=T_01/0.1291;// K
+T_c1=T_02/T_c;
+//Using T_c1 value & From Table A-15
+Ma_2=0.3142;
+printf('The exit Mach number ,Ma_2=%0.4f \n',Ma_2);
+T_2=2.848*T_1;// K
+printf('The exit temperature,T_2=%0.0f K\n',T_2);
+P_2=0.9142*P_1;// kPa
+printf('The exit pressure ,P_2=%0.0f kPa\n',P_2);
+V_2=3.117*V_1;// m/s
+printf('The exit velocity ,V_2=%0.0f m/s\n',V_2);
diff --git a/3720/CH12/EX12.16/Ex12_16.sce b/3720/CH12/EX12.16/Ex12_16.sce
new file mode 100644
index 000000000..f2bb05977
--- /dev/null
+++ b/3720/CH12/EX12.16/Ex12_16.sce
@@ -0,0 +1,37 @@
+//Example 12_16
+clc;clear;
+// Given values
+D=3/100;// Diameter in m
+P_1=150;// kPa
+T_1=300;// K
+Ma_1=0.4;// Mach number
+
+// Properties
+k=1.4;// Specific heat ratio
+C_p=1.005;// kJ/kg.K
+R=0.287;// kJ/kg.K
+nu=1.58*10^-5;//Kinematic viscosity in m^2/s
+
+// Calculation
+c_1=sqrt(k*R*T_1*1000);// m/s
+V_1=Ma_1*c_1;// Mach number
+Re_1=(V_1*D)/nu;// The inlet Reynolds number
+// The friction factor is determined from the Colebrook equation,
+function[X]=frictionfactor(y)
+ X(1)=real(-(2.0*log10((0/3.7)+(2.51/((Re_1)*sqrt(y(1)))))))-(1/sqrt(y(1)));
+endfunction
+y=[0.01];
+z=fsolve(y,frictionfactor);
+f=z(1);
+// The Fanno flow functions corresponding to the inlet Mach number of 0.4,From Table A-16
+P_0r=1.5901;// (P_0r=P_01/P_0*)
+T_r=1.1628;// (T_1r=T_1/T*)
+P_r=2.6958;// (P_1r=P_1/P*)
+V_r=0.4313;// (V_1r=V_1/V*)
+fL_D=2.3085;
+L_1=((fL_D*D)/f);// m
+T_c=T_1/T_r;// K
+P_c=P_1/P_r;// kPa
+V_c=V_1/V_r;// m/s
+P_01L=(1-(1/P_0r))*100;
+printf('\nThe duct length=%0.2f m \nThe temperature at exit=%0.0f K \nThe pressure at exit=%0.1f kPa \nThe velocity at exit=%0.0f m/s \nThe percentage of stagnation pressure lost in the duct=%0.1f percentage',L_1,T_c,P_c,V_c,P_01L);
diff --git a/3720/CH12/EX12.17/Ex12_17.sce b/3720/CH12/EX12.17/Ex12_17.sce
new file mode 100644
index 000000000..d1437073a
--- /dev/null
+++ b/3720/CH12/EX12.17/Ex12_17.sce
@@ -0,0 +1,31 @@
+//Example 12_17
+clc;clear;
+// Given values
+V_1=85;// m/s
+P_1=220;// kPa
+T_1=450;// K
+f=0.023;// The average friction factor for the duct
+L=27;// m
+
+// Properties
+k=1.4;// Specific Heat ratio
+C_p=1.005;// kJ/kg.K
+R=0.287;// kJ/kg.K
+
+// Calculation
+c_1=sqrt(k*R*T_1*1000);// m/s
+Ma_1=(V_1/c_1);
+// From Table A-16,
+fLbyDh1=14.5333;
+D_h=0.05;// m
+fLbyDh=(f*L)/D_h;
+fLbyDh2=fLbyDh1-fLbyDh;
+// The Mach number corresponding to this value of fL*/D is 0.42, obtained from Table A–16,
+Ma_2=0.42;// The Mach number at the duct exit
+rho_1=(P_1)/(R*T_1);// kg/m^3
+A=(%pi/4)*(D_h)^2;// m^2
+m_air=rho_1*A*V_1;// kg/s
+printf('\nThe Mach number at the duct exit=%0.2f \nThe mass flow rate of air=%0.3f kg/s',Ma_2,m_air);
+L_max1=fLbyDh1*(D_h/f);// m
+L_max2=fLbyDh2*(D_h/f);// m
+printf('\nThe maximum length at inlet=%0.1f m \nThe maximum length at exit=%0.1f m',L_max1,L_max2);
diff --git a/3720/CH12/EX12.2/Ex12_2.sce b/3720/CH12/EX12.2/Ex12_2.sce
new file mode 100644
index 000000000..a64d238c5
--- /dev/null
+++ b/3720/CH12/EX12.2/Ex12_2.sce
@@ -0,0 +1,16 @@
+//Example 12_2
+clc;clear;funcprot(0);
+// Given values
+V=200;// Velocity in m/s
+T=303;// Temperature in K
+//Properties
+k=1.4;// The specific heat ratio
+R=0.287;//The gas constant of air in kJ/(kg.K)
+
+//Calculation
+//(a)
+c=sqrt(k*R*T*1000);//The speed of sound in air at 30°C in m/s
+printf('(a)The speed of sound in air at 30°C ,c=%0.0f m/s\n',c);
+//(b)
+Ma=V/c;
+printf('(b)The Mach number ,Ma=%0.3f \n',Ma);
diff --git a/3720/CH12/EX12.3/Ex12_3.sce b/3720/CH12/EX12.3/Ex12_3.sce
new file mode 100644
index 000000000..dd635aeb0
--- /dev/null
+++ b/3720/CH12/EX12.3/Ex12_3.sce
@@ -0,0 +1,24 @@
+//Example 12_3
+clc;clear;funcprot(0);
+// Given values
+m=3;//Mass flow rate in kg/s
+T_0=473;// T_0=T_1 in K
+P_0=1400;// P_0=P_1 in kPa
+P=1200;// kPa
+// Properties
+C_p=0.846;// kJ/(kg.K)
+k=1.289;
+R=0.1889;// kJ/(kg.K)
+
+//Calculation
+T=T_0*(P/P_0)^((k-1)/k);// k
+V=sqrt(2*C_p*(T_0-T)*1000);// m/s
+printf('Velocity ,V=%0.1f m/s\n',V);
+rho=P/(R*T);// kg/m^3
+printf('Density ,rho=%0.1f kg/m^3\n',rho);
+A=(m/(rho*V))*10000;//cm^2
+printf('Area ,A=%0.1f cm^2\n',A);
+c=sqrt(k*R*T*1000);// m/s
+Ma=V/c;
+printf('Mach number ,Ma=%0.3f \n',Ma);
+// The answer vary due to round off error
diff --git a/3720/CH12/EX12.4/Ex12_4.sce b/3720/CH12/EX12.4/Ex12_4.sce
new file mode 100644
index 000000000..75e0a1ee3
--- /dev/null
+++ b/3720/CH12/EX12.4/Ex12_4.sce
@@ -0,0 +1,17 @@
+//Example 12_4
+clc;clear;funcprot(0);
+// Given values
+T_0=473;// T_0=T_1 in K
+P_0=1400;// P_0=P_1 in kPa
+// Properties
+k=1.289;//The specific heat ratio of carbon dioxide
+
+//Calculation
+//T_1=T_c/T_0
+T_1=2/(k+1);
+T_c=T_1*T_0;//The critical temperature in K
+printf('The critical temperature T*=%0.0f K\n',T_c);
+//P_1=P_c/P_0
+P_1=(2/(k+1))^(k/(k-1));
+P_c=P_1*P_0;//The critical pressure in KPa
+printf('The critical pressure P*=%0.0f KPa\n',P_c);
diff --git a/3720/CH12/EX12.5/Ex12_5.sce b/3720/CH12/EX12.5/Ex12_5.sce
new file mode 100644
index 000000000..0f07ece75
--- /dev/null
+++ b/3720/CH12/EX12.5/Ex12_5.sce
@@ -0,0 +1,41 @@
+//Example 12_5
+clc;clear;funcprot(0);
+//Properties
+C_p=1.005;// kJ/kg.K
+k=1.4;//The specific heat ratio
+R=0.287;//kJ/kg.K
+//Given values
+P_i=1;// MPa
+T_i=873;// K
+V_i=150;// m/s
+A_t=.0050;// m^2
+P_b1=0.7;// MPa
+P_b2=0.4;//MPa
+
+//Calculation
+T_0i=T_i+((V_i^2/(2*C_p)))/1000;// K
+P_0i=P_i*(T_0i/T_i)^(k/(k-1)); // MPa
+T_0=T_0i;// K
+P_0=P_0i;// K
+//P_cr=P*/P_0
+P_cr=(2/(k+1))^(k/(k-1));
+
+//(a)
+P_br=P_b1/P_0;
+P_t=P_b1;
+//From table A-13
+Ma_1=0.778;
+T_cr=0.892;// T_cr=T_t/T_0
+T_t=0.892*T_0;
+rho_t=P_t*1000/(R*T_t);// kg/m^3
+V_t=Ma_1*sqrt(k*R*T_t*1000);// m/s
+m=rho_t*A_t*V_t;//kg/s
+printf(' (a) The mass flow rate through the nozzle,m=%0.2f kg/s\n',m);
+
+//(b)
+P_br=P_b2/P_0;
+//P_br is less than the critical-pressure ratio, 0.5283.Therefore, sonic conditions exist at the exit plane (throat) of the nozzle, and Ma =1.
+m_1=(A_t*P_0*1000*sqrt(k/(R*T_0))*(2/(k+1))^((k+1)/(2*(k-1))))*sqrt(1000);// kg/s
+printf(' (b) The mass flow rate through the nozzle,m=%0.2f kg/s\n',m_1);
+// The answer vary due to round off error
+
diff --git a/3720/CH12/EX12.6/Ex12_6.sce b/3720/CH12/EX12.6/Ex12_6.sce
new file mode 100644
index 000000000..30a2d8d53
--- /dev/null
+++ b/3720/CH12/EX12.6/Ex12_6.sce
@@ -0,0 +1,25 @@
+// Example 12_6
+clc;clear;funcprot(0);
+//Given values
+T_1=400; // K
+P_1=100; // kPa
+Ma_1=0.3;// Mach number
+
+// Calculation
+//From table A-13.At the initial Mach number of Ma=0.3, we read
+// a_1=A1/A*; t_1=T1/T0; p_1=P1/P0;t_2=T1/T0;p_2=P2/P0;
+a_1=2.031;
+t_1=0.9823;
+p_1=0.9395;
+// A2=0.8*A1;
+//a_2=(A2/A*)=(A2/A1)*(A1/A*);
+a_2=0.8*a_1;
+//From table A-13,for the value of a_2
+t_2=0.9703;
+p_2=0.9000;
+Ma_2=0.391;
+T_2=T_1*(t_2/t_1);// K
+P_2=P_1*(p_2/p_1);// kPa
+printf('Mach number,Ma_2=%0.3f\n',Ma_2);
+printf('Temperature,T_2=%0.0f K\n',T_2);
+printf('Pressure,P_2=%0.1f kPa\n',P_2);
diff --git a/3720/CH12/EX12.7/Ex12_7.sce b/3720/CH12/EX12.7/Ex12_7.sce
new file mode 100644
index 000000000..632e24f6a
--- /dev/null
+++ b/3720/CH12/EX12.7/Ex12_7.sce
@@ -0,0 +1,43 @@
+// Example 12_7
+clc;clear;funcprot(0);
+//Given values
+P_0=1000;// kPa;
+T_0=800;// K
+k=1.4;//The specific heat ratio of air
+Ma_2=2;// Exit Mach number
+a=20;// Throat area in cm^2
+//Properties
+R=0.287;// kJ/kg.k
+
+// Calculation
+rho_0=P_0/(R*T_0);// kg/m^3
+P_0=1;// MPa
+//(a)At the throat of the nozzle Ma=1, and from Table A–13
+//P*=P_c;T*=T_c;rho*=rho_c;V*=V_c;c*=c_c;
+P_c=0.5283*P_0;// MPa
+printf('(a)The throat conditions,P*=%0.4f MPa\n',P_c);
+T_c=0.8333*T_0;// K
+printf(' T*=%0.1f K\n',T_c);
+rho_c=0.6339*rho_0;// kg/m^3
+printf(' rho*=%0.3f kg/m^3\n',rho_c);
+V_c=sqrt(k*R*T_c*1000);// m/s
+printf(' V*=c*=%0.1f m/s\n',V_c);
+
+//(b)For Ma_2=2,by using data from Table A–13
+P_e=0.1278*P_0;// MPa
+printf('(b)The exit plane conditions,P_e=%0.4f MPa\n',P_e);
+T_e=0.5556*T_0;// K
+printf(' T_e=%0.1f K\n',T_e);
+rho_e=0.23000*rho_0;// kg/m^3
+printf(' rho_e=%0.3f kg/m^3\n',rho_e);
+A_e=1.6875*a;// cm^2
+printf(' A_e=%0.2f cm^2\n',A_e);
+Ma_e=1.6330;// Critical Mach number
+V_e=Ma_e*V_c;// m/s
+printf(' V_e=%0.1f m/s\n',V_e);
+c_e=sqrt(k*R*T_e*1000);// The speed of sound at the exit condition in m/s
+V_e=Ma_2*c_e;// m/s
+
+//(c)
+m=rho_c*(a*10^-4)*V_c;
+printf('(c)The mass flow rate,m=%0.2f kg/s\n',m);
diff --git a/3720/CH12/EX12.9/Ex12_9.sce b/3720/CH12/EX12.9/Ex12_9.sce
new file mode 100644
index 000000000..473732074
--- /dev/null
+++ b/3720/CH12/EX12.9/Ex12_9.sce
@@ -0,0 +1,47 @@
+// Example 12_9
+clc;clear;funcprot(0);
+//From example 12_7
+//Given values
+P_0=1000;// kPa;
+T_0=800;// K
+Ma_1=2;// Exit Mach number
+a=20;// Throat area in cm^2
+//Properties
+R=0.287;// kJ/kg.k
+C_p=1.005;// kJ/kg.k
+k=1.4;//The specific heat ratio of air
+
+// Calculation
+//(a)
+//From example 12_7
+P_01=1.0;// MPa
+P_1=0.1278; // MPa
+T_1=444.5;// K
+rho_1=1.002;// kg/m^3
+// From table A-14,For Ma_1=2,we read
+Ma_2=0.5774
+P_02=0.7209*P_01;// MPa
+printf('(a)The stagnation pressure,P_02=%0.3f MPa\n',P_02);
+P_2=4.5000*P_1;// MPa
+printf('The static pressure,P_2=%0.3f MPa\n',P_2);
+T_2=1.6875*T_1;// K
+printf('The static temperature,T_2=%0.0f K\n',T_2);
+rho_2=2.6667*rho_1;// kg/m^3
+printf('The static density,rho_2=%0.2f kg/m^3\n',rho_2);
+
+//(b)
+//gradS=s2-s1
+gradS=(C_p*(log(T_2/T_1)))-(R*log((P_2/P_1)));
+printf('(b)The entropy change across the shock,s2-s1=%0.4f kJ/kg.K\n',gradS);
+
+//(c)
+c_2=sqrt(k*R*T_2*1000);// The speed of sound at the exit conditions in m/s
+V_2=Ma_2*c_2;
+printf('(c)The exit velocity,V_2=%0.0f m/s\n',V_2);
+
+//(d)
+//The mass flow rate in this case is the same as that determined in Example 12_7:
+V_1=517.5;// m/s
+rho_c=2.761;// kg/m^3
+m=rho_c*(a*10^-4)*V_1;// kg/s
+printf('(d)The mass flow rate,m=%0.2f kg/s\n',m);