Question
Given time increments, initial condition, a vector of parameters (mass and drag coefficient), and right-hand-side force (gravity coefficient), compute values of bungee jumper velocity (downward
Given time increments, initial condition, a vector of parameters (mass and drag coefficient), and right-hand-side force (gravity coefficient), compute values of bungee jumper velocity (downward speed) at the given times, accounting for the discontinuity in drag coefficient when the parachute opens.
For the second-order drag model (Eq. 1.8), compute the velocity of a free-falling parachutist using Eulers method for the case where m=80 kg and c_d=0.25 kg/m. Perform the calculation from t=0 to 20 sec with a step size of 1 sec. Use an initial condition that the parachutist has an upward velocity of 20 m/s at t=0. At t =10 sec, assume that the chute is instantaneously deployed so that the drag coefficient jumps to 1.5 kg/m [at 10 seconds].
Ihave included what I have wrirten. It does not seem to like how I set up the velocity equation. I says the matrix dimensions must agree. Any help would be appreciated.
CODE:
clc g=9.8; m=80; dt=1; t0=1; tf=20; c_d0=.25; c_d1=1.5; t = 0:1:20; % The time values (s) n = numel(t); % The number of time values v = zeros(1,n); % The velocity values (m/s) v(1) = 20; T=t0:dt:tf;
for i=1:(length(T)-1) if i>=10 v(i+t) = v(i)+(g-(c_d0/m).*(v*abs(v))).*t; else v(i+t) = v(i)+(g-(c_d1/m).*(v.*abs(v))).*t; end end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started