Skip to content

Commit a054b62

Browse files
authored
Merge pull request #39 from byuflowlab/romberg
Additional Quadrature Methods
2 parents 879ebff + ccee801 commit a054b62

16 files changed

+2147
-299
lines changed

src/DuctAPE.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const c4b = C4Blade
1212
# - Packages for Calculating Unit Induced Velocities - #
1313
# For Kernels
1414
using SpecialFunctions # required for elliptic integrals
15+
1516
# For Integration
1617
using FastGaussQuadrature
1718
using QuadGK
@@ -23,11 +24,14 @@ using PreallocationTools # caches
2324
# - Packages for Solves - #
2425
using ImplicitAD # used for all solves
2526
using LinearAlgebra # linear solve and LU decomposition
27+
2628
# General Nonlinear solves
2729
using SimpleNonlinearSolve
30+
2831
# Fixed-Point Iteration Solvers
2932
# using FixedPointAcceleration
3033
using SpeedMapping
34+
3135
# For using NLsolve
3236
using NLsolve #for newton solver
3337
using LineSearches # used in newton solver
@@ -86,12 +90,16 @@ include("preprocess/geometry/elliptic_grid_residuals.jl")
8690

8791
# Induced Velocity Functions
8892
include("preprocess/velocities/unit_induced_velocities.jl")
89-
include("preprocess/velocities/integrals.jl")
9093
include("preprocess/velocities/induced_velocity_matrices.jl")
9194
include("preprocess/velocities/body_aic.jl")
95+
# Quadrature
96+
include("preprocess/velocities/integrands.jl")
97+
include("preprocess/velocities/out_of_place_integrals.jl")
98+
include("preprocess/velocities/gausslegendre_integrals.jl")
99+
include("preprocess/velocities/romberg_integrals.jl")
100+
include("preprocess/velocities/gausskronrod_integrals.jl")
92101

93102
##### ----- PROCESS ----- #####
94-
95103
# Solve and Residual Functions
96104
include("process/solve.jl")
97105
include("process/residuals/CSORresidual.jl")

src/analysis/analyses.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ function analyze(
8484

8585
# out-of-place version currently has 22,292,181 allocations.
8686
# TODO: do this in place for the solve input cache items. eventually will want to have a post-processing and output cache too.
87-
ivb, A_bb_LU, lu_decomp_flag, airfoils, idmaps, panels, problem_dimensions = precompute_parameters_iad!(
87+
ivb, A_bb_LU, lu_decomp_flag, airfoils, idmaps, panels, problem_dimensions = precompute_parameters!(
8888
solve_parameter_tuple.ivr,
8989
solve_parameter_tuple.ivw,
9090
solve_parameter_tuple.blade_elements,
9191
solve_parameter_tuple.linsys,
9292
solve_parameter_tuple.wakeK,
9393
propulsor;
94-
grid_solver_options=options.wake_solver_options,
94+
grid_solver_options=options.grid_solver_options,
95+
integration_options=options.integration_options,
9596
autoshiftduct=options.autoshiftduct,
9697
itcpshift=options.itcpshift,
9798
axistol=options.axistol,
@@ -105,11 +106,11 @@ function analyze(
105106
#=
106107
NOTE: If the linear system or wake did not converge, there is likely a serious problem that would lead to an error in the solve, so we will exit here with a fail flag for an optimizer or user
107108
=#
108-
if iszero(lu_decomp_flag) || !options.wake_solver_options.converged[1]
109+
if iszero(lu_decomp_flag) || !options.grid_solver_options.converged[1]
109110
if !options.silence_warnings
110111
if iszero(lu_decomp_flag)
111112
@warn "Exiting. LU decomposition of the LHS matrix for the linear system failed. Please check your body geometry and ensure that there will be no panels lying directly atop eachother or other similar problematic geometry."
112-
elseif !options.wake_solver_options.converged[1]
113+
elseif !options.grid_solver_options.converged[1]
113114
@warn "Exiting. Wake elliptic grid solve did not converge. Consider a looser convergence tolerance if the geometry looks good."
114115
end
115116
end

0 commit comments

Comments
 (0)