Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a MATLAB function that will do the following Given: Re (Reynolds number) & ?/D (relative roughness) Return: f The first line of your function

Create a MATLAB function that will do the following

Given: Re (Reynolds number) & ?/D (relative roughness)

Return: f

The first line of your function should be "function f = f_userID(Re, rel_rough)" without the quote marks.

Your function should incorporate an if statement to check whether the flow is laminar, turbulent, or transitional, and return the appropriate friction factor.

Use a loop to solve the Colebrook formula for the friction factor to a precision of at least 10-5 if the flow is turbulent.

Use the Moody diagram to test various combinations of Re & ?/D.

MUST BE A FUNCTION, NOT A SCRIPT

Please show a screen capture of the program on matlab

image text in transcribedimage text in transcribed

Moody Diagram 11 01 Transition Region 0.1 0.09- 0.08 0.07 0.06 0.05 0.05 -0.04 0.03 0.02 0.015 0.04 0.01 - 0.005 IIIII Friction Factor Laminar Flow 0.002 0.001 5x 10-4 Relative Pipe Roughness 0.02 0.015 2x 10-4 Complete Turbulence: 0.01 r-1-1-r1911----- - ----- --1-re Material (mm) Concrete, coarse 0.25 Concrete, new smooth 0.025 Drawn tubing 0.0025 Glass, Plastic Perspex 0.0025 Iron, cast 0.15 Sewers, old Steel, mortar lined 0.1 Steel, rusted 0.5 Steel, structural or forged 0.025 Water mains, old 1.0 HHHHHHHHH 103 5x10-5 a Rim 3.0 JLJJJJ-- El 10-5 -Friction Factor = CAP. H5x 10-6 .!.!J ALL.... Smooth Pipe 104 106 107 108 105 Reynolds Number, Re = evd

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions