Skip to content

Commit

Permalink
add option in solve function to bypass ImplicitAD
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercritchfield committed Nov 22, 2023
1 parent bb418e6 commit 14dfbfc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/CCBlade.jl
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,13 @@ Solve the BEM equations for given rotor geometry and operating point.
- `section::Section`: section properties
- `op::OperatingPoint`: operating point
**Keyword Arguments**
- `implicitad_option=true`: if true, uses ImplicitAD to solve the residual when Duals are passed through; if false, bypasses the ImplicitAD solve
**Returns**
- `outputs::Outputs`: BEM output data including loads, induction factors, etc.
"""
function solve(rotor, section, op)
function solve(rotor, section, op; implicitad_option=true)

# error handling
if typeof(section) <: AbstractVector
Expand Down Expand Up @@ -491,7 +494,11 @@ function solve(rotor, section, op)

# once bracket is found, solve root finding problem and compute loads
if success
phistar = implicit(solve, residual, xv, pv)
if implicitad_option
phistar = implicit(solve, residual, xv, pv)
else
phistar = solve(xv, pv)
end
_, outputs = residual_and_outputs(phistar, xv, pv)
return outputs
end
Expand Down

0 comments on commit 14dfbfc

Please sign in to comment.