Cantera's implementation of element potential method for solving for equilibrium

39 views
Skip to first unread message

Nick Wogan

unread,
Dec 10, 2021, 5:45:50 PM12/10/21
to Cantera Users' Group
I'm trying to understand Cantera's implementation of the element potential method for solving for chemical equilibrium

The part of Cantera's approach I do not understand very well are the "BasisOptimize" and "ElemRearrange" that are called within the initial estimation of the element potentials (i.e. the Lagrange multipliers). See this link


My rough understanding is that these routines are necessary to avoid poorly conditioned matrices later on. In the header file (link) BasisOptimize is described as

"""
//! Choose the optimum basis of species for the equilibrium calculations.
/*!
 * This is done by choosing the species with the largest mole fraction not
 * currently a linear combination of the previous components. Then, calculate
 * the stoichiometric coefficient matrix for that basis.
"""

Why is this necessary?

I was wondering if this approach is described in an article or documentation somewhere that is easier to understand than the code. 

Thanks,
Nick


Shepherd, Joseph E.

unread,
Dec 11, 2021, 12:09:47 PM12/11/21
to canter...@googlegroups.com
Nick,

The element potential implementation by Reynolds was the basis of the original Cantera algorithm (others will have to speak to what changes have been made I in the past two decades). I have linked Reynolds original reports to my thermo webpage https://shepherd.caltech.edu/EDL/PublicResources/sdt/thermo.html - these discuss the issues around choosing a basis set and preconditioning.

JES

-----Original Message-----
From: canter...@googlegroups.com <canter...@googlegroups.com> On Behalf Of Nick Wogan
Sent: Friday, December 10, 2021 2:46 PM
To: Cantera Users' Group <canter...@googlegroups.com>
Subject: [cantera-users] Cantera's implementation of element potential method for solving for equilibrium

I'm trying to understand Cantera's implementation of the element potential method for solving for chemical equilibrium

The part of Cantera's approach I do not understand very well are the "BasisOptimize" and "ElemRearrange" that are called within the initial estimation of the element potentials (i.e. the Lagrange multipliers). See this link

https://github.com/Cantera/cantera/blob/main/src/equil/BasisOptimize.cpp


My rough understanding is that these routines are necessary to avoid poorly conditioned matrices later on. In the header file (lin <https://github.com/Cantera/cantera/blob/208a89c16aabbe98bbc4de8da66a67b677ff0dbb/include/cantera/equil/MultiPhase.h#L673> k) BasisOptimize is described as

"""
//! Choose the optimum basis of species for the equilibrium calculations.
/*!
* This is done by choosing the species with the largest mole fraction not
* currently a linear combination of the previous components. Then, calculate
* the stoichiometric coefficient matrix for that basis.

"""

Why is this necessary?

I was wondering if this approach is described in an article or documentation somewhere that is easier to understand than the code.

Thanks,
Nick



--
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-user...@googlegroups.com <mailto:cantera-user...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/cantera-users/40ee2f67-acc0-4237-8471-c456b41fd763n%40googlegroups.com <https://groups.google.com/d/msgid/cantera-users/40ee2f67-acc0-4237-8471-c456b41fd763n%40googlegroups.com?utm_medium=email&utm_source=footer> .

Reply all
Reply to author
Forward
0 new messages