![subject](/tpl/images/cats/himiya.png)
Write a function to calculate the Reynolds number in fluid flow and determine whether the flow is laminar, urbulent, or in the transition between the two.
The Reynolds number is defined as:
oB9wkF9BAXd1zElFTkSuQmCC
where r = density of the fluid; V = velocity; L = length scale of the problem (e. g. diameter of a pipe or chord width of an airfoil); m = dynamic viscosity
For purposes of this problem, the Reynolds number is used to classify flow (roughly) as follows:
Reynolds Number Type of Flow
Re < 1,000 Laminar
Re > 10,000 Turbulent
Otherwise Transition
The function specification is as follows:
Input arguments (all SCALARS) Output arguments
density, r (kg/m3) Reynolds number, Re (dimensionless) - SCALAR
velocity, V (m/s) Flow type, a string ("Laminar", "Turbulent", or
length, L (m) "Transition")
viscosity, m (kg/m-s) NOTE: the flow type should be a string ("Laminar")
not a char array (‘Laminar’)
Note: an alternative way to write the function is to pass the arguments as vectors, not scalars, and have the function return array outputs. This is acceptable, but it may not pass the provided checker.
B. In your script file, use the function that you defined in problem 1 to determine the Reynolds number and flow type for the following sets of parameters:
Test Case
Density, r
Length, L
Velocity, V
Viscosity, m
1
1.2
0.05
5
3.5x10-5
2
0.01
1
100
1.7x10-5
3
1.29
0.01
2
3x10-5
For each test case, print a message to the command window in the format:
For test case n, the Reynolds number is X, and the flow type is Z.
where X is the calculated value, and Z is "laminar", "turbulent", or "transition". For full credit, you must use a loop to iterate over the rows of the matrix, and store the results in a numerical array, Re, and a string array, flow_type.
Note: If you wrote the function as specified, with scalar inputs & outputs, you will need a loop in your main script to call the function on each test case. If you used the alternative approach of designing the function with array inputs & outputs, you will only have to call the function once.
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Chemistry
![image](/tpl/images/cats/himiya.png)
![image](/tpl/images/cats/himiya.png)
Chemistry, 22.06.2019 14:20, kekecantonxox121
You have a liquid that exhibits diltancy. you want to pour it from a bottle. what should you do to the bottle before pouring
Answers: 1
![image](/tpl/images/cats/himiya.png)
Chemistry, 22.06.2019 18:30, tanviknawale
Which sample at stp has the same number of atoms as 18 liters of ne at stp
Answers: 1
![image](/tpl/images/cats/himiya.png)
Chemistry, 22.06.2019 20:00, batoolishak7475
Carbon-14 undergoes radioactive decay in the reaction above. determine the type of radiation emitted in this reaction and describe what is happening to the nucleus during this reaction.
Answers: 2
You know the right answer?
Write a function to calculate the Reynolds number in fluid flow and determine whether the flow is la...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 04.08.2021 19:40
![Konu](/tpl/images/cats/mat.png)
Mathematics, 04.08.2021 19:40
![Konu](/tpl/images/cats/ekonomika.png)
![Konu](/tpl/images/cats/informatica.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/ekonomika.png)