求柱的固有频率和欧拉屈曲荷载

求柱的固有频率和欧拉屈曲荷载clearclcdisp(‘pleasewait!!!!!!-Thejobisunderrun’)%DiscretizingtheBeamnel=50;%numberofelementsnnel=2;%numberofnodesperelementndof=2;%numberofdofspernodennode=(nnel-1)*nel+1…

 

clear
clc

disp(‘please wait!!!!!!-The job is under run’)

% Discretizing the Beam

nel=50;                 % number of elements
nnel=2;                 % number of nodes per element
ndof=2;                 % number of dofs per node
nnode=(nnel-1)*nel+1;   % total number of nodes in system
sdof=nnode*ndof;        % total system dofs 

% Material properties
E=2.1*10^11;            % Youngs modulus
I=2003.*10^-8;          % moment of inertia of cross-section
mass = 61.3;            % mass density of the beam
tleng = 7.;             % total length of the beam
leng = tleng/nel;       % uniform mesh (equal size of elements)
lengthvector = 0:leng:tleng ;
% Boundary Conditions
bc = ‘c-f’ ;             % clamped-free
%bc = ‘c-c’ ;            % clamped-clamped
%bc = ‘c-s’ ;            % clamped-supported
%bc = ‘s-s’ ;            % supported-supported

kk=zeros(sdof,sdof);    % initialization of system stiffness matrix
kkg=zeros(sdof,sdof);   % initialization of system geomtric stiffness matrix 
mm=zeros(sdof,sdof);    % initialization of system mass matrix 
index=zeros(nel*ndof,1);  % initialization of index vector

for iel=1:nel           % loop for the total number of elements

index=elementdof(iel,nnel,ndof);  % extract system dofs associated with element

[k,kg,m]=beam(E,I,leng,mass); % compute element stiffness,geometric
                                   % stiffness & mass matrix
                                   
kk=assembel(kk,k,index); % assemble element stiffness matrices into system matrix
kkg=assembel(kkg,kg,index); % assemble geometric stiffness matrices into system matrix
mm=assembel(mm,m,index); % assemble element mass matrices into system matrix

end
%
% Applying the Boundary conditions
[nbcd,bcdof] = BoundaryConditions(sdof,bc); % Reducing the matrix size
[kk,mm] = constraints(kk,mm,bcdof) ;
[kk,kkg] = constraints(kk,kkg,bcdof) ;
%
% Natural frequencies and Buckling load
[vecfreq freq]=eig(kk,mm);   % solve the eigenvalue problem for Natural Frequencies
freq = diag(freq) ;
freq=sqrt(freq);   % UNITS :rad per sec
freqHz = freq/(2*pi) ; % UNITS : Hertz
%
[vecebl ebl] = eig(kk,kkg);  % solve the eigenvalue problem for Buckling Loads
ebl = diag(ebl) ;
%
% Plot Mode Shapes
h = figure ;
set(h,’name’,’Mode Shapes of Beam in rad/s’,’numbertitle’,’off’)
PlotModeShapes(vecfreq,freq,lengthvector,nbcd)
h = figure ;
set(h,’name’,’Buckling Mode shape in N’,’numbertitle’,’off’)
PlotModeShapes(vecebl,ebl,lengthvector,nbcd)
%
% Theoretical Natural Frequencies
 [thfreq,thfreqHz,pcr] =  theory(bc,E,I,mass,tleng) ;

% Code validitation
theory = thfreq(1:3) ;
fem = freq(nbcd+1:nbcd+3);
error = (fem-theory)./theory*100;
compare = [theory fem error] ;
disp(‘First three natural frequencies (rad/sec)’)
disp(‘theory        fem       error%’)
disp(‘———————————‘ )
disp(compare)
%
theory = pcr ;
fem = ebl(1);
error = (fem-theory)./theory*100 ;
compare = [theory fem error] ;
disp(‘Euler Buckling load (N)’)
disp(‘theory        fem       error%’)
disp(‘———————————‘ )
disp(compare)

求柱的固有频率和欧拉屈曲荷载

d146 

今天的文章求柱的固有频率和欧拉屈曲荷载分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/33174.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注