Design a specular sail model with a control boom and vanes.
The sail consists of a boom a mass at the end, a core box with an attached
sail, and two control vanes. The boom gimbals are not modeled.
Since version 7.
------------------------------------------------------------------------
See also BuildCADModel, CreateBody, CreateComponent, DrawSCPlanPlugIn,
Inertias, Eul2Mat, FindDirectory, SaveStructure, Unit
------------------------------------------------------------------------
Contents
Script control
createFiles = 1;
Properties
sailWidth = 80.0;
coreWidth = 0.5;
mastLength = 20.0;
mastWidth = 0.2;
boxWidth = 0.5;
boxMass = 40.0;
coreMass = 20.0;
mastMass = 4.0;
sailArealMass = 0.004;
fracVane = 0.05;
Create the sail mass structure
areaSail = sailWidth^2;
sailMass = sailArealMass*areaSail;
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' , 'Sail with Boom and Vanes' );
BuildCADModel( 'set units', 'mks' );
BuildCADModel( 'set reci', [42167;0;0] );
BuildCADModel( 'add veci', [0;3.0746;0] );
BuildCADModel( 'add qecitobody', [1;0;0;0] );
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', [0;0;0 ] );
BuildCADModel('add body', m );
Vanes, 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;
bCant = Eul2Mat([0;thetaCant;0]);
m = CreateBody( 'make', 'name', 'Vane 1', 'bHinge', struct( 'b', bHingeVane{1}*bCant, 'axis', 2 ),...
'previousBody', 1, 'rHinge', rHingeVane(:,1) );
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',[-coreWidth/2;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 );
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 );
Vanes - right triangles. Treat as masses at end of booms for inertia.
areaVane = fracVane*areaSail;
massVane = sailArealMass*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];
m = CreateComponent( 'make', 'generic', 'faceColor', 'mirror', 'edgeColor', [1 0.8 0.34],...
'vertex', v, 'face', f,'body', 3,...
'rA', [0;0;0], 'mass', massVane, 'name', ['Vane +Z'],...
'sigmaS', 1,'sigmaD', 0,'sigmaA', 0,...
'inside',0);
BuildCADModel( 'add component', m );
m = CreateComponent( 'make', 'generic', 'faceColor', 'mirror', 'edgeColor', [1 0.8 0.34],...
'vertex', v, 'face', f,'body', 4,...
'rA', [0;0;0], 'mass', massVane, 'name', ['Vane -Z'],...
'sigmaS', 1,'sigmaD', 0,'sigmaA', 0,...
'inside',0);
BuildCADModel( 'add component', m );
Model is finished
g = BuildCADModel( 'get cad model' );
BuildCADModel('show vehicle');
view(50,20)
Export
if( createFiles )
c = cd;
cd(FindDirectory('SailData'));
SaveStructure( g, 'PlateWBoomVanes' );
cd(c);
end