The threshold violation warnings are meant to point out potential problems with the solution. They may not actually indicate a serious problem with the solution. Alamode checks for violations by default because it is likely that all of the unknowns represent concentrations, and it is not physical to have negative concentrations. Thresholds are adjusted after a nonlinear update because negatives can cause nonlinear convergence problems.
Threshold violation warnings that are printed can usually be ignored if they do not occur on the last nonlinear update. These are just overshoot in the nonlinear update, and they do not indicate a problem with the converged solution.
Threshold violation warnings/adjustments that occur on the last nonlinear update may be an indication of a problem with the converged solution. Also, if the violations are large and they were adjusted, conservation of dose is no longer guaranteed. For this reason, -failIfHadThresholdViolation is on by default.
Suggestions:
Threshold violations that occur with bottoming out of residual and/or update norms in the Newton solve may be due to taking too large of a timestep in either the TR or BDF2 step. Neither substep is monotonic, and a consistent application of the algorithm to an ODE system may lead to oscillating signs. The cause of these oscillations can be seen by applying TR/BDF2 to the test ODE
where . Let
. The TR step is
where and
.
Thus, the TR sign change comes
from taking a large timestep compared to the eigenvalues of the
system before the modes associated with the large eigenvalues have
decayed enough. The BDF2 step is
where . If the concentration has
been reduced by significant fraction over the TR step
, the sign on C will change.
These sign changes are a result of the consistent application of the timestepping algorithm. Adjust negative values in the nonlinear solve will not lead to convergence, because the converged values for the consistent timestep equations should be negative. Although this situation will fix itself through nonlinear failures and repeating integration over the time step interval with a smaller time step, the failures are not a productive use of computing resources.
Suggestions for dealing with threshold violations arising from the sign change conditions in TR/BDF2 include:
could be rewritten in terms of an offset field (O = C + o, where
o is the offset which would typically be to
) as
The offset value should not be too large as that will lead to problems related to floating point truncation error in the nonlinear update and temporal LTE norm calculations based on the zero-offset field.