Connections / Contact / Joints#

Module containing joint classes to connect multiple rods together.

Description#

Available Connection/Contact/Joints

FreeJoint

This free joint class is the base class for all joints.

ExternalContact

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

FixedJoint

The fixed joint class restricts the relative movement and rotation between two nodes and elements by applying restoring forces and torques.

HingeJoint

This hinge joint class constrains the relative movement and rotation (only one axis defined by the user) between two nodes and elements (chosen by the user) by applying restoring forces and torques.

SelfContact

This class is modeling self contact of rod.

Compatibility#

Connection / Contact / Joints

Rod

Rigid Body

FreeJoint

ExternalContact

FixedJoint

HingeJoint

SelfContact

Built-in Connection / Contact / Joint#

class elastica.joint.FreeJoint(k, nu)[source]#

This free joint class is the base class for all joints. Free or spherical joints constrains the relative movement between two nodes (chosen by the user) by applying restoring forces. For implementation details, refer to Zhang et al. Nature Communications (2019).

Notes

Every new joint class must be derived from the FreeJoint class.

Attributes:
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

__init__(k, nu)[source]#
Parameters:
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

class elastica.joint.ExternalContact(k, nu, velocity_damping_coefficient=0, friction_coefficient=0)[source]#

This class is for applying contact forces between rod-cylinder and rod-rod. 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]. TODO: Currently friction force is between rod-cylinder, in future implement friction forces between rod-rod.

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.connect(rod, cylinder).using(
...    ExternalContact,
...    k=1e4,
...    nu=10,
...    velocity_damping_coefficient=10,
...    kinetic_friction_coefficient=10,
... )

How to define contact between rod and rod.

>>> simulator.connect(rod, rod).using(
...    ExternalContact,
...    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, friction_coefficient=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.joint.FixedJoint(k, nu, kt, nut=0.0, rest_rotation_matrix=None)[source]#

The fixed joint class restricts the relative movement and rotation between two nodes and elements by applying restoring forces and torques. For implementation details, refer to Zhang et al. Nature Communications (2019).

Notes

Issue #131 : Add constraint in twisting, add rest_rotation_matrix (v0.3.0)

Attributes:
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

kt: float

Rotational stiffness coefficient of the joint.

nut: float

Rotational damping coefficient of the joint.

rest_rotation_matrix: np.array

2D (3,3) array containing data with ‘float’ type. Rest 3x3 rotation matrix from system one to system two at the connected elements. Instead of aligning the directors of both systems directly, a desired rest rotational matrix labeled C_12* is enforced.

__init__(k, nu, kt, nut=0.0, rest_rotation_matrix=None)[source]#
Parameters:
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

kt: float

Rotational stiffness coefficient of the joint.

nut: float = 0.

Rotational damping coefficient of the joint.

rest_rotation_matrix: np.array

2D (3,3) array containing data with ‘float’ type. Rest 3x3 rotation matrix from system one to system two at the connected elements. If provided, the rest rotation matrix is enforced between the two systems throughout the simulation. If not provided, rest_rotation_matrix is initialized to the identity matrix, which means that a restoring torque will be applied to align the directors of both systems directly. (default=None)

class elastica.joint.HingeJoint(k, nu, kt, normal_direction)[source]#

This hinge joint class constrains the relative movement and rotation (only one axis defined by the user) between two nodes and elements (chosen by the user) by applying restoring forces and torques. For implementation details, refer to Zhang et. al. Nature Communications (2019).

Attributes:
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

kt: float

Rotational stiffness coefficient of the joint.

normal_direction: numpy.ndarray

2D (dim, 1) array containing data with ‘float’ type. Constraint rotation direction.

__init__(k, nu, kt, normal_direction)[source]#
Parameters:
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

kt: float

Rotational stiffness coefficient of the joint.

normal_direction: numpy.ndarray

2D (dim, 1) array containing data with ‘float’ type. Constraint rotation direction.

class elastica.joint.SelfContact(k, nu)[source]#

This class is modeling self contact of rod.

__init__(k, nu)[source]#
Parameters:
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.