sarkas.potentials.force_pp.update_0D#

sarkas.potentials.force_pp.update_0D(pos, vel, p_id, p_mass, box_lengths, rc, potential_matrix, force, measure, rdf_hist)[source]#

Updates particles’ accelerations when the cutoff radius \(r_c\) is half the box’s length, \(r_c = L/2\) For no sub-cell. All ptcls within \(r_c = L/2\) participate for force calculation. Cost ~ O(N^2)

Parameters
  • force (func) – Potential and force values.

  • potential_matrix (numpy.ndarray) – Potential parameters.

  • rc (float) – Cut-off radius.

  • box_lengths (numpy.ndarray) – Array of box sides’ length.

  • p_mass (numpy.ndarray) – Mass of each particle.

  • p_id (numpy.ndarray) – Id of each particle

  • pos (numpy.ndarray) – Particles’ positions.

  • measure (bool) – Boolean for rdf calculation.

  • rdf_hist (numpy.ndarray) – Radial Distribution function array.

Returns

  • U_s_r (float) – Short-ranged component of the potential energy of the system.

  • acc_s_r (numpy.ndarray) – Short-ranged component of the acceleration for the particles.

  • virial_species_tensor (numpy.ndarray) – Virial term of each particle.

    Shape = (3, 3, pos.shape[0])