su2code / SU2

SU2: An Open-Source Suite for Multiphysics Simulation and Design
https://su2code.github.io
Other
1.34k stars 844 forks source link

Cauchy criteria for Discrete Adjoint #627

Closed jayantmukho closed 5 years ago

jayantmukho commented 5 years ago

I was trying to run a discrete adjoint with the Cauchy Convergence criteria. But it wasn't terminating when it should have.

After doing some digging through the code, I came across a comment in CDiscAdjFluidIteration::Iterate where it says that only residual convergence criterion is possible.

It would be super helpful to add this as a comment in the config_template itself so that people aren't trying to use the Cauchy convergence with the discrete adjoint. But on another note, is there a reason that the Cauchy convergence is not implemented for the Discrete adjoint? The code required for it is present in CIntergration::Convergence_Monitoring, but just the right input (su2double monitor) needs to be set when calling the Convergence_Monitoring function.

I can implement this, but wanted to check to see if there was a reason why Sens_Mach or Sens_AoA weren't already being used as Cauchy criterion.

Cheers Jayant

pcarruscag commented 5 years ago

If I'm not mistaken the residual of discrete adjoints is based on normalized variation of the adjoint variables (since there is no conservation principle) and this is already akin to the Cauchy criterion. Cheers, Pedro

jayantmukho commented 5 years ago

Aaaaahh, good point.

So this means that if the Cauchy criterion is used with the discrete adjoint, it is going to check if that normalized variation is changing. Which would seem to be a plausible stopping criterion as well.