Correction with conservation

Now the method is much better in conserving total energy.
However, still there is an issue with collisions between species of
dispaprate mass.
This commit is contained in:
Jorge Gonzalez 2023-03-06 16:16:17 +01:00
commit 6113ac3305
2 changed files with 59 additions and 47 deletions

View file

@ -10,8 +10,8 @@ MODULE moduleCoulomb
CLASS(speciesGeneric), POINTER:: sp_j
REAL(8):: one_plus_massRatio_ij, one_plus_massRatio_ji
REAL(8):: lnCoulomb !This can be done a function in the future
REAL(8):: A_ij, A_ji
REAL(8):: l_j, l_i
REAL(8):: A_i, A_j
REAL(8):: l2_j, l2_i
CONTAINS
PROCEDURE, PASS:: init => initInteractionCoulomb
@ -79,12 +79,13 @@ MODULE moduleCoulomb
END SELECT
self%lnCoulomb = 12.0
self%A_ij = 8.D0*PI*Z_i**2*Z_j**2*e_ref**4*self%lnCoulomb / self%sp_i%m
self%A_ji = 8.D0*PI*Z_j**2*Z_i**2*e_ref**4*self%lnCoulomb / self%sp_j%m
self%lnCoulomb = 12.0 !Make this function dependent
self%l_j = SQRT(self%sp_j%m / 2.D0) !Missing temperature because it's cell dependent
self%l_i = SQRT(self%sp_i%m / 2.D0) !Missing temperature because it's cell 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
self%l2_j = self%sp_j%m / 2.D0 !Missing temperature because it's cell dependent
self%l2_i = self%sp_i%m / 2.D0 !Missing temperature because it's cell dependent
END SUBROUTINE initInteractionCoulomb