Skip to content

Conversation

@EZoni
Copy link
Member

@EZoni EZoni commented Oct 17, 2025

Overview

Follow up on #5955 and implement the electromagnetic part of the energy-preserving PIC-MCC algorithm described in (Vay, Jean-Luc, et al. "Energy-preserving coupling of explicit particle-in-cell with Monte Carlo collisions." Physical Review E 111.2 (2025): 025306) (i.e., explicit PIC coupled with Monte Carlo collisions).

Notes

To do

  • Add a new electromagnetic test.
  • Implement the new algorithm.
  • Test & debug:
    • Fix GPU issue that seems to be resolved by passing communicate=1 to AddRealComp.
    • Fix charge deposition (deposit old $\rho$ in the first half, new $\rho$ in the second half).
    • Check tests that fail and reset the checksums if needed.

@EZoni EZoni added component: core Core WarpX functionality component: collisions Anything related to particle collisions labels Oct 17, 2025
@EZoni
Copy link
Member Author

EZoni commented Oct 17, 2025

Basically the goal here will be to have the analysis of the test test_2d_collisions_split_position_push_electromagnetic pass without breaking any other tests, with respect to this CI reference starting point: https://dev.azure.com/BLAST-WarpX/WarpX/_build/results?buildId=2275.

@EZoni
Copy link
Member Author

EZoni commented Oct 18, 2025

Discussed with @oshapoval offline:

  • The momenta that are averaged should be the momentum at the end of the first position half-push and the momentum after the collisions.
  • The relative time used for the current deposition should not need any correction.

@EZoni EZoni requested review from RemiLehe and oshapoval October 21, 2025 23:47
@EZoni
Copy link
Member Author

EZoni commented Oct 21, 2025

@RemiLehe @oshapoval

I start requesting your review in case you have comments on the early draft. I don't think it's working correctly yet.

Comment on lines 515 to 516
// communicate particle data
mypc->Redistribute();
Copy link
Contributor

@oshapoval oshapoval Oct 24, 2025

Choose a reason for hiding this comment

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

For better performance, reproduce the logic in HandleParticlesAtBoundaries to ensure only local communication.

Copy link
Member Author

@EZoni EZoni Nov 25, 2025

Choose a reason for hiding this comment

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

Maybe this can be a follow-up optimization PR, since I think it'd require some refactoring of the code in HandleParticlesAtBoundaries. We should reference the first comment of this thread into a new issue to track this when the PR is merged.

@EZoni EZoni force-pushed the pic_mcc_electromagnetic branch from 74c907f to d16803f Compare October 24, 2025 23:05
@atmyers

This comment was marked as outdated.

@EZoni

This comment was marked as outdated.

@EZoni

This comment was marked as outdated.

@EZoni

This comment was marked as outdated.

@EZoni

This comment was marked as outdated.

@EZoni

This comment was marked as outdated.

@EZoni

This comment was marked as outdated.

@EZoni

This comment was marked as resolved.

@EZoni EZoni force-pushed the pic_mcc_electromagnetic branch from 8f543ed to a08f073 Compare November 21, 2025 23:21
@EZoni EZoni force-pushed the pic_mcc_electromagnetic branch from a08f073 to 277fee4 Compare November 22, 2025 00:34
@EZoni

This comment was marked as resolved.

@EZoni EZoni changed the title [WIP] Energy-preserving explicit PIC-MCC algorithm: electromagnetic Energy-preserving explicit PIC-MCC algorithm: electromagnetic Nov 25, 2025
@RemiLehe RemiLehe self-assigned this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: collisions Anything related to particle collisions component: core Core WarpX functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Energy-Preserving PIC-MCC Loop

6 participants