[petsc-users] Newton methods that converge all the time
Matthew Knepley
knepley at gmail.com
Thu Nov 30 06:10:35 CST 2017
On Thu, Nov 30, 2017 at 6:05 AM, Buesing, Henrik <
hbuesing at eonerc.rwth-aachen.de> wrote:
> Dear Barry,
>
> I am using a pressure-enthalpy formulation, which is valid across all
> phase states, i.e. no variable switching. Nevertheless, I have
>
> 1) a truncate function defined with SNESLineSearchSetPreCheck, which keeps
> pressure and enthalpy values in physical bounds.
>
You should be able to replace this using
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESVISetVariableBounds.html
and use the SNESVI solver.
> 2) I have if statements in my FormFunction and FormJacobian. These test
> the current enthalpy vs. saturated water and gas enthalpies and determine
> the state.
>
It sounds like the residual function you are using could be non-smooth
here. This could give you problems if the
solution is near the switch, however sometimes it will still converge but
linearly instead of quadratically.
Thanks,
Matt
> I could discard the SNESLineSearchSetPreCheck. Would this be better for
> Newton's method?
>
> Thank you!
>
> Henrik
>
>
> --
> Dipl.-Math. Henrik Büsing
> Institute for Applied Geophysics and Geothermal Energy
> E.ON Energy Research Center
> RWTH Aachen University
> ------------------------------------------------------
> Mathieustr. 10 | Tel +49 (0)241 80 49907
> 52074 Aachen, Germany | Fax +49 (0)241 80 49889
> ------------------------------------------------------
> http://www.eonerc.rwth-aachen.de/GGE
> hbuesing at eonerc.rwth-aachen.de
> ------------------------------------------------------
>
> > -----Ursprüngliche Nachricht-----
> > Von: Smith, Barry F. [mailto:bsmith at mcs.anl.gov]
> > Gesendet: 10 November 2017 05:09
> > An: Buesing, Henrik <hbuesing at eonerc.rwth-aachen.de>
> > Cc: petsc-users <petsc-users at mcs.anl.gov>
> > Betreff: Re: [petsc-users] Newton methods that converge all the time
> >
> >
> > Henrik,
> >
> > Please describe in some detail how you are handling phase change. If
> > you have if () tests of any sort in your FormFunction() or
> > FormJacobian() this can kill Newton's method. If you are using "variable
> > switching" this WILL kill Newtons' method. Are you monkeying with phase
> > definitions in TSPostStep or with SNESLineSearchSetPostCheck(). This
> > will also kill Newton's method.
> >
> > Barry
> >
> >
> > > On Nov 7, 2017, at 3:19 AM, Buesing, Henrik <HBuesing at eonerc.rwth-
> > aachen.de> wrote:
> > >
> > > Dear all,
> > >
> > > I am solving a system of nonlinear, transient PDEs. I am using
> > Newton’s method in every time step to solve the nonlinear algebraic
> > equations. Of course, Newton’s method only converges if the initial
> > guess is sufficiently close to the solution.
> > >
> > > This is often not the case and Newton’s method diverges. Then, I
> > reduce the time step and try again. This can become prohibitively
> > costly, if the time steps get very small. I am thus looking for variants
> > of Newton’s method, which have a bigger convergence radius or ideally
> > converge all the time.
> > >
> > > I tried out the pseudo-timestepping described in
> > http://www.mcs.anl.gov/petsc/petsc-
> > current/src/ts/examples/tutorials/ex1f.F.html.
> > >
> > > However, this does converge even worse. I am seeing breakdown when I
> > have phase changes (e.g. liquid to two-phase).
> > >
> > > I was under the impression that pseudo-timestepping should converge
> > better. Thus, my question:
> > >
> > > Am I doing something wrong or is it possible that Newton’s method
> > converges and pseudo-timestepping does not?
> > >
> > > Thank you for any insight on this.
> > >
> > > Henrik
> > >
> > >
> > >
> > >
> > > --
> > > Dipl.-Math. Henrik Büsing
> > > Institute for Applied Geophysics and Geothermal Energy E.ON Energy
> > > Research Center RWTH Aachen University
> > > ------------------------------------------------------
> > > Mathieustr. 10 | Tel +49 (0)241 80 49907
> > > 52074 Aachen, Germany | Fax +49 (0)241 80 49889
> > > ------------------------------------------------------
> > > http://www.eonerc.rwth-aachen.de/GGE
> > > hbuesing at eonerc.rwth-aachen.de
> > > ------------------------------------------------------
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171130/907ccf14/attachment.html>
More information about the petsc-users
mailing list