Skip to content

Commit

Permalink
CEPTR: PLOG reaction support at constant pressure (#549)
Browse files Browse the repository at this point in the history
* ceptr: Added functionality for reading and converting PLOG reactions.

* Do formatting with black

* Run isort and flake8

* Latest upstream pull (#2)

* pin intel-oneapi version in CI (#541)

* Bump Submodules/amrex from `8349789` to `00e6f75` (#540)

Bumps [Submodules/amrex](https://github.com/AMReX-Codes/amrex) from `8349789` to `00e6f75`.
- [Release notes](https://github.com/AMReX-Codes/amrex/releases)
- [Commits](AMReX-Codes/amrex@8349789...00e6f75)

---
updated-dependencies:
- dependency-name: Submodules/amrex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bruce Perry <Bruce.Perry@nrel.gov>

* Make EOS functions templates to allow for CellData as an argument (#536)

* template for celldata in EOS

* static asserts in templates

* templating for RY2 functions for all EOS

* Fix clang-tidy (#535)

* fix unused variable

* free shared ptr for manfunc parm

---------

Co-authored-by: Marc T. Henry de Frahan <marc.henrydefrahan@nrel.gov>

* Unit conversions (#539)

* Utilities and unit conversions

* Formatting

* 2 structs and renamed functions to avoid macros issue

* Templating and namespaces

* Added Utilities to Docs

* Overload instead of templating

* Fixed nested namespaces for clang-tidy error in PeleLMeX, removed Utilities.H from PelePhysics.H.wq (#545)

* Update CI to ubuntu-24.04 (#546)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Bruce Perry <Bruce.Perry@nrel.gov>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marc T. Henry de Frahan <marc.henrydefrahan@nrel.gov>
Co-authored-by: Dave Montgomery <David.Montgomery@nrel.gov>
Co-authored-by: Jon Rood <jon.rood@nrel.gov>

* Adding example mechanism for PLOG evaluation

* Bump Submodules/amrex from `00e6f75` to `f27eb69` (#550)

Bumps [Submodules/amrex](https://github.com/AMReX-Codes/amrex) from `00e6f75` to `f27eb69`.
- [Release notes](https://github.com/AMReX-Codes/amrex/releases)
- [Commits](AMReX-Codes/amrex@00e6f75...f27eb69)

---
updated-dependencies:
- dependency-name: Submodules/amrex
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* speciesNames for Manifold EOS (#542)

* simplify templated functions in EOS.cpp

* rearrange template specializations in EOS.cpp so they are all in header; improve speciesNames function for manifold

* SYCL ifdef for manifold speciesnames

* pass host eosparm to reactors

* ignitionDelay: remove one invalid call for manifold eos

* fix dumb bug

* clang-tidy unused arguments

* ceptr: create pressure-specific folders for plog mechanism, move plog_pressure var into mechanism object

* ceptr: implement command line and list options to specify plog pressure

* ceptr: Add plog mech to list_mech

* ceptr: Copy Make.package to the plog subfolder

* add docs on plog mechanism conversion

* fix typo

fix another typo

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Thomas Howarth <69794367+ThomasHowarth@users.noreply.github.com>
Co-authored-by: Bruce Perry <Bruce.Perry@nrel.gov>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marc T. Henry de Frahan <marc.henrydefrahan@nrel.gov>
Co-authored-by: Dave Montgomery <David.Montgomery@nrel.gov>
Co-authored-by: Jon Rood <jon.rood@nrel.gov>
  • Loading branch information
7 people authored Dec 23, 2024
1 parent 760e2fe commit 3b3b7fe
Show file tree
Hide file tree
Showing 17 changed files with 38,938 additions and 28 deletions.
27 changes: 17 additions & 10 deletions Docs/sphinx/Ceptr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To install CEPTR dependencies::
$ cd ${PELE_PHYSICS_HOME}/Support/ceptr
$ poetry update

.. note:: Note that the install requires a specific Python version, which is specified in the ``Support/ceptr/pyproject.toml``. If a compatible version exists in your system then poetry will try to find and use it. Otherwise, think about using a `conda <https://conda.io/projects/conda/en/latest/user-guide/getting-started.html>`_ environment to manage packages and their dependencies without tampering with your system.
.. note:: Note that the install requires a specific Python version, which is specified in the ``Support/ceptr/pyproject.toml``. If a compatible version exists in your system then poetry will try to find and use it. Otherwise, think about using a `conda <https://conda.io/projects/conda/en/latest/user-guide/getting-started.html>`_ environment to manage packages and their dependencies without tampering with your system.

Usage
-----
Expand Down Expand Up @@ -48,7 +48,8 @@ There are three ways to use CEPTR to generate C++ mechanism files for a given ch
$ poetry run convert -f ${PELEPHYSICS_HOME}/Mechanisms/${chemistry}/mechanism.yaml \
--chemistry {chemistry-type} \
--gas_name {gas-name} \
--interface_name {interface-name}
--interface_name {interface-name} \
--plog_pressure {value in Pa}

The ``--chemistry`` (or ``-c``) argument allows users to convey if the ``${chemistry}`` of interest is either one of two valid options, namely, ``homogeneous`` or ``heterogeneous``. The default value for ``{chemistry-type}`` is ``homogeneous``.
The ``--gas_name`` argument allows users to specify the names of the homogeneous phase to use, as several different ones can be defined in the corresponding ``mechanism.yaml`` file (under the ``phases:`` item). The default value for ``{gas-name}`` is ``gas``.
Expand All @@ -63,17 +64,25 @@ There are three ways to use CEPTR to generate C++ mechanism files for a given ch

.. note:: CEPTR interpretations of heterogeneous mechanisms is currently a work in progress.

.. note:: CEPTR offers only partial support for mechanisms with pressure-dependent Arrhenius (PLOG) reactions.
These reactions are fixed to a constant pressure, specified with the ``--plog_pressure`` argument,
in the CEPTR-generated source code. Mechanisms with PLOG reactions generated in this way are limited
in validity to that specific pressure and would not be suitable for compressible flows with significant
pressure variation. For that reason, source code for these mechanisms is saved in pressure-specific directories, for
example ``${PELE_PHYSICS_HOME}/Mechanisms/POLIMI2020/1_000atm/``.


2. Using a helper script in the directory containing the ``mechanism.yaml`` file::

$ ./convert.sh

.. note:: It is possible that using this option will require for you to have a valid Cantera installed somewhere. Again, we strongly suggest using a `conda <https://conda.io/projects/conda/en/latest/user-guide/getting-started.html>`_ environment to install all required package. A simple ceptr environment can be generated using the following yaml script::
.. note:: It is possible that using this option will require for you to have a valid Cantera installed somewhere. Again, we strongly suggest using a `conda <https://conda.io/projects/conda/en/latest/user-guide/getting-started.html>`_ environment to install all required package. A simple ceptr environment can be generated using the following yaml script::

$ name: ceptr
$ channels:
$ - conda-forge
$ dependencies:
$ - python=3.10
$ channels:
$ - conda-forge
$ dependencies:
$ - python=3.10
$ - cantera

3. Using a helper script in the ``Mechanisms`` directory::
Expand Down Expand Up @@ -110,7 +119,7 @@ For a detailed description of these options and a further information on the way

To generate a QSS C++ mechanism from the ``.yaml`` file thus created, tailored to your needs, please refer to Tutorials :ref:`Generating NC12H26 QSS mechanism with analytical jacobian <sec_tutqss1>` and :ref:`Generating NC12H26 QSS mechanism without analytical jacobian <sec_tutqss2>`.

Batched generation of Pele-compatible mechanisms
Batched generation of Pele-compatible mechanisms
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note::
Expand Down Expand Up @@ -138,5 +147,3 @@ To generate all mechanisms::
$ poetry run convert -l ${PELE_PHYSICS_HOME}/Mechanisms/list_mech
$ poetry run qssa -lq ${PELE_PHYSICS_HOME}/Mechanisms/list_qss_mech
$ poetry run convert -lq ${PELE_PHYSICS_HOME}/Mechanisms/list_qss_mech


1 change: 1 addition & 0 deletions Mechanisms/POLIMI2020/1_000atm/Make.package
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CEXE_sources+=mechanism.cpp
Loading

0 comments on commit 3b3b7fe

Please sign in to comment.