Skip to content

Commit

Permalink
clean up bugs with updates to duct viscous drag outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
juddmehr committed Feb 21, 2025
1 parent f3ddd0c commit 8e4ebe7
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/DuctAPE/api/private_postprocess.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,6 @@ DuctAPE.solve_head_boundary_layer!
DuctAPE.squire_young
DuctAPE.total_viscous_drag_duct
DuctAPE.compute_viscous_drag_duct
DuctAPE.compute_single_side_drag_coefficient_head
DuctAPE.compute_single_side_drag_coefficient
DuctAPE.compute_viscous_drag_duct_schlichting
```
2 changes: 1 addition & 1 deletion src/postprocess/postprocess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ function post_process(
end

# Total body thrust
body_thrust = sum(body_inviscid_thrust) - sum(duct_viscous_drag)
body_thrust = sum(body_inviscid_thrust) - sum(body_viscous_drag)

### --- TOTAL OUTPUTS --- ###

Expand Down
2 changes: 2 additions & 0 deletions src/utilities/caching/allocate_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ function allocate_prepost_container_cache(
zpts,
vtan_tuple,
cp_tuple,
body_inviscid_thrust,
body_viscous_drag,
body_thrust,
body_force_coefficient,
# - TOTALS - #
Expand Down
12 changes: 10 additions & 2 deletions src/utilities/caching/reshape_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,18 @@ function withdraw_prepost_body_container_cache(vec, dims)
dims.cp_tuple.cp_centerbody_out.shape,
),
)

body_inviscid_thrust = reshape(@view(vec[dims.body_inviscid_thrust.index]), dims.body_inviscid_thrust.shape)

body_viscous_drag = reshape(@view(vec[dims.body_viscous_drag.index]), dims.body_viscous_drag.shape)

body_thrust = reshape(@view(vec[dims.body_thrust.index]), dims.body_thrust.shape)

body_force_coefficient = reshape(
@view(vec[dims.body_force_coefficient.index]), dims.body_force_coefficient.shape
)

return zpts, vtan_tuple, cp_tuple, body_thrust, body_force_coefficient
return zpts, vtan_tuple, cp_tuple, body_inviscid_thrust, body_viscous_drag,body_thrust, body_force_coefficient
end

"""
Expand Down Expand Up @@ -526,7 +532,7 @@ function withdraw_prepost_container_cache(vec, dims)
)

# - BODY POST CACHE - #
zpts, vtan_tuple, cp_tuple, body_thrust, body_force_coefficient = withdraw_prepost_body_container_cache(
zpts, vtan_tuple, cp_tuple, body_inviscid_thrust, body_viscous_drag, body_thrust, body_force_coefficient = withdraw_prepost_body_container_cache(
vec, dims
)

Expand Down Expand Up @@ -584,6 +590,8 @@ function withdraw_prepost_container_cache(vec, dims)
zpts,
vtan_tuple,
cp_tuple,
body_inviscid_thrust,
body_viscous_drag,
body_thrust,
body_force_coefficient,
# Totals Post
Expand Down

0 comments on commit 8e4ebe7

Please sign in to comment.