0

The table shows the drag coefficient cD of a sphere as a function of Reynolds number Re. Find cD at Re = 5, 50, 500, 5000. Hint: use log–log scale.

Re 0.2 2 20 200 2000 20000
cD 103 13.9 2.72 0.800 0.401 0.433

I don't understand how to "use log-log scale" to solve this problem. I tried the below codes but I don't know whether it is correct or not. How can I use the log-log scale here?

you can find original of question below link

https://d2vlcm61l7u1fs.cloudfront.net/media%2Faef%2Faef9a122-1a83-423d-9258-66fac0cac8e4%2FphpCF4Vwd.png

r = [0.2, 2, 20 ,200, 2000 ,20000];
c = [103, 13.9, 2.72 ,0.800 ,0.401 ,0.433];
rI = [5,50,500,5000];
cI = spline (r,c, rI);
Ejjjn
  • 11
  • 5
  • i need to find polynominal that passes through all x-y point and plot it the polynomial curve. after accomplishing this convert it back to x-y data and plot it on a log-log scale with "loglog" command. i have no idea how to create x-y data points without knowing of degree of the equalation. – Ejjjn May 06 '19 at 08:41

1 Answers1

1

What you need to do for this question, is to compute the logarithm of your X and Y values and only then perform interpolation. If you look at the drag coefficient of a sphere,

Cd vs Re

you'll see that this chart (and other similar charts) is plotted using logarithmic scales. Note that the red curve is quite smooth and well-behaved with the exception of the transition point around 3E5, where flow separation occurs.

To solve your assignment, you need to perform interpolation "using the red curve", that is, in a logarithmic domain. The reason for doing this is because the spans of the X and Y values are very large, and a polynomial or a spline over the original domain would not capture the behavior correctly. Practically -

r = [0.2, 2, 20 ,200, 2000 ,20000];
c = [103, 13.9, 2.72 ,0.800 ,0.401 ,0.433];
rI = [5,50,500,5000];
cI = exp( spline( log(r), log(c), log(rI)) ); % interpolation is performed for log(y) vs log(x)
%{
cI =
    6.9390    1.5843    0.5636    0.3717
%}

The correctness of these results can be validated manually using the chart.

Dev-iL
  • 23,742
  • 7
  • 57
  • 99
  • i want to proceed like this. r = [0.2, 2, 20 ,200, 2000 ,20000]; c = [103, 13.9, 2.72 ,0.800 ,0.401 ,0.433]; x = log(r); y = log(c); plot(x,y); fig = gcf; axObjs = fig.Children; dataObjs = axObjs.Children; xx = dataObjs(1).XData; yy = dataObjs(1).YData; r2 = 10.^xx; c2 = 10.^yy; rI = [5,50,500,5000]; cI = spline (r2,c2, rI) what is wrong with the my syntax and alrgorithm – Ejjjn May 06 '19 at 10:07
  • first of all i want to create polynomial figure from given values. then convert it to r-c data again. then spline it with created equation. – Ejjjn May 06 '19 at 10:09
  • You don't need to change the data in any way in order to plot the figure. Just use `loglog` instead of `plot`. – Dev-iL May 06 '19 at 10:32