雷诺数与阻力系数的对数插值

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

我不明白如何"use log-log scale"解决这个问题。我尝试了以下代码,但我不知道它是否正确。我如何在这里使用对数对数刻度?

你可以在下面找到问题的原文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);

对于这道题,你需要做的是计算你的 X 和 Y 值的对数,然后才进行插值。如果您查看 drag coefficient of a sphere

您会看到此图表(以及其他类似图表)是使用对数刻度 绘制 的。请注意,除了发生流分离的 3E5 附近的过渡点外,红色曲线非常平滑且表现良好。

要解决您的作业,您需要执行插值"using the red curve",即在对数域中。这样做的原因是因为 X 和 Y 值的跨度非常大,原始域上的多项式或样条曲线无法正确捕获行为。实际上 -

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
%}

可以使用图表手动验证这些结果的正确性。