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