You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Overview
This PR changes the definition of the stair-case approximation of the EB
(used in the Yee solver), so that the actual EB boundary (where e.g.
particles are removed from the simulation) is **inside** the
stair-case-approximated boundary - as opposed to the definition used in
the current `development` branch, for which the actual EB is **outside**
the stair-case-approximated boundary.
This ensures that the algorithm remains charge conserving, when charged
particles are absorbed or emitted by the embedded boundary, **for
particle shape of order 1**. (Higher-order particle shapes will be
addressed in #5209.) As illustrated in the figure below (and as
discussed in [this
paper](https://www.researchgate.net/publication/318642364_Charge_Conserving_Emission_from_Conformal_Boundaries_in_Electromagnetic_PIC_simulations)),
this is fundamentally because the particle does not deposit any charge
in the valid cells, at the time when it is removed/emitted.
<img width="608" alt="Screenshot 2025-01-12 at 8 56 17 AM"
src="https://github.com/user-attachments/assets/bd803ef0-faf8-4ea5-973b-240c15b2ba4b"
/>
(The black crosses show the locations where the electric field is not
updated, and thus usually remains equal to 0. The red dots show the
locations where the particle deposits charge, for particle shape of
order 1.)
The better behavior with respect to charge-conservation can be observed
in the following animations, which show two particles of opposing charge
separating and going into the embedded boundary. (Note that a static
error in `divE` remains at the position where the particle was absorbed,
with the `development` branch. The propagating errors in `divE` are
expected: they are due to electromagnetic waves reflecting on the EB.)
- **development branch**

- **this PR**

Input script:
[inputs.txt](https://github.com/user-attachments/files/18428873/inputs.txt)
Analysis script:
[openPMD-visualization.ipynb.txt](https://github.com/user-attachments/files/18428878/openPMD-visualization.ipynb.txt)
(An automated tests using a similar configuration has been added in a
separate, follow-up PR: #5562)
Note that, as part of this PR, the above new definition has been adopted
for all the finite-difference solvers, except for the ECT solver (which
uses a cut-cell representation instead of a stair-case representation).
# Implementation
This PR uses the changes of #5574. It still uses `MarkUpdateECellsECT`
and `MarkUpdateBCellsECT` for the ECT sover - which preserve the
previous behavior of the embedded boundary for this solver, but now uses
`MarkUpdateCellsStairCase` for the other FDTD solvers - which introduce
the above-mentioned new stair-case definition.
0 commit comments