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

Preamble to InterfaceKinetics refactoring #1184

Merged
merged 25 commits into from
Feb 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9758427
[SCons] Add option to disable legacy reactions
ischoegl Jan 28, 2022
ef61299
[CI] Add runner probing 'no_legacy_reactions' option
ischoegl Jan 28, 2022
7a45e71
[Kinetics] Fix compilation errors with 'no_legacy_reactions'=y
ischoegl Jan 28, 2022
a0359c4
[Kinetics] Make ArrheniusBase independent from ReactionRate
ischoegl Jan 28, 2022
1cd0343
[Kinetics] (Re)-implement updateFromStruct
ischoegl Jan 22, 2022
13b2986
[Kinetics] Rename MultiBulkRate to MultiRate
ischoegl Jan 29, 2022
185ced9
[Kinetics] Add ReactionRate::setContext
ischoegl Jan 29, 2022
6ac4c46
[Python] Consolidate constructors and properties in reaction.pyx
ischoegl Jan 29, 2022
df0082a
Remove remmants of BlowersMasel2
ischoegl Jan 29, 2022
1b86874
Use ArrheniusBase for low and high FalloffRate rates
ischoegl Jan 29, 2022
0cd2de0
Mark ArrheniusBase as the successor of Arrhenius(2)
ischoegl Jan 29, 2022
5627cc4
Streamline nomenclature for activation_energy (Blowers-Masel)
ischoegl Jan 29, 2022
659101d
[Kinetics] Consolidate getRateParameters versions
ischoegl Jan 29, 2022
f02caf9
[Kinetics] Isolate serialization of legacy rates
ischoegl Jan 29, 2022
94e471b
Switch PlogRate to use ArrheniusBase and limit use of 'Arrhenius'
ischoegl Jan 30, 2022
9f7b5ad
Mark remaining legacy objects with '2' suffix
ischoegl Jan 30, 2022
4179a5c
[Kinetics] Add deprecation messages to legacy files
ischoegl Jan 30, 2022
c31f8eb
Remove suffix '3' from ChebyshevRate(3)
ischoegl Jan 30, 2022
1165820
[Kinetics] Calculate Blowers-Masel deltaH internally
ischoegl Jan 30, 2022
712d239
[Kinetics] Re-introduce updateFromStruct instances
ischoegl Jan 30, 2022
7a6f1bd
[Kinetics] Remove remaining 'bulk' references and add todo comments
ischoegl Jan 30, 2022
e50d243
Various code and docstring improvements
ischoegl Feb 5, 2022
5fa23b7
Add ArrheniusTypeRate to Sphinx documentation
ischoegl Feb 5, 2022
1ef59d5
Fix typo in 'SConstruct'
ischoegl Feb 6, 2022
ce94ac1
Minor updates
ischoegl Feb 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,34 @@ jobs:
- name: Test Cantera
run: python3 `which scons` test show_long_tests=yes verbose_tests=yes

check-deprecations:
name: Run test suite without legacy typedefs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout the repository
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
- name: Install Apt dependencies
run: |
sudo apt update
sudo apt install libboost-dev gfortran libopenmpi-dev
- name: Upgrade pip
run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies
run: python3 -m pip install ruamel.yaml scons numpy cython h5py pandas pytest
pytest-github-actions-annotate-failures
- name: Build Cantera
run: python3 `which scons` build env_vars=all -j2 debug=n --debug=time no_legacy_reactions=y
- name: Test Cantera
run:
python3 `which scons` test show_long_tests=yes verbose_tests=yes --debug=time

windows:
name: ${{ matrix.os }}, MSVC ${{ matrix.vs-toolset }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -517,7 +545,7 @@ jobs:
- name: Set Up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.8
architecture: x64
- name: Install Python dependencies
run: |
Expand Down
8 changes: 8 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,13 @@ config_options = [
definitions (see Eq. 9.75 in Kee, Coltrin and Glarborg, 'Chemically Reacting
Flow', Wiley Interscience, 2003).""",
True),
BoolOption(
"no_legacy_reactions",
"""If disabled ('no'/default), legacy 'Reaction' and associated rate objects
that are deprecated in Cantera 2.6 are used. If enabled ('yes'), internal
objects will use new objects introduced in Cantera 2.6. The flag is used
for testing purposes only and has no effect on results.""",
False),
]

config = Configuration()
Expand Down Expand Up @@ -1759,6 +1766,7 @@ cdefine("CT_USE_SYSTEM_EIGEN_PREFIXED", "system_eigen_prefixed")
cdefine('CT_USE_SYSTEM_FMT', 'system_fmt')
cdefine('CT_USE_SYSTEM_YAMLCPP', 'system_yamlcpp')
cdefine('CT_USE_DEMANGLE', 'has_demangle')
cdefine("CT_NO_LEGACY_REACTIONS_26", "no_legacy_reactions")

config_h_build = env.Command('build/src/config.h.build',
'include/cantera/base/config.h.in',
Expand Down
12 changes: 11 additions & 1 deletion doc/sphinx/cython/kinetics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ BlowersMaselInterfaceReaction
:no-undoc-members:

Reaction Rates
---------------------------------------
--------------

ReactionRate
^^^^^^^^^^^^
.. autoclass:: ReactionRate()

ArrheniusTypeRate
^^^^^^^^^^^^^^^^^
.. autoclass:: ArrheniusTypeRate(input_data)
:no-undoc-members:

ArrheniusRate
^^^^^^^^^^^^^
.. autoclass:: ArrheniusRate(A, b, Ea)
Expand All @@ -87,6 +92,11 @@ BlowersMaselRate
.. autoclass:: BlowersMaselRate(A, b, Ea, w)
:no-undoc-members:

TwoTempPlasmaRate
^^^^^^^^^^^^^^^^^
.. autoclass:: TwoTempPlasmaRate(A, b, Ea_gas, Ea_electron)
:no-undoc-members:

FalloffRate
^^^^^^^^^^^
.. autoclass:: FalloffRate()
Expand Down
3 changes: 3 additions & 0 deletions include/cantera/base/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,7 @@ typedef int ftnlen; // Fortran hidden string length type
// Use legacy rate constant by default
{CT_LEGACY_RATE_CONSTANTS!s}

// Do not use reactions deprecated in Cantera 2.6
{CT_NO_LEGACY_REACTIONS_26!s}

#endif
Loading