Contact#
Numba implementation module containing contact between rods and rigid bodies and other rods rigid bodies or surfaces.
Description#
Note
(CAUTION) The contact is recommended to be added at last. This is because contact forces often includes friction that may depend on other normal forces and constraints to be calculated accurately. Be careful on the order of adding interactions.
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, time=np.float64(0.0))[source]#
Apply contact forces and torques between two system objects. In NoContact class, this routine simply passes.
- Return type:
None- Parameters:
- system_oneSystemType
First system object.
- system_twoSystemType
Second system object.
- timefloat
The time of simulation.
- 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 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.
- 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].
[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
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, ... )
- __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, ... )
- __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]#
Compute 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_oneCylinder
Cylinder object.
- system_twoPlane
Plane object.
- timefloat
The time of simulation.