0% found this document useful (0 votes)
87 views4 pages

Frame Example 1

Uploaded by

gajula pavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views4 pages

Frame Example 1

Uploaded by

gajula pavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Table of Contents

Stiffness Method for Frame Analysis ...................................................................................... 1


Inputs ................................................................................................................................ 1
Stiffness Calculations ........................................................................................................... 2
Output ............................................................................................................................... 3

Stiffness Method for Frame Analysis


CES 6106, Spring 2020, Jennifer A. Bridge, Ph.D

clear all; clc;

Inputs
% All units in kips and inches
ndof = 15;
nelem = 4;
elemdof = 6;
fixeddof = 5;
freedof = ndof-fixeddof;

%Element properties (kips and inches)


E = [29000 10000 10000 29000];
A = [29.8 30.6 30.6 29.8];
I = [2420 3100 3100 2420];

%Frame geometry
%Element coordinates
xy=[0 240;
240 96;
240 -96;
0 -240];

% Element Lengths
for i = 1:nelem
L(i)=sqrt((xy(i,1))^2 + (xy(i,2))^2);
end

ConMat = [11 12 13 1 2 3;
1 2 3 4 5 6;
4 5 6 7 8 9;
7 8 9 14 15 10]; %connectivity matrix

%Load vector
Pf = [0 0 0 0 0 0 0 0 0 0]';

%Fixed End Forces


FEFbar=zeros(elemdof,nelem);

1
FEF=zeros(elemdof,nelem);
w=0.25;
FEFbar(:,2)=[0 w*L(2)/2 w*L(2)^2/12 0 w*L(2)/2 -w*L(2)^2/12];
Ph = 20; Pv= 45;
FEFbar(:,3)=[-Ph/2 Pv/2 Pv*L(3)/8 -Ph/2 Pv/2 -Pv*L(3)/8];

Stiffness Calculations
for i = 1:nelem
term1=A(i)*E(i)/L(i);
term2=12*E(i)*I(i)/(L(i))^3;
term3=6*E(i)*I(i)/(L(i))^2;
term4=4*E(i)*I(i)/(L(i));
term5=2*E(i)*I(i)/(L(i));
%stiffness for element i
kbar(:,:,i) = [term1 0 0 -term1 0 0;
0 term2 term3 0 -term2 term3;
0 term3 term4 0 -term3 term5;
-term1 0 0 term1 0 0;
0 -term2 -term3 0 term2 -term3;
0 term3 term5 0 -term3 term4];
%transformation matrix for element i
T(:,:,i) = (1/L(i))*[xy(i,1) xy(i,2) 0 0 0 0;
-xy(i,2) xy(i,1) 0 0 0 0;
0 0 L(i) 0 0 0
0 0 0 xy(i,1) xy(i,2) 0;
0 0 0 -xy(i,2) xy(i,1) 0
0 0 0 0 0 L(i)];
%transformed stiffness for element i
k(:,:,i)=T(:,:,i)'*kbar(:,:,i)*T(:,:,i); %T'*kbar*T
end

%Global stiffness matrix assembly


K=stiffness_assembly(k,ndof,nelem,elemdof,ConMat);

%Global FEF vector assembly


PF = zeros(ndof,1); %initialize matrix
for i = 1:nelem
FEF(:,i)=T(:,:,i)'*FEFbar(:,i); %transform from local to global
coords.
PFtemp = zeros(ndof,1);
for d = 1:elemdof
PFtemp(ConMat(i,d)) = FEF(d,i);
end
PF=PF+PFtemp;
end

%Partition global stiffness matrix


Kff = K(1:freedof,1:freedof);
Ksf = K(freedof+1:ndof,1:freedof);
%Partition global FEF fector
PFf = PF(1:freedof);

2
PFs = PF(freedof+1:ndof);

%Displacements
uf = Kff\(Pf-PFf); %Displacement vector for free DOF
us = zeros(ndof-freedof,1);
u=[uf;us]; %total displacement vector for all DOF

%Reactions
Ps = Ksf*uf+PFs;

%Element force recovery


Fbar=force_recovery(k,u,nelem,elemdof,ConMat,T);
Fbar=Fbar+FEFbar;

Output
%Output
fprintf('Nodal Displacement (in and rad)\n')
for i=1:freedof
fprintf('DOF %d\n',i)
fprintf('%4.5f\n',uf(i))
end
fprintf('\nElement Forces (k and k-in)\n')
for i=1:nelem
fprintf('Element %d\n',i)
fprintf('%4.2f\n',Fbar(:,i))
end
fprintf('\nReactions (k and k-in)\n')
for i=1:ndof-freedof
fprintf('DOF %d\n',i+freedof)
fprintf('%4.2f\n',Ps(i))
end

Nodal Displacement (in and rad)


DOF 1
0.98658
DOF 2
-0.01315
DOF 3
-0.00775
DOF 4
1.46005
DOF 5
-1.22962
DOF 6
0.00230
DOF 7
1.91427
DOF 8
-0.01717
DOF 9
-0.00184
DOF 10

3
-0.01105

Element Forces (k and k-in)


Element 1
47.37
3.41
2677.25
-47.37
-3.41
-1857.79
Element 2
14.42
45.25
1857.79
-14.42
19.38
1485.77
Element 3
23.81
-4.09
-1485.77
-43.81
49.09
-5386.21
Element 4
61.84
22.44
5386.21
-61.84
-22.44
0.00

Reactions (k and k-in)


DOF 11
-3.41
DOF 12
47.37
DOF 13
2677.25
DOF 14
-22.44
DOF 15
61.84

Published with MATLAB® R2020a

You might also like