(a) Consider the Colebrook equation for the friction factor in a fully developed
ID: 3112012 • 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
(a) D = input (' please enter the pipe diameter in meters: ' ) ;
V = input (' please enter the fluid velocity in m/s : ') ;
rho = input (' please enter fluid density in kg/m^3 ; ') ;
mew = input (' please enter fluid viscosity in kg/m*s : ') ;
Re = D * V * rho / mew ;
eps = input (' enter absolute roughness in millimeters : ') ;
eD = eps / (D * 1000 ) ;
a = fzero ( @ (x)colebrookfunc (x , eD ,Re) , 0.1 )
fprintf(a) ;
Equation that i want to solve is kept in another m-file called "colebrookfunc" , and the code it contains is as
below.
function F = colebrookfunc (x , eD , Re)
F = (-2 * log10 (eD / 3.7 + 2.51 . / ( Re * x . ^ 0.5))) . ^2 ;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.