- Modify the joints for Ty, Ry, Rz to have only one bushing joint. - Compensation of gravity
43 lines
1.3 KiB
Matlab
43 lines
1.3 KiB
Matlab
function [granite] = initializeGranite(args)
|
|
|
|
arguments
|
|
args.type char {mustBeMember(args.type,{'rigid', 'flexible', 'none', 'modal-analysis', 'init'})} = 'flexible'
|
|
args.Foffset logical {mustBeNumericOrLogical} = true
|
|
args.density (1,1) double {mustBeNumeric, mustBeNonnegative} = 2800 % Density [kg/m3]
|
|
args.x0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the X direction [m]
|
|
args.y0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the Y direction [m]
|
|
args.z0 (1,1) double {mustBeNumeric} = 0 % Rest position of the Joint in the Z direction [m]
|
|
end
|
|
|
|
granite = struct();
|
|
|
|
switch args.type
|
|
case 'none'
|
|
granite.type = 0;
|
|
case 'rigid'
|
|
granite.type = 1;
|
|
case 'flexible'
|
|
granite.type = 2;
|
|
case 'modal-analysis'
|
|
granite.type = 3;
|
|
case 'init'
|
|
granite.type = 4;
|
|
end
|
|
|
|
granite.density = args.density; % [kg/m3]
|
|
granite.STEP = './STEPS/granite/granite.STEP';
|
|
|
|
granite.sample_pos = 0.8; % [m]
|
|
|
|
granite.K = [4e9; 3e8; 8e8]; % [N/m]
|
|
granite.C = [4.0e5; 1.1e5; 9.0e5]; % [N/(m/s)]
|
|
|
|
if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
|
|
load('mat/Foffset.mat', 'Fgm');
|
|
granite.Deq = -Fgm'./granite.K;
|
|
else
|
|
granite.Deq = zeros(6,1);
|
|
end
|
|
|
|
save('./mat/stages.mat', 'granite', '-append');
|