Contact#

Numba implementation module containing contact between rods and rigid bodies and other rods rigid bodies or surfaces.

Description#

Available Contact Classes

NoContact

This is the base class for contact applied between rod-like objects and allowed contact objects.

RodRodContact

This class is for applying contact forces between rod-rod.

RodCylinderContact

This class is for applying contact forces between rod-cylinder.

RodSelfContact

This class is modeling self contact of rod.

RodSphereContact

This class is for applying contact forces between rod-sphere.

RodPlaneContact

This class is for applying contact forces between rod-plane.

RodPlaneContactWithAnisotropicFriction

This class is for applying contact forces between rod-plane with friction.

CylinderPlaneContact

This class is for applying contact forces between cylinder-plane.

Built-in Contact Classes#

class elastica.contact_forces.NoContact[source]#

This is the base class for contact applied between rod-like objects and allowed contact objects.

Notes

Every new contact class must be derived from NoContact class.

__init__()[source]#

NoContact class does not need any input parameters.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

Apply contact forces and torques between two system object..

In NoContact class, this routine simply passes.

Return type:

None

Parameters:
system_one
system_two
class elastica.contact_forces.RodRodContact(k, nu)[source]#

This class is for applying contact forces between rod-rod.

Examples

How to define contact between rod and rod.

>>> simulator.detect_contact_between(first_rod, second_rod).using(
...    RodRodContact,
...    k=1e4,
...    nu=10,
... )
__init__(k, nu)[source]#
Parameters:
kfloat

Contact spring constant.

nufloat

Contact damping constant.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

Apply contact forces and torques between RodType object and RodType object.

Return type:

None

Parameters:
system_one: RodType
system_two: RodType
class elastica.contact_forces.RodCylinderContact(k, nu, velocity_damping_coefficient=0.0, friction_coefficient=0.0)[source]#

This class is for applying contact forces between rod-cylinder. If you are want to apply contact forces between rod and cylinder, first system is always rod and second system is always cylinder. In addition to the contact forces, user can define apply friction forces between rod and cylinder that are in contact. For details on friction model refer to this [1].

Notes

The velocity_damping_coefficient is set to a high value (e.g. 1e4) to minimize slip and simulate stiction (static friction), while friction_coefficient corresponds to the Coulombic friction coefficient.

Examples

How to define contact between rod and cylinder.

>>> simulator.detect_contact_between(rod, cylinder).using(
...    RodCylinderContact,
...    k=1e4,
...    nu=10,
... )
[1]

Preclik T., Popa Constantin., Rude U., Regularizing a Time-Stepping Method for Rigid Multibody Dynamics, Multibody Dynamics 2011, ECCOMAS. URL: https://www10.cs.fau.de/publications/papers/2011/Preclik_Multibody_Ext_Abstr.pdf

__init__(k, nu, velocity_damping_coefficient=0.0, friction_coefficient=0.0)[source]#
Parameters:
kfloat

Contact spring constant.

nufloat

Contact damping constant.

velocity_damping_coefficientfloat

Velocity damping coefficient between rigid-body and rod contact is used to apply friction force in the slip direction.

friction_coefficientfloat

For Coulombic friction coefficient for rigid-body and rod contact.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

Apply contact forces and torques between two system object..

In NoContact class, this routine simply passes.

Return type:

None

Parameters:
system_one
system_two
class elastica.contact_forces.RodSelfContact(k, nu)[source]#

This class is modeling self contact of rod.

Examples

How to define contact rod self contact.

>>> simulator.detect_contact_between(rod, rod).using(
...    RodSelfContact,
...    k=1e4,
...    nu=10,
... )
__init__(k, nu)[source]#
Parameters:
kfloat

Contact spring constant.

nufloat

Contact damping constant.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

Apply contact forces and torques between RodType object and itself.

Return type:

None

Parameters:
system_one: RodType
system_two: RodType
class elastica.contact_forces.RodSphereContact(k, nu, velocity_damping_coefficient=0.0, friction_coefficient=0.0)[source]#

This class is for applying contact forces between rod-sphere. First system is always rod and second system is always sphere. In addition to the contact forces, user can define apply friction forces between rod and sphere that are in contact. For details on friction model refer to this [1].

Notes

