Closed lamkina closed 1 year ago
Merging #318 (b84ab84) into main (409b986) will increase coverage by
0.07%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #318 +/- ##
==========================================
+ Coverage 41.87% 41.94% +0.07%
==========================================
Files 13 13
Lines 4017 4017
==========================================
+ Hits 1682 1685 +3
+ Misses 2335 2332 -3
see 1 file with indirect coverage changes
:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!
bump @anilyil @sseraj
Purpose
This PR adds a volume dependency to actuator regions. Previously, the actuator region volume was computed once during initialization and the source terms were computed using the baseline actuator region volume and baseline cell volumes. In subsequent optimization iterations with shape change, the baseline volumes were still used, resulting in an incorrect distribution of source terms in the actuator region.
With this PR, we re-compute the actuator region total volume in the
metric
subroutine after we update the geometry. Additionally, thesourceTerms_block
subroutine inresiduals.f90
was updated to depend on the current cell volumes and current actuator region total volume. I used AD to get the derivative of the actuator region total volume calculation and added the necessary mpi calls tomaster
,master_d
, andmaster_b
to accumulate the volume seeds.Finally, I added a new test that uses an FFD around the actuator zone pipe mesh to test the derivatives with the actuator zone volume changing. The FFD file is added to AFS and I retrained the actuator zone tests to account for the changes.
Expected time until merged
A few weeks, but hopefully sooner since this is incorrectly computing the actuator zone during optimization.
Type of change
Testing
I added a test to the actuator region regression tests that runs the dot product test with shape variables using a simple FFD.
Checklist
flake8
andblack
to make sure the Python code adheres to PEP-8 and is consistently formattedfprettify
or C/C++ code withclang-format
as applicable