The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help with this matlab assignment. The coding part was a little difficult.
Â
Â
MAE 384. Advanced Mathematical Methods for Engineers.
Homework Assignment 4. Due February 22.
1. The …gure shows the accepted relationship between drag coe¢ cient and Reynolds number for a
smooth sphere. Note that the curve is plotted on a log-log scale. Assume that you perform an
experiment to verify this relationship. Your data for CD 1 vs. Re 2 is shown in the table below the
…gure. Reynolds number
Drag coe¢ cient 2 20 200 2000 20,000 40,000 200,000 400,000 2,000,000 13.9 2.72 0.8 0.401 0.433 0.47 0.40 0.0775 0.214 Note: You should do the analysis in parts (a)-(e) for log10 (CD ) vs. log10 (Re) rather than for CD
vs. Re. I suggest you create new variables x = log10 (Re) and y = log10 (CD ) and use them in your
analysis.
(a) By solving a linear system (Vandermonde matrix), …nd the polynomial that passes through all
x-y data points. Plot the polynomial curve. On the same graph, plot the data points. Note
that, ideally for all plots in this problem, you should convert your x-y data back to Re-CD
and plot on a log-log scale using the MATLAB loglog command. Using your polynomial …t,
predict the drag coe¢ cient at Reynolds numbers of 100, 10,000 and 1,000,000.
1 Drag coe¢ cient, CD , is de…ned as the total drag divided by the dynamic pressure
the sphere cross-sectional area. It
is a dimensionless number.
2
The Reynolds number, Re, is de…ned as the ratio of inertial forces to viscous forces in a ‡uid ‡ow. It is a dimensionless
number. (b) Your lab partner believes that you may have made some errors in your measurements, and
the partner decides that the best …t to the x-y appears to be a quadratic. Find the quadratic
either by using MATLAB’s polyfit command, or by doing your own least-squares …t. Create
a new plot showing the quadratic curve and the data points. Predict the drag coe¢ cient at
Reynolds numbers of 100, 10,000 and 1,000,000.
(c) Use the MATLAB function spline to interpolate the data as cubic splines. You can call the
function by typing
>>f = spline(x,y,xi);
xi is a vector of x-locations at which the interpolation is to be completed. f will be a vector
of interpolated (logarithms of) drag coe¢ cients. Plot the curve and the data points. Predict
the drag coe¢ cient at Reynolds numbers of 100, 10,000 and 1,000,000.
(d) Compare the drag coe¢ cient predictions from each of the three methods. Discuss, including
other observations about the three approximations. Which do you think is likely to give the
most physically realistic result?
(e) With the help of the MATLAB function csape, repeat the interpolation for end conditions
corresponding to the natural (‘variational’) spline and/or the default (‘Lagrange’) spline and
compare with results for the MATLAB default "not-a-knot" end condition. Comment on the
di¤erences. Which do you think is likely more correct and why?
2. Consider the periodic function
f (t) = 1 t2 , 1 t 1, T = 2 (a) Find the Fourier coe¢ cients for this function.
(b) Plot the function and its Fourier approximation between t = 2 and t = 2. For the Fourier approximation, use K = 5; 11 and 21. Comment.
(c) How many terms in the Fourier series are required for good resolution of the function?
-----------