[petsc-users] Stiff ODEs

Jed Brown jedbrown at mcs.anl.gov
Tue Dec 3 11:13:46 CST 2013


Katy Ghantous <katyghantous at gmail.com> writes:

> Hi,
> I have just started with Petsc and have very elementary equations.
> I am trying to solve a set of stiff ODEs explicitly. 

If your ODEs are stiff, why are you trying to use an explicit method?
(A common definition of "stiff" is that explicit methods do not work
well.)

> They are very stiff and was hoping to use TSRK with variable time
> steps, but it is throwing a segmentation fault 

Always show the full error message.  Please also use 'master' from
petsc-dev, because TSRK was overhauled recently to be consistent with
the other integrators (and adding a bunch of new functionality).

  https://bitbucket.org/petsc/petsc/wiki/

> otherwise non existent with Euler or TSSSP.  1. should i look into the
> TSRK error or is it something with the new version of Petsc?  2. i
> read somewhere (but cant find the source again) that TSSSP is not
> recommended for stiff equations (even with the rk solvers set as the
> type).  

Yes, TSSSP is for non-stiff problems that require "strong stability"
(like controlling total variation or positivity in transport-dominated
applications).

> Is that correct? if so, what would be most optimized to solve stiff
> odes explicitly.  

Stiff ODEs should be solved *implicitly*.

> 3. If it is not correct and TSSSP is useful for stiff equations, how
> can i run it with variable time steps, since with TSStep it is taking
> equal time steps which is the time step that i am specifying as an
> initial time step TSSetInitialTimeStep.

TSSSP does not have an adaptive controller.  A user can set a post-check
function that adapts the time step based on a custom stability function
(e.g., CFL criteria).

TSROSW and TSARKIMEX are IMEX methods that can handle stiff problems.
They have adaptive error estimators and the like.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131203/e91b1f3d/attachment-0001.pgp>


More information about the petsc-users mailing list