Skip to content

Conversation

@JamesMcClung
Copy link
Collaborator

@JamesMcClung JamesMcClung commented Jan 22, 2026

Major changes:

  • Open particle BCs:
    • Particles that leave through an open boundary are dropped
    • [VB pusher only] Exiting particles deposit extra current
  • Open field BCs:
    • Revived the functions that handle magnetic fields near open BCs (I didn't look at what they do, all I know is that reviving them made certain tests pass)
  • Fixed several problems with BoundaryInjector

Unfortunately, there are gauss errors at open boundaries. I believe they are false positives caused by inaccurate ghost electric fields. I can think of two possible solutions to this:
a) Communicate ghost corners in the ghost region beyond open BCs
b) Move the particle injection/deletion region to inside the domain
For now, I take solution c), ignore the problem and just deal with the erroneous gauss errors.

Elaborating on the inaccurate ghost electric field:
Consider a particle at the top of a patch, moving left. When it exits the patch, it deposits current in the ghost cells on the left, including some ghost cells in the upper-left corner. The ghost currents in that corner don't get communicated, and thus aren't used to time-evolve the ghost electric fields used by the gauss check, leading to a false positive error. Continuity checks are likely similarly affected.

Copy link
Contributor

@germasch germasch left a comment

Choose a reason for hiding this comment

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

I found some minor things to comment on ;)

@JamesMcClung JamesMcClung merged commit 3d58e9e into psc-code:main Feb 3, 2026
6 checks passed
@JamesMcClung JamesMcClung deleted the pr/open-bcs branch February 3, 2026 13:30
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.

2 participants