Fix an issue in assigning cells in ionization Boundary
This assigns the correct random cell when a particle is created from the ionization boundary. Also, the number of possible ionizations is reduced by one if there is a suscesful ionization. This has no impact on the results.
This commit is contained in:
parent
d36b2db342
commit
a0dfc55a69
1 changed files with 11 additions and 2 deletions
|
|
@ -156,8 +156,14 @@ MODULE moduleMeshBoundary
|
|||
newElectron%r = edge%randPos()
|
||||
newIon%r = newElectron%r
|
||||
|
||||
newElectron%cell = part%cell
|
||||
newIon%cell = part%cell
|
||||
IF (ASSOCIATED(edge%e1)) THEN
|
||||
newElectron%cell = edge%e1%n
|
||||
|
||||
ELSEIF (ASSOCIATED(edge%e2)) THEN
|
||||
newElectron%cell = edge%e2%n
|
||||
|
||||
END IF
|
||||
newIon%cell = newElectron%cell
|
||||
|
||||
newElectron%Xi = mesh%cells(part%cell)%obj%phy2log(newElectron%r)
|
||||
newIon%Xi = newElectron%Xi
|
||||
|
|
@ -178,6 +184,9 @@ MODULE moduleMeshBoundary
|
|||
eRel = eRel - bound%eThreshold
|
||||
vRel = 2.D0*DSQRT(eRel)/mRel
|
||||
|
||||
!Reduce number of possible ionizations
|
||||
nIonizations = nIonizations - 1
|
||||
|
||||
END IF
|
||||
|
||||
END DO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue