Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(a) Consider the Colebrook equation for the friction factor in a fully developed

ID: 3887511 • Letter: #

Question

(a) Consider the Colebrook equation for the friction factor in a fully developed pipe flow 1 VI EID 2.51 where f is the Darcy friction factor, e/D is the relative roughness of the pipe material, and Re is the Reynolds number based on a pipe diameter D. Use fzero to find the friction factor f corresponding to parameter values e/D 0.0001 and Rep 3 x 10%. Use a tolerance 10-8 with fzero. In your homework write-up give the value of f as well as the code you used to solve the problem. Do not include the fzero code just how you called it. Hint : Use the function optimset to set up the tolerance Tolx. (b) David Peters (SIAM Review, 1997) obtains the following equation for the optimum damp- ing ratio of a spring-mass-damper system designed to minimize the transmitted force when an impact is applied to the mass: Use fzero to find theE 10,05) that satisfies this equation with a tolerance 0-12. In your homework write-up give the value of as well as the code you used to solve the problem. Do not include the fzero code just how you called it.

Explanation / Answer

Ans(!) %Declare variable

re=300000; %Reynolds number

ed=0.001; %Roughness of pipe

%Evaluate Colebrook equation

Function fric=cbf(f,ed,re)

fric=(1/sqrt(f))+2*(log10(ed/3.7))+(2.51/(re*sqrt(f)));

%Determine root of friction
x_root=fzero(@(f)cbf(f,ed,re),tx); %fzero is used to find the square root with tolerance
tx=optimset('Tolx',1e-8);   %Optimset is used to set up tolerance to 10-8

Variables re and ed is declared with values given in the question the Colebroke equation is evaluated by using airthmetic operator .here the equation on right hand side is negative( refer to equation in question) so when this equation is added with left hand side it gives (1/sqrt(f))+2*(log10(ed/3.7))+(2.51/(re*sqrt(f))); Then we have to find out the square root of friction for this, we use fzero function.To set the tolerance upto level 10-8 we use optimset function.