Contact#
Numba implementation module containing contact between rods and rigid bodies and other rods rigid bodies or surfaces.
Description#
Available Contact Classes
This is the base class for contact applied between rod-like objects and allowed contact objects. |
|
This class is for applying contact forces between rod-rod. |
|
This class is for applying contact forces between rod-cylinder. |
|
This class is modeling self contact of rod. |
|
This class is for applying contact forces between rod-sphere. |
|
This class is for applying contact forces between rod-plane. |
|
This class is for applying contact forces between rod-plane with friction. |
|
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.
- apply_contact(system_one, system_two)[source]#
Apply contact forces and torques between SystemType object and AllowedContactType object.
In NoContact class, this routine simply passes.
- Return type:
None
- Parameters:
- system_oneSystemType
Rod or rigid-body object
- system_twoAllowedContactType
Rod, rigid-body, or surface object
- 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, ... )
- 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)[source]#
Apply contact forces and torques between SystemType object and AllowedContactType object.
In NoContact class, this routine simply passes.
- Return type:
None
- Parameters:
- system_oneSystemType
Rod or rigid-body object
- system_twoAllowedContactType
Rod, rigid-body, or surface object
- 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, ... )
- 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.
- 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, ... )
- 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.
- 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, ... )