Jack and Box Simulation

Python, SymPy, Dynamics

Authors: Allen Liu

GitHub: View this Project on GitHub

Project Description

Used Jupyter notebook to perform the calculation about physics model of a jack with a box with some force applied upon the box.

Amination

The result of the jack and box simulation can be shown in the video below

Structure

Rigit Body Transformation

To model the dynamics about the jack and the box, we defined all necessary frames as shown in figure below:

Then we can calculate the transformation between all frames:

Euler-Language Equation Formulation

In this project, to simplify the problem, we model the jack as 4 point mass with same mass, $m_j$, and model the box with the mass $m_b$ and moment of intertia of $I_b$, so that the total kinetic energy and potential energy can be easily obtained by this

\[\begin{align*} I &= \frac{1}{3}ML^2 \\ I^{**} &= \begin{bmatrix} M & 0 & 0 & 0 & 0 & 0 \\ 0 & M & 0 & 0 & 0 & 0 \\ 0 & 0 & M & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & {\cal I} \\ \end{bmatrix} \\ V^b &= \check{\left( g^{-1} \dot{g} \right)} \\ K &= \sum_i{V_{ib}^T I_i^{**}V_i^b} \\ P &= \sum_i{ m_igh_i }\\ L &= K - P \end{align*}\]

Impacts

The impact of the jack and box can be modeled by impact equations

\[\begin{align*} P \big |^{\tau_+}_{\tau_-} &= \lambda \Delta \phi\\ {\cal H} \big |^{\tau_+}_{\tau_-} &= 0 \\ {\cal H} &= \frac{d {\cal L}}{\dot{q}} \cdot \dot{q} - {\cal L} \end{align*}\]

Finally by solving all equations listed above, we can simulate the dynamics of jack wihin a box.