sarkas.potentials.moliere.moliere_force#

sarkas.potentials.moliere.moliere_force(r, pot_matrix)[source]#

Numba’d function to calculate the PP force between particles using the Moliere Potential.

Parameters
  • r (float) – Particles’ distance.

  • pot_matrix (numpy.ndarray) – Moliere potential parameters.

    Shape = (7, sarkas.core.Parameters.num_species, sarkas.core.Parameters.num_species)

Returns

  • U (float) – Potential.

  • force (float) – Force between two particles.

Examples

>>> from scipy.constants import epsilon_0, pi, elementary_charge
>>> from numpy import array, zeros
>>> charge = 4.0 * elementary_charge  # = 4e [C] mks units
>>> coul_const = 1.0/ (4.0 * pi * epsilon_0)
>>> screening_charges = array([0.5, -0.5, 1.0])
>>> screening_lengths = array([5.99988000e-11, 1.47732309e-11, 1.47732309e-11])  # [m]
>>> params_len = len(screening_lengths)
>>> pot_mat = zeros(2 * params_len + 1)
>>> pot_mat[0] = coul_const * charge**2
>>> pot_mat[1: params_len + 1] = screening_charges.copy()
>>> pot_mat[params_len + 1:] = 1./screening_lengths
>>> r = 6.629755e-10  # [m] particles distance
>>> moliere_force(r, pot_mat)
(4.423663010052846e-23, 6.672438139145769e-14)