I hate Coulomb and his Scattering

I found no way to ensure conservation in the linear Coulomb operator.
Thus, now two collisions have to be declared if sp_i /= sp_j: collision
ij and collision ji.

This does not conserve energy so please use under your own risk, like
everything else.

Still, I think something is wrong with this implementation and I'm
really tired.
This commit is contained in:
Jorge Gonzalez 2023-07-07 16:36:31 +02:00
commit a26dc04051
2 changed files with 5 additions and 105 deletions

View file

@ -8,10 +8,10 @@ MODULE moduleCoulomb
TYPE:: interactionsCoulomb
CLASS(speciesGeneric), POINTER:: sp_i
CLASS(speciesGeneric), POINTER:: sp_j
REAL(8):: one_plus_massRatio_ij, one_plus_massRatio_ji
REAL(8):: one_plus_massRatio_ij
REAL(8):: lnCoulomb !This can be done a function in the future
REAL(8):: A_i, A_j
REAL(8):: l2_j, l2_i
REAL(8):: A_i
REAL(8):: l2_j
CONTAINS
PROCEDURE, PASS:: init => initInteractionCoulomb
@ -60,7 +60,6 @@ MODULE moduleCoulomb
self%sp_j => species(j)%obj
self%one_plus_massRatio_ij = 1.D0 + (self%sp_i%weight*self%sp_i%m)/(self%sp_j%weight*self%sp_j%m)
self%one_plus_massRatio_ji = 1.D0 + (self%sp_j%weight*self%sp_j%m)/(self%sp_i%weight*self%sp_i%m)
SELECT TYPE(sp => self%sp_i)
TYPE IS (speciesCharged)
@ -85,10 +84,8 @@ MODULE moduleCoulomb
scaleFactor = (n_ref * qe**4) / (eps_0**2 * m_ref**2 * v_ref**3) * ti_ref
self%A_i = 2.D0*Z_i**2*Z_j**2*self%lnCoulomb / self%sp_i%m**2 * scaleFactor
self%A_j = 2.D0*Z_j**2*Z_i**2*self%lnCoulomb / self%sp_j%m**2 * scaleFactor
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