Machine Dynamics Final Project

For my ME314 class this past spring, we had to simulate a dynamical system in Python. I chose to do one of my prized possessions, the Lego NASA SLS Technic set.

I wrote the code for the entire project, from setting up the Euler-Lagrange Equations, to implementing collision checks and impact updates, to the numerical simulation and the final animation. Guidance and feedback was received from Professor Todd Murphey.

For this simulation, I considered three independent bodies: the Core, the Orion capsule, and the boosters (I analyzed one booster and then mirrored the results about the y-axis for the second booster).

I also considered a couple different phases of flight:

Stage 1: Core, boosters, and Orion all rising together. Boosters and Orion are constrained to stay attached to the core.

Stage 1.5: Boosters stop firing, are still constrained to the core. This stage should last a very short time as it will be used to decide when the boosters detach.

Stage 2: External force on boosters starts again (reasons discussed below). Boosters are constrained to follow parabolic trajectory and turn (the x-position and angle from the vertical of the booster are constrained as a function of the booster’s height). Core and Orion continue rising together.

Stage 2.5: Core stops firing, Orion still attached. This stage should last a very short time as it will be used to decide when Orion detaches. Booster external force also shuts off and they enter free-fall.

Stage 3: Orion continues rising (under its own engine power), boosters and core in free-fall. System is checking for when the core hits the ground.

Stage 4: Core hits the ground. Orion continues rising and boosters continue falling.

The most difficult decisions I made during this project were how to balance the desire to match the Lego set, while also keeping the dynamics interesting (I didn’t want to just be hard-coding a bunch of constraints), and even making something more similar to the real-life operation of the SLS. For example, none of the components in the Lego set fall after they are detached, but I decided to do that anyway. Additionally, the detachment of the Orion capsule in the Lego set is purely a function of how high it is (and the core continues rising after Orion is detached). Instead, I decided to allow the core to drop, and to make the dynamics interesting, told Orion to leave the core behind only after the core started to drop (ie. it isn’t that Orion detaches so the core drops. Instead, it is that the core drops so Orion detaches).

In all, I had a lot of fun working on this project, and plan to continue to improve it as I have time. My current plans are:

  1. Improve the animation

  2. Code the boosters hitting the ground

Keep checking back for updates!