Expand support for chemical kinetics, thermo, and transport
Spitfire Feature Request
Summary and Motivation
We need to have more flexibility in Griffon's chemistry routines to support a broader set of kinetic mechanisms - some extremely detailed mechanisms with unusual rate laws and some extremely simple ones like a one-step global combustion reaction. Additionally we need to support mixture-averaged transport properties in griffon and minimization of Gibbs free energy for chemical equilibrium calculations. Furthermore, writing cantera CTI->XML or straight XML for a simple mechanism is annoying and we should have Python-level abstractions over reactions, thermo, and transport. This will facilitate a deeper level of interaction with chemistry than Spitfire currently allows (none).
This should be done with a eye towards elimination of cantera as a strict dependency of the Python interface. Cantera should absolutely be used for testing but eliminating it from the Python layer would be a huge benefit as we could then add parsing for flamemaster, chemkin, and more at the Python level, expanding our usability further and freeing up the format of mechanism/thermo/transport input for Griffon. Both Spitfire and Griffon are set up pretty well for this, but it's a sizable chunk of work.
Desired Behavior
-
run with a one-step combustion model with unity reaction orders (a non-elementary reaction) -
generate a steady flamelet table with the (large) Polimi et al. mechanism that has non-integer reaction orders -
figure out why the parser fails on certain bigger mechanisms like octane-mehl and heptane-mehl -
generate a simple one- or two-step mechanism from Python 'on the fly' and generate a flamelet table with it -
reproduce a Hydrogen mechanism at the Python layer and test against the original cantera file -
evaluate transport properties (at least viscosity) and add a test to validate against cantera -
be able to perform equilibrium calculations and add a test to validate against cantera
Development Estimate
Allowing non-elementary reactions with integer reaction orders is simply an issue of parsing. Allowing non-integer reaction orders hits both the parsing and kinetics functions, possibly including modifications to routines for source terms and sensitivities. Heptane-Mehl and Octane-Mehl should work fine but it's just a parsing issue (I think). Transport includes parsing as well as implementation in griffon. Equilibrium solves requires learning how precisely those work in advanced codes like cantera (really just Newton's method on Gibbs free energy, or are there gimmicks?). Python layers on top of this should be a 'fun' thing to write, but it's not clear how to best interact with griffon (e.g. autogenerating XML).