% ========================================================================================= % FEDEASLab - Release 2.6, July 2004 % Matlab Finite Elements for Design, Evaluation and Analysis of Structures % Copyright(c) 1998-2004. The Regents of the University of California. All Rights Reserved. % Created by Professor Filip C. Filippou (filippou@ce.berkeley.edu) % Department of Civil and Environmental Engineering, UC Berkeley % =========================================================================================
% all units in kip and inches
CleanStart
IOW = Create_File (mfilename);
Model_TwoStoryFrm % echo input data of structural model to output file (optional) Print_Model (Model,'Modal analysis of two story steel frame');
LinearElemData % print element properties (optional) Structure ('data',Model,ElemData);
% Reference acceleration vector by linear analysis under unit support displacement Ue([1,4],1) = ones(2,1); SupLoading = Create_Loading (Model,[],Ue); % need to include an empty array for Pe State = LinearStep(Model,ElemData,SupLoading); % create actual loading vector with reference acceleration vector Loading.Uddref = State.U(1:Model.nf); % reference acceleration vector in Loading % NOTE: the above reference acceleration vector could also be specified directly for this % simple case of rigid body motion due to support displacement % load ground motion history into Loading: 2% in 50 years motion from Erzincan, Turkey load EZ02; Loading.AccHst(1).Time = EZ02(1:500,1); % Load time values into field Time Loading.AccHst(1).Value = EZ02(1:500,2)/2.54; % Load acceleration values and convert to in/sec^2
Norm of equilibrium error = 2.066638e-012
% define distributed mass m m = 0.6; Me([2 3 5:8],1) = m.*ones(6,1); % create nodal mass vector and stored it in Model Model = Add_Mass2Model(Model,Me);
% determine stiffness matrix at initial State State = Initialize_State(Model,ElemData); State = Structure('stif',Model,ElemData,State); % % number of modes to include in modal analysis no_mod = 2; % % modal damping ratios zeta = 0.02.*ones(1,no_mod); % Integration time step Dt = 0.03; % modal analysis [omega, Veig, Y_t] = ModalAnalysis(State.Kf,Model.Ml,Loading,Dt,zeta,no_mod); % global dof response history U_t = Y_t*Veig'; % plotting displacement history at a particular dof t = Dt*[1:length(Loading.AccHst.Value)]; Create_Window (0.70,0.70); plot(t,U_t(:,Model.DOF(1,6))); grid on; % plot mode shapes nf = Model.nf; Create_Window (0.70,0.70); Plot_Model (Model); MAGF = 20; for i=1:length(omega) State.U(1:nf,1) = Veig(:,i); Structure ('defo',Model,ElemData,State); end % close output file fclose(IOW);