summaryrefslogtreecommitdiff
path: root/629/CH5/EX5.1/example5_1.sce
diff options
context:
space:
mode:
Diffstat (limited to '629/CH5/EX5.1/example5_1.sce')
-rw-r--r--629/CH5/EX5.1/example5_1.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/629/CH5/EX5.1/example5_1.sce b/629/CH5/EX5.1/example5_1.sce
new file mode 100644
index 000000000..e67160c8c
--- /dev/null
+++ b/629/CH5/EX5.1/example5_1.sce
@@ -0,0 +1,14 @@
+clear
+clc
+//Example 5.1 VOLUME FLOW RATE AND MEAN VELOCITY
+m=3; //mass flow rate[kg/s]
+rho=1.24; //density[kg/m^3]
+Q=m/rho //discharge[m^3/s]
+//1m^3=35.31ft^3
+printf("\nThe disharge in the pipe in both units is %.2f m^3/s and %.1f cfs.\n\n",Q,Q*35.31)
+
+d=0.3; //diameter[m]
+A=(%pi*d^2)/4 //area[m^2]
+V=Q/A //mean velocity[m/s]
+//1ft=0.3048 m
+printf("\nThe mean velocity in the pipe in both units is %.1f m/s and %.f ft/s.\n",V,V/0.3048) \ No newline at end of file