Overview

This was my final project on the Machine Dynamics course and I chose to simualate a two-body dynamic system - a jack is shaken inside a cup using Lagrangian Mechanics and Impact Dynamics. This scenario invovles interaction between two rigid bodies with the cup experiencing external orces and torques that cause the jack to bounce within it. The entire system is subjected to gravity

System Description

I began by defining the generalized coordinates of the system. These included the x and y positions and orientations (angles) of both the cup and the jack.

Picar Assembly
Picar Assembly

Coordinate Frame Definition

The complete state of the system was represented using a 6-dimensional vector. Using these coordinates, I derived the Lagrangian of the system by calculating the total kinetic and potential energy. From there, I applied the Euler-Lagrange equations to obtain the equations of motion.

Impact Evaulation

This was a key part of the project

Symbolic computations were done using the sympy library to solve the equations of motions and get position and velocity trajectories.

Observations and Improvements

Results

Picar Assembly
Picar Assembly

Jack Bouncing in a Cup