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

1595 篇文章 1599 订阅

 

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 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fpga和matlab

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值