Assignment No: 1: Statement: Write Down The Matlab Program For Falling Parachutist Case
Assignment No: 1: Statement: Write Down The Matlab Program For Falling Parachutist Case
Statement: Write down the Matlab Program for falling parachutist case.
gm
( c / m )t
v(t ) =is 1 e
Formula for Exact solution
v (t + 1)is= v (t ) + [ g v(t )] t
Formula for Numerical Solution
m
i
The value for gravitational acceleration is 9.8 m/s2, mass of the falling
parachutist is 68.1 kg, and coefficient of drag is 12.5 kg / s. Parachutist is
jumping from hot stationary air balloon. (i.e. v=0, @ t = 0).
Solution:
Program 1:
%This program calculates exact solution
clc;
clear all;
g=9.8; m=68.1; c=12.5; %Define variables
t=0:2:12;
vt=g*m/c*(1-exp(-c*t/m)); %Formulation
ans_tableh={'time' 'velocity'};
for i=1:7 %looping
ans_table(i,1)=t(i);
ans_table(i,2)=vt(i);
end
disp(ans_tableh); %Display
disp(ans_table);
Output for Program 1:
'time'
0
2.0000
4.0000
6.0000
8.0000
10.0000
'velocity'
0
16.4050
27.7693
35.6418
41.0953
44.8731
Akshay Walimbe
T 3853
12.0000 47.4902
Program 2:
%Program to calculate Numerical Solutions
clc;
clear all;
g=9.8; m=68.1; c=12.5; %Define Variables
t=0:2:12;
vt=g*m/c*(1-exp(-c*t/m)); %Formulations
vi1(1)=0;vi2(1)=0;vi3(1)=0;
dt1=2;dt2=0.5;dt3=0.01;
for j=1:7
%Solution for dt=2
vn1(j+1)=vi1+(g-c/m*vi1)*dt1;
vi1=vn1(j+1);
end
for k=1:28 %Solution for dt=0.5
vn21=vi2+(g-c/m*vi2)*dt2;
vi2=vn21;
if mod(k,4)==0
vn2(k/4+1)=vn21;
end
end
for l=1:1400 %Solution for dt=0.01
vn31=vi3+(g-c/m*vi3)*dt3;
vi3=vn31;
if mod(l,200)==0
vn3(l/200+1)=vn31;
end
end
for i=1:7 %Create Answer Matrix
ans_table(i,1)=t(i);
ans_table(i,2)=vt(i);
ans_table(i,3)=vn1(i);
ans_table(i,4)=vn2(i);
ans_table(i,5)=vn3(i);
end
ans_tableh={'time' 'velocity' 'dt=2' '0.5' '0.01'}; %Display
disp(ans_tableh); disp(ans_table);
x=ans_table(1:7,1); %Plot
y1=ans_table(1:7,2); y2=ans_table(1:7,3);
y3=ans_table(1:7,4); y4=ans_table(1:7,5);
plot(x,y1,x,y2,x,y3,x,y4)
title('Plot of Velocity v/s Time');
xlabel('Time');
ylabel('Velocity');
info=legend('Exact','dt=2','dt=0.5','dt=0.01','location','SouthE
ast');
Akshay Walimbe
T 3853
Output of Program 2:
'time'
0
2.0000
4.0000
6.0000
8.0000
10.0000
12.0000
'velocity'
0
16.4050
27.7693
35.6418
41.0953
44.8731
47.4902
'dt=2'
0
19.6000
32.0047
39.8555
44.8243
47.9690
49.9592
'0.5'
0
17.0631
28.6729
36.5724
41.9473
45.6044
48.0927
'0.01'
0
16.4175
27.7866
35.6597
41.1119
44.8875
47.5021
Conclusion:
As we decrease the value of dt to calculate the answer, the accuracy of our
answers increases. To get exact answer, we need to make dt just equal to
zero which is not possible due to limitations in computing. But we get a fairly
good result with value of dt about 0.01.
Akshay Walimbe
T 3853