Design a gimbaled boom sail model with two bodies.

The sail consists of a boom with a mast and box at the end and a core box with an attached sail.

Since version 7.
------------------------------------------------------------------------
See also HelioDisturbances and BoomMomentumDemo., BuildCADModel,
CreateBody, CreateComponent, DrawSCPlanPlugIn, Inertias, FindDirectory,
SaveStructure
------------------------------------------------------------------------

Contents

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

Script control

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

Properties

%-----------
gimbalRadius  =  0.02;
gimbalLength  =  0.125;
sailWidth     =  40.0;
coreWidth     =   0.5;
mastLength    =   10.0;
mastWidth     =   0.125;
boxWidth      =   0.25;
boxMass       =  20.0;
coreMass      =  10.0;
gimbalMass    =   1.0;
mastMass      =   4.0;
sailArealMass =   0.005; % kg/m^2

Create the sail mass structure

%-------------------------------
sailMass      = sailArealMass*sailWidth^2;
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 );

Boom

%-----
m = CreateBody( 'make', 'name', 'Boom', 'bHinge', struct( 'b', eye(3) ),...
                'previousBody', 1, 'rHinge', [coreWidth/2+2*gimbalRadius;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 );

m = CreateComponent( 'make', 'cylinder','rUpper',gimbalRadius, 'rLower', gimbalRadius, 'h', gimbalLength,'name','Gimbal','body',1,...
                     'mass', gimbalMass, 'faceColor', 'aluminum', 'rA', [coreWidth/2+gimbalRadius;0;-gimbalLength/2], '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',[-coreWidth/2;0;0],...
                     'sigmaS', [0.9 0.85], 'sigmaD', [0.02 0.05], 'sigmaA', [0.08 0.1], 'emissivity', [0.03, 0.3],...
                     'vertex',v ,'face', [1 2 3; 1 3 4], 'inside', 0 );
BuildCADModel( 'add component', m );

Boom

%-----
m = CreateComponent('make', 'box','x',boxWidth, 'y', boxWidth, 'z', boxWidth,'name','BoomBox','body',2, 'mass', boxMass,...
                    'rA', [mastLength;0;0], 'faceColor', 'gold foil', 'inside', 1 );
BuildCADModel( 'add component', m );

m = CreateComponent('make', 'box','x',mastLength, 'y', mastWidth, 'z', mastWidth,'name','Mast','body',2, 'mass', mastMass,...
                    'rA', [mastLength/2;0;0], 'faceColor', 'gold foil', 'inside', 1 );
BuildCADModel( 'add component', m );

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

Export

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

3D View

%--------
DrawSCPlanPlugIn( 'initialize', g );
view(55,30)

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