Different solver for equilibrium

416 views
Skip to first unread message

Fanne

unread,
May 13, 2014, 6:40:15 AM5/13/14
to canter...@googlegroups.com
Hi all !


Lately, I've been doing some very basic equilibrium calculations, with single and multi phases mixture, through the Python interface.


Now, if I understand correctly, there are three different solvers:
One that will work with a ThermoPhase object : ChemEquil
One that will work with both ThermoPhase and MultiPhase object: MultiPhaseEquil
And potentially another one that will work with a MultiPhase object and that you need to import when installing Cantera: VCSnonideal

First of is this correct ?

And if so, I have a couple of questions that I hope could be answered :) :
I don't really understand the difference between all those solvers. It is pretty clear ChemEquil works with the chemical potentials, as it
provides you with the element chemical potentials at the end. But why is it different when multiple phases are present ? When I look at the
logs generated by the MultiPhaseEquil solver, there are the reaction mechanisms, and no more element potentials ...
Then, which procedure does MultiPhaseEquil follow to calculate what we need : is it still about the minimization of the Gibbs
function ? Is this procedure the same than the VCSnonideal one ? And if so, what is the difference
between both those mixture solvers then (VCSnonideal and MultiPhaseEquil) ? (if you have documentation about this ...)
I am a bit puzzled, as I though it was possible to use the chemical potential method for multiple phases ... (cf STANJAN)
Also, on a practical side: which solver should be used in priority (cpu and time wise) ?

To conclude, I am also unsure of how the equilibrium calculation is performed when something other than T and P is held constant,
say HP for instance: I understand that the mixture solvers (MultiPhaseEquil and VCSnonIdeal) loop over different T values;
but what about ChemEquil ?

Any help will be greatly appreciated :)
I will also create another post with specific cases issues.
Cheers !

Fanne

unread,
May 23, 2014, 3:51:05 AM5/23/14
to canter...@googlegroups.com
Really ? No one ever had questions/problems or was curious about this ?

Moffat, Harry K

unread,
May 23, 2014, 1:07:49 PM5/23/14
to canter...@googlegroups.com

Hi,

 

    I’m the author of most of the equilibrium work in Cantera and I ‘ll try to answer your questions. First,  I’m currently in the midst of writing up  documentation and working on algorithms for the VCS solver which will answer more of your questions. The document will probably be done by the end of the summer.

 

Mostly all of the codes work with constant T and P conditions within their inner loop. Then wrappers are used to calculate other conditions such as constant T and V or S and V.

 

ChemEquil is based on the nonstoichiometric Brinkley method which is based on the element potential method (number of elements + 1 dofs) at constant P and T. It has an analytical matrix, which was an improvement over Goodwin’s original numerical matrix, chiefly because the matrix is so often singular (singular or nearly singular matrices and numerically generated matrices, btw, are a really bad combination).  Sandia’s Fuego code originally used ChemEquil to calculate its matrix of equilibrium conditions. However, it proved to be too unreliable even after a considerable amount of work trying to understand the singularity and we now use the VCS code within Fuego. The singularity is due to when the current species set with nontrivial mole fractions (> 1.E-14) don’t form a complete basis set of the element constraints.

It gets tricky when the rank deficiency of the matrix gets above order 1 .  However, the method is still fast and therefore useful if you take care about initial conditions to avoid the singularity, and it can and has been extended to multiple phases if the infrastructure is put into it to do that. I haven’t done that yet, but may revisit this.

 

The second equilibrium code is Goodwin’s in origin and is no longer used.

 

The third code is the VCS method, which is the workhorse for solving complex equilibrium problems within Cantera. I’ve worked extensively on the VCS code, which is based on an extension of the VCS method in Smith and Missen’s book to nonideal solutions. Its current status is that it is robust, especially wrt minor components and species, with a list of known limitations which I will address when I get the time to do that.  The number of unknowns is basically equal to the number of species. It’s a Gibbs minimization technique which is guaranteed to lower the G at all steps, even though it uses only the diagonal of the hessian.

 However, it separates the species into major and minor categories, and focuses most of its energies on calculating major species. It uses a completely different algorithm for minor species that is tolerant of a large variation in the scales.  I have hopes for it scaling tolerably due to its structure.

 

One of the biggest issue within equilibrium solvers are phase stability problems. This and the determination of the global minimum from a local minimum are really the only two hard issues. I still have one problem that is on my plate for the VCS method that I will be addressing in the near future which is the biggest issue with the solver having to do with this issue. It handles single phase pop issues tolerably, though there is some work to do in putting the algorithm into the main code in a robust manner. However, multiple phases that pop concertedly have yet to be handled correctly, and this issue has arisen in my application work.  Other things to come in the near future is to put surface phases into the equilibrium solver and to resolve robustness issues for single phase problems with large numbers of species that have multiple major species.

 

Stanjan is proprietary, and I have not heard many good things about it. Europe’s calphad work is much better.

 

 

Harry Moffat

--
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.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at http://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

Fanne

unread,
May 27, 2014, 9:32:41 AM5/27/14
to canter...@googlegroups.com
Dear Harry

Thank you very much for your answer, and I look forward to reading the report you're writing on this subject !

So basically, what you are saying is that in the most "recent" version of Cantera, there are only two solvers available : ChemEquil and VCSnonIdeal -that you have to import in the preconfig file when installing Cantera; and the "MultiPhaseEquil" solver is no longer used, am I correct ? (I still use the version 1.8, but will upgrade soon !)
Also, the ChemEquil solver is the only one working with the element potentials (so, faster but less robust) but is not capable of handling multiple phases for now; then if you deal with multiple phases you have to use the VCSnonIdeal : correct ? Or is it not yet possible to do so and be confident in your results ?

Could you recommend a website or a more recent paper maybe, that would explain the VCS method, as I can't find the book by Missen and Smith ?

Thank you again !
Anne

Rodolfo Rodrigues

unread,
Jun 3, 2014, 4:19:38 PM6/3/14
to canter...@googlegroups.com
Dear Anne,

Wong's PhD-thesis provides some notes related to VCS algorithm. It's available here: http://hdl.handle.net/1807/15258

Regards,
Rodolfo
Reply all
Reply to author
Forward
Message has been deleted
0 new messages