diff --git a/doc/user-manual/fpakc_UserManual.pdf b/doc/user-manual/fpakc_UserManual.pdf index 66aba8b..0302caf 100644 Binary files a/doc/user-manual/fpakc_UserManual.pdf and b/doc/user-manual/fpakc_UserManual.pdf differ diff --git a/doc/user-manual/fpakc_UserManual.tex b/doc/user-manual/fpakc_UserManual.tex index e5c0d4f..cbd1573 100644 --- a/doc/user-manual/fpakc_UserManual.tex +++ b/doc/user-manual/fpakc_UserManual.tex @@ -177,9 +177,10 @@ \section{Variable Weighting Scheme\label{sec:weightingScheme}} One of the issues in particle simulations, specially for axial-symmetrical cases, is that due to the disparate volume of cells, specially close to the axis, the statistics in some cells is usually poor. To try to fix that, the possibility to include a Variable Weighting Scheme in the simulations is available in \Gls{fpakc}. - These schemes detect when a particle change cells and modify its weight accordingly. - To avoid particles having a larger weight than the rest, particle can be split in multiple particles if weight become too large. + These schemes detect when a particle change cells and split it if necessary to improve statistics. The use of a Variable Weighting Scheme is defined by the user in the input file. + + Beware that this can increase the number of particles in the simulation and increase computational time. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Interaction between species}\label{ssec:collisions} diff --git a/src/modules/solver/moduleSolver.f90 b/src/modules/solver/moduleSolver.f90 index 58a7a71..88f7bf8 100644 --- a/src/modules/solver/moduleSolver.f90 +++ b/src/modules/solver/moduleSolver.f90 @@ -388,11 +388,12 @@ MODULE moduleSolver REAL(8):: fractionVolume, pSplit !If particle changes volume to smaller cell - IF (volOld%volume > volNew%volume) THEN + IF (volOld%volume > volNew%volume .AND. & + part%weight >= part%species%weight*1.0D-1) THEN fractionVolume = volOld%volume/volNew%volume !Calculate probability of splitting particle - pSplit = 1.D0 - DEXP(-fractionVolume) + pSplit = 1.D0 - DEXP(-fractionVolume*1.0D-1) IF (random() < pSplit) THEN !Split particle in two