Minimum Value dependent on another Minimum Value.

조회 수: 24 (최근 30일)
Sam Potter
Sam Potter 2020년 4월 1일
댓글: darova 2020년 4월 1일
h(1)=150000; %initial height
a(1)=(40*10^7)/(6371+h(1))^2; %initial acceleration dependant on height
dt=5; %time step
t(1)=0; %initial time
v(1)=a(1)*t(1); %velocity
g(1)=((40*10^7)/(6371+h(1))^2); %Downward force h>100000, upward force = 0 above 100000
As= 5; %Area of spaceship
Ap = 150; %area of parachute
m=850; %Mass
c=0.7;
p(1)=-(100/71)+1.4; % Initial Air Density (Air density occurs at h=100000, from then p=(h/71)+1.4)
Fd(1)=0.5*p(1)*c*As*v^2; %Downward force h<=100000
i=1; %loop counter
while h(end)>=0
t(i+1)=t(i)+dt;
h(i+1)=h(i)-(v(i)*dt); % Find the height of previous time increment
g(i+1)=(40*10^7)/((6371+h(i+1))^2);
if h(i+1)>100000
a(i+1)= g(i+1) %Acceleration=Gravity-(Fd/m)
v(i+1)=v(i)+(a(i+1)*dt);
elseif h(i+1)>=3000
p(i+1)=-((h(i+1)/1000)/71)+1.4;
Fd(i+1)=0.5*c*(p(i+1))*As*(v(i))^2;
a(i+1)=g(i+1)-(Fd(i+1)/m); %Acceleration=Gravity-(Fd/m)
v(i+1)=v(i)+(a(i+1)*dt);
else
dt=0.1;
p(i+1)=-((h(i+1)/1000)/71)+1.4;
Fd(i+1)=0.5*c*(p(i+1))*Ap*(v(i))^2; %Air resistanace open parachute
a(i+1)=g(i+1)-(Fd(i+1)/m); %Acceleration=Gravity-(Fd/m)
v(i+1)=v(i)+(a(i+1)*dt);
end
i=i+1;
end
My code is a kinematics loop. What I need to do is find the minimum height the parachute can be opened to achieve the minimum inpact velocity. The parachute is opened normally at h=3000 when the Fd equation changes from having As to Ap. The impact velocity is the value of v when h=0. I would show what I have done already but I dont know where to start. Thanks in advance for any help.
  댓글 수: 1
darova
darova 2020년 4월 1일
Can you integrate in reverse direction? From earth to atmosphere?
Start from from earth with acceleration (works in opposite direction)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Quadcopters and Drones에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by