Skip to content

Adding Cantera fluid model for incompressible reacting flows - #2713

Open
Cristopher-Morales wants to merge 323 commits into
developfrom
feature_CANTERA_PR
Open

Cristopher-Morales wants to merge 323 commits into
developfrom
feature_CANTERA_PR

Conversation

@Cristopher-Morales

@Cristopher-Morales Cristopher-Morales commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

Proposed Changes

This pull request aims to add a fluid model called FLUID_CANTERA for coupling Cantera library with SU2. Cantera library is an open-source library for problems involving chemical kinetics, thermodynamics, and transport processes. This is needed for combustion problems using the incompressible solver.

[UPDATE] adding the cantera option to meson is now sufficient to get cantera coupled to su2.

SU2 can be built with Cantera as follows (for example):

    ./meson.py build -Dwarning_level=2 -Denable-autodiff=false -Denable-directdiff=false -Dwith-mpi=enabled -Denable-cgns=true -Denable-tecio=false -Denable-cantera=true --prefix=/path_to_SU2_directory/SU2

• -Denable-tests=true can be used for testing if Cantera is correctly compiled with SU2, running one of the Cantera fluid unit test cases.

Work in progress:

• Improve cantera coupling, only compile the functionalities needed for SU2. Currently, when cantera is compiled, whole functionalities are compiled. Most of the cantera implementations are not needed for incompressible reacting flows.
• Compile cantera with the AD options. For this purpose, a different repository must be cloned and compiled, where the AD implementation of cantera is located.
• Add regression and unit test cases in the SU2 workflow.

Regarding the coupling between SU2 and Cantera, any advice/suggestion how to improve it would be really appreciated.

Thanks in advance!!

Related Work

Related to pull request #2426

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

Cristopher-Morales and others added 30 commits November 18, 2024 13:56
bigfooted and others added 6 commits October 13, 2026 08:52
…antera tests

Other unit tests open files relative to the workspace root; the Cantera tests now do the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Comment thread TestCases/combustion/1step_methane_air/2d_slit_burner_fluid.cfg Outdated
Comment thread SU2_CFD/src/fluid/CFluidCantera.cpp
Comment thread Common/include/CConfig.hpp Outdated
Comment thread SU2_CFD/src/solvers/CIncEulerSolver.cpp Outdated
bigfooted and others added 2 commits October 15, 2026 13:37
…review fixes

- CANTERA_SPECIES_NAMES is optional; if omitted all mechanism species are transported.
- Warn about mechanism species that are not transported.
- Rename GetCombustion to GetCanteraCombustion.
- Drop unneeded mass fractions in SetEnthalpyFormation.
- Remove commented-out options from the test cases.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@joshkellyjak joshkellyjak mentioned this pull request Oct 15, 2026
6 tasks done
@joshkellyjak
joshkellyjak added this pull request to stack #2982 October 15, 2026 15:23
@joshkellyjak
joshkellyjak removed this pull request from stack #2982 October 15, 2026 15:57

@joshkellyjak joshkellyjak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants