Minimum Value dependent on another Minimum Value.

1 visualización (últimos 30 días)
Sam Potter
Sam Potter el 1 de Abr. de 2020
Comentada: darova el 1 de Abr. de 2020
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 comentario
darova
darova el 1 de Abr. de 2020
Can you integrate in reverse direction? From earth to atmosphere?
Start from from earth with acceleration (works in opposite direction)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Simscape en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by