Question: Chapra Problem 1.7 . For the second-order drag model (Eq. 1.8), compute the velocity of a free-falling parachutist using Eulers method for the case where
Chapra Problem 1.7. 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].
My code:

But when I test it I keep getting errors that say "v has an incorrect value" and that the "answer is incorrect for negative initial velocity, before parachute opens", however one of the five tests do work.
MATLAB Documentation 1 function v - Chapra_Problem_1p7(x,p,g) 2 % Usage: v Chapra-Problem-1p7(x,p,g) = 3% 4 % Compute velocity of falling mass using Euler's method 5% 6 %% Input 7% x: independent variables, vector of time values and initial velocity parameters, vector [m, c_de, c d1] gravitational constant for right-hand-side gravity force (scalar) 9% p: 10% g: 11 % 12 %% Output 13% v: 14 15 %% Parse input var ables 16 dt = x( 1 ) ; % time Increment, delta-t velocity vector (downward speeds at each time) 18 t1 -x(3); % time when parachute deploys 19 tf -x(4); % final time 20 ve -x(5); % initial velocity at time t=t 21 m p(1); % jumper's mass 22 C-d@-p(2); % drag coefficient for jumper alone 23 c-d1-p(3); % drag coefficient for jumper with parachute 24 25 %% Insert your code here 26 t-t0:dt:tf 27 for i-1:length(t)-1 28 29 30 31 32 if t (1)-t elseif t (1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
