summaryrefslogtreecommitdiff
path: root/797/CH8/EX8.6.s/8_06_solution.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /797/CH8/EX8.6.s/8_06_solution.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 '797/CH8/EX8.6.s/8_06_solution.sce')
-rw-r--r--797/CH8/EX8.6.s/8_06_solution.sce17
1 files changed, 17 insertions, 0 deletions
diff --git a/797/CH8/EX8.6.s/8_06_solution.sce b/797/CH8/EX8.6.s/8_06_solution.sce
new file mode 100644
index 000000000..f9cef3469
--- /dev/null
+++ b/797/CH8/EX8.6.s/8_06_solution.sce
@@ -0,0 +1,17 @@
+//Solution 8-06
+WD=get_absolute_file_path('8_06_solution.sce');
+datafile=WD+filesep()+'8_06_example.sci';
+clc;
+exec(datafile)
+//unit conversions
+P_1 = P_1 * 1000 //from [kPa] to [Pa]
+D_1 = D_1 / 100 //from [cm] to [m]
+D_2 = D_2 / 100 //from [cm] to [m]
+//calculation of loss coefficient for included angle of 20 and d/D = 6/9
+K_L = 0.15 + (0.1 - 0.15) / 0.2 * (D_1/D_2 - 0.6) //interpolation from Table 8-4
+V_2 = (D_1/D_2)**2 * V_1 //conservation of mass
+h_L = K_L * (V_1)**2 /(2 * g)
+printf("Head loss in the expansion section is %1.3f m", h_L)
+P_2 = P_1 + rho * ((alpha_1 * V_1**2 - alpha_2 * V_2**2)/2 - g * h_L)
+P_2 = P_2 / 1000
+printf("\nPressure in the larger-diameter pipe is %1.0f kPa",P_2) \ No newline at end of file