Parachute codeΒΆ

This is the solution to the parachute problems from Skydiving 1 and Skydiving 2. We recommend that you try to solve the problems from both before you have a look at this solution.

We begin by importing pylab and declaring all the parameters we need

Then we define the acceleration as a function of the velocity

We define \(\Delta t = 0.01\), \(T = 60\) and \(n = T/dt\)

We declare two arrays, one for the velocity \(v\) and one for the time \(t\). We want the arrays to be empty and have room for \(\verb!n+1!\) elements, so we use the \(\verb+zeros+\) command.

We use \(\verb+range+\) to create a \(\verb+for+\) loop that that iterates over \(i =0,1,2,..,n\). Inside the loop, we calculate \(\verb!v[i+1]!\) from \(\verb+v[i]+\) by using the formula we found in the tutorial. We update the time with \(\verb!t[i+1] = t[i] + dt!\).

We simulate the deployment of the parachute by updating the drag coefficient, \(C\), and the silhouette area, \(A\).

Finally, we simulate the next 120 seconds after the parachute is completely deployed

We plot the velocity vs. time

We plot the g-forces vs. time

We plot the position vs. time