Rigid Body#

type

Cylinder

Sphere

class elastica.rigidbody.rigid_body.RigidBodyBase[source]#

Base class for rigid body classes.

Notes

All rigid body class should inherit this base class.

compute_internal_forces_and_torques(time)[source]#

For rigid body, there is no internal forces and torques

Return type:

None

compute_position_center_of_mass()[source]#

Return positional center of mass

Return type:

ndarray[tuple[int, ...], dtype[float64]]

compute_translational_energy()[source]#

Return translational energy

Return type:

ndarray[tuple[int, ...], dtype[float64]]

compute_rotational_energy()[source]#

Return rotational energy

Return type:

ndarray[tuple[int, ...], dtype[float64]]

Implementation of a rigid body cylinder.

class elastica.rigidbody.cylinder.Cylinder(start, direction, normal, base_length, base_radius, density)[source]#

Implementation of a sphere rigid body.

class elastica.rigidbody.sphere.Sphere(center, base_radius, density)[source]#