No progress in fixing Coulomb collisions with mass ratio

I am starting to think that the only fix is to reduce the time step, but
that is too harsh.
This commit is contained in:
Jorge Gonzalez 2023-03-07 10:10:54 +01:00
commit f8af7a8dae
2 changed files with 22 additions and 14 deletions

View file

@ -978,6 +978,7 @@ MODULE moduleMesh
REAL(8):: rnd
!$OMP SINGLE
DO e = 1, self%numCells
cell => self%cells(e)%obj
cellNodes = cell%getNodes(cell%nNodes)
@ -1016,6 +1017,7 @@ MODULE moduleMesh
lW = l * normW
AW = coulombMatrix(k)%A_i/normW
delta_par = -coulombMatrix(k)%A_i*coulombMatrix(k)%one_plus_massRatio_ij*density*l2*G(lW)
delta_par_square = AW*density*G(lW)
@ -1050,6 +1052,7 @@ MODULE moduleMesh
IF (i /= j) THEN
!Do scattering of particles from species_j due to species i
!Compute background properties of species_i
DO n = 1, cell%nNodes
node => self%nodes(cellNodes(n))%obj
CALL calculateOutput(node%output(i), output, node%v, coulombMatrix(k)%sp_i)
@ -1059,6 +1062,7 @@ MODULE moduleMesh
END DO
!Loop over particles of species_j
partTemp => cell%listPart_in(j)%head
DO WHILE(ASSOCIATED(partTemp))
density = cell%gatherF(partTemp%part%Xi, cell%nNodes, densityNodes)
@ -1094,7 +1098,10 @@ MODULE moduleMesh
e3 = crossProduct(e2, e1)
e3 = normalize(e3)
!Random number for direction
rnd = PI2*random()
!Change particle velocity
partTemp%part%v = partTemp%part%v + dW(1)*e1 + dW(2)*(COS(rnd)*e2 + &
SIN(rnd)*e3)
@ -1107,6 +1114,7 @@ MODULE moduleMesh
END DO
END DO
!$OMP END SINGLE
END SUBROUTINE doCoulomb

View file

@ -79,7 +79,7 @@ MODULE moduleCoulomb
END SELECT
self%lnCoulomb = 12.0 !Make this function dependent
self%lnCoulomb = 10.0 !Make this function dependent
self%A_i = 8.D0*PI*Z_i**2*Z_j**2*self%lnCoulomb / self%sp_i%m**2
self%A_j = 8.D0*PI*Z_j**2*Z_i**2*self%lnCoulomb / self%sp_j%m**2