Restart of Nonlinear Analysis

Hello everyone,

I’m dealing with large DOF model (~1 M DOF) by using NonlinearVariationalFormulation and it really take too much time to get some result. Due to the nonlinearity of the formulation and the structure of the geometry, for some of the specific steps I need to decrease the step size manually. Otherwise the solution diverges. I’m doing in with a trial-error method and every time I start the analysis from the beginning.

My question, is there any setting that provide me to use last converged step results and continue with smaller steps over that step to seek convergence ?

Example:

Let’s imagine that my end time is 1s and my initial step size is 0.01. After 40 step (at t=0.4s) analysis diverges but if I use 0.005s as a time step then it converges. I want to apply a method that firstly try the step time as 0.01s, if it diverges then apply 0.01s/2 as a time step and divide the time step by 2 until it converges.

Is there any suggestion ?

Regards,

There are several things you can try. The simplest thing is to write your solution to file at each time step, using XDMFFile.write_checkpoint. The. You can read in the last solution before divergence and restart your problem from this time step.

Another more elaborate solution would be to try to catch the error, using exception handling:
https://docs.python.org/3/tutorial/errors.html#handling-exceptions
You could also try setting error_on_nonconvergence to false, see: Bitbucket