OpenMDAO: NLBGS fails during optimization but not during analysis?

43 Views Asked by At

I am trying to do a fluid-structure interaction optimization using OpenMDAO with DaFoam for the fluids solver and TACS for the structural solver. When running the problem as an analysis, I am able to resolve the coupling fairly quickly using NLBGS. However, when running an optimization, the coupling becomes much harder to resolve and often fails to meet the convergence criteria. This problem occurs for the same design point so it is not a problem of the optimizer choosing a design point that can't be evaluated. I would have thought that the analysis should be the same regardless if it is computed during an optimization or during a stand alone execution. Does anyone have any insights on what could be going on and how I can fix it?

I am using the IPOPT optimizer.

My case is somewhat similar to this example: https://dafoam.github.io/mydoc_tutorials_aerostruct_mach_wing.html

1

There are 1 best solutions below

0
On

Without more information (at least an N2 diagram, but preferably some simplified test case) its very challenging to give you any specific advice. So instead, I'll provide some general advice:

  1. The most important tip I can give you is to use Mphys. The developers of the DAfoam and TACS wrappers for OpenMDAO are both involved in that project, and there are example cases to help you get set up. That community is where the best high-fidelity-mdo research in the OpenMDAO platform is currently going on as of December 2023.

  2. You've said the analysis works stand alone, but not under the optimizer. Are you 100% sure you're seeing the challenging behavior from the nonlinear solver? The optimizer uses both linear and nonlinear solvers, and perhaps its the linear solver (for the derivative solves) that is struggling?

  3. If you haven't already tried it, make sure you turn up the [iprint][2] level on the solver so you can get a clear indication of whats going on. You can also use the debug_print option which helps by providing more detailed solver state information whenever a solver fails. Don't leave this on during normal running, its a very expensive debugging tool. But its helpful for figuring out why a solver isn't working.

  4. Lastly general advice for optimization. Check your derivatives very carefully. Use OpenMDAO derivative checking tools. If you can set up a small enough mesh to afford finite differences across all your design variables then spend the runtime to do a full check on the derivatives. Also check your derivatives at a point that is not exactly the same as you default initial condition. Sometimes that exposes problems as well. If you analysis works, but your optimization doesn't, its almost always because there is a derivative problem.