[petsc-users] Problem with TS and SNES VI

Smith, Barry F. bsmith at mcs.anl.gov
Tue Aug 6 08:51:16 CDT 2019


  Could you explain in a bit more detail what you mean by "some states go to unphysical values" ? 

  Is this within a stage or at the actual time-step after the stage? 

   Does you model explicitly have these bounds on the solution; i.e. it is imposed as a variational inequality or does the model not explicitly have the constraints because its "analytic" solution just naturally stays in the physical region anyways? But numerical it can go out?

  Or, is your model suppose to "change" at a certain time, which you don't know in advance when the solution goes out of some predefined bounds" (this is where the event is designed for).

   This information can help us determine what approach you should take. 

   Thanks

   Barry


> On Aug 6, 2019, at 2:12 AM, Huck, Moritz via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Hi,
> I think I am missing something here.
> How would events help to constrain the states.
> Do you mean to use the event to "pause" to integration an adjust the state manually?
> Or are the events to enforce smaller timesteps when the state come close to the constraints?
> 
> Thank you,
> Moritz
> ________________________________________
> Von: Abhyankar, Shrirang G <shrirang.abhyankar at pnnl.gov>
> Gesendet: Montag, 5. August 2019 17:21:41
> An: Huck, Moritz; petsc-users at mcs.anl.gov
> Betreff: Re: [petsc-users] Problem with TS and SNES VI
> 
> For problems with constraints on the states, I would recommend trying the event functionality, TSEvent, that allows detection and location of discrete events, such as one that you have in your problem.
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetEventHandler.html.
> 
> An example using TSEvent functionality:  https://www.mcs.anl.gov/petsc/petsc-current/src/ts/examples/tutorials/ex40.c.html
> 
> A brief intro to TSEvent can be found here<https://www.mcs.anl.gov/petsc/petsc-20/conference/Abhyankar_S.pdf>.
> 
> Thanks,
> Shri
> 
> 
> From: petsc-users <petsc-users-bounces at mcs.anl.gov> on behalf of "Huck, Moritz via petsc-users" <petsc-users at mcs.anl.gov>
> Reply-To: "Huck, Moritz" <Moritz.Huck at rwth-aachen.de>
> Date: Monday, August 5, 2019 at 5:18 AM
> To: "petsc-users at mcs.anl.gov" <petsc-users at mcs.anl.gov>
> Subject: [petsc-users] Problem with TS and SNES VI
> 
> Hi,
> I am trying to solve a DAE with the ARKIMEX solver, which works mostly fine.
> The problem arises when some states go to unphysical values. I try to constrain my states with SNESVISetVariableBounds (through the petsc4py interface).
> But TS seems not respect this e.g. I have a state with is usually between 1 and 1e3 for which I set a lower bound of 1, but the state goes t0 -0.8 at some points.
> Are there some tolerances I have to set for VI or something like this?
> 
> Best Regards,
> Moritz
> 



More information about the petsc-users mailing list