8.16 inertia -- inertia.py

Compute inertia related quantities of a Formex. This comprises: center of gravity, inertia tensor, principal axes

Currently, these functions work on arrays of nodes, not on Formices! Use func(F,f) to operate on a Formex F.

centroids( X)
Compute the centroids of the points of a set of elements.

X (nelems,nplex,3)

center( X,mass=None)
Compute the center of gravity of an array of points.

mass is an optional array of masses to be atributed to the points. The default is to attribute a mass=1 to all points.

If you also need the inertia tensor, it is more efficient to use the inertia() function.

inertia( X,mass=None)
Compute the inertia tensor of an array of points.

mass is an optional array of masses to be atributed to the points. The default is to attribute a mass=1 to all points.

The result is a tuple of two float arrays: - the center of gravity: shape (3,) - the inertia tensor: shape (6,) with the following values (in order): Ixx, Iyy, Izz, Ixy, Ixz, Iyz

principal( inertia)
Returns the principal values and axes of the inertia tensor.