Design an electric powered transfer vehicle.

Uses the payload mass, the required delta-V, the required thrust, the ratio of structure to fuel mass (for tanks, etc.) and the power per unit mass.

------------------------------------------------------------------------
 See also OptimalVehicle, ElectricPropulsionDesign, Plot2D
------------------------------------------------------------------------
%--------------------------------------------------------------------------
%   Copyright (c) 1997-2004 Princeton Satellite Systems, Inc.
%   All rights reserved.
%--------------------------------------------------------------------------

x        = struct();
x.mP     = 50000;     % kg
x.thrust = 15000;     % N
x.dV     = 50000;     % m/s
x.pR     = 1e9/50000; % W/kg
x.sR     = 0.1;       % kg/kg
x.eff    = 0.6;       % efficiency
x.uE    = 20000;

% Find the optimal exhaust velocity and design the vehicle
%---------------------------------------------------------
xOpt  = OptimalVehicle( x );
xT    = xOpt;

% Test a vector of uE's to confirm this is optimal
uE    = logspace(floor(log10(0.1*x.uE)), ceil(log10(100*x.uE)));
mPlot = zeros(4,length(uE));

for k = 1:length(uE)
  xT.uE      = uE(k);
  xT         = ElectricPropulsionDesign( xT );
  mPlot(:,k) = [xT.mT;xT.mS;xT.mR;xT.mF];
end

[z,j] = find( mPlot(1,:) > 0 );
j  = min(j);

uE = uE(j:end);
mPlot = mPlot(:,j:end);

yP = char('Total','Structural','Propulsion','Fuel');
Plot2D( uE, mPlot, 'Exhaust Velocity (m/s)',yP,'Mass vs. Exhaust Velocity','log');
subplot(4,1,1)
hold on
plot(xT.uE,xT.mT,'k*')


%--------------------------------------
Input uE      1000.00 m/s is less than the minimum uE of     20851.62 m/s
Input uE      1206.79 m/s is less than the minimum uE of     20851.62 m/s
Input uE      1456.35 m/s is less than the minimum uE of     20851.62 m/s
Input uE      1757.51 m/s is less than the minimum uE of     20851.62 m/s
Input uE      2120.95 m/s is less than the minimum uE of     20851.62 m/s
Input uE      2559.55 m/s is less than the minimum uE of     20851.62 m/s
Input uE      3088.84 m/s is less than the minimum uE of     20851.62 m/s
Input uE      3727.59 m/s is less than the minimum uE of     20851.62 m/s
Input uE      4498.43 m/s is less than the minimum uE of     20851.62 m/s
Input uE      5428.68 m/s is less than the minimum uE of     20851.62 m/s
Input uE      6551.29 m/s is less than the minimum uE of     20851.62 m/s
Input uE      7906.04 m/s is less than the minimum uE of     20851.62 m/s
Input uE      9540.95 m/s is less than the minimum uE of     20851.62 m/s
Input uE     11513.95 m/s is less than the minimum uE of     20851.62 m/s
Input uE     13894.95 m/s is less than the minimum uE of     20851.62 m/s
Input uE     16768.33 m/s is less than the minimum uE of     20851.62 m/s
Input uE     20235.90 m/s is less than the minimum uE of     20851.62 m/s