Trying to fix weighting scheme
Now particles can be split to increase statistics when they enter a smaller cell. However, this only has an effect for collisions. Still, I have to rethink a lot about this feature.
This commit is contained in:
parent
7c2c4ae884
commit
905d3f94a5
3 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue