%--------------------------------------------------------------------------
% PURPOSE
% Test multifiber beams - MODAL - FLI - LUMP MASS
%--------------------------------------------------------------------------
% REFERENCES
% Benjamin RICHARD
% 18-10-2017
%--------------------------------------------------------------------------
% 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
%% Global variables
global ME TP
%% Definition of the section
FILE = '100_1.mail';
ME = INPUT.ACQU(FILE,'MAIL');
%% Definition of the model - cross section scale
MO1 = MODEL('SBET' ,'MECHANICS','ELASTICITY','ISOTROPIC','DAMAGE','MAZARS','QUAS');
MO2 = MODEL('SAINF','MECHANICS','ELASTICITY','ISOTROPIC','PLASTICITY','VONMISES','POJS');
MO3 = MODEL('SASUP','MECHANICS','ELASTICITY','ISOTROPIC','PLASTICITY','VONMISES','POJS');
MOT = [MO1 [MO2 MO3]];
%% Definition of the materials - cross section scale
MA1 = CHAMELEM.MATE(MO1,'youn',36000e6,'nu',0.2,'rho',...
2500,'ay',0.83,'az',0.83,'at',0.8,'k0',1.0e-4,'bt',12000,...
'beta',1.06,'ac',1.2,'bc',1500);
MA2 = CHAMELEM.MATE(MO2,'youn',200000e6,'nu',0.3,'rho',...
7100,'sect',pi*0.012^2/4,'sigy',500e6,'K',0.01*210000e6,'ay',0.83);
MA3 = CHAMELEM.MATE(MO3,'youn',200000e6,'nu',0.3,'rho',...
7100,'sect',pi*0.012^2/4,'sigy',500e6,'K',0.01*210000e6,'ay',0.83);
MAT = [MA1 [MA2 MA3]];
%% Definition of the beam
FILE = '100_2.mail';
ME = INPUT.ACQU(FILE,'MAIL');
%% Definition of the model - beam scale
MOB1 = MODEL('LPOUTRE','MECHANICS','ELASTICITY','SECTION','PLASTICITY',...
'SECTION','TIMO');
MOBT = MOB1;
%% Topology
TP = TOPOLOGY(MOBT);
%% Definition of the material - beam scale
MAB1 = CHAMELEM.MATE(MOB1,'mods',MOT,'mats',MAT);
MABT = MAB1;
%% Stiffness and mass matrix
STI = MATRICE('STIFF',MOBT,MABT);
%% Dirichlet boundary conditions
CL1 = MATRICE('DIRI','P0',1,2,6);
CL2 = MATRICE('DIRI','LPOUTRE',3,4,5);
CLT = [CL1 CL2];
%% Lumped mass
MAD1 = MATRICE('MADD','P1',[1 2],50./2);
%% Modal
PB2 = PROBLEM('model',MOBT,'mater',MABT,'diric',CLT,'solve_type','MODAL','lumped_mass',MAD1);
SOL2 = SOLVE(PB2);
%% Non regression test
if ((abs((SOL2.eigenfrequency(1) - 120.03)/120.03) > 1.0e-3)|| (abs((SOL2.eigenfrequency(2) - 863.88)/863.88)> 1.0e-3)|| (abs((SOL2.eigenfrequency(3) - 918.6)/918.6) > 1.0e-3))
error('TEST IS NOT SUCCESSFUL')
else
disp('---------------------------------')
disp('0100_MODAL_MULTIFIBER_LUMP_TIMO')
disp('TEST IS SUCCESSFUL')
disp('---------------------------------')
end