2024-10-30 14:29:52 +01:00
|
|
|
function [rz] = initializeRz(args)
|
|
|
|
|
|
|
|
arguments
|
2024-10-31 10:37:01 +01:00
|
|
|
args.type char {mustBeMember(args.type,{'none', 'rigid', 'flexible'})} = 'flexible'
|
2024-10-30 14:29:52 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
rz = struct();
|
|
|
|
|
|
|
|
switch args.type
|
|
|
|
case 'none'
|
|
|
|
rz.type = 0;
|
|
|
|
case 'rigid'
|
|
|
|
rz.type = 1;
|
|
|
|
case 'flexible'
|
|
|
|
rz.type = 2;
|
|
|
|
end
|
|
|
|
|
|
|
|
% Spindle - Slip Ring
|
|
|
|
rz.slipring.density = 7800; % [kg/m3]
|
|
|
|
rz.slipring.STEP = 'Spindle_Slip_Ring.STEP';
|
|
|
|
|
|
|
|
% Spindle - Rotor
|
|
|
|
rz.rotor.density = 7800; % [kg/m3]
|
|
|
|
rz.rotor.STEP = 'Spindle_Rotor.STEP';
|
|
|
|
|
|
|
|
% Spindle - Stator
|
|
|
|
rz.stator.density = 7800; % [kg/m3]
|
|
|
|
rz.stator.STEP = 'Spindle_Stator.STEP';
|
|
|
|
|
|
|
|
rz.K = [7e8; 7e8; 2e9; 1e7; 1e7; 1e7];
|
|
|
|
rz.C = [4e4; 4e4; 7e4; 1e4; 1e4; 1e4];
|
|
|
|
|
|
|
|
if exist('./mat', 'dir')
|
2024-11-06 15:16:41 +01:00
|
|
|
if exist('./mat/nass_model_stages.mat', 'file')
|
|
|
|
save('mat/nass_model_stages.mat', 'rz', '-append');
|
2024-10-30 14:29:52 +01:00
|
|
|
else
|
2024-11-06 15:16:41 +01:00
|
|
|
save('mat/nass_model_stages.mat', 'rz');
|
2024-10-30 14:29:52 +01:00
|
|
|
end
|
|
|
|
elseif exist('./matlab', 'dir')
|
2024-11-06 15:16:41 +01:00
|
|
|
if exist('./matlab/mat/nass_model_stages.mat', 'file')
|
|
|
|
save('matlab/mat/nass_model_stages.mat', 'rz', '-append');
|
2024-10-30 14:29:52 +01:00
|
|
|
else
|
2024-11-06 15:16:41 +01:00
|
|
|
save('matlab/mat/nass_model_stages.mat', 'rz');
|
2024-10-30 14:29:52 +01:00
|
|
|
end
|
|
|
|
end
|