2020-01-13 11:42:31 +01:00
|
|
|
function [rz] = initializeRz(args)
|
2020-02-03 17:50:52 +01:00
|
|
|
|
|
|
|
arguments
|
2020-02-25 17:49:08 +01:00
|
|
|
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible', 'modal-analysis', 'init'})} = 'flexible'
|
2020-03-17 11:22:57 +01:00
|
|
|
args.Foffset logical {mustBeNumericOrLogical} = false
|
2018-06-16 22:57:54 +02:00
|
|
|
end
|
2020-02-03 17:50:52 +01:00
|
|
|
|
|
|
|
rz = struct();
|
|
|
|
|
2020-02-17 18:21:20 +01:00
|
|
|
switch args.type
|
|
|
|
case 'none'
|
|
|
|
rz.type = 0;
|
|
|
|
case 'rigid'
|
|
|
|
rz.type = 1;
|
|
|
|
case 'flexible'
|
|
|
|
rz.type = 2;
|
2020-02-18 16:46:35 +01:00
|
|
|
case 'modal-analysis'
|
|
|
|
rz.type = 3;
|
2020-02-25 17:49:08 +01:00
|
|
|
case 'init'
|
|
|
|
rz.type = 4;
|
2020-02-17 18:21:20 +01:00
|
|
|
end
|
|
|
|
|
2020-02-03 17:50:52 +01:00
|
|
|
% Spindle - Slip Ring
|
|
|
|
rz.slipring.density = 7800; % [kg/m3]
|
|
|
|
rz.slipring.STEP = './STEPS/rz/Spindle_Slip_Ring.STEP';
|
|
|
|
|
|
|
|
% Spindle - Rotor
|
|
|
|
rz.rotor.density = 7800; % [kg/m3]
|
|
|
|
rz.rotor.STEP = './STEPS/rz/Spindle_Rotor.STEP';
|
|
|
|
|
|
|
|
% Spindle - Stator
|
|
|
|
rz.stator.density = 7800; % [kg/m3]
|
|
|
|
rz.stator.STEP = './STEPS/rz/Spindle_Stator.STEP';
|
|
|
|
|
2020-02-25 17:49:08 +01:00
|
|
|
rz.K = [7e8; 7e8; 2e9; 1e7; 1e7; 1e7];
|
|
|
|
rz.C = [4e4; 4e4; 7e4; 1e4; 1e4; 1e4];
|
|
|
|
|
|
|
|
if args.Foffset && ~strcmp(args.type, 'none') && ~strcmp(args.type, 'rigid') && ~strcmp(args.type, 'init')
|
|
|
|
load('mat/Foffset.mat', 'Fzm');
|
|
|
|
rz.Deq = -Fzm'./rz.K;
|
|
|
|
else
|
|
|
|
rz.Deq = zeros(6,1);
|
|
|
|
end
|
2020-02-03 17:50:52 +01:00
|
|
|
|
|
|
|
save('./mat/stages.mat', 'rz', '-append');
|