diff options
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 |