summaryrefslogtreecommitdiff
path: root/3685/CH5/EX5.1/Ex5_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '3685/CH5/EX5.1/Ex5_1.sce')
-rw-r--r--3685/CH5/EX5.1/Ex5_1.sce24
1 files changed, 24 insertions, 0 deletions
diff --git a/3685/CH5/EX5.1/Ex5_1.sce b/3685/CH5/EX5.1/Ex5_1.sce
new file mode 100644
index 000000000..4af3c057e
--- /dev/null
+++ b/3685/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,24 @@
+
+clc
+// Part(a)
+V1 = 0.95 // Inlet volume flow rate in m^3/kg
+P1 = 100 // Pressure at inlet in kPa
+v1 = 7 // velocity of flow at inlet in m/s
+V2 = 0.19 // Exit volume flow rate in m^3/kg
+P2 = 700 // Pressure at exit in kPa
+v2 = 5 // velocity of flow at exit in m/s
+w = 0.5 // mass flow rate in kg/s
+u21 = 90 // change in internal energy in kJ/kg
+Q = -58 // Heat transfer in kW
+W = - w*( u21 + (P2*V2-P1*V1) + ((v2^2-v1^2)/2) ) + Q // W = dW/dt
+printf("\n Example 5.1")
+printf("\n The rate of work input is %d kW",abs(W))
+//The answers given in textbook is wrong
+// Part (b)
+A = (v2/v1)*(V1/V2) // A = A1/A2
+d_ratio = sqrt(A) // d = d1/d2
+
+printf("\n The ratio of the inlet pipe diameter and outlet pipe diameter is %f ",d_ratio)
+
+//The answers vary due to round off error
+