%--------------------------------------------------------------------------
% PURPOSE
% Modal analysis of a 2D structure meshed with TRI3 and QUA4 FEs with
% kinematic relationships between some degrees of freedom
%--------------------------------------------------------------------------
% REFERENCES
% Benjamin RICHARD
% 20-02-2016
%--------------------------------------------------------------------------
% 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 = 'PLANE_STRESS';
%% Loading of the input datafile
FILE = '6.mail';
ME = INPUT.ACQU(FILE,'MAIL');
%% Definition of the model
MO1 = MODEL('ST','MECHANICS','ELASTICITY','ISOTROPIC');
MOT = MO1;
%% Topology
TP = TOPOLOGY(MOT);
%% Definition of the material
MA1 = CHAMELEM.MATE(MO1,'youn',12e9,'nu',0.2,'rho',50e3);
MAT = MA1;
%% Boundary conditions
% Line L1 fixed
CL1 = MATRICE('DIRI','L1',1,2);
CL2 = MATRICE('POINT_RELA',3,1,'P1',-1,2,'P3');
CL3 = MATRICE('POINT_RELA',1,2,'P2',-6,2,'P4');
CLT = [CL1 [CL2 CL3]];
%% Static analysis
PB1 = PROBLEM('model',MOT,'mater',MAT,'diric',CLT,'solve_type','MODAL');
SOL = SOLVE(PB1);
%% Non regression test
if abs(SOL.eigenfrequency(1) - 80.3168) > 1.0e-4 || ...
abs(SOL.eigenfrequency(2) - 144.6077) > 1.0e-4 || ...
abs(SOL.eigenfrequency(3) - 164.9158) > 1.0e-4
error('TEST IS NOT SUCCESSFUL')
else
disp('---------------------------------')
disp('006_MODAL_2D_TRI3_QUA4_RELA_POINT')
disp('TEST IS SUCCESSFUL')
disp('---------------------------------')
end