diff options
Diffstat (limited to '2126/CH5/EX5.15/15.sce')
-rwxr-xr-x | 2126/CH5/EX5.15/15.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/2126/CH5/EX5.15/15.sce b/2126/CH5/EX5.15/15.sce new file mode 100755 index 000000000..d30f0bb73 --- /dev/null +++ b/2126/CH5/EX5.15/15.sce @@ -0,0 +1,21 @@ +clc
+clear
+
+//Input data
+Px=16 //Pressure before the shock in kPa
+Poy=70 //Stagnation pressure after shock in kPa
+To=300+273 //Stagnation temperature in K
+k=1.4 //Adiabatic constant
+
+//Calculation
+p1=Poy/Px //Pressure ratio
+Mx=1.735 //Mach number upstream of shock
+My=0.631 //Mach number downstream of shock
+p2=0.84 //Ratio of stagnation pressures after and before shock from gas tables
+t1=1.483 //Temperature ratio after and before shock from gas tables
+Tx=To/(1+((k-1)/2)*Mx^2) //Temperature upstream of shock in K
+Ty=Tx*t1 //Temperature downstream of shock in K
+Pox=Poy/p2 //Stagnation pressure before shock in kPa
+
+//Output
+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)
|