Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Cantera into core and toolbox libraries #153

Open
ischoegl opened this issue Jun 6, 2022 Discussed in #97 · 1 comment
Open

Split Cantera into core and toolbox libraries #153

ischoegl opened this issue Jun 6, 2022 Discussed in #97 · 1 comment
Labels
feature-request New feature request

Comments

@ischoegl
Copy link
Member

ischoegl commented Jun 6, 2022

Converting #97 into a feature request.

Discussed in #97

Originally posted by ischoegl April 19, 2021
Cantera is quite large, and mixes core and toolbox objects within the same libraries. Some users may only be interested in linking to core objects (species, reactions and their YAML importers), but may not require reactor networks and one-dimensional simulations.

Within C++, a core C++ cantera library would be much leaner than application toolboxes (no sundials, etc.), which may be attractive for those working with OpenFOAM, or any other 3rd party application. I personally do not believe that a split into multiple repositories makes sense whatsoever, as zerod and onedim toolboxes are an integral part of Cantera.

For Python, all objects are currently available at the root level

import cantera as ct
...

where users pick what they need. As an alternative, objects could be topically sorted

from cantera.core import Solution
from cantera.zerod import Reactor
...

which may be more intuitive/instructive to new users. I do realize that the same is possible by writing from cantera import Solution, Reactor, but my point is that those are really two different contexts. Splitting the Python API actually would not require a corresponding split at the C++ level, but doing both would be consistent.

One of the main questions here is the difficulty of splitting libcantera into multiple libraries for core and zerod/onedim? Outside of stock cantera, it is relatively straight-forward to compile against cantera headers and libraries (which I have done several times over the years; as an aside, code compiles much faster), so the question is whether it is feasible to do this the same repository.

This certainly would be a long-term aspirational project,.

PS: The discussion was originally started in #93, but per @bryanwweber and @speth feedback deserves its own thread.

@ischoegl
Copy link
Member Author

ischoegl commented Feb 5, 2023

@speth … with Cantera/cantera#1429 merged, are there any new possibilities based on the availability of shared Cantera libraries across all platforms?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature request
Projects
No open projects
Development

No branches or pull requests

1 participant