4 Consider the Colebrook equation for the friction factor in
4. Consider the Colebrook equation for the friction factor in fully developed pipe flow -21 goap + 2517) E/D 2.51 Vi where f is the Darcy friction factor, c/D is the relative roughness of the pipe material, and Rep is the Reynolds number based on pipe diameter D (e) Derive the following fixed-point iteration formula to find f Nan D2.51 12 by showing that D 2.51 12 Code (b)Use the ixed-iteration formula in part(a) to find / within 10-6 accuracy when e/D -0.02, Rep 105, and using an initial guess of fo 0.05. d t 17T2-8r-8 = 0 by Newton\'s method, starting
Solution
Matlab Code:
fk = 0.05;%initial guess
fkplus1=0;%fk+1
while 1==1%infinite loop
fkplus1 = (2*log10((0.02/3.7)+(2.51/((10^5)*sqrt(fk)))))^-0.5;%writing iteration function
if abs(fk-fkplus1)<10^-6%calculating absolute error if it is less than 10^-6 then breaks the loop
break;
end
fk = fkplus1;%if absolute error is not less than 10^-6 loop iterates again
end
disp(fkplus1);%displaying final f value
Output:
0.0002 - 0.4698i
