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: examples/liftingline_a50k27.jl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -109,8 +109,8 @@ sigmafactor = 0.0 # Dragging line amplification fa
109
109
sigmaexponent =1.0# Dragging line amplification exponent (no effects if `sigmafactor==0.0`)
110
110
111
111
# Nonlinear solver
112
-
solver = pnl.SimpleNonlinearSolve.SimpleDFSane()# Indifferent to initial guess, but somewhat not robust
113
-
# solver = pnl.SimpleNonlinearSolve.SimpleTrustRegion() # Trust region needs a good initial guess, but it converges very reliably
112
+
solver = pnl.analysis_solver# Very robust and physically accurate, but it can take a long time post-stall (not AD compatible)
113
+
# solver = pnl.optimization_solver# Robus, fast, and ForwardDiff compatible, but often times it returns the secondary solution that is unphysical post stall
solver = pnl.analysis_solver # Very robust and physically accurate, but it can take a long time post-stall (not AD compatible)
116
+
# solver = pnl.optimization_solver # Robus, fast, and ForwardDiff compatible, but often times it returns the secondary solution that is unphysical post stall
Copy file name to clipboardExpand all lines: src/liftingline/optimization.jl
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -134,12 +134,13 @@ function run_liftingline(;
134
134
# Nonlinear solver
135
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
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)
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
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
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
140
# solver = NonlinearSolve.SIAMFANLEquationsJL(method = :newton, autodiff=ADTypes.AutoForwardDiff()), # Also robust in linear and mild stall regions, but much faster
141
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
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)
# solver = pnl.NonlinearSolve.NonlinearSolve.FastShortcutNonlinearPolyalg(; autodiff = :forward, vjp_autodiff = :forward, jvp_autodiff = :forward, prefer_simplenonlinearsolve = Val(true)), # Robust, fast, and ForwardDiff compatible (though solver might be a bit noise, so set optimizer tol ~5e-5)
135
+
136
+
solver = pnl.optimization_solver,
135
137
136
138
solver_optargs = (;
137
139
abstol =1e-12, # <-- tight tolerance to converge derivatives
0 commit comments