Aero-Structural Discrete Adjoint Sensitivities and Python Wrapper Developments #1750
Aero-Structural Discrete Adjoint Sensitivities and Python Wrapper Developments #1750
Conversation
pcarruscag
left a comment
There was a problem hiding this comment.
Thank you, looks good to me, mostly just comments about naming conventions.
|
@pcarruscag @bigfooted Finally seeing the light at the end of the tunnel on this PR... I added a regression test (which is passing) with an example that compares sens outputs from fixed-point and residuals adjoint solvers. Anything else you want me to address on this? |
| for (unsigned long iPoint = 0; iPoint < nPoint; iPoint++) { | ||
| for (unsigned long jPoint = 0; jPoint < nPoint; jPoint++) { | ||
| auto value = solver[FLOW_SOL]->Jacobian.GetBlock(iPoint, jPoint); | ||
|
|
||
| CopiedJacobian.SetBlock(iPoint, jPoint, value); | ||
| } | ||
| } |
There was a problem hiding this comment.
So this doesn't work if there is turbulence?
There was a problem hiding this comment.
Yes, I did not test with turbulence
pcarruscag
left a comment
There was a problem hiding this comment.
Do you have a test that exercises all the different cross terms?
You mean the aero-structural cross terms? If so, I don't have a SU2 specific test for those, since they were all handled by OpenMDAO |
Motivation
Fundamental bottlenecks exist for industrial adoption of high-fidelity physics codes with fully coupled discrete adjoint sensitivity analysis. These bottlenecks include a lack of flexibility, modularity, and robustness of the computational tools, as well as the potential startup development costs needed to implement and verify the MDAO features. The purpose of this work is to facilitate the coupling of SU2 with external structural codes (e.g. NASTRAN, TACS, Airbus structural suite Lagrange) for gradient-based aerodynamic shape and structural sizing optimization using dedicated frameworks (e.g. OpenMDAO).
Startup development costs include the creation of modular tools that are designed to be driven by another framework like OpenMDAO, rather than to drive execution themselves. However, leveraging those MDAO frameworks assumes that software codes and modules to be coupled exist, have appropriate data structures, execution and query APIs, and are wrapped in Python for flexibility and ease of use. The proposed changes were motivated with the goal of making SU2 more modular and flexible, particularly to facilitate its integration into large-scale MDAO frameworks. For more details on the motivation, methodology, and verification & validation results, please refer to our paper from AIAA Aviation 2022.
Proposed Changes
@aa-g and I propose the following code updates:
Implementation of residual-based discrete adjoint solver as
CDiscAdjResidualSolvera. New config option:
KIND_DISC_ADJEnhancements and standardization of SU2 Python API
a. Add pysu2/pysu2ad methods
b. Standardize Python API and function names
c. Overloaded getter/setter methods to make data handling more flexible
Related Work
These efforts are related to Issue #1262, Pull Request #1300, and Discussion #1325.
PR Checklist