added C and Python support for custom reactant data#53
Merged
markleader merged 5 commits intonasa:mainfrom Mar 3, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add custom-reactant support to the C and Python interfaces so RP-1311 Example 5 style workflows (including reactants not present in
thermo.lib, e.g.CHOS-Binder) are available outside the legacy main interface, while keeping existingMixture([...])behavior backward compatible.Changes
source/bind/c/cea.h:cea_mixture_create_products_from_input_reactants(...)cea_mixture_create_products_from_input_reactants_w_ions(...)source/bind/c/bindc.F90):cea_reactant_input -> ReactantInputto remove duplicated parsing/validation logic.source/bind/python/cea_def.pxdwithcea_reactant_inputand new function declarations.cea.Reactantinsource/bind/python/CEA.pyx.Mixture(...)to acceptstr,Reactant, and mixed lists.temperatureinKenthalpyinJ/kg(converted internally for core input)source/bind/c/samples/rp1311_example5.csource/bind/python/cea/samples/rp1311/example5.pysource/bind/c/CMakeLists.txtascea_bindc_rp1311_ex5source/bind/python/tests/test_rp1311_samples.pysource/bind/python/tests/test_strings.py(bytes inputs no longer supported)docs/source/interfaces/python_api.rstto documentcea.Reactantand SI expectations.Testing
ctest -R cea_core_test -Vpython -m pytestCompatibility / Numerical behavior