Question: python original code: # Initialize variables h = 3000 # initial height: m v = 0 # initial velocoty: m/s g = -9.81 # gravity:

python

original code:

# Initialize variables h = 3000 # initial height: m v = 0 # initial velocoty: m/s g = -9.81 # gravity: m/s^2 t = 0 # initial time tmax = 30 # Falling time dt = 1 # timestep

# Initialize lists for storing data height = [] velocity = [] time = []

# Append initial values to lists height.append(h) velocity.append(v) time.append(t)

# Create a function to compute derivaives of velocity and height def derivs(v,g): # derivative of height is velocity dhdt = v # derivative of velocity is acceleration (gravity in this e.g.) dvdt = g return dhdt, dvdt

# Create a time loop that will update the skydiver over time # Use a while loop that will loop until t > tmax while t <= tmax: # Compute derivatives for use in update equations dhdt, dvdt = derivs(v,g) # Update Equations h_new = h + dhdt*dt # new height v_new = v + dvdt*dt # new velocity # Append values to height and velocity lists height.append(h_new) velocity.append(v_new) # Update old height/velocity with new height h = h_new v = v_new # Increase time t += dt # t = t + dt # Update time list time.append(t) # Plotting height/velocity vs time plt.figure(1) plt.plot(time, height, color = 'green') plt.xlabel('Time [seconds]') plt.ylabel('Height [meters]') plt.grid()

plt.figure(2) plt.plot(time, velocity, color = 'purple') plt.xlabel('Time [seconds]') plt.ylabel('Veloctiy [meters/second]') plt.grid()

Adding air resistance to the model

As we can see from our plots above, without air resistance the skydiver continously accelerates under the force of gravity. If they start high enough, they could reach very high velocities! In reality, we know that this isn't how skydiving works, eventually the skydiver reaches what we call terminal velocity, which is the point at which the acceleration due to gravity is balanced by the acceleration due to air resistance, or drag, which opposes the motion of the skydiver.

The acceleration due to friction with the air acts to slow down skydiver and is dependent on the skydiver's velocity. It is defined to be:

air=0.65 ||aair=0.65 A v |v|m

In this equation, A is the projected area of the skydiver, |||v| is the absolute value of the velocity, and the m is the mass of skydiver. When computing the total acceleration of the skydiver, we need to combine both the acceleration due to gravity and the acceleration due to air resistance. That makes the total acceleration:

total=gravity+airatotal=agravity+aair

As before, you are going to model the free-fall of the sky-diver for a total of 30 seconds, but now you need to take into account air resistance. You can assume that the projected area of the skydiver is 0.4 m22 and their mass is 80 kg. Also assume that the skydiver is jumping out of a helicopter at an initial height of 2000 m and use a new timestep size of 0.1 seconds.

Ideally, you should find that eventually the skydiver approaches a constant velocity when the acceleration due to gravity is matched by the acceleration due to friction.

Modify the above code (don't write new code from scratch!) to account for air resistance in the model while using the provided area of the skydiver and the new initial height. Make sure that your new plots make sense. You should see that the velocity flattens out to a constant value, the terminal velocity. If you can, create a list to store the acceleration and make a plot of that as well.

Thank you in advance for your help!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!