⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 febeam4.m

📁 采用Matlab编写的有限元方法
💻 M
字号:
function [k,m]=febeam4(el,xi,leng,sh,heig,rho,ipt)

%--------------------------------------------------------------
%  Purpose:
%     Stiffness and mass matrices for mixed beam element
%     bending moment and deflection as nodal degrees of freedom
%     nodal dof {M_1 v_1 M_2 v_2}
%
%  Synopsis:
%     [k,m]=febeam4(el,xi,leng,sh,heig,rho,ipt) 
%
%  Variable Description:
%     k - element stiffness matrix (size of 4x4)     
%     m - element mass matrix (size of 4x4)
%     el - elastic modulus 
%     xi - second moment of inertia of cross-section
%     leng - length of the beam element
%     sh - shear modulus              
%     heig - beam thickness
%     rho - mass density of the beam element (mass per unit volume)
%     ipt = 1           - lumped mass matrix
%         = otherwise   - diagonalized mass matrix
%---------------------------------------------------------------

% stiffness matrix

 if sh == 0

% thin beam (no shear deformation)

 k= [ leng/(3*el*xi)     1/leng   leng/(6*el*xi)    -1/leng;...
      1/leng             0          -1/leng          0;...       
      leng/(6*el*xi)    -1/leng   leng/(3*el*xi)     1/leng;...
     -1/leng             0           1/leng          0 ];

 else  

% thick beam (includes shear deformation)

 a=6/(5*sh*leng*heig);
 k= [ 1/(3*el*xi)+a   1/leng      1/(6*el*xi)-a  -1/leng;...
      1/leng          0          -1/leng          0;...       
      1/(6*el*xi)-a  -1/leng      1/(3*el*xi)+a   1/leng;...
     -1/leng          0           1/leng          0 ];

 end

% lumped mass matrix

if ipt==1

    m=zeros(4,4);
    mass=rho*heig*leng/2;
    m=diag([0  1  0  1]);

% diagonal mass matrix

else
        
    m=zeros(4,4);
    mass=rho*heig*leng/2;
    m=mass*diag([1  1  1  1]);

end
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -