Determine Camber and Thickness of a Airfoil - Given the xy coordinates
122 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear All,
I have got airfoil coordinates, in the form of a closed polygon (xy points given below).
I need a function to determine the maximum possbile inscribed circle about each point (vertex) in the polygon.
ps: inscribed circle at a vertex point is defined as the maximum possible circle drawn inside the polygon and also tangent to the vertex.
The airfoil below given contains 33 points, and i require 33 inscribed circles...
Otherwise need to determine the camber and thickness distribution of the airfoil as referred in the comments below.
Any help is highly appreciated.
Thanks in advance,
K Vijay Anand
%Coordinates of Airfoil
xy = [1.00000 0.94908 0.89816 0.79638 0.69491 0.59377 0.49322 0.39328 0.29389 0.19489 0.14562 0.09650 0.07203 0.04764 0.02338 0.01143 0.00000 0.01330 0.02596 0.05095 0.07573 0.10048 0.14992 0.19932 0.29821 0.39752 0.49722 0.59742 0.69804 0.79883 0.89957 0.94979 1.00000;
0.00000 0.02835 0.05669 0.11138 0.15658 0.19180 0.20853 0.20678 0.18805 0.15733 0.13473 0.10764 0.09134 0.07255 0.04976 0.03287 0.00000 -0.02457 -0.02966 -0.02934 -0.02254 -0.01473 0.00237 0.02098 0.05519 0.07642 0.08566 0.07942 0.06019 0.03596 0.01324 0.00637 0.00000];
plot(xy(1,:),xy(2,:),'o-','LineWidth',2); grid on; axis equal;
5 commentaires
Réponses (2)
DGM
le 30 Sep 2021
This isn't exactly a great way, but I'm more used to abusing image processing tools than polyshape() and such. The mention of Voronoi diagrams made me think that a distance map would be a decent place to start.
profileline = [1.00000 0.94908 0.89816 0.79638 0.69491 0.59377 0.49322 0.39328 0.29389 0.19489 0.14562 0.09650 0.07203 0.04764 0.02338 0.01143 0.00000 0.01330 0.02596 0.05095 0.07573 0.10048 0.14992 0.19932 0.29821 0.39752 0.49722 0.59742 0.69804 0.79883 0.89957 0.94979 1.00000;
0.00000 0.02835 0.05669 0.11138 0.15658 0.19180 0.20853 0.20678 0.18805 0.15733 0.13473 0.10764 0.09134 0.07255 0.04976 0.03287 0.00000 -0.02457 -0.02966 -0.02934 -0.02254 -0.01473 0.00237 0.02098 0.05519 0.07642 0.08566 0.07942 0.06019 0.03596 0.01324 0.00637 0.00000];
stepsize = 0.0001; % effective resolution
xrange = [-0.1 1.1];
yrange = [-0.1 0.25];
% use a dummy image display to generate an image of the profile
x = xrange(1):stepsize:xrange(2);
y = yrange(1):stepsize:yrange(2);
h = image(xrange,yrange,ones(numel(y),numel(x)));
L = images.roi.Polygon(gca);
L.Position = profileline.';
mask = ~createMask(L);
% find camberline coordinates from the ridgeline of the distance map
% this is only an incomplete solution due to the leading edge angle
dmap = bwdist(mask);
[~,idx] = max(dmap,[],1);
camberline1 = [x; y(idx)];
% use the initial estimate to find where to bisect the profile
% so that the leading edge can be estimated
[~,breakpoint] = max(camberline1(2,:));
breakpoint = round(breakpoint/2); % avoid shallow slopes
[~,idx] = max(dmap(:,1:breakpoint),[],2);
camberline2 = [x(idx); y];
% plot estimates for demonstration
subplot(2,1,1)
plot(profileline(1,:),profileline(2,:)); hold on; grid on
plot(camberline1(1,:),camberline1(2,:),'r:');
plot(camberline2(1,:),camberline2(2,:),'b:');
xlim(xrange)
ylim(yrange)
% clean up and merge estimates
camberline1(:,camberline1(2,:)==yrange(1)) = NaN;
camberline2(:,camberline2(1,:)==xrange(1)) = NaN;
camberline2(:,camberline2(1,:)==x(breakpoint)) = NaN;
camberline = [camberline2 camberline1(:,breakpoint+1:end)];
% plot merged estimate
subplot(2,1,2)
plot(profileline(1,:),profileline(2,:)); hold on; grid on
plot(camberline(1,:),camberline(2,:),'b--');
xlim(xrange)
ylim(yrange)
As mentioned, the leading edge area is problematic. I doubt either estimate is correct in that region, but the second looked marginally more reasonable, and I figured I'd at least demonstrate that a piecewise solution may be an option. It would take me more time to wrap my head around a more robust approach.
6 commentaires
nyhuma
le 28 Juil 2023
hey @Vijay Anand
can you provide the code for this analysis? i have implemented something similiar to this, but i am only looking for radii with r => "distance of voronoi_site to polygon". this way i am lacking voronoi sites at the leading and trailing edges of airfoils or in parts of high curvature. this makes the analysis of turbine airfoils pretty unreliable.
Bruno Luong
le 4 Oct 2021
If you can tolerate some finite precision, you migh discretize the interior as b&w image, look for the skeleton
For each point of the skeleton (center of the circle) the radius is the minimum of the distance from the boundary (not very difficult to compute).
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!