Question 23.7: Determine the position and velocity of a bungee jumper with ...
Determine the position and velocity of a bungee jumper with the following parameters: L = 30 m, g = 9.81 m/s², m = 68.1 kg, c_d = 0.25 kg/m, k = 40 N/m, and γ = 8 N · s/m. Perform the computation from t = 0 to 50 s and assume that the initial conditions are x(0) = υ(0) = 0.
The following M-file can be set up to compute the right-hand sides of the ODEs:
function dydt = bungee(t,y,L,cd,m,k,gamma)
g = 9.81;
cord = 0;
if y(1) > L %determine if the cord exerts a force
cord = k/m*(y(1)−L) + gamma/m*y(2);
end
dydt = [y(2); g − sign(y(2))*cd/m*y(2)^2 − cord];
Notice that the derivatives are returned as a column vector because this is the format required by the MATLAB solvers.
Because these equations are not stiff, we can use ode45 to obtain the solutions and display them on a plot:
>> [t,y] = ode45(@bungee,[0 50],[0 0],[],30,0.25,68.1,40,8);
>> plot(t,−y(:,1),'−',t,y(:,2),':')
>> legend('x (m)','v (m/s)')
As in Fig. 23.11, we have reversed the sign of distance for the plot so that negative distance is in the downward direction. Notice how the simulation captures the jumper’s bouncing motion.
