First conservative implementation of Coulomb

I am doing a trick in which I ensure that energy is conserved for
Coulomb collisions. This was not happening and what an issue for
different mass ratios. Still, this can cause an issue on getting the
right relaxation rates, still necessary to check it.
This commit is contained in:
Jorge Gonzalez 2023-03-08 16:37:45 +01:00
commit fe94615a27
4 changed files with 26 additions and 13 deletions

View file

@ -54,6 +54,7 @@ MODULE moduleCoulomb
CLASS(interactionsCoulomb), INTENT(out):: self
INTEGER, INTENT(in):: i, j
REAL(8):: Z_i, Z_j
REAL(8):: scaleFactor
self%sp_i => species(i)%obj
self%sp_j => species(j)%obj
@ -81,8 +82,10 @@ MODULE moduleCoulomb
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
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