Skip to content

Commit

Permalink
major cleanup and reorganization. Cleaned out deprecated functions, e…
Browse files Browse the repository at this point in the history
…xtraneous function inputs, fixed some style items, cleaned out old commented code that is not longer needed, moved some functions and files and names around, etc.
  • Loading branch information
juddmehr committed Apr 16, 2024
1 parent c32c821 commit 66005dc
Show file tree
Hide file tree
Showing 28 changed files with 2,681 additions and 3,342 deletions.
22 changes: 14 additions & 8 deletions src/DuctAPE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ export c4b

##### ----- UTILITIES ----- #####
# general utility functions
include("utilities/utils.jl")
include("utilities/types.jl")
include("utilities/misc.jl")
include("utilities/options.jl")
include("utilities/package_states.jl")
include("utilities/caches.jl")
include("utilities/caching/caches.jl")
include("utilities/caching/allocate_caches.jl")
include("utilities/caching/reshape_caches.jl")
include("utilities/caching/integration_caches.jl")
include("utilities/bookkeeping.jl")

# Airfoil utility functions
Expand All @@ -99,12 +102,13 @@ include("preprocess/geometry/elliptic_grid_residuals.jl")
include("preprocess/velocities/unit_induced_velocities.jl")
include("preprocess/velocities/induced_velocity_matrices.jl")
include("preprocess/velocities/body_aic.jl")

# Quadrature
include("preprocess/velocities/integrands.jl")
include("preprocess/velocities/out_of_place_integrals.jl")
include("preprocess/velocities/gausslegendre_integrals.jl")
include("preprocess/velocities/romberg_integrals.jl")
include("preprocess/velocities/gausskronrod_integrals.jl")
include("preprocess/velocities/quadrature/integrands.jl")
include("preprocess/velocities/quadrature/out_of_place_integrals.jl")
include("preprocess/velocities/quadrature/gausslegendre_integrals.jl")
include("preprocess/velocities/quadrature/romberg_integrals.jl")
include("preprocess/velocities/quadrature/gausskronrod_integrals.jl")

##### ----- PROCESS ----- #####
# Solve and Residual Functions
Expand All @@ -125,4 +129,6 @@ include("postprocess/pressures.jl")
include("postprocess/rotor_performance.jl")
include("postprocess/utils.jl")

##### ----- DEBUGGING ----- #####
include("../test/test_utils.jl")
end
2 changes: 0 additions & 2 deletions src/postprocess/pressures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ function get_body_cps!(
centerbody_zpts,
cp_in,
controlpoints,
endpanelidxs,
)
split_bodies!(
cp_casing_out,
Expand All @@ -229,7 +228,6 @@ function get_body_cps!(
centerbody_zpts,
cp_out,
controlpoints,
endpanelidxs,
)

return cp_tuple
Expand Down
2 changes: 0 additions & 2 deletions src/postprocess/velocities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ function get_body_tangential_velocities!(
centerbody_zpts,
Vtan_out,
controlpoints,
endpanelidxs,
)
split_bodies!(
vtan_casing_in,
Expand All @@ -227,7 +226,6 @@ function get_body_tangential_velocities!(
centerbody_zpts,
Vtan_in,
controlpoints,
endpanelidxs,
)

return vtan_tuple
Expand Down
34 changes: 0 additions & 34 deletions src/preprocess/geometry/body_geometry.jl
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
#"""
#"""
#function reinterpolate_bodies(
# duct_coordinates,
# centerbody_coordinates,
# zwake,
# ncenterbody_inlet,
# nduct_inlet;
# finterp=FLOWMath.akima,
#)

##TODO: initialize repaneled coordinates

#return reinterpolate_bodies!(
# duct_coordinates,
# centerbody_coordinates,
# zwake,
# ncenterbody_inlet,
# nduct_inlet;
# finterp=FLOWMath.akima,
#)

#end

"""
"""
function reinterpolate_bodies!(
Expand Down Expand Up @@ -62,23 +38,13 @@ function reinterpolate_bodies!(
new_zcenterbody_grid = @view(zwake[1:centerbody_trailing_index])
new_rcenterbody_grid = finterp(zcenterbody, rcenterbody, new_zcenterbody_grid)

# - update centerbody geometry between leading edge and rotor - #
# interpolate centerbody geometry between leading edge and rotor
# new_zcenterbody = range(zcenterbody[1, 1], new_zcenterbody_grid[1], ncenterbody_inlet + 1)

scale = new_zcenterbody_grid[1] - zcenterbody[1]
transform = zcenterbody[1]
new_zcenterbody = scaled_cosine_spacing(
ncenterbody_inlet + 1, 2 * scale, transform; mypi=pi / 2
)
new_rcenterbody = finterp(zcenterbody, rcenterbody, new_zcenterbody)

# - update inner duct geometry between leading edge and rotor - #
# interpolate inner duct geometry between leading edge and rotor
# new_zduct_inner = range(
# duct_coordinates[dleidx, 1], new_zduct_grid[1], nduct_inlet + 1
# )

scale = new_zduct_grid[1] - duct_coordinates[dleidx, 1]
transform = duct_coordinates[dleidx, 1]
new_zduct_inner = scaled_cosine_spacing(
Expand Down
Loading

2 comments on commit 66005dc

@juddmehr
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something about this didn't break the official tests, but unofficial tests are super broken with this commit.

@juddmehr
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, the "unofficial test" was using new, untested features that aren't actually working yet.

Please sign in to comment.