Fix preaccumulation error, improve recording of RANS solvers by oleburghardt · Pull Request #2472 · su2code/SU2

Proposed Changes

This contributes two algorithmic-differentiation-based fixes;

  • Add a missing preaccumulation input to the recording of SetRoe_Dissipation_FD. This may change derivatives as the current recording of this function is likely to be wrong if PREACC = YES.
  • Include muT (eddy viscosity) as input/output to the recording of RANS solvers. Since both muT and conservative variables go "on the same level" into the flow solver's Preprocessing (i.e. we cannot think of muT as a derived value from the conservative ones), this should be reflected in the recording. (Also, the debug mode developed in Tape recording debug mode #2442 will complain otherwise ;-)).
    This change does not affect derivative values – especially it does nothing about the circumstance that Preprocessing is based on an initial value of muT, whereas the flow solvers depend on an updated one – but it may clarify things and remove a source of future problems.

Related Work

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.