Demonstrate thruster design

Since version 10.
%-------------------------------------------------------------------------------
%-------------------------------------------------------------------------------
%	Copyright (c) 2012 Princeton Satellite Systems, Inc.
%   All rights reserved.
%-------------------------------------------------------------------------------

Nm2ToPSI        = Constant('N/m^2 to PSI');
pressure        = 350/Nm2ToPSI;
thrust          = 0.1;
pressureRatio	= inf;
areaRatio       = 100;

%                 [ADN Methanol Ammonia]
%---------------------------------------
gammaParts      = [1.3 1.2 1.31]; % Gamma for ADN is assumed to be near that for ammonia
frac            = [0.6 0.2 0.2];
gamma           = sum(frac.*gammaParts);
fuel            = 'LMP-103S';

[cT,pRatio]     = TCoeff( gamma, areaRatio, pressureRatio);
aStar           = thrust/(pressure*cT);
divergenceAng	= 28;
rNozzle         = sqrt(areaRatio*aStar/pi)*1000;
lNozzle         = rNozzle/TanD(divergenceAng);

clear x;

k = 1;
x{k,1} = 'Pressure';                x{k,2} = sprintf('%8.2f',pressure);     x{k,3} = 'N/m$^2$';	k = k + 1;
x{k,1} = 'Area ratio';              x{k,2} = sprintf('%8.2f',areaRatio);    x{k,3} = '';        k = k + 1;
x{k,1} = 'Thrust coefficient';      x{k,2} = sprintf('%8.2f',cT);           x{k,3} = '';        k = k + 1;
x{k,1} = 'Fuel';                    x{k,2} = fuel;                          x{k,3} = '';        k = k + 1;
x{k,1} = 'Heat capacity ratio';	    x{k,2} = sprintf('%8.2f',gamma);        x{k,3} = '';        k = k + 1;
x{k,1} = 'A*';                      x{k,2} = sprintf('%8.4f',aStar*1e6);	x{k,3} = 'mm$^2$';  k = k + 1;
x{k,1} = 'Divergence angle';        x{k,2} = sprintf('%8.2f',divergenceAng);x{k,3} = 'deg';     k = k + 1;
x{k,1} = 'Radius nozzle';           x{k,2} = sprintf('%8.2f',rNozzle );     x{k,3} = 'mm';      k = k + 1;
x{k,1} = 'Length nozzle';           x{k,2} = sprintf('%8.2f',lNozzle );     x{k,3} = 'mm';      k = k + 1;

disp(x)

CreateLatexTable(x,'Thruster');


%--------------------------------------
    'Pressure'               '2413165.02'    'N/m$^2$'
    'Area ratio'             '  100.00'      ''       
    'Thrust coefficient'     '    1.81'      ''       
    'Fuel'                   'LMP-103S'      ''       
    'Heat capacity ratio'    '    1.28'      ''       
    'A*'                     '  0.0229'      'mm$^2$' 
    'Divergence angle'       '   28.00'      'deg'    
    'Radius nozzle'          '    0.85'      'mm'     
    'Length nozzle'          '    1.61'      'mm'