summaryrefslogtreecommitdiff
path: root/2126/CH5/EX5.5/5.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2126/CH5/EX5.5/5.sce
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 '2126/CH5/EX5.5/5.sce')
-rwxr-xr-x2126/CH5/EX5.5/5.sce19
1 files changed, 19 insertions, 0 deletions
diff --git a/2126/CH5/EX5.5/5.sce b/2126/CH5/EX5.5/5.sce
new file mode 100755
index 000000000..34fb891ee
--- /dev/null
+++ b/2126/CH5/EX5.5/5.sce
@@ -0,0 +1,19 @@
+clc
+clear
+
+//Input data
+Mol=39.9 //Molar mass of a gas in kg/mol
+k=1.67 //Specific heat ratio
+Mx=2.5 //Mach number before the shock
+Px=40 //Pressure before the shock in kPa
+Tx=-20+273 //Temperature before the shock in K
+
+//Calculation
+My=0.554 //Mach number after the shock from gas tables @Mx
+p1=7.567 //Static pressure ratio after and before the shock from gas tables @My
+Py=p1*Px //Static pressure after shock in kPa
+t1=2.805 //Temperature ratio after and before the shock from gas tables @My
+Ty=Tx*t1 //Temperature ratio after the shock in K
+
+//Output
+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)