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 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 (i.e. the "nose" of the airfoil). The B-spline curves follow really accurately the original curve but show a "pointy" behaviour. I am now attaching my script.
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 ?
Thank you in advance
filename = 'RAE2822.txt';
coords = readtable(filename);
plot(x_1, y_1, x_2, y_2); hold on;
x = [0,0.001 0.005, 0.01, 0.025, 0.05, 0.2, 0.55, 1];
knots = augknt(x,degree+1)
BS_SS = spap2(knots, degree+1, x_1, y_1,w1);
BS_PS = spap2(knots, degree+1, x_2, y_2, w2);