On Thu, Nov 30, 2017 at 6:05 AM, Buesing, Henrik < [email protected]> 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 > [email protected] > ------------------------------------------------------ > > > -----Ursprüngliche Nachricht----- > > Von: Smith, Barry F. [mailto:[email protected]] > > Gesendet: 10 November 2017 05:09 > > An: Buesing, Henrik <[email protected]> > > Cc: petsc-users <[email protected]> > > 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 <[email protected] > > 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 > > > [email protected] > > > ------------------------------------------------------ > > -- 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/>
