Skip to content

Enable calling of pre-compiled kinetics in CKWYP format #126

@tpg2114

Description

@tpg2114

Abstract

Reduced kinetics (those composed of non-elementary reactions, quasi-steady-state assumptions, and/or algebraic relationships) are often distributed in a common format originating from Chemkin, the CKWYP format, and are generally in the form of a set of Fortran or C routines. The resulting kinetics are useful in many practical simulations, both standalone and when coupled to a reacting flow code.

Possible Solutions

Back many years ago, our research group added the capability to call reduced kinetics mechanisms to Cantera v1.8. We added a new reaction type that could be specified in the CTI file and that would point Cantera to a function name that was compiled into it, corresponding to the desired reduced kinetics. The required set of changes were not very extensive, once one knew how to do it.

That approach was a bit brittle because all the CKWYP kinetics had to be compiled into Cantera and so it wasn't particularly user-friendly. Since we were often using Cray supercomputers that did not support dynamic linking of shared libraries, it was the only path forward for us at the time. However, this is no longer a constraint and it would be easy enough to add a reaction type that can be specified in the YAML file to point to a shared library to load and a function within it to call, and Cantera can use dlopen and related functions to get the requested routine from the specified library.

Unfortunately, I do not have the bandwidth to port these changes forward from v1.8 to the latest Cantera. However, if somebody who is familiar with the current state of the kinetics classes is willing to work on it, I will share the modified v1.8 source code and can advise on how to use kinetics compiled into a shared library (as I have done this in other codes).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions