problem at smooting the spline
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
DGM
il 23 Giu 2021
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.
Risposta accettata
DGM
il 23 Giu 2021
Modificato: DGM
il 23 Giu 2021
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
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Airfoil tools in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!