-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfebeam4.m
66 lines (48 loc) · 1.72 KB
/
febeam4.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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