problem at smooting the spline

조회 수: 6 (최근 30일)
onur karakurt
onur karakurt 2021년 6월 23일
댓글: onur karakurt 2021년 7월 11일
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
onur karakurt
onur karakurt 2021년 6월 23일
I opened cftool program. is there any function for curvefitting toll with fourier8 , without openning tool page
DGM
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
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
  댓글 수: 2
onur karakurt
onur karakurt 2021년 7월 9일
Thanks so much
onur karakurt
onur karakurt 2021년 7월 11일
please check the trailing edge

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by