Determine Camber and Thickness of a Airfoil - Given the xy coordinates

45 views (last 30 days)
Vijay Anand on 30 Sep 2021
Edited: Vijay Anand on 7 Oct 2021
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.
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;
DGM on 30 Sep 2021
Ah. I didn't notice that they were solving it that way.

DGM on 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.';
% find camberline coordinates from the ridgeline of the distance map
% this is only an incomplete solution due to the leading edge angle
[~,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.
Vijay Anand on 7 Oct 2021
Dear Mr.@DGM and others,
A small break through...
As i thought earlier, these circles need not be inscribed circles...
The definition of camber line says, the thickness should be normal to the camber line (measured at a point)... and also thickness is equal on top and bottom of the camber line.
Please refer to the figures 1,2,3 Figure 1
The dotted vertical lines are thickness lines plotted verticaly in y-axis.
slanted lines are thickness lines plotted normal to local camber point...
The circles are drawn with thickness/2 as radius and center at camber point... Figure 2 Figure 3
From the figures near leading edge (figure 2), it is evident that the circles are bigger . . .
Kindly give your valuable feed back on this...
Still, I am struck with the algorithm to determine the camber line and thickness distribution.
ps: these figures i have generated from known camber and thickness distributions equations (NACA 4312 Aifoil) and coordinate points
K Vijay Anand

Bruno Luong on 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).

R2020a

Community Treasure Hunt

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

Start Hunting!