DEMutilities.postprocessing.analysistools.spatial. countcontacts

Module to compute the number of contacts in a postprocessing step. This makes use of efficient mpacts contact detection, to rapidly resolve contacts.

In order to be able to use this module import it like this:

import DEMutilities.postprocessing.analysistools.spatial.countcontacts
#or assign it to a shorter name
import DEMutilities.postprocessing.analysistools.spatial.countcontacts as cou

CountContactSpheres

class DEMutilities.postprocessing.analysistools.spatial.countcontacts.CountContactSpheres

Bases: object

Count the number of contacts within a particle container of spheres. Overloads the () function so that it can be used in a postprocessing operator.

Arguments for its () function: :param x: list of sphere positions :param r: list of sphere radii :param float keep_distance: (optional) keep_distance for the contact detector. If not specified,

a sane default will be chosen that is sufficiently low to not hinder performance.
CountContactSpheres(name, parent, **kwargs)
add_contact_detector(keep_distance=0)

Adds a contact detector between the spheres, with a given keep_distance

reinit_number_contacts()

Reinitializes the arrays containing ‘number_of_contacts’ and ‘number_of_effective_contacts’ to zero

set_data(x, r)

Clears the current array managers, and re-sets them with given positions and radii

Parameters:
  • x – list of sphere positions
  • r – list of sphere radii

CountContactsWithMesh

class DEMutilities.postprocessing.analysistools.spatial.countcontacts.CountContactsWithMesh(geo=<class 'mpacts.particles.rigidtriangle.RigidTriangle'>)

Bases: object

CountContactsWithMesh(name, parent, **kwargs)
add_contact_detector(keep_distance=0)

Adds a contact detector between the spheres, with a given keep_distance

add_mesh(xmesh, vilmesh, x=(0, 0, 0), q=(1, 0, 0, 0))
reinit_number_contacts()

Reinitializes the arrays containing ‘number_of_contacts’ and ‘number_of_effective_contacts’ to zero

reset(**kwargs)
set_data(x, r)

Clears the current array managers, and re-sets them with given positions and radii

Parameters:
  • x – list of sphere positions
  • r – list of sphere radii