Commit 05bb7555 authored by Andreas Zilian's avatar Andreas Zilian
Browse files

Return just the elastic stiffness.

parent 7e382500
...@@ -20,11 +20,11 @@ classdef Member2D < mafe.Li2Element2D ...@@ -20,11 +20,11 @@ classdef Member2D < mafe.Li2Element2D
end end
%% provide element index vector of dof %% provide element index vector of dof
function idx = getDofSysIndices(self) function idx = getDofSysIndices(self)
disp1 = find( [self.node.dof] == mafe.DofType.Disp1 ); disp1 = find( [self.node.dof] == mafe.DofType.Disp1 );
disp2 = find( [self.node.dof] == mafe.DofType.Disp2 ); disp2 = find( [self.node.dof] == mafe.DofType.Disp2 );
rota3 = find( [self.node.dof] == mafe.DofType.Rota3 ); rota3 = find( [self.node.dof] == mafe.DofType.Rota3 );
ndidx = [ self.node.idx ]; ndidx = [ self.node.idx ];
idx = [ ndidx(disp1(1)), ndidx(disp2(1)), ndidx(rota3(1)), ndidx(disp1(2)), ndidx(disp2(2)), ndidx(rota3(2)) ]; idx = [ ndidx(disp1(1)), ndidx(disp2(1)), ndidx(rota3(1)), ndidx(disp1(2)), ndidx(disp2(2)), ndidx(rota3(2)) ];
end end
%% calculate transformation matrix local->global %% calculate transformation matrix local->global
function [L, T] = transform(self) function [L, T] = transform(self)
...@@ -41,7 +41,7 @@ classdef Member2D < mafe.Li2Element2D ...@@ -41,7 +41,7 @@ classdef Member2D < mafe.Li2Element2D
%% calculation of element stiffness matrix %% calculation of element stiffness matrix
function ele_mat = stiffness(self) function ele_mat = stiffness(self)
% global element matrix % global element matrix
ele_mat = self.stiffnessElastic() + self.stiffnessGeometric(); ele_mat = self.stiffnessElastic();
end end
%% calculation of element elastic stiffness matrix %% calculation of element elastic stiffness matrix
function ele_mat = stiffnessElastic(self) function ele_mat = stiffnessElastic(self)
...@@ -52,15 +52,15 @@ classdef Member2D < mafe.Li2Element2D ...@@ -52,15 +52,15 @@ classdef Member2D < mafe.Li2Element2D
EI = self.sect.E * self.sect.Iy; EI = self.sect.E * self.sect.Iy;
% local element matrix % local element matrix
h1 = 2*EI/L; h1 = 2*EI/L;
h2 = 6*EI/L^2; h2 = 6*EI/L^2;
h3 = 12*EI/L^3; h3 = 12*EI/L^3;
h4 = EA/L; h4 = EA/L;
ele_mat_local = [ +h4, 0, 0, -h4, 0, 0 ; ele_mat_local = [ +h4, 0, 0, -h4, 0, 0 ;
0, +h3, +h2, 0, -h3, +h2 ; 0, +h3, +h2, 0, -h3, +h2 ;
0, +h2, 2*h1, 0, -h2, +h1 ; 0, +h2, 2*h1, 0, -h2, +h1 ;
-h4, 0, 0, +h4, 0, 0 ; -h4, 0, 0, +h4, 0, 0 ;
0, -h3, -h2, 0, +h3, -h2 ; 0, -h3, -h2, 0, +h3, -h2 ;
0, +h2, +h1, 0, -h2, 2*h1 ]; 0, +h2, +h1, 0, -h2, 2*h1 ];
% global element matrix % global element matrix
ele_mat = T' * (ele_mat_local) * T; ele_mat = T' * (ele_mat_local) * T;
end end
...@@ -91,15 +91,15 @@ classdef Member2D < mafe.Li2Element2D ...@@ -91,15 +91,15 @@ classdef Member2D < mafe.Li2Element2D
rhoA = self.sect.rho * self.sect.A; rhoA = self.sect.rho * self.sect.A;
% local element matrix % local element matrix
h1 = rhoA/420 * L^3; h1 = rhoA/420 * L^3;
h2 = rhoA/420 * L^2; h2 = rhoA/420 * L^2;
h3 = rhoA/420 * L; h3 = rhoA/420 * L;
h4 = rhoA/6 * L; h4 = rhoA/6 * L;
ele_mat_local = [ 2*h4, 0, 0, 1*h4, 0, 0 ; ... ele_mat_local = [ 2*h4, 0, 0, 1*h4, 0, 0 ; ...
0, 156*h3, 22*h2, 0, 54*h3, -13*h2 ; ... 0, 156*h3, 22*h2, 0, 54*h3, -13*h2 ; ...
0, 22*h2, 4*h1, 0, 13*h2, -3*h1 ; ... 0, 22*h2, 4*h1, 0, 13*h2, -3*h1 ; ...
1*h4, 0, 0, 2*h4, 0, 0 ; ... 1*h4, 0, 0, 2*h4, 0, 0 ; ...
0, 54*h3, 13*h2, 0, 156*h3, -22*h2 ; ... 0, 54*h3, 13*h2, 0, 156*h3, -22*h2 ; ...
0, -13*h2, -3*h1, 0, -22*h2, 4*h1 ]; 0, -13*h2, -3*h1, 0, -22*h2, 4*h1 ];
% global element matrix % global element matrix
ele_mat = T' * ele_mat_local * T; ele_mat = T' * ele_mat_local * T;
end end
...@@ -171,27 +171,27 @@ classdef Member2D < mafe.Li2Element2D ...@@ -171,27 +171,27 @@ classdef Member2D < mafe.Li2Element2D
ww1 = T(1,1) * uu + T(2,1) * ww; ww1 = T(1,1) * uu + T(2,1) * ww;
ww2 = T(1,2) * uu + T(2,2) * ww; ww2 = T(1,2) * uu + T(2,2) * ww;
% %
% defaults % defaults
lcolor = [0.6 0.6 0.6]; lcolor = [0.6 0.6 0.6];
mcolor = [0.2 0.2 0.2]; mcolor = [0.2 0.2 0.2];
lwidth = 0.5; lwidth = 0.5;
mwidth = 10.; mwidth = 10.;
ecolor = [0.4 0.4 0.4]; ecolor = [0.4 0.4 0.4];
marker = '.'; marker = '.';
% %
switch config switch config
case 'deformed' case 'deformed'
XX1 = xx1+ww1*scale; XX1 = xx1+ww1*scale;
XX2 = xx2+ww2*scale; XX2 = xx2+ww2*scale;
lcolor = [43.9, 50.6, 0.0]/100; lcolor = [43.9, 50.6, 0.0]/100;
mcolor = [43.9, 50.6, 0.0]/100; mcolor = [43.9, 50.6, 0.0]/100;
falpha = 0.6; falpha = 0.6;
lwidth = 1.0; lwidth = 1.0;
mwidth = 20.; mwidth = 20.;
case 'intensity' case 'intensity'
XX1 = xx1; XX1 = xx1;
XX2 = xx2; XX2 = xx2;
normalforce = 0.5 * ( -self.internal(1) + self.internal(4) ); normalforce = 0.5 * ( -self.internal(1) + self.internal(4) );
if normalforce < 0.0 if normalforce < 0.0
lcolor = 'b';%[15.3, 31.0, 54.5]/100; lcolor = 'b';%[15.3, 31.0, 54.5]/100;
elseif normalforce > 0.0 elseif normalforce > 0.0
...@@ -200,15 +200,15 @@ classdef Member2D < mafe.Li2Element2D ...@@ -200,15 +200,15 @@ classdef Member2D < mafe.Li2Element2D
lcolor = 'g';%[58.8, 65.5, 7.8]/100; lcolor = 'g';%[58.8, 65.5, 7.8]/100;
end end
mcolor = [0.0 0.0 0.0 0.0]; mcolor = [0.0 0.0 0.0 0.0];
falpha = 0.6; falpha = 0.6;
lwidth = 2.0; lwidth = 2.0;
mwidth = 0.1; mwidth = 0.1;
otherwise otherwise
plot@mafe.Li2Element2D(self, config, scale); plot@mafe.Li2Element2D(self, config, scale);
return; return;
end end
mafe.patchline(XX1, XX2, ... mafe.patchline(XX1, XX2, ...
'EdgeColor', lcolor, ... 'EdgeColor', lcolor, ...
'LineWidth', lwidth, ... 'LineWidth', lwidth, ...
'EdgeAlpha', falpha); 'EdgeAlpha', falpha);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment