Closed jakobtorben closed 3 months ago
Thanks for the updated configuration files with improve tuning. Please rebase with main and remove the changes in the spe11b.mako and spe11c.mako, and add the flags --time-step-after-event-in-days=1
and --solver-restart-factor=0.33
for the cases where this specific tuning is required (see https://github.com/OPM/pyopmspe11/pull/70).
Thanks for adding that functionality. I rebased and updated the files accordingly now.
It looks good, merging now, thanks.
I have tested changing some different parameters to improve the runtime performance of the simulations. My experiments has mainly been done on SPE11C with CP grid, but the result should generalise to Cartesian and the B case as well.
In earlier tests, the NLDD nonlinear solver was found to significantly reduce the runtime on several of the case, compared to Newton with default parameters. On the cases, where this was not the case, such as SPE11C with CP grid, the comparison was made between NLDD with strict cnv tolerances and Newton with looser cnv tolerances. I have verified that with the same tolerances, the tuned NLDD case is faster than Newton with default parameters.
In my tests, I have found the runtime performance to be very sensitive to setting good timestepping parameters. This is true, both for the Newton and NLDD nonlinear solver. If I apply the same timestep tuning I have been using with NLDD to Newton, the simulation runtime was actually fastest for Newton. As, seen in the plot below, where the black line represents a Newton case with parameters similar to which is used for the different examples found in this repo. NLDD uses fewer timesteps and nonlinear iterations but the extra assembly time for the local domains makes it slower than Newton.
For the tests I have ran, the behaviour have been very similar, except from a small deviation in box B, which I believe is mostly just from different timesteps. The small difference between the strict and non-strict NLDD case, resulted in that I removed the stricter cnv tolerances as I didn't find them necessary.
In this PR, I have uploaded the tuned cases for both Newton and NLDD that can be used for getting a more stable timestepping and reduced runtime. The most important changes have been the following: