From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 797/CH8/EX8.2.s/8_02_solution.sce | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 797/CH8/EX8.2.s/8_02_solution.sce (limited to '797/CH8/EX8.2.s/8_02_solution.sce') 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 -- cgit