You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/liftingline/optimization.jl
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -132,9 +132,14 @@ function run_liftingline(;
132
132
sigmaexponent =4.0, # Dragging line amplification exponent (no effects if `sigmafactor==0.0`)
133
133
134
134
# Nonlinear solver
135
-
# solver = SimpleNonlinearSolve.SimpleDFSane(), # Indifferent to initial guess, but somewhat not robust <---- NOT COMPATIBLE WITH FORWARDDIFF
136
-
# solver = SimpleNonlinearSolve.SimpleTrustRegion(), # Trust region needs a good initial guess, but it converges very reliably
137
-
solver = NonlinearSolve.SimpleBroyden(), # This seems to converge well while being compatible with ForwardDiff
135
+
# solver = SimpleNonlinearSolve.SimpleDFSane(), # Indifferent to initial guess, but somewhat not robust post stall <---- NOT COMPATIBLE WITH FORWARDDIFF (but compatible with CSDA and optimization converges well)
136
+
# solver = SimpleNonlinearSolve.SimpleTrustRegion(), # Trust region needs a good initial guess, but solver converges very reliably post stall, not compatible with CSDA nor ForwardDiff
137
+
solver = NonlinearSolve.SimpleBroyden(), # Optimization converges well while being compatible with ForwardDiff (not compatible with CSDA). EXTREMELY ROBUST ACROSS LINEAR, MILD STALL, AND DEEP STALL (it returns an answer, but it might be noise and not accurate)
138
+
# solver = NonlinearSolve.NonlinearSolveQuasiNewton.Broyden(; autodiff = ADTypes.AutoForwardDiff(), init_jacobian=Val(:true_jacobian)) # Also extremely robust across regions (it returns an answer, but it might be noise and not accurate)
139
+
# solver = NonlinearSolve.NLsolveJL(method = :trust_region),# Optimization converges very well with ForwardDiff, not compatible with CSDA. Solver converges slowly but realibly in linear and mild stall regions, does not converge post stall
140
+
# solver = NonlinearSolve.SIAMFANLEquationsJL(method = :newton, autodiff=ADTypes.AutoForwardDiff()), # Also robust in linear and mild stall regions, but much faster
141
+
# solver = NonlinearSolve.NonlinearSolve.FastShortcutNLLSPolyalg(; autodiff = ADTypes.AutoForwardDiff(), vjp_autodiff = ADTypes.AutoForwardDiff(), jvp_autodiff = ADTypes.AutoForwardDiff()) # Very robust, but it can take a long time. Not ForwardDiff nor CSDA compatible
142
+
# solver = NonlinearSolve.NonlinearSolve.FastShortcutNonlinearPolyalg(; autodiff = ADTypes.AutoForwardDiff(), vjp_autodiff = ADTypes.AutoForwardDiff(), jvp_autodiff = ADTypes.AutoForwardDiff(), prefer_simplenonlinearsolve = Val(true)) # 100% convergence, and super fast, but it might return the wrong solution. ForwardDiff compatible (though solver might be a bit noise, so set optimizer tol ~5e-5)
solver = pnl.NonlinearSolve.NonlinearSolve.FastShortcutNonlinearPolyalg(; autodiff = ADTypes.AutoForwardDiff(), vjp_autodiff = ADTypes.AutoForwardDiff(), jvp_autodiff = ADTypes.AutoForwardDiff(), prefer_simplenonlinearsolve =Val(true)), # Robust, fast, and ForwardDiff compatible (though solver might be a bit noise, so set optimizer tol ~5e-5)
129
135
130
136
solver_optargs = (;
131
137
abstol =1e-12, # <-- tight tolerance to converge derivatives
0 commit comments