CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Special Topics > Mesh Generation & Pre-Processing

B-spline fit of airfoil coordinates

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2021, 10:55
Unhappy B-spline fit of airfoil coordinates
  #1
New Member
 
Marco Zanichelli
Join Date: Jun 2021
Posts: 6
Rep Power: 4
m_zanichelli is on a distinguished road
Hello everybody,
I am an aerospace Engineer, I am currently working in an airfoil optimization project. I want to create an airfoil parametrization starting from a RAE2822 of which I know the coordinates.
At the beginning I was trying to get a unique B-spline representation for the whole airfoil curve, i.e. to find a unique curve that fits the airfoil curve. I have not been able to do so (does anybody have an idea?) . Anyway, I found the spap2 function of Matlab and I've been using it to find the B-spline best-fit to the coordinates I have, keeping separate the lower and upper part of the airfoil. Trying some different knot sequences and found some that seem promising, but I am getting a weird behaviour at the Leading Edge. The B-spline curves follow really accurately the original curve but show a "pointy" behaviour. I am now attaching my matlab script.


Code:
filename = 'RAE2822.txt'; % attached here
coords = readtable(filename);
x_0 = coords.Var1;
y_0 = coords.Var2;
% separation of upper and lower parts of the airfoil
xaxis = sort(x_0(1:65));
x_1 = x_0(1:65);
y_1 = y_0(1:65);
x_2 = [0; x_0(66:end)];
y_2 = y_0(65:end);
% plot of the original coordinates
plot(x_1, y_1, x_2, y_2); hold on;
% definition of the knot sequence
x = [0, 0.025, 0.05, 0.2, 0.55, 1];
degree = 3 %b - spline degree
knots = augknt(x,degree+1);
%weights
w1 = ones(size(x_1));                               %
w1(end) = 1000;
w2 = ones(size(x_2));
w2(1) = 1000;
%least squares b-spline fit of the suction side SS
BS_SS = spap2(knots, degree+1, x_1, y_1,w1);
fnplt(BS_SS); 
%least squares b-spline fit of the pressure side PS
BS_PS = spap2(knots, degree+1, x_2, y_2, w2);
fnplt(BS_PS); axis equal
xlim([-0.01, 0.05]) % comment if you want to see the whole parametrization. Here you can see the problem
I am guessing this problem comes from the large derivative I have at the beginning of the curve, but I am not really sure about that. Can somebody help ?
m_zanichelli is offline   Reply With Quote

Old   September 30, 2021, 06:43
Default
  #2
Member
 
Chrowale
Join Date: Sep 2021
Location: Bandung, Indonesia
Posts: 59
Rep Power: 4
mluckyw is on a distinguished road
Have you tried to use camber line as your line of reference and not coordinates? It will better to resemble the airfoil curves but for exchange of added variables of thickness for each point in the curve.
mluckyw is offline   Reply With Quote

Reply

Tags
#airfoil, #bspline, #fit, #parametrization


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with airfoil shape optimization robyTKD SU2 Shape Design 7 March 7, 2022 16:18
SU2 AOA optimization 454514566@qq.com SU2 9 March 7, 2022 16:17
Ffd_control_point_2d feiyi SU2 4 September 30, 2019 12:42
High drag for airfoil compared to XFOIL and wind tunnel data Ry10 SU2 15 October 30, 2016 17:27
2D FFD Optimization RLangtry SU2 2 August 5, 2014 09:48


All times are GMT -4. The time now is 03:12.