SA rough
Purpose
This extends the SA model for rough walls as described here.
How to use
To activate the rough variant, those ADflow options must be present:
"useRoughSA": True,
"useBlockette": False,
The surface roughness may be prescribed using cgns_utils overwriteBC with the following example bcfile:
4 kLow bcwall le BCDataSet_1 BCWall Dirichlet SandGrainRoughness 1e-3
Alternatively, the ADflow-method setSurfaceRoughness(self, ks, groupName=None) may be used.
Known bugs
The proposed changes work, but two bugs are still present:
-
The effect of the specified surface-roughness is to little compared to SU2:


-
The effect of the specified surface-roughness is to little compared to experiments:


-
The predicted shape of the effect seems correct.
-
The AD-gradients only agree to a relative tolerance of ~1e-8 compared to complex step.
All of this information may be found to more detail in the report i had to write.
Expected time until merged
This depends on the mdo-team. Although there are two bugs, I would argue this feature is already usable. I spent a lot of time trying to find the errors, but i was unsuccessful. My intention is to do something else and later come back and fix it.
Type of change
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (non-backwards-compatible fix or feature)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no API changes)
- [ ] Documentation update
- [ ] Maintenance update
- [ ] Other (please describe)
Testing
I used the tutorial wing and roughened its surface. Based on this, I introduced three tests:
- Add a new instance to
test_adjoint.pywith the rough wing. - Add a new instance to
test_functionals.pywith the rough wing. - Add a new instace to
test_functionals.pywhere the rough SA variant is activated. But the restart and reference files are from the testrans_tut_wing. This makes sure SA rough with a roughness value of 0 is consistent to the regular SA model.
Checklist
- [x] I have run
flake8andblackto make sure the Python code adheres to PEP-8 and is consistently formatted - [x] I have formatted the Fortran code with
fprettifyor C/C++ code withclang-formatas applicable - [x] I have run unit and regression tests which pass locally with my changes
- [x] I have added new tests that prove my fix is effective or that my feature works
- [x] I have added necessary documentation
Codecov Report
Attention: Patch coverage is 31.25000% with 11 lines in your changes are missing coverage. Please review.
Project coverage is 41.28%. Comparing base (
de01140) to head (a784190).
:exclamation: Current head a784190 differs from pull request most recent head 156b582. Consider uploading reports for the commit 156b582 to get more accurate results
| Files | Patch % | Lines |
|---|---|---|
| adflow/pyADflow.py | 31.25% | 11 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #259 +/- ##
==========================================
- Coverage 41.49% 41.28% -0.21%
==========================================
Files 13 13
Lines 4066 4021 -45
==========================================
- Hits 1687 1660 -27
+ Misses 2379 2361 -18
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.