summaryrefslogtreecommitdiff
path: root/3765/CH5/EX5.4/Ex5_4.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3765/CH5/EX5.4/Ex5_4.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '3765/CH5/EX5.4/Ex5_4.sce')
-rw-r--r--3765/CH5/EX5.4/Ex5_4.sce27
1 files changed, 27 insertions, 0 deletions
diff --git a/3765/CH5/EX5.4/Ex5_4.sce b/3765/CH5/EX5.4/Ex5_4.sce
new file mode 100644
index 000000000..4a06cf437
--- /dev/null
+++ b/3765/CH5/EX5.4/Ex5_4.sce
@@ -0,0 +1,27 @@
+clc
+// Example 5.4.py
+// Consider the flow through a convergent-divergent duct with an exit to throat area
+// ratio of 2. The reservoir pressure is 1 atm, and the exit pressure is 0.95 atm.
+// Calculate the mach numbers at the throat and at the exit.
+
+// Variable declaration
+po = 1.0 // reservoir pressure (in atm)
+pe = 0.95 // pressure at the exit (in atm)
+Ae_by_At = 2.0 // ratio of exit to throat area
+
+// Calculations
+// from table A1 for po/pe = 1.053
+Me = 0.28 // mach number at exit
+Ae_by_Astar = 2.17 // nearest entry
+
+At_by_Astar = 1 / Ae_by_At * Ae_by_Astar // At/Astar = At/Ae * Ae/Astar
+
+// from table A1 for At/A* = 1.085
+Mt = 0.72 // mach number at throat
+
+
+// Results
+printf("\n Mach number at exit %.2f", Me)
+
+printf("\n Mach number at throat %.2f", Mt)
+