Skip to content

Add inelastic power loss to PlasmaPhase #1869

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BangShiuh
Copy link
Contributor

@BangShiuh BangShiuh commented Apr 13, 2025

Changes proposed in this pull request

  1. Added tracking of electron collision reaction indices:
  • Added a new member variable m_electronCollisionReactionIndices to store indices of electron collision reactions
  • Modified the setCollisions() method to clear and populate this list
  1. Changed the addCollision method:
  • Now takes a reaction index j as parameter instead of a reaction pointer
  • Gets the reaction from the kinetics object using the index
  • Stores the reaction index in m_electronCollisionReactionIndices
  • Resizes m_netROPCollisions along with other parameters
  1. Added new methods:
  • updateCollisionRatesOfProgress(): Updates the rates of progress for collision reactions
  • inelasticPowerLoss(): Calculates the inelastic power loss by summing the product of net rates of progress and energy levels
  • Added a member variable m_kin to store a reference to the kinetics object

These changes enable the calculation of inelastic power loss in plasma simulations, which represents energy lost during inelastic collisions between electrons and other species. The implementation caches calculation results to avoid redundant computations when the electron energy distribution hasn't changed.

If applicable, fill in the issue number this pull request is fixing

Closes #

If applicable, provide an example illustrating new features this pull request is introducing

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@BangShiuh BangShiuh marked this pull request as draft April 13, 2025 02:44
Copy link

codecov bot commented Apr 13, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 74.34%. Comparing base (0eb7f94) to head (5767522).

Files with missing lines Patch % Lines
include/cantera/kinetics/Kinetics.h 0.00% 2 Missing ⚠️
src/thermo/PlasmaPhase.cpp 96.42% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1869   +/-   ##
=======================================
  Coverage   74.33%   74.34%           
=======================================
  Files         443      443           
  Lines       55403    55432   +29     
  Branches     9108     9111    +3     
=======================================
+ Hits        41183    41209   +26     
- Misses      11122    11124    +2     
- Partials     3098     3099    +1     

☔ View full report in Codecov by Sentry.
📢 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.

@BangShiuh BangShiuh force-pushed the inelastic-power-loss branch from 8408d7a to 8fc6bff Compare May 20, 2025 17:48
@BangShiuh BangShiuh marked this pull request as ready for review May 20, 2025 17:53
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.

2 participants