summaryrefslogtreecommitdiff
path: root/3765/CH3/EX3.10/Ex3_10.sce
diff options
context:
space:
mode:
Diffstat (limited to '3765/CH3/EX3.10/Ex3_10.sce')
-rw-r--r--3765/CH3/EX3.10/Ex3_10.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/3765/CH3/EX3.10/Ex3_10.sce b/3765/CH3/EX3.10/Ex3_10.sce
new file mode 100644
index 000000000..4becf3099
--- /dev/null
+++ b/3765/CH3/EX3.10/Ex3_10.sce
@@ -0,0 +1,23 @@
+clc
+// Example 3.10.py
+// In example 3.9, how much heat per unit mass must be added to choke the flow//
+
+
+// Variable declaration from example 3.9
+To1 = 840 // upstream total temperature (in K)
+M1 = 3.0 // upstream mach number
+To1_by_Tostar = 0.6540 // To1/Tostar from Table A3
+cp = 1004.5 // specific heat at constant pressure for air (in J/Kg K)
+
+// Calculations
+Tostar = To1 / To1_by_Tostar // Tostar = To1 * Tostar/To1 (in K)
+
+M2 = 1.0 // for choked flow
+To2 = Tostar // since M2 = 1.0
+
+q = cp * (To2 - To1) // required heat = cp(To2 - To1) (in J/kg)
+
+
+// Result
+printf("\n Heat require to choke the flow is %.2e J/kg", q)
+