[WIP] GradVal FIX for Massflow SWP #2272
Open
+2
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
As mentioned in the last few dev meetings, there was some error with GradVal for the streamwise solver with Massflow. This was because the tape was not cleared during SetRecoding. In the current version, the register of extra solutions is moved to Register Variables and gradients look consistent.
Related Work
SWP-Isothermal with mass flow also shows good gradient validation after implementing this fix. In theory, this should not break any other part of the code.
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.
pre-commit run --all
to format old commits.CAD Sensitivites after making changes, gradients are symmetric for the upper and lower variables.
CAD Sensitivities before making changes, gradients are not-symmetric for the upper and lower variables.
Test Case!
FFD Sensitives also co-relate well