-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Airfoil control surface / hinged geometry not smooth #131
Comments
Hi Ben, Thanks for reporting this, and a good question! Tl;dr is that I agree that the circular-arc method is probably the better way to go these days, but there were older motivations back when this AeroSandbox flap handling code was written that motivated this choice. The original motivation behind the AeroSandbox flap handling was that it preserves the dimensions of the coordinates array (i.e., no new points are deleted and created). This contrasts with XFoil's approach, which both creates new points on the "expanding" side and deletes points on the "contracting" side. The problem with this is that this makes XFoil's logic inherently This also causes issues with automatic differentiation in static-graph backends (e.g., CasADi, JAX), which require array shapes to remain static. A practical example of where both problems might arise would be iteratively varying the deflection to satisfy a trim condition. Another example would be differentiable meshing for a VLM simulation with varying control surface deflections. Nowadays, the Because of that, it would be reasonable to go back to I probably don't have time to implement this logic in the near-term, but leaving this issue open in case anyone wants to open a pull request supporting this! |
Ah ok that all makes sense, for some reason I thought the Xfoil approach was maintaining c1 continuity, thanks for the correction. I was coming at it more from wanted to evaluate hinge moments than optimization, and Aerosandbox was just a handier/ready-made way to run those sweeps parametrically in Xfoil vs. Xfoil itself! I'm fine with closing this but up to you. |
Bug Description / Observed Behavior
When adding a deflected control surface (flap) to an Airfoil object, the resulting geometry / coordinates have more of an abrupt curvature discontinuity than Xfoil's method of adding a circular arc. Not necessarily a bug/wrong, but it does end up giving coefficient results that differ from the Xfoil-created flapped geometry by >10% even at modest deflections. It threw me off for a while when validating the hinged-airfoil results with a pure Xfoil check.
Steps to Reproduce
The extended upper-surface "gap" is nearly linear / not filled in smoothly.
!
Expected Behavior
Overlayed against Xfoil's GDES routine (blue/green is aerosandbox's geometry), where Xfoil fills in with a smoother circular arc.
System Information
Other Information
See subroutine FLAP in xfoil (6.99) xgdes.f source file for how Xfoil adds a circular arc: was this approach considered for hinged airfoil geometry in asb?
The text was updated successfully, but these errors were encountered: