problem at smooting the spline
1 次查看(过去 30 天)
显示 更早的评论
When trying smooting the leading edge of airfoil, nothing is changing. Leading edge looks like a arrow. not a circle.
How can ı smoot the leading edge of airfoil.?
x=[0.0 0.5 0.75 1.250 2.5 5.0 7.5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100]./100;
y=[0.0 0.394 0.475 0.594 0.795 1.090 1.322 1.518 1.828 2.066 2.245 2.375 2.459 2.498 2.487 2.420 2.290 2.106 1.881 1.623 1.339 1.038 0.729 0.430 0.165 0.0]./100;
erase=numel(x);
pp=spline(x,y);
xx=sort([x max(x)-0.005 max(x)-0.0075 max(x)-0.0125 max(x)-0.025 max(x)-0.075])
yy=ppval(pp,xx);
x=xx;y=yy;
x=[flip(x) x]; x(numel(xx))=[];
y=[flip(y) -(y)]; y(numel(xx))=[];
plot(x,y)
axis equal
5 个评论
DGM
2021-6-23
I'm not that familiar with the depths of the CFT, and I'm not really sure how one would use cftool for this case.
采纳的回答
DGM
2021-6-23
编辑:DGM
2021-6-23
You could try doing something like this instead of trying to enforce endslopes
x = [0.0 0.5 0.75 1.250 2.5 5.0 7.5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100]./100;
y = [0.0 0.394 0.475 0.594 0.795 1.090 1.322 1.518 1.828 2.066 2.245 2.375 2.459 2.498 2.487 2.420 2.290 2.106 1.881 1.623 1.339 1.038 0.729 0.430 0.165 0.0]./100;
% build a single curve
x = [fliplr(x(2:end-1)) x(2:end-1)];
y = [fliplr(y(2:end-1)) -y(2:end-1)];
% for sake of doing this in polar, x needs to be offset temporarily
% for sake of getting spline to interpolate well, temporarily adjust aspect ratio
xos = 0.5;
ysc = 40;
x = x-xos;
y = y*ysc;
% convert to polar coordinates
r = sqrt(x.^2 + y.^2);
th = atan2(y,x);
th(th<0) = 2*pi+th(th<0);
% do the interpolation
thf = linspace(0,2*pi,1000);
rf = spline(th,r,thf);
% convert back, reposition/rescale, plot
xf = [1 rf.*cos(thf)+xos 1];
yf = [0 rf.*sin(thf) 0]/ysc;
plot(xf,yf); axis equal
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Airfoil tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!