Steady State PSR

205 views
Skip to first unread message

AS

unread,
Nov 3, 2016, 2:27:19 PM11/3/16
to Cantera Users' Group
Hello All (specifically developers),

I've seen a couple of posts about this-- specifically trying to match results between ChemKin and Cantera

https://groups.google.com/forum/#!topic/cantera-users/dMUhi5kVVDk

My question is this: Is there any plan to create a steady state reactor model in Cantera like there is in Chemkin? The differences between the two are shown in Slides 5 and 6 in the slide set:

http://seitzman.gatech.edu/classes/ae6766/WellStirredReactor.pdf

The short answer is that yes-- you can run the reactor for many seconds and it will reach a steady state solution. However solving the steady state equations yields algebraic equations instead of ODEs and may be faster.

Is there any plan to do this? Cantera uses the Sundials ODE solver, right? I believe that supports algebraic equations, also. Should be straight forward, but I hesitate to do this if there are plans to integrate this functionaltiy. Perhaps this already exists, and I just don't know about it.

Thanks all!!

Ray Speth

unread,
Nov 5, 2016, 3:59:48 PM11/5/16
to Cantera Users' Group
Adam,

No, this functionality does not already exist in Cantera. There has been some recent discussion about implementing it, though. I don't think it's as straightforward as you might guess. The Sundials algebraic solver (KINSOL) uses variants of Newton's method, which require the initial guess for the system state to be semi-reasonable. This is generally not the case for a reactor model, in which case a hybrid timestepping / steady-state solver is required, much like the one used in Cantera for solving steady 1D problems.

Regards,
Ray

Adam

unread,
Nov 8, 2016, 12:13:42 PM11/8/16
to Cantera Users' Group
Ray,

Got it, I appreciate the response. Things are never really as easy as they seem, are they?!

Most of the problems that I look at are steady state operation, so it would be useful for me. However, I can get the SS solution by just increasing the runtime. Sometimes I have very large number of reactors, and it takes quite a long time for a SS solution. I do wonder if the algebraic solver would take me there faster....

Nick Curtis

unread,
Nov 12, 2016, 5:48:17 PM11/12/16
to Cantera Users' Group
Adam,

Yes it is likely that a steady state solver would accelerate your solution.
In addition to what Ray said, a difficult part of solving a SS PSR (via Newton iteration) is that the Jacobian becomes singular at the turning point, specifically dT/dtau -> +/- infinity depending what side you're coming from.
There are methods of dealing with this, the simplest being to simply 'rotate' your system of equations such that your are instead looking at dtau/dT (i.e. zero), but of course this causes the opposite issue (dtau/dT -> infinity) to appear near equilibrium or the inlet (which may be where your initial guess is...).
Additionally there are arc-length methods which parameterize the system (T = T(s), Yi = Yi(s), tau=tau(s), s= arclength), and help to resolve this, but in my experience they are difficult to properly derive and implement.

Nick
Reply all
Reply to author
Forward
0 new messages