Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In fluid mechanics, it is often important to calculate the drag (i.e., the force exerted on an object by the fluid flowing past/around it) for

image text in transcribedimage text in transcribedimage text in transcribed

In fluid mechanics, it is often important to calculate the drag (i.e., the force exerted on an object by the fluid flowing past/around it) for some physical scenario. The first step in calculating the drag is often to calculate the drag coefficient (CD) for the given scenario. Calculating drag coefficients is difficult in general, but it simplifies somewhat nicely for fluid flow over a flat plate. For fluid flowing over a flat plate of length L with velocity magnitude U, the drag coefficient can be calculated according to the table below. As seen in the table, there are a few things to consider when calculating drag coefficients for flow over flat plates: 1. Is the flow laminar (i.e., nice and smooth), turbulent (i.e., chaotic), or mixed (i.e., initially laminar with a transition to turbulent)? 2. What is the so-called Reynolds number, ReL=UL ? Here, (pronounced "nu") is the kinematic viscosity of the fluid, which is a measure of how easily the fluid flows. Honey, for example, has a much larger kinematic viscosity than water. Write a funciton called PlatecD that takes in values for the fluid velocity (U) in [m/s], the plate length (L) in [m], the kinematic viscosity of the fluid () in [ 2/s], and the type of fluid flow (laminar, turbulent, or mixed), and returns the drag coefficient (CD), which is dimensionless. A few things to consider while writing your function: - To determine the flow type, the function user will input ' 1 ' for laminar, ' t ' for turbulent, or ' m ' for mixed. The single quotes on either side of the letters indicate that these are strings (i.e., letters/words). We haven't worked much with strings, but working with strings isn't too much of a conceptual leap from working with doubles (i.e., numbers). To help you out, I have defined strings for each of the 3 flow types and provided an example conditional statement to - To determine the flow type, the function user will input ' l ' for laminar, ' t ' for turbulent, or ' m ' for mixed. The single quotes on either side of the letters indicate that these are strings (i.e., letters/words). We haven't worked much with strings, but working with strings isn't too much of a conceptual leap from working with doubles (i.e., numbers). To help you out, I have defined strings for each of the 3 flow types and provided an example conditional statement to check if the flow is laminar. - DO NOT use more than one comparison in a given conditional statement. That is, do not write something like ifa>5&c

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

Bachelors degree in Information Systems or Statistics

Answered: 1 week ago