peterdsharpe / AeroSandbox

Aircraft design optimization made fast through modern automatic differentiation. Composable analysis tools for aerodynamics, propulsion, structures, trajectory design, and much more.
https://peterdsharpe.github.io/AeroSandbox/
MIT License
687 stars 111 forks source link

LEM on Kulfan airfoils #127

Closed guillaume-florent closed 3 months ago

guillaume-florent commented 3 months ago

Bug Description / Observed Behavior

On a symmetrical Kulfan airfoil (upper weights = - lower weights), using a leading edge weight other than zero creates an assymetrical airfoil. On line 599 of kulfan_airfoil.py, the leading edge modification is added to y_lower. If it is substracted instead, the symmetrical airfoils remain symmetrical. Yet, loading a Kulfan airfoil from a symmetrical library airfoil (e.g. naca00xx) with the above mentioned modification creates an assymetrical airfoil. Which leads to the question: does neuralfoil have to be re-trained if kulfan_airfoil.py is modified to substract the leading edge modification on y_lower?

Steps to Reproduce

Create a symmetrical Kulfan airfoil, tinker with the leading_edge_weight and visualize.

Expected Behavior

Even though changing the leading edge weight should keep symmetrical airfoils symmetrical, it does not.

System Information

Other Information

peterdsharpe commented 3 months ago

This is expected behavior - changing the leading edge weight should indeed result in an asymmetric airfoil, since the leading-edge mode shape of a CST airfoil parameterization is asymmetric.

For visual of this, see this chart from the NeuralFoil README (blue mode shape of the bottom subplot) image

Kulfan's paper on the LEM gives this mathematically in Eqn. 8: https://www.researchgate.net/publication/343615711_Modification_of_CST_Airfoil_Representation_Methodology

guillaume-florent commented 3 months ago

Thanks for the clarification. So, the LE radius only depends on the 8 upper and 8 lower weights, with the 'front' weights having a much bigger impact? Is that correct?