Replies: 3 comments 18 replies
-
Separating this out in the Python user interface is certainly possible, although I don't know how much of a benefit that would provide. There would certainly be a cost in muscle memory for all current users who are used to the current structure. As a point of comparison, the On the C++ side, you and others who have been using Cantera for long enough may remember a time when Cantera was actually compiled into separate libraries corresponding to different "modules". This had the very unfortunate effect of needing to specify something like And while I recognize that there are users who don't use significant parts of Cantera, I think the cost of having those parts always available is pretty small. The biggest one is probably the fact that the reactor network code requires Sundials, but I hope that we've made that pretty hassle-free with the git submodule. I don't think there are many other use cases where our other dependencies could be made optional. Other than that, the cost is maybe an additional minute of compile time to compile the 0D/1D code. Is there some other cost that I'm missing? Without debug symbols the whole of |
Beta Was this translation helpful? Give feedback.
-
I'm posting this as a new followup, although it's more related to what @speth said. Quoting from his reply:
I wonder if it makes sense to have a library that only includes thermo, transport, and kinetics, and leaves out the SUNDIALS dependency. I'm imagining this would be in addition to having a single library for the whole thing (so we distribute 2 |
Beta Was this translation helpful? Give feedback.
-
Superseded by #153 |
Beta Was this translation helpful? Give feedback.
-
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
where users pick what they need. As an alternative, objects could be topically sorted
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.
Beta Was this translation helpful? Give feedback.
All reactions