From ae6b5f85df7ee0b68dabbba51710ae634fa5ab0b Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Sat, 29 Nov 2014 18:38:55 -0500 Subject: [PATCH] Allow up to 30 tries at the saturation solver Signed-off-by: Ian Bell --- src/Backends/Helmholtz/VLERoutines.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Backends/Helmholtz/VLERoutines.cpp b/src/Backends/Helmholtz/VLERoutines.cpp index dba8c65f..8ed83c47 100644 --- a/src/Backends/Helmholtz/VLERoutines.cpp +++ b/src/Backends/Helmholtz/VLERoutines.cpp @@ -1079,8 +1079,8 @@ void SaturationSolvers::saturation_T_pure_Maxwell(HelmholtzEOSMixtureBackend &HE } iter++; - if (iter > 20){ - throw SolutionError(format("Maxwell solver did not converge after 20 iterations; rhoL: %0.16Lg rhoV: %0.16Lg error: %Lg dvL/vL: %Lg dvV/vV: %Lg pL: %Lg pV: %Lg\n", rhoL, rhoV, error, DeltavL/vL, DeltavV/vV, pL, pV)); + if (iter > 30){ + throw SolutionError(format("Maxwell solver did not converge after 30 iterations; rhoL: %0.16Lg rhoV: %0.16Lg error: %Lg dvL/vL: %Lg dvV/vV: %Lg pL: %Lg pV: %Lg\n", rhoL, rhoV, error, DeltavL/vL, DeltavV/vV, pL, pV)); } } while ((SatL->p() < 0) || (error > 1e-5 && small_step_count < 4));