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 paper. 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, cylidner).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,
... )
__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)[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).

Attributes
k: float

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

kt: float

Rotational stiffness coefficient of the joint.

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

Stiffness coefficient of the joint.

nu: float

Damping coefficient of the joint.

kt: float

Rotational stiffness coefficient of the joint.

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.