Skip to content

Commit

Permalink
fix for getting out of averaging when reached forced convergence
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-airshaper committed Jan 2, 2023
1 parent 9fa5b44 commit 63bddb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion convergenceDetection.C
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ bool Foam::functionObjects::convergenceDetection::execute()
!simulationFinished_ &&
convergenceFound_)
{
if (convergenceMaxGradient() >= thresholdConvergence_ && !forcedConvergence_)
if ((convergenceMaxGradient() >= thresholdConvergence_ && !forcedConvergence_) &&
(currentIteration_ < iterationMaxConvergence_))
{
stopAveraging();
}
Expand Down

0 comments on commit 63bddb9

Please sign in to comment.