CASE STUDY PIPE FRICTION CASE STUDY continued

6.7 CASE STUDY continued

where ε = the roughness m, D = diameter m, and Re = the Reynolds number: Re = ρ VD µ where ρ = the fluid’s density kgm 3 , V = its velocity ms, and µ = dynamic viscosity N· sm 2 . In addition to appearing in Eq. 6.15, the Reynolds number also serves as the criterion for whether flow is turbulent Re ⬎ 4000. In this case study, we will illustrate how the numerical methods covered in this part of the book can be employed to determine f for air flow through a smooth, thin tube. For this case, the parameters are ρ = 1.23 kgm 3 , µ = 1.79 × 10 –5 N · sm 2 , D = 0.005 m, V = 40 ms and ε = 0.0015 mm. Note that friction factors range from about 0.008 to 0.08. In addition, an explicit formulation called the Swamee-Jain equation provides an approximate estimate: f = 1.325 ln ε 3.7D + 5.74 Re 0.9 2 6.16 Solution. The Reynolds number can be computed as Re = ρ VD µ = 1.23400.005 1.79 × 10 −5 = 13,743 This value along with the other parameters can be substituted into Eq. 6.15 to give g f = 1 √ f + 2.0 log 0.0000015 3.70.005 + 2.51 13,743 √ f Before determining the root, it is advisable to plot the function to estimate initial guesses and to anticipate possible difficulties. This can be done easily with MATLAB: rho=1.23;mu=1.79e-5;D=0.005;V=40;e=0.00151000; Re=rhoVDmu; g=f 1sqrtf+2log10e3.7D+2.51Resqrtf; fplotg,[0.008 0.08],grid,xlabelf,ylabelgf As in Fig. 6.11, the root is located at about 0.03. Because we are supplied initial guesses x l = 0.008 and x u = 0.08, either of the brack- eting methods from Chap. 5 could be used. For example, the bisect function developed in Fig. 5.7 gives a value of f = 0.0289678 with a percent relative error of error of 5.926 × 10 –5 in 22 iterations. False position yields a result of similar precision in 26 iterations. Thus, although they produce the correct result, they are somewhat inefficient. This would not be important for a single application, but could become prohibitive if many evaluations were made. 6.7 CASE STUDY 175

6.7 CASE STUDY continued

We could try to attain improved performance by turning to an open method. Because Eq. 6.15 is relatively straightforward to differentiate, the Newton-Raphson method is a good candidate. For example, using an initial guess at the lower end of the range x = 0.008, the newtraph function developed in Fig. 6.7 converges quickly: dg=f -2log101.255Ref-32eD3.7 ... +2.51Resqrtf-0.5f32; [f ea iter]=newtraphg,dg,0.008 f = 0.02896781017144 ea = 6.870124190058040e-006 iter = 6 However, when the initial guess is set at the upper end of the range x = 0.08, the routine diverges, [f ea iter]=newtraphg,dg,0.08 f = NaN + NaNi As can be seen by inspecting Fig. 6.11, this occurs because the function’s slope at the initial guess causes the first iteration to jump to a negative value. Further runs demonstrate that for this case, convergence only occurs when the initial guess is below about 0.066. –3 0.02 0.01 0.03 0.04 0.05 0.06 0.07 0.08 –2 –1 1 2 3 4 5 6 g f f FIGURE 6.11

6.7 CASE STUDY continued