The velocity_damping_coefficient is set to a high value (e.g. 1e4) to minimize slip and simulate stiction (static friction), while friction_coefficient corresponds to the Coulombic friction coefficient.

Examples

How to define contact between rod and sphere.

>>> simulator.detect_contact_between(rod, sphere).using(
...    RodSphereContact,
...    k=1e4,
...    nu=10,
... )
[1]

Preclik T., Popa Constantin., Rude U., Regularizing a Time-Stepping Method for Rigid Multibody Dynamics, Multibody Dynamics 2011, ECCOMAS. URL: https://www10.cs.fau.de/publications/papers/2011/Preclik_Multibody_Ext_Abstr.pdf

__init__(k, nu, velocity_damping_coefficient=0.0, friction_coefficient=0.0)[source]#
Parameters:
kfloat

Contact spring constant.

nufloat

Contact damping constant.

velocity_damping_coefficientfloat

Velocity damping coefficient between rigid-body and rod contact is used to apply friction force in the slip direction.

friction_coefficientfloat

For Coulombic friction coefficient for rigid-body and rod contact.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

Apply contact forces and torques between RodType object and Sphere object.

Return type:

None

Parameters:
system_one: RodType
system_two: Sphere
class elastica.contact_forces.RodPlaneContact(k, nu)[source]#

This class is for applying contact forces between rod-plane. First system is always rod and second system is always plane. For more details regarding the contact module refer to Eqn 4.8 of Gazzola et al. RSoS (2018).

Examples

How to define contact between rod and plane.

>>> simulator.detect_contact_between(rod, plane).using(
...    RodPlaneContact,
...    k=1e4,
...    nu=10,
... )
__init__(k, nu)[source]#
Parameters:
kfloat

Contact spring constant.

nufloat

Contact damping constant.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

Apply contact forces and torques between RodType object and Plane object.

Return type:

None

Parameters:
system_one: object

Rod object.

system_two: object

Plane object.

class elastica.contact_forces.RodPlaneContactWithAnisotropicFriction(k, nu, slip_velocity_tol, static_mu_array, kinetic_mu_array)[source]#

This class is for applying contact forces between rod-plane with friction. First system is always rod and second system is always plane. For more details regarding the contact module refer to Eqn 4.8 of Gazzola et al. RSoS (2018).

Examples

How to define contact between rod and plane.

>>> simulator.detect_contact_between(rod, plane).using(
...    RodPlaneContactWithAnisotropicFriction,
...    k=1e4,
...    nu=10,
...    slip_velocity_tol = 1e-4,
...    static_mu_array = np.array([0.0,0.0,0.0]),
...    kinetic_mu_array = np.array([1.0,2.0,3.0]),
... )
__init__(k, nu, slip_velocity_tol, static_mu_array, kinetic_mu_array)[source]#
Parameters:
kfloat

Contact spring constant.

nufloat

Contact damping constant.

slip_velocity_tol: float

Velocity tolerance to determine if the element is slipping or not.

static_mu_array: numpy.ndarray

1D (3,) array containing data with ‘float’ type. [forward, backward, sideways] static friction coefficients.

kinetic_mu_array: numpy.ndarray

1D (3,) array containing data with ‘float’ type. [forward, backward, sideways] kinetic friction coefficients.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

Apply contact forces and torques between RodType object and Plane object with anisotropic friction.

Return type:

None

Parameters:
system_one: RodType
system_two: SurfaceType
class elastica.contact_forces.CylinderPlaneContact(k, nu)[source]#

This class is for applying contact forces between cylinder-plane. First system is always cylinder and second system is always plane. For more details regarding the contact module refer to Eqn 4.8 of Gazzola et al. RSoS (2018).

Examples

How to define contact between cylinder and plane.

>>> simulator.detect_contact_between(cylinder, plane).using(
...    CylinderPlaneContact,
...    k=1e4,
...    nu=10,
... )
__init__(k, nu)[source]#
Parameters:
kfloat

Contact spring constant.

nufloat

Contact damping constant.

apply_contact(system_one, system_two, time=np.float64(0.0))[source]#

This function computes the plane force response on the cylinder, in the case of contact. Contact model given in Eqn 4.8 Gazzola et. al. RSoS 2018 paper is used.

Return type:

None

Parameters:
system_one: Cylinder
system_two: SurfaceBase