Design a specular (plate) sail model with two control vanes.

Since version 7.
------------------------------------------------------------------------
See also BuildCADModel, CreateBody, CreateComponent, DrawSCPlanPlugIn,
Inertias, Eul2Mat, FindDirectory, SaveStructure, Unit
------------------------------------------------------------------------

Contents

%-------------------------------------------------------------------------------
%   Copyright (c) 2006 Princeton Satellite Systems, Inc. All rights reserved.
%   This file is referenced for listings in the User's Guide.
%-------------------------------------------------------------------------------

Script control

%---------------
createFiles = 1;

Properties

%-----------
sailWidth     = 100.0;   % m
coreWidth     =   0.5;
coreMass      = 100.0;
arealMass     =   0.003;
fracVane      =   0.05;  % percent of sail area per vane

Create the sail mass structure

%-------------------------------
areaSail      = sailWidth^2;
sailMass      = areaSail*arealMass;
inertiaSail   = Inertias( sailMass, [sailWidth sailWidth], 'plate', 1 );
bXToZ         = [0 0 -1;0 1 0;1 0 0];
massSail      = struct('inertia', bXToZ*inertiaSail*bXToZ', 'mass', sailMass, 'cM', [0;0;0] );

Initialize

%-----------
BuildCADModel( 'initialize' );

Add general properties

%-----------------------
BuildCADModel( 'set name' ,  'Solar Sail' );
BuildCADModel( 'set units',  'mks'  );

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

Create CAD bodies first

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

Core

%-----
m = CreateBody( 'make', 'name', 'Core' );
BuildCADModel('add body', m );

Vanes

%------
% These vanes can be used for attitude control and momentum management in roll.

1: +Z, 2: -Z

%----------------------------------------------
lBoom           = sailWidth*sqrt(2)/2;
rHingeVane      = Unit([0 0; 0 0; 1 -1])*lBoom;
bHingeVane      = { eye(3) Eul2Mat([pi 0 0]) };
thetaCant       = 15*pi/180; % vanes are canted back for stability
bCant           = Eul2Mat([0;thetaCant;0]);
m = CreateBody( 'make', 'name', 'Vane 1', 'previousBody', 1, 'rHinge', rHingeVane(:,1),...
                'bHinge', struct( 'b', bHingeVane{1}*bCant, 'axis', 2 ));
BuildCADModel('add body', m );

m = CreateBody( 'make', 'name', 'Vane 2', 'bHinge', struct( 'b', bHingeVane{2}*bCant, 'axis', 2 ),...
                'previousBody', 1, 'rHinge', rHingeVane(:,2) );
BuildCADModel('add body', m );

This creates the connections between the bodies

%------------------------------------------------
BuildCADModel( 'compute paths' );

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

Create CAD Components second

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

Core

%-----
m = CreateComponent( 'make', 'box','x',coreWidth, 'y', coreWidth, 'z', coreWidth,...
                     'name','CoreBox','body',1,...
                     'mass', coreMass, 'faceColor', 'gold foil', 'inside', 1  );
BuildCADModel( 'add component', m );

Sail

%-----
v = [0 0 0 0;0.5 -0.5 -0.5 0.5;0.5 0.5 -0.5 -0.5]'*sailWidth;
m = CreateComponent( 'make', 'sail','name','Sail','body',1,...
                     'mass', massSail, 'faceColor', 'mirror',...
                     'rA',[0;0;0],'b',Eul2Mat([pi/4;0;0]),...
                     'sigmaS', [1 1], 'sigmaD', [0 0], 'sigmaA', [0 0], ...
                     'emissivity',[0.02 0.02],...
                     'vertex',v ,'face', [1 2 3; 1 3 4], 'inside', 0 );
BuildCADModel( 'add component', m );

Vanes - right triangles. Treat as masses at end of booms for inertia.

%----------------------------------------------------------------------
areaVane = fracVane*areaSail;
massVane = arealMass*areaVane;
lVane = sqrt(2*areaVane);
hVane = 2*sqrt(areaVane);
sVane = sqrt(lVane^2 - (hVane/2)^2);
v = [ 0        0        0;...
      0  hVane/2 -hVane/2;...
      0    sVane    sVane]';
f         = [1 2 3];
vaneName = {'+Z' '-Z'};

for k = 1:2
  m = CreateComponent( 'make', 'sail', 'faceColor', 'mirror', 'edgeColor', [1 0.8 0.34],...
                       'vertex', v, 'face', f,...
 					             'rA', [0;0;0], 'mass', massVane, 'name', ['Vane ' vaneName{k}], 'body', k+1,...
                       'sigmaS', [1 1], 'sigmaD', [0 0], 'sigmaA', [0 0], ...
                       'emissivity',[0.02 0.02],...
                       'inside',0);
  BuildCADModel( 'add component', m );
end

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

Export

%------------------------------------------------------------------
if( createFiles )
  g = BuildCADModel( 'get cad model' );
  c = cd;
  cd(FindDirectory('SailData'));
  SaveStructure( g, 'PlateWithVanes' );
  cd(c);
end

DrawSCPlanPlugIn( 'initialize', g );
view(110,25)


%--------------------------------------
% PSS internal file version information
%--------------------------------------