Question: **Please write this is in C language. OR give me pointers on how I should proceed with this question. Question c: In fluid mechanics there
**Please write this is in C language. OR give me pointers on how I should proceed with this question.
Question c: In fluid mechanics there is an equation relating the fluid friction factor f, and Reynolds number (Re). Re describes the laminar or turbulent nature of a flowing fluid. This equation is called the Prandtl Correlation. It is stated as: 1/sqrt(f) = 4.0 log10(Re*sqrt(f)) 0.4 Unfortunately, one cannot directly solve this for f. However, we can guess at a value of f, plug it into the right-hand side (rhs) and calculate a new f as: f = 1/rs^2 Applying this successively in a loop, we hope it will eventually converge to the correct value of f for a given Re. Your program should request a Reynolds number and a starting guess for f from the user and print out the actual value of f for that Reynolds number. Assume the function approximation has converged when the new value of f differs from the last value of f by less than 0.00001. Your program should terminate with an error message if it has not converged in 100 iterations.
Hints: Values of f are typically quite small, so you might start with a guess less than 1, however, you program should converge in less than 10 iterations, even for a guess quite a bit larger or smaller than the correct value. For a Reynolds number of Re=10,000, the correct friction factor is f = 0.007727.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
