Search code examples
matlabinterpolationsplinelogarithmloglog

Logarithmic interpolation of Reynold numbers vs drag coefficient


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);

Solution

  • 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.