I am solving a system of nonlinear time-dependent equations using the Newton method in a finite-element-setting, i.e. first I create the jacobian matrix for the current time, and afterwards I try to solve the system (using a GMRES-solver, preconditioned using the AMG-method) to get the solution update. This is repeated until the residual does not get smaller anymore, then the time is increased by one time step. For each time step the necessary GMRES iterations are recorded.
Now I noticed that initially the GMRES iterations stay constant at 50 iterations for each time step, but after a certain time (depending on the input parameters) they increase suddenly to 75-100 iterations, and in the next time step the solver fails to converge at all (even after >10000 iterations).
Several suggestions are given here: Why is my iterative linear solver not converging?, but implementing those suggestions will take some time, thus, if there are already some hints based on the behaviour I could use giving me an initial idea, that would reduce the time necessary for finding the bug.
Furthermore, using a direct solver is not possible, after I currently am using > 40kk elements (which is way to big for the memory available). In order to calculate the equations correctly without introducing oscillations, I can not reduce the amount of elements.
Concerning the comments:
- I am discretizing my time step using the Crank-Nicholson-method, to avoid instabilities
- My system consists out of three coupled non-linear heat-equation-like equations, which are strongly coupled during solving
- I am using a fixed time step and a fixed mesh density
- My system has ~40e6 degrees of freedom. Usually (for smaller systems) I allow the solver to use as many iterations as I have degrees of freedom, but here I wanted to investigate the behavior of the system, thus I reduced the amount of allowed iterations. In addition, ~50 iterations take ~50 seconds, thus allowing 40e6 iterations will stop solving the program entirely.
- Currently I am using 28 krylov vectors (default setting of the solver), but can change that. If there are suggestions for the size I should use instead, I can implement that, though
- Preconditioning is from the left