ODE-solver in Reactor class

494 views
Skip to first unread message

Рузана Тухватуллина

unread,
Dec 14, 2016, 6:41:36 AM12/14/16
to Cantera Users' Group
Hello! 

I use C++ Cantera interface for solving chemical reactions. It works fine for my problems.

However, I have some theoretical questions. What kind of ODE-solver is used by default in Reactor class?

Is it the same solver for all systems? Or it depends on the stiffness of the ODE? 


Thanks

Kyle Niemeyer

unread,
Dec 14, 2016, 12:07:28 PM12/14/16
to Cantera Users' Group
Hello,

Cantera uses SUNDIALS (http://computation.llnl.gov/projects/sundials) for ODE integration, and specifically CVODE/CVODES from that suite. Since chemical kinetics problems are usually stiff, Cantera uses the varying-order Backward Differentiation Formulas (BDFs) method offered by CVODE. You can see more about CVODE here, or see more about the mathematical detail in this paper.

Kyle

arief...@gmail.com

unread,
Dec 14, 2016, 1:11:16 PM12/14/16
to canter...@googlegroups.com
Hello Kylie and Рузана,

The SUNDIALS package is not the way forward.

Because it cannot overcome the Second Dahlquist Barrier for compressible reacting flows. And the First Dahlquist Barrier, which is prerequisite to the Second Dahlquist Barrier, cannot be overcome by multi-step methods greater than 2.

Kyle Niemeyer

unread,
Dec 14, 2016, 1:26:03 PM12/14/16
to Cantera Users' Group
Arief,

First of all, the question was about what Cantera currently uses, not what you believe it should use. Your response is not helpful to Рузана in understanding what Cantera relies on.

Second, Cantera is not a general compressible reacting-flow solver. While I agree other methods may be more appropriate for coupled problems of another nature, that isn't what Cantera does. In the context of a multidimensional solver, Cantera would handle the coupled energy and species conservation equations—a stiff system of ODEs that SUNDIALS can certainly handle. Other ODE solvers can absolutely be faster for certain conditions, and so SUNDIALS may not be the *optimal* package for every single problem, but it is certainly sufficient for the problems that Cantera is designed for.

Lastly, the papers you shared are literature on Rosenbrock methods and pseudo-transient continuation (not quite sure how the latter is relevant to the question about ODEs). If you want to argue that SUNDIALS is somehow insufficient for Cantera—and this thread, responding to Рузана's question, is probably not the appropriate location for that. For me, your argument would be much more convincing if you instead posted evidence for that assertion. In fact, I'm sure many would be interested if you showed such problems.

Kyle

arief...@gmail.com

unread,
Dec 14, 2016, 2:02:44 PM12/14/16
to canter...@googlegroups.com
Hello Kyle,

I've wasted more than 20 years of my life applying SUNDIALS and what preceded it on attempting to solve stiff problems.

At http://tudelft.ddns.net/Literature/  subdirectory 'Books' there are two files for your perusal:
Login with  user=Area51  and password=Area51
1) HairerE_SolvingOrdinaryDifferentialEquationsI.pdf
2) HairerE_SolvingOrdinaryDifferentialEquationsII.djvu

Just study these books from cover-to-cover. Then you'll know that there are only two ways forward for solving stiff problems.

a) The Rosenbrock Method.
b) Or, a combination of the L-stable 3rd-order Radau II method combined with the A-stable 4th-orther Gauss-Legendre method in conjunction with a proper Milne-device for solution adaptive stepsize adjustment. 

All of this relying on a Jacobi Singular Value Decomposition for the linear algebra, about which Ray Speth can inform you on details.

Arief

Kyle Niemeyer

unread,
Dec 14, 2016, 2:44:05 PM12/14/16
to Cantera Users' Group
Hi Arief,

Thanks very much, but I have pretty extensive experience in research focusing on the solution of ODEs, particularly for kinetics, I'm quite familiar with not only the relevant methods but also those books. You may not realize it, but when you make statements like this it can come across as incredibly patronizing. It is not helpful to tell people to read a textbook from cover to cover. If you want to convince people of something, specific evidence would be much more compelling.

I'm not going to get into a debate about particular methods, because as the second of the two textbooks you linked describes, all of these methods have advantages and disadvantages—the first book is for non-stiff problems, so I'm not sure it's even relevant here. I will be the first to admit that CVODE is not the most efficient method for all problems... that said, you are welcome to develop a package as robust as SUNDIALS using a different method, and integrate it with Cantera.

However, as the original poster said, it works fine for most problems, so I'd like to move on and focus on the science Cantera is capable of, as you're interested in as well. That said, if you do have suggestions for or develop an alternative ODE integration package for Cantera, I'm sure many of us would be interested to see that... that said, I think Рузана's original question has been answered.

Kyle

arief...@gmail.com

unread,
Dec 14, 2016, 3:12:56 PM12/14/16
to canter...@googlegroups.com
Hello Kyle,

Your scientific background is well known to me. I'm well aware of your abilities. Otherwise I would not have responded to you.

Where are you based? Perhaps we could meet to discuss things further. I'm based in Delft, The Netherlands.

I know what must be done. But haven't got the ability to accomplish what must be done.

Maybe we could look deeper into the combination of the 3rd order Radau IIA and the 4th order Gauss-Legendre methods for solving stiff problems. And also for DAE-systems. And deploy the Jacobi Singular Value Decomposition for coping with the linear algebra arising from the discretisation.

The CANTERA-community has enough scientists to accomplish this.

Without this capability I'm unable to move my explosion work forward.

Arief


--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-users+unsubscribe@googlegroups.com.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

Рузана Тухватуллина

unread,
Dec 14, 2016, 4:17:25 PM12/14/16
to Cantera Users' Group
Kyle and Arief, thank you for the answers.

Ruzana    

среда, 14 декабря 2016 г., 14:41:36 UTC+3 пользователь Рузана Тухватуллина написал:
Message has been deleted

Marc Fischer

unread,
Sep 22, 2020, 12:21:58 AM9/22/20
to Cantera Users' Group
That's interesting. I didn't know that Cantera was based on Sundials!
Do you think this might be related to the convergence issues I described elsewhere?
Cheers.
Reply all
Reply to author
Forward
0 new messages