Change in calculation of reduced mass and relative energy
Now reduced mass and relative energy are calculated on the fly per collision.
This commit is contained in:
parent
50705292a7
commit
ae8aa9075e
2 changed files with 6 additions and 8 deletions
|
|
@ -70,7 +70,6 @@ MODULE moduleCollisions
|
|||
CLASS(speciesGeneric), POINTER:: sp_i
|
||||
CLASS(speciesGeneric), POINTER:: sp_j
|
||||
INTEGER:: amount
|
||||
REAL(8):: rMass !Reduced mass
|
||||
TYPE(collisionCont), ALLOCATABLE:: collisions(:)
|
||||
CONTAINS
|
||||
PROCEDURE, PASS:: init => initInteractionBinary
|
||||
|
|
@ -133,7 +132,6 @@ MODULE moduleCollisions
|
|||
ALLOCATE(interactionMatrix(1:nCollPairs))
|
||||
|
||||
interactionMatrix(:)%amount = 0
|
||||
interactionMatrix(:)%rMass = 0.D0
|
||||
|
||||
END SUBROUTINE initInteractionMatrix
|
||||
|
||||
|
|
@ -169,8 +167,6 @@ MODULE moduleCollisions
|
|||
mass_i = species(i)%obj%m
|
||||
mass_j = species(j)%obj%m
|
||||
|
||||
self%rMass = reducedMass(mass_i, mass_j)
|
||||
|
||||
ALLOCATE(self%collisions(1:self%amount))
|
||||
|
||||
END SUBROUTINE initInteractionBinary
|
||||
|
|
@ -234,7 +230,7 @@ MODULE moduleCollisions
|
|||
m_i = part_i%species%m
|
||||
m_j = part_j%species%m
|
||||
!Applies the collision
|
||||
vCM = velocityCM(m_i, part_i%v, m_j, part_j%v)
|
||||
vCM = velocityCM(part_i%weight*m_i, part_i%v, part_j%weight*m_j, part_j%v)
|
||||
vp = vRel*randomDirectionVHS()
|
||||
|
||||
!Assign velocities to particles
|
||||
|
|
@ -311,7 +307,7 @@ MODULE moduleCollisions
|
|||
REAL(8), DIMENSION(1:3):: vChange
|
||||
TYPE(particle), POINTER:: newElectron
|
||||
|
||||
rMass = reducedMass(part_i%species%m, part_j%species%m)
|
||||
rMass = reducedMass(part_i%weight*part_i%species%m, part_j%weight*part_j%species%m)
|
||||
eRel = rMass*vRel**2
|
||||
!Relative energy must be higher than threshold
|
||||
IF (eRel > self%eThreshold) THEN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue