This README provides an overview of the ME314 Final Project, focusing on the analysis and simulation of a box and dice system. The project involves deriving and solving Euler-Lagrange equations, considering system parameters, and simulating impacts between the box and dice.
Illustrates the box and dice system with corresponding frames. The world frame {W} and box center frame {BC} are at the same location. BS1 and JS1 correspond to the first corner of the box and jack, respectively.
- Mass of box: 20
- Mass of jack: 1
- Length of box: 10
- Length of jack: 1
- Calculate the inertia tensor I for both the box and dice.
- Compute body angular velocities (Vb) for each object using respective world to box center {gw_b} and world to jack center {gw_j} frames.
- Calculate rotational kinetic energy (KE) of the system.
- Compute potential energy (V) using y-values of {gw_bc} and {gw_dc}.
- Generate the Lagrangian L = KE - V.
- Use the Lagrangian to calculate Euler-Lagrange (EL) equations.
- The system configuration q includes x-coordinate, y-coordinate, and theta rotation for each object.
- External forces: Vertical force (Fyb) and horizontal force (Fthetab) on the box.
- Define impacts as corners of the die coming into contact with a side of the box.
- Calculate impacts using transforms.
- Check for impacts along the y-axis of the box corner frame.
- 16 total impacts to check (4 sides of the box for each of the 4 die corners).
- Trajectory generation with impacts.
- Plot and animate the simulation.
- The die bounces repeatedly up and down, gradually decreasing in overall y-value.
- Proper impacts on all sides of the box.
- Applied forces on the box (Fyb and Fthetab) may slightly alter box dynamics.
The simulation successfully captures the dynamics of the box and dice system, considering impacts and external forces. Further analysis may be needed to fine-tune the applied forces on the box for more accurate simulation results.
Feel free to adjust the README to better fit your project structure and specific details.
