# Python package to calculate static force and moments of rigid body

Which Python package is suited for solving problems of the following type?

Given the rigid body depicted in violet in the following sketch I would like to do the following:

• Define cartesian coordinate systems $\text{cs0}(x_0, y_0, z_0)$, $\text{cs1}(x_1, y_1, z_1)$ and $\text{cs2}(x_2, y_2, z_2)$.
• Specify forces and moments acting on the center of coordinate systems.
• Calculate forces and moments acting on fixed clamp at origin of $\text{cs0}$.

In order to preserve flexibility and intuitive usage, object orientated syntax would be preferred.
Pseudocode:

...
cs0 = initCartesianCoordinatesystem()
cs1 = cartesianCoordinatesystem( cs0, tranlationX = 0, translationY = 20,\
translationZ = 0, rotationX = 0, rotationY = 0, rotationZ = 0)
cs2 = cartesianCoordinatesystem( cs1, translationX = 10, translationY = 0,\
translationZ = 0, rotationX = 0, rotationY = 135, rotationZ = 0)

body = rigidBody()
body.addForce( cs1, (1, 0, 0) )
body.addMoment( cs1, (0, 0, 1) )
body.addMoment( cs2, (0, 2, 0) )
force, moment = body.staticEquilibrium( cs0 )


Leading to $$force = \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix}_{\text{cs0}}$$ $$moment = \begin{pmatrix} 0 \\ 2+20 \\ 1 \end{pmatrix}_{\text{cs0}}$$

The following features would be helpful:

• Visualization
• Units
• I think that you could use SymPy Mechanics. Nov 20 '17 at 19:32