Skip to content

Add a function mechInfo() to return compiled mechanism information #40

@blttkgl

Description

@blttkgl

Hey,

We use pyJac with linking it to OpenFOAM as a dynamic library through case folders. During compiling the OpenFOAM chemistry model we use dummy pyjac headers, since we want to be able to use different mechanisms via pyJac by linking the appropriate dynamic library from the case folder.

At the moment there is no easy way to check if the mechanism input file provided and mechanism pyJac is compiled and dynamically linked are matching. Since header files are dummy (so we are not limited to one mechanism), we can't for instance check number of species NSP, since it is #defined in the mechanism.h.

Would you be able to add a get_mech_info() function, which returns the mechanism information such as number of species, number of variables, forward reactions etc. when called? If this is implemented it enables OpenFOAM users to use multiple mechanisms without re-compiling their models, by simply checking e.g. pyJac mechanism size matches the mechanism they want to use.

I can also try to provide this change and open a pull request if you are interested.

Thanks!

Bulut

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions