ComputationalRadiationPhysics / particle_reduction

5 stars 3 forks source link

Implement some thinning methods #4

Open KseniaBastrakova opened 5 years ago

KseniaBastrakova commented 5 years ago

1) Leveling thinning: At the beginning, this method calculates the average weight of particulates Wavg(x) . Then if the particle weight Wi(x) is less than coeff Wavg then this particle with probability Wi /(coeff Wavg) stays in the ensemble with a new weight coeff Wavg Thus, the procedure gets rid of particles with low weight. The procedure preserves the distribution functions, but leads to local and global deviations from the laws of conservation of charge, energy, and momentum.

2) NumberConservative thinning In this method, the choice of K particles with repetition occurs, and the choice of a single particle occurs with probability Wi /W , where W -- sum particles weight. After this, particles that have not been selected once are removed from the ensemble, while the rest receive new weights. kiW/K, where ki -- the amount of deposition in the procedure for choosing a given particle. However, it does not save other invariants, such as total energy.

3) EnergyConservative thinning there is a selection of K particles with repetition, while the choice of a single particle occurs with probability ei Wi/E. Where E is the total energy of the particles, and ei - energy of a current particle. After this, particles that have not been selected once are removed from the ensemble, while the rest get new weights ki E/ (K * ei) The method saves distribution functions and total energy of all macroparticles.

4) MergeAverage First there is a clustering of particles using the k-means algorithm. After that, within each obtained cluster, instead of all particles belonging to it in the ensemble, a particle with an average value of coordinates and momentum is added, and the weight of this particle is equal to the sum of weights of all particles in this cluster.