%--------------------------------------------------------------------------
% PURPOSE
% Acquisition of the SMART 2013 structure - full 3D model - modal
% analysis
%--------------------------------------------------------------------------
% REFERENCES
% Benjamin RICHARD
% 03-01-2018
%--------------------------------------------------------------------------
% COMMENTS
%
%
%
%--------------------------------------------------------------------------
% MIT License
%
% Copyright (c) 2018 Benjamin Richard
%
% Permission is hereby granted, free of charge, to any person obtaining a
% copy of this software and associated documentation files (the "Software
% "), to deal in the Software without restriction, including without
% limitation the rights to use, copy, modify, merge, publish, distribute,
% sublicense, and/or sell copies of the Software, and to permit persons
% to whom the Software is furnished to do so, subject to the following
% conditions:
%
% The above copyright notice and this permission notice shall be included
% in all copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
% OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
% IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
% CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
% TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
% SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
%--------------------------------------------------------------------------
%% Clearing off
fclose all;
clear
close all
%% Declaration de variables global
global options ME TP;
%% Definition des options
options.mode = 'TRID';
%% Loading of the input datafile
FILE = '88.mail';
ME = INPUT.ACQU(FILE,'MAIL');
%% Ploting
% h = plot(ME,...
% 'ENVW1','c',...
% 'ENVW2','c',...
% 'ENVW3','c',...
% 'ENVB1','r',...
% 'ENVB2','r',...
% 'ENVB3','r',...
% 'ENVF1','g',...
% 'ENVF2','g',...
% 'ENVF3','g',...
% 'ENVP1','y',...
% 'ENVP2','y',...
% 'ENVP3','y',...
% 'ENVBG','b');
%% Definition of the model
MO1 = MODEL('VOLTOT','MECHANICS','ELASTICITY','ISOTROPIC');
%% Topology
TP = TOPOLOGY(MO1);
%% Definition of the material
MA1 = CHAMELEM.MATE(MO1,'youn',23000e6,'nu',0.20,'rho',2300);
%% Boundary conditions
% Surface SURF_INF fixed
CL1 = MATRICE('DIRI','SURF_INF',1,2,3);
% Additional masses
MAS1 = MATRICE('MADD','FLOOR1',[1 2 3],11.45e3 / 1398);
MAS2 = MATRICE('MADD','FLOOR2',[1 2 3],12.17e3 / 1398);
MAS3 = MATRICE('MADD','FLOOR3',[1 2 3],10.32e3 / 1398);
MAST = [MAS1 [MAS2 MAS3]];
%% Modal analysis
PB1 = PROBLEM('model',MO1,'mater',MA1,'diric',CL1,'solve_type','MODAL','lumped_mass',MAST);
SOL = SOLVE(PB1);
%% Non regression test
if abs(SOL.eigenfrequency(1) - 8.158342548309429) > 1.0e-4 || ...
abs(SOL.eigenfrequency(2) - 13.919103045009390) > 1.0e-4 || ...
abs(SOL.eigenfrequency(3) - 27.486763447589269) > 1.0e-4
error('TEST IS NOT SUCCESSFUL')
else
disp('---------------------------------')
disp('088_MODAL_3D_SMART2013')
disp('TEST IS SUCCESSFUL')
disp('---------------------------------')
end