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.
This PR contains several improvements to the quasistatic wakefield model. It greatly improves the stability, specially for strongly non-linear wakes where a sharp blowout peak is present. It also allows for plasma columns of finite width, different from that of the simulation box.
Changes
Plasma column can have a different radial extent than simulation box.
Set
edge_order=2
when calculatingnabla_a2
.Implement new method for computing psi and derivatives at plasma particles. It is now done by interpolating between neighboring values. This ensures that
dr_psi=0
in a uniform plasma. The boundary conditions have also been reformulated. They are now more robust and allow for plasma columns of finite width.The minimum value of
psi
is now limited to -0.9. Also, the amplitude of dxi_psi and b_theta_bar is now limited to 3. This improves the stability near the blowout peak.Plasma particles leaving the simulation box are no longer removed.
Plasma particles with too much momentum will be reset to a rest state. This avoids having to remove highly relativistic particles and improves the stability near the blowout peak.
Fixed an inconsistency in the derivatives of particles crossing the axis during the Runge-Kutta push. The sign of the derivatives in now inverted.
Fixed a bug in
update_gamma_and_pz
, where a2 was (incorrectly) being divided by 2.Implemented new method for computing b_theta at plasma particles. It is now also based on interpolation and it is more accurate than before.
Fixed a bug when returning a_i and b_i. The wrong value was being removed due to not taking the particle sorting into account.
Sample images:
Strong blowout:

Finite-width plasma column:
