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
690 stars 111 forks source link

EXIT: Maximum Number of Iterations Exceeded. #31

Closed hen97 closed 4 years ago

hen97 commented 4 years ago

Adding for example the airfoil MH30 the maximum number of iterations (3000) are exceeded error_aerosandbox.txt

peterdsharpe commented 4 years ago

Hey Henry!

Thanks for reaching out! Basically, what's happening here is that the automated tools to fit a surrogate model to this airfoil are not working.

This is likely because this airfoil has something a little bit out-of-the-ordinary happening with its polars. A quick glance at airfoil data for an MH30 suggests that the issue might stem from its unusually long and flat drag bucket, but I'd have to look into more detail to know for sure.

While I do that, as a quick fix, you can supply your own functions for CL, CDp, and Cm. An example can be found in /AeroSandbox/examples/conventional/casll1_conventional_analysis_point.py beginning at line 33 (go to the path referenced in the subsequent import to see what the constructor looks like).

On my end, action items for this ticket:

  1. Figure out why automated fitting is failing for this airfoil, and adjust methods accordingly
  2. Make airfoil fitting fail in a more descriptive and helpful way

Thanks!

hen97 commented 4 years ago

Hey Peter, thanks for the fast answer. I will try to create my own functions for CL, CDp and Cm. This is a great project! Keep going 👍

KikeM commented 4 years ago

Hi @peterdsharpe,

For your point number 2 of your action items,

Make airfoil fitting fail in a more descriptive and helpful way

you might find creating custom Exceptions a good approach :)