Skip to content

Commit 2b8c88a

Browse files
committed
added C and Python support for custom reactant data
1 parent f9b4002 commit 2b8c88a

File tree

10 files changed

+669
-219
lines changed

10 files changed

+669
-219
lines changed

docs/source/interfaces/python_api.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Mixture
99
-------
1010
The :class:`~cea.Mixture` class is used to define a mixture of product or reactant species. It allows the user to specify the composition of the mixture and provides methods to compute thermodynamic curve fit properties.
1111
The instances of this class are then passed as inputs to the available solver classes (e.g., :class:`~cea.EqSolver`, :class:`~cea.RocketSolver`, :class:`~cea.ShockSolver`, or :class:`~cea.DetonationSolver`).
12+
Custom reactants can be provided through :class:`~cea.Reactant` objects (including mixed lists of strings and Reactant objects).
13+
For :class:`~cea.Reactant`, ``enthalpy`` and ``temperature`` are SI-only in the Python API (J/kg and K, respectively); use :mod:`cea.units` helpers for pre-conversion.
14+
15+
.. autoclass:: cea.Reactant
16+
:members:
1217

1318
.. autoclass:: cea.Mixture
1419
:members:

source/bind/c/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ if (CEA_BUILD_TESTING)
5656
COMMAND cea_bindc_rp1311_ex3
5757
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
5858
)
59+
60+
add_executable(cea_bindc_rp1311_ex5 samples/rp1311_example5.c)
61+
target_link_libraries(cea_bindc_rp1311_ex5 PRIVATE cea::bindc)
62+
add_test(
63+
NAME cea_bindc_rp1311_ex5
64+
COMMAND cea_bindc_rp1311_ex5
65+
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
66+
)
67+
5968
add_executable(cea_bindc_rp1311_ex6 samples/rp1311_example6.c)
6069
target_link_libraries(cea_bindc_rp1311_ex6 PRIVATE cea::bindc)
6170
add_test(
@@ -89,4 +98,3 @@ if (CEA_BUILD_TESTING)
8998
)
9099

91100
endif()
92-

0 commit comments

Comments
 (0)