diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /797/CH8/EX8.2.s/8_02_solution.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-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.2.s/8_02_solution.sce')
-rw-r--r-- | 797/CH8/EX8.2.s/8_02_solution.sce | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/797/CH8/EX8.2.s/8_02_solution.sce b/797/CH8/EX8.2.s/8_02_solution.sce new file mode 100644 index 000000000..986e29355 --- /dev/null +++ b/797/CH8/EX8.2.s/8_02_solution.sce @@ -0,0 +1,20 @@ +//Solution 8-2 +WD=get_absolute_file_path('8_02_solution.sce'); +datafile=WD+filesep()+'8_02_example.sci'; +exec(datafile); +//unit conversions +D = D / 100; //from [cm] to [m] +//(a)Head loss +Re = rho * V_avg * D / mu; +if Re < 2300 then + f = 64 / Re; +end +h_L = f * L * V_avg**2 / (2 * g * D); +printf("Head loss in pipe is %1.2f m", h_L); +//(b) +deltaP = f * L * rho * V_avg**2 / (2 * D); +printf("\nPressure drop in pipe is %1.2f kPa", deltaP / 1000); +//(c) +Vdot = V_avg * %pi * D**2 / 4; +Wdot_pump = deltaP * Vdot; +printf("\nPumping power required to overcome pressure drop is %1.2f W", Wdot_pump);
\ No newline at end of file |