summaryrefslogtreecommitdiff
path: root/2870/CH17
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2870/CH17
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2870/CH17')
-rwxr-xr-x2870/CH17/EX17.1/Ex17_1.sce22
-rwxr-xr-x2870/CH17/EX17.10/Ex17_10.sce12
-rwxr-xr-x2870/CH17/EX17.11/Ex17_11.sce37
-rwxr-xr-x2870/CH17/EX17.12/Ex17_12.sce23
-rwxr-xr-x2870/CH17/EX17.15/Ex17_15.sce55
-rwxr-xr-x2870/CH17/EX17.16/Ex17_16.sce52
-rwxr-xr-x2870/CH17/EX17.2/Ex17_2.sce17
-rwxr-xr-x2870/CH17/EX17.3/Ex17_3.sce26
-rwxr-xr-x2870/CH17/EX17.4/Ex17_4.sce21
-rwxr-xr-x2870/CH17/EX17.5/Ex17_5.sce47
-rwxr-xr-x2870/CH17/EX17.6/Ex17_6.sce31
-rwxr-xr-x2870/CH17/EX17.7/Ex17_7.sce58
-rwxr-xr-x2870/CH17/EX17.9/Ex17_9.sce46
13 files changed, 447 insertions, 0 deletions
diff --git a/2870/CH17/EX17.1/Ex17_1.sce b/2870/CH17/EX17.1/Ex17_1.sce
new file mode 100755
index 000000000..be542d830
--- /dev/null
+++ b/2870/CH17/EX17.1/Ex17_1.sce
@@ -0,0 +1,22 @@
+clc;clear;
+//Example 17.1
+
+//given data
+V1=250;
+T1=255.07;
+P1=54.05;
+h=5000;
+
+//from Table A-2a
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+T01=T1+V1^2/(2*cp*1000);//factor of 1000 to convert kJ to J
+P01=P1*(T01/T1)^(k/(k-1));
+//given pressure ratio in compressor *
+// T02 = T01*(P02/P01)^((k-1)/k)
+T02 = T01*(8)^((k-1)/k);
+win=cp*(T02-T01);
+disp(P01,'the stagnation pressure at the compressor inlet in kPa');
+disp(win,'the required compressor work per unit mass in kJ/kg')
diff --git a/2870/CH17/EX17.10/Ex17_10.sce b/2870/CH17/EX17.10/Ex17_10.sce
new file mode 100755
index 000000000..e7de46e5f
--- /dev/null
+++ b/2870/CH17/EX17.10/Ex17_10.sce
@@ -0,0 +1,12 @@
+clc;clear;
+//Example 17.10
+
+//given data
+//using protactor frpm Fig 17-36
+u=19;//u stands for angle of the mach lines
+
+//calculations
+//by Eq. 17-47
+//i.e u= asin(1/Ma)
+Ma=1/sind(u);
+disp(Ma,'The Mach number is')
diff --git a/2870/CH17/EX17.11/Ex17_11.sce b/2870/CH17/EX17.11/Ex17_11.sce
new file mode 100755
index 000000000..d3585e02c
--- /dev/null
+++ b/2870/CH17/EX17.11/Ex17_11.sce
@@ -0,0 +1,37 @@
+clc;clear;
+//Example 17.11
+
+//given data
+Ma1=2;
+P1=75;
+O=10;//angle b/w shock wave and normal
+
+//constants used
+k=1.4;
+
+//calcualtions
+//with given values of Ma1 and O from Eq 17-46
+Bweak=39.3;
+Bstrong=83.7;
+//Weak shock
+Ma1w=Ma1*sind(Bweak);
+//Strong shock
+Ma1s=Ma1*sind(Bstrong);
+//from second part Eq 17-40
+Ma2w=0.8032;
+Ma2s=0.5794;
+//pressure ratio = (2*k*Ma^2 - k + 1)/(k + 1 )
+//Weak shock
+P2w=P1*(2*k*Ma1w^2 - k + 1)/(k + 1 );
+P2w=ceil(P2w);
+disp(P2w,'pressure for weak shock in kPa');
+//Strong shock
+P2s=P1*(2*k*Ma1s^2 - k + 1)/(k + 1 );
+P2s=floor(P2s);
+disp(P2s,'pressure for strong shock in kPa');
+//Weak shock
+Ma2=Ma2w/sind(Bweak-O);
+disp(Ma2,'Mach number downstream for weak shock');
+//Strong shock
+Ma2=Ma2s/sind(Bstrong-O);
+disp(Ma2,'Mach number downstream for strong shock');
diff --git a/2870/CH17/EX17.12/Ex17_12.sce b/2870/CH17/EX17.12/Ex17_12.sce
new file mode 100755
index 000000000..9807e4715
--- /dev/null
+++ b/2870/CH17/EX17.12/Ex17_12.sce
@@ -0,0 +1,23 @@
+clc;clear;
+//Example 17.12
+
+//given data
+Ma1=2;
+P1=230;
+O=10;//O stands for angle of the mach lines
+
+//constants used
+k=1.4;
+
+//calculations
+//Eq. 17–49 for the upstream Prandtl–Meyer function
+vMa1=sqrt((k+1)/(k-1))*atand(sqrt((k-1)*(Ma1^2-1)/(k+1)))-atand(sqrt(Ma1^2-1));
+//Eq. 17–48 to calculate the downstream Prandtl–Meyer function
+vMa2=O+vMa1;
+//using equation solver as implict nature of Eq 17-49
+Ma2=2.385;
+disp(Ma2,'downstream Mach number Ma2 is');
+//P2 = (P2/P0)/(P1/P0) * P1
+P2= (1 + (k-1)*Ma2^2/2 )^(-k/(k-1)) / (1 + (k-1)*Ma1^2/2 )^(-k/(k-1)) * P1;
+P2=floor(P2);
+disp(P2,'downstream pressure in kPa')
diff --git a/2870/CH17/EX17.15/Ex17_15.sce b/2870/CH17/EX17.15/Ex17_15.sce
new file mode 100755
index 000000000..a52aa1b13
--- /dev/null
+++ b/2870/CH17/EX17.15/Ex17_15.sce
@@ -0,0 +1,55 @@
+clc;clear;
+//Example 17.15
+
+//given data
+P1=480;
+T1=550;
+V1=80;
+d1=15/100;//diameter in m
+AF=40;//air to fuel ratio
+HV=40000;//heating value in kJ/kg
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+p1=P1/(R*T1);
+A1=%pi*d1^2/4;
+mair=p1*A1*V1;
+mfuel=mair/AF;
+Q=mfuel*HV;
+q=Q/mair;
+T01=T1+V1^2/(2*cp);
+c1=sqrt(k*R*T1*1000);//factor of 1000 to convert kJ to J
+Ma1=V1/c1;
+//exit stagnation energy equation q= Cp (T02 - T01)
+T02=T01+q/cp;
+//from Table A–34
+//at Ma1
+//s stands for * symbol
+T0s=0.1291;//T0/Ts
+Ts0=T01/T0s;
+T2s=T02/Ts0;//T02/T*0
+//from Table A–34 at this ratio
+Ma2=0.3142;
+//Rayleigh flow relations corresponding to the inlet and exit Mach no
+//at Ma1
+T1s=0.1541;//T1/Ts
+P1s=2.3065;//P1/Ps
+V1s=0.0668;//V1/Vs
+//at Ma2
+T2s=0.4389;//T2/Ts
+P2s=2.1086;//P2/Ps
+V2s=0.2082;//V2/Vs
+T2=T2s/T1s*T1;
+T2=floor(T2);
+P2=P2s/P1s*P1;
+P2=ceil(P2);
+V2=V2s/V1s*V1;
+V2=floor(V2);
+disp(Ma2,'Mach Number at exit');
+disp(T2,'Temperature in K');
+disp(P2,'Pressure in kPa');
+disp(V2,'Velocity in m/s')
diff --git a/2870/CH17/EX17.16/Ex17_16.sce b/2870/CH17/EX17.16/Ex17_16.sce
new file mode 100755
index 000000000..b868f27ff
--- /dev/null
+++ b/2870/CH17/EX17.16/Ex17_16.sce
@@ -0,0 +1,52 @@
+clc;clear;
+//Example 17.16
+
+//given data
+P01=2*1000;//factor of 1000 to convert MPa to kPa
+T1=400;
+V1=0;//negligible
+nN=0.93;
+m=2.5;
+P2=300;
+
+//calculations
+
+//part - a
+P201=P2/P01;
+//critical pressure ratio at this values is 0.546
+Pt=0.546*P01;
+//at inlet
+h1=3248.4;
+h01=h1;
+s1=7.1292;
+//at throat
+st=s1;
+ht=3076.8;
+vt=0.24196;
+Vt=sqrt(2*(h01-ht)*1000);//factor of 1000 to convert kJ to J
+At=m*vt/Vt;
+//at state 2s
+s2s=s1;
+h2s=2783.6;
+//nN = (h01 - h2)/ (h01 - h2s)
+h2=h01-nN*(h01-h2s);
+//at P2 and h2
+v2=0.67723;
+s2=7.2019;
+V2=sqrt(2*(h01-h2)*1000);//factor of 1000 to convert kJ to J
+A2=m*v2/V2;
+disp((At*10000),'throat area in cm^2');
+disp((A2*10000),'exit area in cm^2');
+
+//part - b
+// at st=7.1292
+//pressures of 1.115 and 1.065 MPa
+//c calculated using tables
+c=sqrt((1115-1065)/(1/0.23776 - 1/0.24633)*1000);//factor of 1000 to convert kPa to Pa
+Ma=Vt/c;
+disp(Ma,'the Mach number at the throat');
+// at s2=7.2019
+//pressures of 325 and 275 kPa
+c=sqrt((325-276)/(1/0.63596 - 1/0.72245)*1000);//factor of 1000 to convert kPa to Pa
+Ma=V2/c;
+disp(Ma,'the Mach number at the nozzle exit')
diff --git a/2870/CH17/EX17.2/Ex17_2.sce b/2870/CH17/EX17.2/Ex17_2.sce
new file mode 100755
index 000000000..adb616759
--- /dev/null
+++ b/2870/CH17/EX17.2/Ex17_2.sce
@@ -0,0 +1,17 @@
+clc;clear;
+//Example 17.2
+
+//given data
+V=200;
+T=30+273;//converted in K
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+k=1.4;
+
+//calculations
+c=sqrt(k*R*T*1000);//factor of 1000 to convert kJ to J
+c=ceil(c);
+disp(c,'the speed of sound in m/s');
+Ma=V/c;
+disp(Ma,'the Mach number at the diffuser inlet')
diff --git a/2870/CH17/EX17.3/Ex17_3.sce b/2870/CH17/EX17.3/Ex17_3.sce
new file mode 100755
index 000000000..3bcbe259d
--- /dev/null
+++ b/2870/CH17/EX17.3/Ex17_3.sce
@@ -0,0 +1,26 @@
+clc;clear;
+//Example 17.3
+
+//given data
+T0=200+273;//converted in K
+P0=1400;
+//stagnant temp. & pressure is same as inlet due to small inlet velocity
+P=1200;
+m=3;
+
+//from Table A-2a
+cp=0.846;//in kJ/kg-K
+R=0.1889;//in kJ/kg-K
+k=1.289;
+
+//calculations
+T=T0*(P/P0)^((k-1)/k);
+V=sqrt(2*cp*(T0-T)*1000);//factor of 1000 to convert kJ to J
+p=P/(R*T);
+A=m/(p*V);
+c=sqrt(k*R*T*1000);//factor of 1000 to convert kJ to J
+Ma=V/c;
+disp(V,'velocity in m/s');
+disp(p,'density in kg/m^3');
+disp((A*10000),'flow area in cm^2');
+disp(Ma,'Mach number');
diff --git a/2870/CH17/EX17.4/Ex17_4.sce b/2870/CH17/EX17.4/Ex17_4.sce
new file mode 100755
index 000000000..b79795a73
--- /dev/null
+++ b/2870/CH17/EX17.4/Ex17_4.sce
@@ -0,0 +1,21 @@
+clc;clear;
+//Example 17.4
+
+//given data
+T0=200+273;//converted in K
+P0=1400;
+
+//from Table A-2a
+k=1.289;
+
+//calculations
+//Tc & Tr stands for critical temp and ratio respectively
+//Pc & Pr stands for critical temp and ratio respectively
+Tr=2/(k+1);
+Pr=(2/(k+1))^(k/(k-1));
+Tc=Tr*T0;
+Pc=Pr*P0;
+Tc=floor(Tc);
+Pc=ceil(Pc);
+disp(Tc,'critical temperature in K');
+disp(Pc,'critical pressure on kPa')
diff --git a/2870/CH17/EX17.5/Ex17_5.sce b/2870/CH17/EX17.5/Ex17_5.sce
new file mode 100755
index 000000000..a5b9c1738
--- /dev/null
+++ b/2870/CH17/EX17.5/Ex17_5.sce
@@ -0,0 +1,47 @@
+clc;clear;
+//Example 17.5
+
+//given data
+Vi=150;
+Ti=600+273;
+Pi=1;
+At=50/10000;//converted into m^2
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+Toi=Ti+Vi^2/(2*cp*1000);//factor of 1000 to convert kJ to J
+Poi=Pi*(Toi/Ti)^(k/(k-1));
+//flow is isentropic
+//stagnation temp. and pressure values remain constant
+To=Toi;
+Po=Poi;
+//from Table 17–2
+//The critical-pressure ratio is 0.5283
+
+//Part a
+Pb=0.7;
+Pca=Pb/Po;
+// Pca > 0.5283
+//exit plane pressure is equal to the back pressure
+Pt=Pb;
+//from Table A–32
+Mat=0.778;
+//Tt/To = 0.892
+Tt=0.892*To;
+pt=Pt*1000/(R*Tt);//factor of 1000 to convert MPa to kPa
+Vt=Mat*sqrt(k*R*Tt*1000);//factor of 1000 to convert kJ to J
+ma=pt*At*Vt;
+disp(ma,'the mass flow rate through the nozzle when the back pressure is 0.7 MPa in kg/s');
+
+//Part b
+Pb=0.4;
+Pca=Pb/Po;
+// Pca < 0.5283
+//sonic conditions exists at the exit
+Ma=1;
+mb=At*(Po*1000)*(sqrt(k*1000/(R*To)))*(2/(k+1))^((k+1)/(2*(k-1)));//factor of 1000 to convert MPa to kPa and kJ to J
+disp(mb,'the mass flow rate through the nozzle when the back pressure is 0.4 MPa in kg/s');
diff --git a/2870/CH17/EX17.6/Ex17_6.sce b/2870/CH17/EX17.6/Ex17_6.sce
new file mode 100755
index 000000000..3d96d25c0
--- /dev/null
+++ b/2870/CH17/EX17.6/Ex17_6.sce
@@ -0,0 +1,31 @@
+clc;clear;
+//Example 17.6
+
+//given data
+T1=400;
+P1=100;
+Ma1=0.3;
+A21=0.8;//A2/A1
+
+//assumption
+k=1.4;
+
+//from Table A–32
+//at Ma1=0.3
+//s stands for * symbol
+A1s = 2.0351;//A1/As
+T10 = 0.9823;//T1/T0
+P10 = 0.9305;//P1/P0
+A2s = A21*A1s;//A2/As
+//at this value of A2/As
+T20=0.9701;//T2/T0
+P20=0.8993;//P2/P0
+Ma2=0.391;
+
+//calculations
+T2=T1*T20/T10;
+T2=floor(T2);
+P2=P1*P20/P10;
+disp(Ma2,'Ma2 is ');
+disp(T2,'T2 in K is');
+disp(P2,'P2 in kPa is')
diff --git a/2870/CH17/EX17.7/Ex17_7.sce b/2870/CH17/EX17.7/Ex17_7.sce
new file mode 100755
index 000000000..71a049ec0
--- /dev/null
+++ b/2870/CH17/EX17.7/Ex17_7.sce
@@ -0,0 +1,58 @@
+clc;clear;
+//Example 17.7
+
+//given data
+T0=800;
+P0=1;
+Vi=0;//negligible
+At=20;
+Mae=2
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+k=1.4;
+
+//calculations
+
+//part - a
+// Mach no. at exit is 2 hence sonic conditions at throat
+p0=P0*1000/(R*T0);//factor of 1000 to convert MPa to kPa
+//from Table A-32 at Mat=1
+//s stands for * symbol
+Ps0 = 0.5283;//Ts/T0
+Ts0 = 0.8333;//Ps/P0
+ps0=0.6339;//ps/p0
+Ps=Ps0*P0;
+Ts=Ts0*T0;
+ps=ps0*p0;
+As=At;
+Vs=sqrt(k*R*Ts*1000);//factor of 1000 to convert kJ to J
+disp('the throat conditions');
+disp(Ps,'Presssure in MPa');
+disp(Ts,'Temperature in K');
+disp(ps,'density in kg/m^3');
+disp(As,'area in cm^2');
+disp(Vs,'velocity in m/s');
+
+//part - b
+//from Table A-32
+//at Mae=2
+Te0 = 0.5556;//Te/T0
+Pe0 = 0.1278;//Pe/P0
+pe0= 0.2300;//pe/p0
+Ae0= 1.6875;//Ae/Ao
+Pe=Pe0*P0;
+Te=Te0*T0;
+pe=pe0*p0;
+Ae=Ae0*At;
+Ve=Mae*sqrt(k*R*Te*1000);//factor of 1000 to convert kJ to J
+disp('the exit plane conditions, including the exit area');
+disp(Pe,'Presssure in MPa');
+disp(Te,'Temperature in K');
+disp(pe,'density in kg/m^3');
+disp(Ae,'area in cm^2');
+disp(Ve,'velocity in m/s');
+
+//part - c
+m=ps*As*Vs/10000;//factor of 10000 to convert cm^2 to m^2
+disp(m,'the mass flow rate through the nozzle in kg/s');
diff --git a/2870/CH17/EX17.9/Ex17_9.sce b/2870/CH17/EX17.9/Ex17_9.sce
new file mode 100755
index 000000000..28e3da2c2
--- /dev/null
+++ b/2870/CH17/EX17.9/Ex17_9.sce
@@ -0,0 +1,46 @@
+clc;clear;
+//Example 17.9
+
+//given data
+m=2.86;
+Ma1=2;
+P01=1;
+P1=0.1278;
+T1=444.5;
+p1=1.002;
+
+//from Table A-2a
+R=0.287;//in kJ/kg-K
+cp=1.005;//in kJ/kg-K
+k=1.4;
+
+//calculations
+
+//part - a
+//from Table A-33 at Ma1=2.0
+Ma2=0.5774;
+P0201=0.7209;//P02/P01
+P21=4.5;//P2/P1;
+T21=1.6875;//T2/T1
+p21=2.6667;//p2/p1
+P02=P0201*P01;
+P2=P21*P1;
+T2=T21*T1;
+p2=p21*p1;
+disp(P02,'the stagnation pressure in MPa');
+disp(P2,'the static pressure in MPa');
+disp(T2,'static temperature in K');
+disp(p2,'static density in kg/m^3');
+
+//part - b
+//s21 = s2 - s1
+s21=cp*log(T2/T1)-R*log(P2/P1);
+disp(s21,'the entropy change across the shock in kJ/kg-K');
+
+//part - c
+V2=Ma2*sqrt(k*R*T2*1000);//factor of 1000 to convert kJ to J
+V2=ceil(V2);
+disp(V2,'the exit velocity in m/s');
+
+//part - d
+disp('flow rate is not affected by presence of shock waves amd remains 2.86 kg/sec')