Skip to content

Cross sections format modification and EEDF solver correction - #2172

Open
Gaetanosaure wants to merge 17 commits into
Cantera:mainfrom
Gaetanosaure:cantera_PR_format_cross_sections
Open

Cross sections format modification and EEDF solver correction#2172
Gaetanosaure wants to merge 17 commits into
Cantera:mainfrom
Gaetanosaure:cantera_PR_format_cross_sections

Conversation

@Gaetanosaure

Copy link
Copy Markdown
Contributor

This Pull request follows three previous pull requests aiming at the improvement of the low temperature plasma modelling capabilities of Cantera.

The first pull request that proposed a lot of changes (#2121) was split in smaller pull requests, two of them which already got integrated:

#2144 addressed points 2, 3 and 4 of the original PR.
#2145 addressed points 6 and 7 of the original PR.

The present PR addresses the last two remaining points of the initial pull request:

  1. Solved the EEDF computation issue: the solver now converges to the right EEDF. As you may have noticed, the example on the website gets the right trend but the values are off (figures 1a and 1c). This is because the effective cross-sections and elastic cross-sections were treated in the same way whereas they should not be: effective = elastic + inelastic. This ended up in counting the inelastic cross-sections twice, thus lowering the EEDF value on the high energies with respect to the correct solution. As can be seen on figure 1b and 1d, this is now fixed.
image

Running the same case as the Cantera example for some additional reduced electric fields yields a perfect agreement with BOLOS:

image (18)
  1. Implemented a new format for the YAML files avoiding information duplication but solving the current problem of cross-section datasets inconsistency, all the while keeping readability. Hopefully you will find it satisfactory. Here is its presentation:
    The idea of this YAML format for electron collision reactions is to separate the data needed for the chemical solver from the data needed for the EEDF solver, the ultimate goal being to allow for a minimal user error while manipulating the cross-section datasets (which remains as close as possible to the original LXcat reference). However, you made a good point in the previous discussions by stressing that the reactions should not duplicate information from the cross-sections. Therefore, now all the information is stored in the cross-sections, which are themselves all stored in the electron-collisions YAML node for safety and clarity purposes. To link the reactions involving electron collisions to their data, a field “name” was added to the cross-sections.
    This field is constructed from the cross-section data taken from the LXCat database as follows: databaseName_target_kind_product_threshold to create a unique identifier that is then declared in the appropriate reaction in the reaction YAML node if this reaction if wished by the user to be taken into account into the chemistry.

All relevant tests and documentation have been modified accordingly, so for further details you may also find useful to consult the updated documentation of this PR.

  • Limited use of generative AI for the actual code itself and for documentation.
    Standard or boilerplate code snippets were generated with AI and manually reviewed;
    all design, logic, and implementation decisions were made by the contributor.
    Examples: IDE code-completions or brief LLM queries for common patterns.

  • Extensive use of generative AI for the tests.
    Significant portions of code or documentation were generated with AI, including
    logic and implementation decisions. All generated code and documentation were
    reviewed and understood by the contributor. Examples: Output from agentic coding
    tools and/or substantial refactoring by LLMs (web-based or local).

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.74954% with 160 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.41%. Comparing base (027501d) to head (7eea1eb).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
interfaces/cython/cantera/lxcat2yaml.py 70.61% 36 Missing and 41 partials ⚠️
src/kinetics/ElectronCollisionPlasmaRate.cpp 54.95% 27 Missing and 23 partials ⚠️
src/thermo/PlasmaPhase.cpp 72.88% 6 Missing and 10 partials ⚠️
src/thermo/EEDFTwoTermApproximation.cpp 85.39% 7 Missing and 6 partials ⚠️
src/base/YamlWriter.cpp 77.77% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2172      +/-   ##
==========================================
+ Coverage   78.35%   78.41%   +0.06%     
==========================================
  Files         462      463       +1     
  Lines       55749    56218     +469     
  Branches     9155     9251      +96     
==========================================
+ Hits        43682    44085     +403     
- Misses       8999     9007       +8     
- Partials     3068     3126      +58     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Gaetanosaure

Copy link
Copy Markdown
Contributor Author

Hi @speth and @BangShiuh , here is the pull request for the modification of the cross-sections format.

Let me know your thinking about this.

Some of the CI checks fail because of example_data which is not modified yet, so the format changes cause crashes. If you agree to the proposed format, I'll reformat the relevant data in it and create a separate example_data repository pull request.

@Gaetanosaure Gaetanosaure changed the title Cantera pr format cross sections Cross sections format modification and EEDF solver correction Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant