Skip to content

Commit

Permalink
New option to disable the pusher for plasma particles (#1203)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Sinn <[email protected]>
Co-authored-by: Maxence Thévenet <[email protected]>
  • Loading branch information
3 people authored Feb 12, 2025
1 parent cf5abf8 commit 4f46952
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/source/run/parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ When both are specified, the per-species value is used.
the domain. However, this will also result in a gap at the domain boundary,
which can lead to noise.

* ``<plasma name> or plasmas.do_push`` (`bool`) optional (default `1`)
When set to `0`, disables the particle pusher.

Beam parameters
---------------

Expand Down
4 changes: 3 additions & 1 deletion src/particles/plasma/MultiPlasma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ MultiPlasma::AdvanceParticles (
int const current_N_level)
{
for (int i=0; i<m_nplasmas; i++) {
AdvancePlasmaParticles(m_all_plasmas[i], fields, gm, temp_slice, lev, current_N_level);
if (m_all_plasmas[i].m_do_push){
AdvancePlasmaParticles(m_all_plasmas[i], fields, gm, temp_slice, lev, current_N_level);
}
}
}

Expand Down
1 change: 1 addition & 0 deletions src/particles/plasma/PlasmaParticleContainer.H
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public:
amrex::Real m_mass = 0; /**< mass of each particle of this species */
amrex::Real m_charge = 0; /**< charge of each particle of this species, per Ion level */
int m_n_subcycles = 1; /**< number of subcycles in the plasma particle push */
bool m_do_push = true; /**< whether the plasma pusher is enabled */

// ionization:

Expand Down
1 change: 1 addition & 0 deletions src/particles/plasma/PlasmaParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ PlasmaParticleContainer::ReadParameters ()
"Both 'fine_ppc' and 'fine_patch(x,y)' must be specified "
"to use the fine plasma patch feature");
queryWithParserAlt(pp, "prevent_centered_particle", m_prevent_centered_particle, pp_alt);
queryWithParser(pp, "do_push", m_do_push);
}

void
Expand Down

0 comments on commit 4f46952

Please sign in to comment.