Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tuned timestep cases #68

Merged
merged 1 commit into from
Aug 27, 2024
Merged

Conversation

jakobtorben
Copy link
Contributor

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.

spe11c_Newton_vs_NLDD

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.
spe11c_sparse_data

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:

  • NewtonMaxIterations="6" # default: "20"
  • TimeStepControlTargetNewtonIterations="3" # default: "8"
  • TimeStepControlGrowthRate="1.15" # default: "1.25"
  • TimeStepControlDecayRate="0.85" # default: "0.75"
  • Setting max timestep to 91 days during injection + 50 years. And 183/365 days for the rest
  • Only cutting timesteps by 0.33 if failed (TUNING default is 0.1)

@daavid00
Copy link
Collaborator

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 #70).

@jakobtorben
Copy link
Contributor Author

Thanks for adding that functionality. I rebased and updated the files accordingly now.

@daavid00 daavid00 merged commit e4f1c99 into OPM:main Aug 27, 2024
1 check passed
@daavid00
Copy link
Collaborator

It looks good, merging now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants