[petsc-users] Optimizing solver and consistent converging on non-linear solver
Sean Hsu
hsu at kairospower.com
Mon Jul 15 18:44:37 CDT 2019
Hi,
I have been using blackbear (a moose framework app) to do a simple tensile test simulation on a complex material model with high amount of elements. I was able to get consistent and quick solution results with low amount of elements, however once the amount of element start increasing, the solver won’t converge consistently and dt usually drops to a very low value, causing the simulation to run for a very long time. I am seeking recommendations for tips to optimize the solver so I can get consistent and faster convergence rate. Here is the petsc option that I am using (along with SMP preconditioner):
l_max_its = 15
l_tol = 1e-8
nl_max_its = 50
nl_rel_tol = 1e-7
nl_abs_tol = 1e-9
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu bt'
end_time = 50.0
dt = 0.5
Here is a example output from the first few timesteps of the simulation:
Time Step 2, time = 0.75, dt = 0.5
0 Nonlinear |R| = 1.078014e-02
0 SNES Function norm 1.078014340559e-02
0 Linear |R| = 1.078014e-02
0 KSP unpreconditioned resid norm 1.078014340559e-02 true resid norm 1.078014340559e-02 ||r(i)||/||b|| 1.000000000000e+00
1 Linear |R| = 2.319831e-13
1 KSP unpreconditioned resid norm 2.319831277078e-13 true resid norm 2.255163534674e-13 ||r(i)||/||b|| 2.091960607412e-11
Linear solve converged due to CONVERGED_RTOL iterations 1
NEML stress update failed!
Line search: objective function at lambdas = 1. is Inf or Nan, cutting lambda
NEML stress update failed!
Line search: objective function at lambdas = 0.5 is Inf or Nan, cutting lambda
NEML stress update failed!
Line search: objective function at lambdas = 0.25 is Inf or Nan, cutting lambda
NEML stress update failed!
Line search: objective function at lambdas = 0.125 is Inf or Nan, cutting lambda
NEML stress update failed!
Line search: objective function at lambdas = 0.0625 is Inf or Nan, cutting lambda
NEML stress update failed!
Line search: objective function at lambdas = 0.03125 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.015625 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.0078125 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.00390625 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.00195312 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.000976562 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.000488281 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.000244141 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 0.00012207 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 6.10352e-05 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 3.05176e-05 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.52588e-05 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 7.62939e-06 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 3.8147e-06 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.90735e-06 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 9.53674e-07 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 4.76837e-07 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 2.38419e-07 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.19209e-07 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 5.96046e-08 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 2.98023e-08 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.49012e-08 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 7.45058e-09 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 3.72529e-09 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.86265e-09 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 9.31323e-10 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 4.65661e-10 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 2.32831e-10 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.16415e-10 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 5.82077e-11 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 2.91038e-11 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.45519e-11 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 7.27596e-12 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 3.63798e-12 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 1.81899e-12 is Inf or Nan, cutting lambda
Line search: objective function at lambdas = 9.09495e-13 is Inf or Nan, cutting lambda
Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 0
Solve Did NOT Converge!
I really appreciate any inputs or insights, thanks for your time and help.
Best,
Sean
[signature_16346658]<https://kairospower.com/>
Sean Hsu Mechanics of Materials Intern
p 510.808.5265 e hsu at kairospower.com<mailto:user at kairospower.com>
707 W Tower Ave, Alameda, CA 94501
www.kairospower.com<http://www.kairospower.com> [Image result for linkedin logo] <https://www.linkedin.com/company/kairos-power-llc/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190715/a0d35c0a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 18556 bytes
Desc: image001.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190715/a0d35c0a/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 10320 bytes
Desc: image002.png
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190715/a0d35c0a/attachment-0003.png>
More information about the petsc-users
mailing list