Using the Python library AirfoilPrep.py, I noticed that there is an issue when the data provided by the user starts or ends with an angle value that is multiple of ten.
It is creating an additional aoa value of the user bound, there will thus be two times the first/last value of aoa provided by the user. As those will not be edited, you risk ending up with extra zero values around the boundary of the values provided by the user.
The proposed fix is the following:
In the "extrapolate" function of your "polar" class, you should add a very small offset to the argument of the floor and ceil functions used to evaluate the additional aoa for the extrapolation, using for example 10 times the machine precision (one time the machine precision was not enough in my case):
cm1_alpha = floor(self.alpha[0] / 10.0 - 10np.finfo(float).eps) 10.0
cm2_alpha = ceil(self.alpha[-1] / 10.0 + 10np.finfo(float).eps) 10.0
If you do not do this, if for example the last user-provided aoa is 20.0, cm2_alpha will be equal to 20.0 and you will have two "20" value in your new alpha vector (alpha_cm). What you should avoid.
Hi,
Using the Python library AirfoilPrep.py, I noticed that there is an issue when the data provided by the user starts or ends with an angle value that is multiple of ten. It is creating an additional aoa value of the user bound, there will thus be two times the first/last value of aoa provided by the user. As those will not be edited, you risk ending up with extra zero values around the boundary of the values provided by the user.
The proposed fix is the following: In the "extrapolate" function of your "polar" class, you should add a very small offset to the argument of the floor and ceil functions used to evaluate the additional aoa for the extrapolation, using for example 10 times the machine precision (one time the machine precision was not enough in my case): cm1_alpha = floor(self.alpha[0] / 10.0 - 10np.finfo(float).eps) 10.0 cm2_alpha = ceil(self.alpha[-1] / 10.0 + 10np.finfo(float).eps) 10.0
If you do not do this, if for example the last user-provided aoa is 20.0, cm2_alpha will be equal to 20.0 and you will have two "20" value in your new alpha vector (alpha_cm). What you should avoid.
Best regards,