eval(demosdt('echoon')) % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % This DEMO script is meant to show a typical use of the Structural Dynamics % Toolbox in basic exploitation of finite element models. % % Topics seen are: % model assembly and boundary conditions % static response and normal modes % frequency response to an applied load % % This demonstration corresponds to a manual section which you can access % directly using doc('sdt/feco'). % The following lines create a two bay truss model as explained in much more % detail in the d_truss demo. model=femesh('test2bayplot'); % The next step is to define materials % material properties of aluminum (see doc('sdt/pl')) % MatId MatType E nu rho model.pl = m_elastic('dbval 1 steel'); % element properties of for beam1 (see doc('sdt/il')) % ProId ProType J I1 I2 A typ=fe_mat('p_beam','SI',1); % standard beam model.il = [1 typ 5.0e-09 5.0000e-09 5.0000e-09 2.0000e-05 % longerons 2 typ 5.0e-09 5.0000e-09 5.0000e-09 2.0000e-05 % diagonals 3 typ 5.0e-09 5.0000e-09 5.0000e-09 2.0000e-05]; % battens demosdt('pause'); %---------------------------------------------------------- % Imposing fixed boundary conditions corresponds to the elimination of certain % DOFs which is done using fe_case entries % see doc('sdt/fe_case') and doc('sdt/case') model=fe_case(model, ... 'fixdof','2-D',[.03;.04;.05]', ...% 2-D 'fixdof', 'Left Edge', 'x==0'); cf=feplot; cf.model=model; cf.def=fe_eig(model); % for low level DOF selection see doc('sdt/adof'). demosdt('pause'); %---------------------------------------------------------- % We will now add point loads to the case. For example, a unit vertical % input (DOF .02) on node 6 is declared and the response comupted by model=fe_case(model,'DofLoad','Unit tip load',6.02); cf.def=fe_simul('static',model); fecom(';scalemax;scd.1;undefline'); % - FE_LOAD can be used to build distributed loads % - the use of \ to compute the inverse implies that fixed DOFs have % been eliminated at assembly or using % ind=fe_c(mdof,adof,'ind',2); kr=k(ind,ind);adof=mdof(ind); demosdt('pause'); %---------------------------------------------------------- % A typical application is the computation of frequency response functions % to applied loads at known sensors. % One unit load at DOF 6.02 and a relative load between 3.01 and 1.01 Load=struct('DOF',[6.02;3.01;1.01],'def',[1 0;0 1;0 -1]); model=fe_case(model,'AddtoCase 1','Remove','Unit tip load', ... 'DofLoad','Two loads',Load, ... 'SensDof','Two sensors',[6.02;5.01]); % given a set of modes def = fe_eig(model,[2 4]); % you can easily display frequency responses with w=linspace(80,240,200)'; RESP=nor2xf(def,.01,model,w,'HzPlot struct'); % Notes % - PAY ATTENTION to frequency units. When using structures, the default is % the natural Hz. On the contrary low level calls with matrix arguments % assume frequencies rad/sec, unless 'Hz' is given in the string argument. % - it is possible to obtain velocity or acceleration FRFs with % xf=nor2xf(def,.01,model,w,'VelHzPlot') or 'AccHzplot' % - the state-space model corresponding to xf can be obtained using % sys = nor2ss(def,.01,model,w,'VelHzPlot') sys = nor2ss(def,.01,model); RESP2=qbode(sys,w*2*pi,'struct'); figure(1);clf; qbode(sys,w*2*pi,'plot'); sys=fe2ss('free 2',model); demosdt('pause'); %---------------------------------------------------------- % The use of a truncated set of modes is not necessarily sufficient and it % is strongly desirable to introduce STATIC CORRECTIONS to account for % the residual effects of truncated modes. % % FE2SS directly computes modes and static corrections sys=fe2ss('free 2 3',model); xfcor = qbode(sys,w*2*pi); xfnoncor = nor2xf(fe_eig(model,[2 3]),.01,model,w,'Hz'); xftot = nor2xf(fe_eig(model),.01,model,w,'Hz'); ind=3; subplot(211);plot(w,dbsdt([xftot(:,ind) xfcor(:,ind) xfnoncor(:,ind)])); xlabel('Frequency (Hz)'); ylabel('Amplitude db(m/N)'); legend('all modes','3 modes + static','3 modes');iimouse title('u2 to 6'); %sprintf('%s to %s',sys.lab_in{2},sys.lab_out{1}) subplot(212);plot(w,dbsdt([xftot(:,ind+1) xfcor(:,ind+1) xfnoncor(:,ind+1)])); xlabel('Frequency (Hz)'); ylabel('Amplitude db(m/N)'); title('u2 to 5x'); %sprintf('%s to %s',sys.lab_in{2},sys.lab_out{2}) % Notice that the need for a static correction depends on actuators/sensors % considered as well as modes retained. demosdt('pause'); %---------------------------------------------------------- % The SDT supports different damping models. The different possibilities % are illustrated here for a normal mode prediction % Case=fe_case('DofLoad','Horizontal',3.01, ... 'SensDof','Tip sensors',6.02); def=fe_eig(model); % uniform modal damping, specified by a single damping ratio xf = nor2xf(def,0.01,Case,w,'hz'); % modal damping values defined for each mode % for example all modes at 1% except the first at 2% damp=ones(size(def.data))*.01; damp(1)=.02; xf(:,2) = nor2xf(def,damp,Case,w,'hz'); % structural/hysteretic damping (complex modal stiffness is diag(freq.^2) in a % normal mode model considered here) def1=def; def1.data=def1.data*sqrt(1+.02*i); xf(:,3) = nor2xf(def1,[],Case,w,'hz'); % non-proportional viscous damping matrices. For example assuming that the % viscous damping matrix is equal to 1e-4 time the stiffness of the diagonals [C,mdof]=fe_mk(model.Node,feutil('selelt proid2',model), ... model.pl,model.il,[],model.DOF,[0 1]); ga = 1e-4*def.def'*C*def.def; % ga is the modal damping matrix xf(:,4) = nor2xf(def,ga/2/pi,Case,w,'hz'); figure(1);subplot(1,1,1); semilogy(w,abs(xf)) xlabel('Frequency (Hz)'); ylabel('FRF Amplitudes (m/N)'); title('Available damping models') legend('constant modal','varying modal','hysteretic','non-proportional'); iimouse % Notes % - complex modes can be computed using FE_CEIG % - non-proportional viscous damping model can be identified using ID_NOR eval(demosdt('echooff')) % Etienne Balmes 2/1/92, 21/07/03 % Copyright (c) 1990-2003 by SDTools, All Rights Reserved % $Revision: 1.7 $ $Date: 2005/12/02 17:09:45 $