The equations of plasmacoll.population, declared on the code that implements them and checked by the tests.
Merge markers until about target remain, conserving weight, momentum and energy.
- moments
- W=i∑wi,u=W1i∑wivi,s2=max(W1i∑wi∣vi∣2−∣u∣2, 0)
- merged
- two markers of weight 2W at u±sn^, n^ isotropic, at the mean position
- conservation
- 2W[(u+sn^)+(u−sn^)]=Wu,2W⋅2(∣u∣2+s2)=i∑wi∣vi∣2
- groups
- runs of max(3,⌈Ntarget2N⌉) markers
- Assumes
- groups within a spatial cell (
cell_size) and velocity octant, sorted by speed; runs of three or more merge into two - weight, momentum and kinetic energy exact; the result can exceed the target when the cells hold few markers; on the host
- References
Split every marker heavier than max_weight into equal lighter copies.
- split
- w→k copies of weight kw,k=⌈wmaxw⌉
- Assumes
- at the same position and velocity: weight, momentum and energy exact