Plasma treatment enhancements#2121
Open
Gaetanosaure wants to merge 29 commits into
Open
Conversation
…ble, in addition to the already present custom grid
…e energy deposited by the plasma corresponds to Joules heating, elastic power losses are a fraction of it and were thus counted twice in the previous expression
…um maximum value automatically to match the problem's requirements
…ase constructor slightly modified)
…the EEDF is correct
…for now hard-coded at 1 Td)
…ith the older YAML file format but it throws a deprecation warning.
… for the user to be able to choose the reduced electric field below which they want to impose a Maxwellian
…ity for more clarity
…lasmaPhase code cleaning and commenting
… reaction rates from detailed vibrational-translational relaxation and vibrational-vibrational relaxation when vibrational species are involved in the phase
…to two-temperature-plasma reactions to extend the formula when needed
… be able to handle the vibrational energy equation model with V-T relaxation models constant, Castela and Starikovskiy. This works by declaring fictitious vibrational species in the YAML that act as energy reservoir, hence curbing the need for a new PlasmaReactor class.
…ss with some references as to where the model and rate formulas come from and where data for these can be found.
…te example, the computed EEDF was wrong. The algorithm is fixed by these changes
…rors to the user during the run.
…f vibrational fictive species, and in this case they send a warning if X_A(v) / ( X_A(v) + X(A)) > 1 %
… the YAML with the parameter geometric_grid_ratio
…tion linearInterpCrossSectionZeroOutside
…nRate representing detailed vibration which was formerly known as detailed-vv-vt to multi-state-resolved for better readability
Member
|
Hi @Gaetanosaure, thank you for sharing this PR. It looks like there are several interesting things here. Are there some changed input files that need to be committed and included with this PR? You mention a number of changes to the input format, but I don't see any changes to any input files demonstrating them. I assume this is also the reason for some of the CI failures. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are the changes proposed in this pull request. They all focus on the plasma modelling in cantera.
Figure 1 – Example of EEDF calculation on the cantera website. a) current implementation - logarithmic x axis, b) Proposed pull request - logarithmic x axis, c) a) current implementation - linear x axis, d) Proposed pull request – linear x axis.
Corrected the physics of plasma heating. In the current version of the code, intrinsincHeating() returns the Joule effect plus the power of the discharge going into elastic collisions. This is incorrect since the work of the electromagnetic force is the Joule effect. In the proposed pull request, intrinsincHeating() only returns the Joule power.
Entering grid parameters instead of having to enter the grid itself in the YAML: this is much more compact and practical than having to copy-paste the grid by hand, especially when the grid reaches several hundreds of points (see figure 2 for the parameters).
Automatic grid adaptation to the problem faced. This feature allows for the adaptation of the maximum value of the energy grid so that in cases where the user is not sure up to which energies the EEDF should be resolved the code solves it for them (with a slight computational overhead). Both this feature and the previous one are controlled by a block electron-energy-distribution added in the YAML phase node looking roughly like this (depending on the user’s choices):
Figure 2 - New YAML phase node architecture for the EEDF calculation parameters.
The parameters to be chosen by the user are the following:
-> Initial max_energy_level: in eV, the energy level at which the energy grid will be initialized. This number can be led to change if the energy grid adaptation is activated.
-> Initial number of energy grid cells: the number of cells the user wishes to have in the energy grid. This number is not modified by grid adaptation in its current implementation but the name is chosen as is to keep compatibility with a potential later update.
-> Energy_levels_distribution: governs how the energy levels are spaced between themselves. Three options are currently available: Linear, Quadratic and Geometric. For the Geometric case, the user can also choose the geometric factor using the field geometric_grid_ratio.
-> energy_grid_adaptation block: used if the user wishes the grid to be dynamically adapted during the computation. If "enabled" is set to true, the solver checks the amount of decades lost between the head and the tail of the EEDF and compares it to "max_decay_decades" and "min_decay_decades" to decide whether to extend or shrink the current grid by a factor "update_factor" at the next iteration. The maximum amount of iterations allowed to the grid adaptation routine is chosen via "max_iterations".
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 dataset (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, which now typically look like that:
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. Reactions involving electron-collisions now typically look like:
However, depending on the chosen model, all parameters are not required and some default values are applied.
7. Managed to go around the PlasmaReactor by implementing the mean vibrational energy equation model using fictitious species as energy reservoirs. This avoids having to declare a new class for each reactor in which one wishes to use a PlasmaPhase. Typically, this is done by, instead of declaring N2(v1), N2(v2), … N2(v45) , declaring one unique species N2(v), which enthalpy is shifted from that of ground N2 by a chosen energy E_res. This allows to collapse the 45 species equations for the vibrational levels of N2 into one species equation for N2(v). The reactions supposed to produced a vibrational level v_i are then declared as such in the YAML file:
N2 + Electron => Electron + alpha*N2(v) + (1-alpha)*N2,
Where alpha is defined as E_shift_v_i / E_res.
To avoid interfering with chemistry we recommend taking a high value with respect to dissociation energy for instance for E_res (in order to get small N2(v) concentration). To avoid mistakes and to enhance readability it is also recommended to take the same E_res for each vibrational species declared.
The changes proposed here are validated on figure 3 against the test case computed in the two following papers:
Harry Gillingham, Thomas Lesaffre, Nicolas Barléon,
A semi-analytical model for Plasma-Assisted Combustion: Application to NH3-H2-air mixtures,
Combustion and Flame,
Volume 283,
2026,
114528,
ISSN 0010-2180,
https://doi.org/10.1016/j.combustflame.2025.114528.
and
Xingqian Mao, Hongtao Zhong, Ning Liu, Ziyu Wang, Yiguang Ju,
Ignition enhancement and NOx formation of NH3/air mixtures by non-equilibrium plasma discharge,
Combustion and Flame,
Volume 259,
2024,
113140,
ISSN 0010-2180,
https://doi.org/10.1016/j.combustflame.2023.113140.
AI Statement (required)
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.
Closes #