%--------------------------------------------------------------------------
% PURPOSE
% Analysis of a truss structure , using Ouglova's
% constutive law - BARRE elements
%--------------------------------------------------------------------------
% REFERENCES
% Romili PAREDES
% 04-07-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_STRAIN';
%% Loading of the input datafile
FILE = '58.mail';
ME = INPUT.ACQU(FILE,'MAIL');
%% Definition of the model
MO1 = MODEL('LT','MECHANICS','ELASTICITY','ISOTROPIC','PLASTICITY','OUGLOVA','TRUSS');
MOT = MO1;
%% Topology
TP = TOPOLOGY(MO1);
%% Definition of the material
tc = 25.0;
d0 = 0.006;
dc = d0 - (tc/100)*d0;
sc = 3.141592*(dc^2)/4;
MA1 = CHAMELEM.MATE(MO1,'youn',200e9,'nu',0.33,'rho',7800,'sect',sc,...
'sigy',700e6,'K',500e6,'m',2.786,'Tc',tc,'Dc',0.2);
MAT = MA1;
%% Boundary conditions
% Line L1 fixed
CL1 = MATRICE('DIRI','P1',1,2);
CL2 = MATRICE('DIRI','P2',1);
CLT = [CL1 CL2];
% Definition of a prescribed displacement
FO1 = CHPOINT.DEPI(CL2,1);
%% Loading
EV1 = EVOL([0 1],[0 5e-3],'Time','Displacement (m)');
CHT = TIMELOAD(FO1,EV1,'DIRI');
%% Static analysis
PB1 = PROBLEM('model',MOT,'mater',MAT,'diric',CLT,'loadt',CHT,'comp_time',0:0.005:1,...
'solve_type','QUASI_NEWTON');
SOL = SOLVE(PB1);
%% Post-treatment
% Reaction curve
EV_OUT = EVOL.REAC(SOL,CL1,EV1,1);
plot(EV_OUT);
close all
%% Non regression test
if abs(EV_OUT.ordo(100) + 1.309433542529805e+04) > 1.0e-4
error('TEST IS NOT SUCCESSFUL')
else
disp('---------------------------------')
disp('058_INCR_NLINE_2D_BARRE_OUGLOVA')
disp('TEST IS SUCCESSFUL')
disp('---------------------------------')
end