forked from Mrunzzz/Advanced-Structural-Analysis-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMD_estiff_2ndnode_MyMz_release.m
105 lines (85 loc) · 2.86 KB
/
MD_estiff_2ndnode_MyMz_release.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
function [elk] = MD_estiff_2ndnode_MyMz_release (A, Izz, Iyy, J, Ayy, Azz, E, v, L)
% Code developed by Mrunmayi Mungekar and Devasmit Dutta
%
% MD_estiff.m computes the element stiffness matrix for a given element with finish node flexurally released
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Functions Called
% none
%
% Dictionary of Variables
% Input information
% A = cross-sectional area
% Izz = moment of inertia about local z-axis
% Iyy = moment of inertia about local y-axis
% J = torsional constant
% Ayy = shear area along local y-axis
% Azz = shear area along local z-axis
% E = Young's modulus
% v = Poisson's ratio
% L = element length
% G = shear modulus
% elk_temp = temporary element stiffness matrix (just the lower triangular part)
% kA = axial stiffness
% kJ = torsional stiffness
% etaz = shear coefficient along local z-axis
% etay = shear coefficient along local y-axis
%
% Output information
% elk = complete element stiffness matrix
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Consolidating the geometric and material properties
if(Izz == 0)
Izz = Iyy;
elseif(Iyy == 0)
Iyy = Izz;
elseif(J == 0)
J = (Izz + Iyy)/10;
end
G = E / (2 + 2 * v);
elk_temp = zeros(12, 12);
kA = E * A / L;
kJ = G * J / L;
etaz = E * Iyy / (Azz * G);
etay = E * Izz / (Ayy * G);
% Formulating lower half of the symmetric Kele
elk_temp(:, 1) = [kA; ...
zeros(5,1); -kA;...
zeros(5,1)];
elk_temp(:, 2) = E * Izz * [0; 1/4; ...
zeros(3,1); L / 4; ...
0; -1/4;...
zeros(3,1); 0] / (L * (L ^ 2/12 + etay));
elk_temp(:, 3) = E * Iyy * [zeros(2, 1); 1/4;...
0; -L / 4; ...
zeros(3,1); -1/4;...
0; 0;...
0] / (L * (L ^ 2/12 + etaz));
elk_temp(:, 4) = [zeros(3, 1); kJ;...
zeros(5,1); -kJ;...
0; 0];
elk_temp(:, 5) = E * Iyy * [zeros(4, 1); (L ^ 2/4 + etaz);...
zeros(3,1);...
-L / 4; 0;...
0; 0] / (L * (L ^ 2/12 + etaz));
elk_temp(:, 6) = E * Izz * [zeros(5, 1); (L ^ 2/4 + etay);...
0; -L / 4;...
zeros(3,1); 0] / (L * (L ^ 2/12 + etay));
elk_temp(:, 7) = [zeros(6, 1); kA;...
zeros(5,1);];
elk_temp(:, 8) = E * Izz * [zeros(7, 1); 1/4;...
zeros(3,1); 0] / (L * (L ^ 2/12 + etay));
elk_temp(:, 9) = E * Iyy * [zeros(8, 1); 1/4;...
0; 0;...
0] / (L * (L ^ 2/12 + etaz));
elk_temp(:, 10) = [zeros(9, 1); kJ;...
0; 0];
elk_temp(:, 11) = zeros(12,1);
elk_temp(:, 12) = zeros(12,1);
% Inverting the lower half to form the entire symmetric matrix
[n, ~] = size(elk_temp);
elk = elk_temp' + elk_temp;
elk(1:n + 1:end) = diag(elk_temp);