Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Help with 3 Storey Frame Structure Using Stiffness Method

Status
Not open for further replies.

Tygra_1983

Student
Oct 8, 2021
111
0
0
GB
Hi there guys,

I am working on a problem that is a 3 storey rigid frame structure using the Stiffness Method. I have checked and checked it and there seems to be nothing wrong with it. However, I am getting incorrect values for the moments at the nodes. I am comparing my code with SAP2000, and SAP2000 is producing different results.

Here is the structure with its loading and the lablled nodes.

20230819_153636_1_utzmlm.jpg


Here is my Ocatve/MATLAB code:

[tt]clear, clc, close all

E = 2.1E+08;
I = 8.622E-04;
L = 5;
n = 12;

K = [4*E*I/L 2*E*I/L;
2*E*I/L 4*E*I/L]

T1 = zeros(2,n)
T2 = zeros(2,n)
T1(1,1) =1;
T1(2,2) = 1;
T2(1,2) = 1;
T2(2,6) = 1;

Km1 = T1'*K*T1;
Km2 = T2'*K*T2;


for i = 1:13
Tn:),:,i) = circshift(T1,[0,i])
if i >= 3
Tn:),:,i) = circshift(T1,[0,i+1])
if i >=6
Tn:),:,i) = circshift(T1,[0,i+2])

if i >= 9
Tn:),:,i) = circshift(T2,[0,i-8])
if i >=11
Tn:),:,i) = circshift(T2,[0,i-7])
endif
endif
endif
endif
end

for i = 1:13
Km:),:,i) = Tn:),:,i)'*K*Tn:),:,i);
end

Z = Km:),:,1)
for i = 1:12
Z = Z + Km:),:,i+1);
end

Ks = Km1 + Km2 + Z

Ks([1,5,9],:) = []
Ks:),[1,5,9]) = []

F = [-41.6; 41.6; 0; 0; 0; 0; 0; 0;0]

theta = inv(Ks)*F
[/tt]

I am hoping there is somebody here that knows a bit about Octave/MATLAB and has experience with the Stiffness Method. Then you can copy and paste my code into Octave/MATLAB and check through it. As you can see I am working also on my programming skills. so, I hope this question is not too tendious and time consuming for you guys.

Many Thanks
 
Replies continue below

Recommended for you

Your stiffness matrix only appears to account for the bending stiffness. SAP is likely taking into account the axial stiffness as well as shear deformation.
 
Hi Celt83,

Yes, you are right. However, you can still view the rotations seperately from the axial and shear deformation.

Sap_kfkap2.jpg


What's more, I have tried simpler structures using bending stiffness only and have retrieved the correct results.
 
get yourself a copy of this book: Matrix Analysis of Structures by Kassimali

You have a laterally loaded moment frame the axial stiffness of the columns is a significant component of the analysis. On a second pass look your force vector F is not consistent with the applied loading you have shown in your sketch, you should be applying the fixed end forces to the joints to be consistent with a uniform load.


"What's more, I have tried simpler structures using bending stiffness only and have retrieved the correct results."

Bending stiffness only is really only applicable to continuous beam structures once you start introducing columns you need to be utilizing the full 2D stiffness matrix which includes bending and axial stiffness.
 
Status
Not open for further replies.
Back
Top