Trip time vs. power demo

This solves for the duration to achieve a straight line distance given the engine parameters. The payload mass is constant.

Note: for a given distance and engine parameters there will be a minimum power!!

See also: Straight2DStructure, ComputeDuration, EngineThrust, SwitchTime

%--------------------------------------------------------------------------
%   Copyright (c) 2018 Princeton Satellite Systems, Inc.
%   All rights reserved.
%--------------------------------------------------------------------------

d = Straight2DStructure;

% power vector
power    = linspace(1,10)*1e6;

% define trip
distance = 125;  % AU
d.dF    = distance*Constant('au');

% engine parameters
d.sigma = 1000; % W/kg
d.mP    = 1000;
d.uE    = 100;
d.eta   = 0.4;

% run loop
duration = [];
thrust = [];
switchFrac = [];
for k = 1:length(power)
  duration(k) = ComputeDuration( power(k), d );
  thrust(k) = EngineThrust(power(k), d );
  d.tF = duration(k);
  m0 = InitialMass( thrust(k), d );
  tS = SwitchTime( thrust(k), d.uE, duration(k), m0 );
  switchFrac(k) = tS/duration(k);
end

% switch time is later for higher sigma
% switch time is earlier for higher Isp

year = 365.25*86400;
Plot2D(power*1e-6,[duration/year;thrust],'Power (MW)',{'Duration (yrs)','Thrust (N)'},'Envelope');
Plot2D(power*1e-6,switchFrac,'Power (MW)','Switch Fraction')



%--------------------------------------

% $Id: e2e12a2bb9c6df9c83a213505d2ec817b1732917 $