Option to coarsen the calling of elastic collision operator - #1403
ibranajmudin wants to merge 4 commits into
Conversation
| // default Coulomb log is -1, if < 0 (e.g. not specified), will be computed automatically | ||
| pp.query("CoulombLog", m_CoulombLog); | ||
| // how often the collision operator should be applied - every m_collide_every'th slice | ||
| pp.query("collide_every", m_collide_every); |
There was a problem hiding this comment.
Can you change the name to "collision_period" to make it consistent with the output_period parameter name we use in the diagnostics? Additionally, can you add an entry in the documentation for it here https://github.com/Hi-PACE/hipace/blob/92d3da222f62481e9eacf3207b98aa22fea47b62/docs/source/run/parameters.rst?plain=1#L1457
There was a problem hiding this comment.
Also I would be good to add an assert that it is >= 1.
| BeamParticleContainer& species1, PlasmaParticleContainer& species2, amrex::Real CoulombLog, | ||
| amrex::Real background_density_SI) | ||
| { | ||
| if (islice%collide_every != 0) {return;} |
There was a problem hiding this comment.
For Beam Plasma collisions this is a bit tricky. Beam particles usually stay on the same slice between time steps, so with this some won't get any collisions while others would get them every time step. Maybe we should just not allow the use of the parameter for this case. Or do something like (islice + step) % collision_period == 0 or step % collision_period == 0 . dt would also also need to be rescaled for that.
Adds an option to have an interval (in xi-slices) between calling the elastic collision operator. Multiplies the timestep in the operator by the interval. Works to reduce the number of these computationally heavy operations performed and speed up single timestep (long plasma timescale) simulations. Example
hipace.collisions = <collision_name>
<collision_name>.species = species_1 species_2
<collision_name>.collide_every = 4