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

The control masses are referred to as "trim" masses for clarity.
Since version 7.
------------------------------------------------------------------------
See also BuildCADModel, CreateBody, CreateComponent, DrawSCPlanPlugIn,
Inertias, Eul2Mat, FindDirectory, SaveStructure
------------------------------------------------------------------------

Contents

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

Parameters

% Script control
%---------------
createFiles = 1;

% Properties
%-----------
sailWidth     = 100.0;    % m
coreWidth     =   0.5;
coreMass      = 100.0;
arealMass     =   0.003;  % kg/m2
massTrim      =  10.0;    % kg

% 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 );

% Trim Masses
%------------
m = CreateBody( 'make', 'name', 'Trim Y',...
                'previousBody', 1, 'rHinge', [0;0;0] );
BuildCADModel('add body', m );

m = CreateBody( 'make', 'name', 'Trim Z',...
                'previousBody', 1, 'rHinge', [0;0;0] );
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 );

% Trim
%-----
trimName = {'Y','Z'};
for k = 1:2
  m = CreateComponent( 'make', 'sphere','radius', 0.1, 'faceColor', 'magenta',...
        'rA', [0;0;0], 'mass', massTrim, 'name', ['Trim ' trimName{k}],...
        'body', k+1,'inside',1);
  BuildCADModel( 'add component', m );
end

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

Export

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

3D View

%--------
ShowCAD(g);


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