0% found this document useful (0 votes)
48 views

The Code For Solving Above Example of Plane Frame Is Given By

This document provides code to analyze a plane frame structure. It defines the geometry, material properties, and calculates the global stiffness matrix, structural stiffness matrix, and fixed end forces for each member. It then calculates the joint displacements and member end forces. The key steps are: 1) Define member geometry, material properties, and calculate global stiffness matrices 2) Assemble structural stiffness matrix and calculate fixed end forces 3) Calculate joint displacements by inverting structural stiffness matrix 4) Calculate member end forces using local stiffness matrices and known displacements

Uploaded by

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

The Code For Solving Above Example of Plane Frame Is Given By

This document provides code to analyze a plane frame structure. It defines the geometry, material properties, and calculates the global stiffness matrix, structural stiffness matrix, and fixed end forces for each member. It then calculates the joint displacements and member end forces. The key steps are: 1) Define member geometry, material properties, and calculate global stiffness matrices 2) Assemble structural stiffness matrix and calculate fixed end forces 3) Calculate joint displacements by inverting structural stiffness matrix 4) Calculate member end forces using local stiffness matrices and known displacements

Uploaded by

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

Plane Frame

The code for solving above example of plane frame is given by:.
1. clear all
%%
%% input data
E=29000; % kips modulus of elasticity
A=11.8; % sectional area of members
I=310; % Moment of inertia of members
%%
%% calculation of global stiffness matrix
%% for member 1
xb1=0;xe1=120;
yb1=0;ye1=240;
K1=global_stiffness_matrix(xb1,xe1,yb1,ye1);
%%form member 2
xb2=120;xe2=360;
yb2=240;ye2=240;
K2=global_stiffness_matrix(xb2,xe2,yb2,ye2);
%global stiffness matrix
function [K]=global_stiffness_matrix(xb,xe,yb,ye)
E=29000; % KN/m2 modulus of elasticity
A=11.8; % sectional area of members
I=310; % Moment of inertia of members
L=sqrt((xe-xb)^2+(ye-yb)^2); %length of member 1 is in m
co=(xe-xb)/L; % cos anagle
s=(ye-yb)/L; % sine angle
EI=E*I; %modulus of rigidity
% calcualtion of member of Global stiffness matrix for easiness
a=(A*L^2/I)*co^2+12*s^2;
b=((A*L^2/I)-12)*co*s;
c=-6*L*s;
e=6*L*co;
f=(A*L^2/I)*s^2+12*co^2;
%global matrix
K=(EI/L^3)*[a b c -a -b c;b f e -b -f e;c e 4*L^2 -c -e 2*L^2;
-a -b -c a b -c;-b -f -e b f -e;c e 2*L^2 -c -e 4*L^2];
%%
%% structural stiffness matrix
%for member 1
S1=[K1(4,4) K1(4,5) K1(4,6);K1(5,4) K1(5,5) K1(5,6);K1(6,4) K1(6,5) K1(6,6)];
S2=[K2(1,1) K2(1,2) K2(1,3);K2(2,1) K2(2,2) K2(2,3);K2(3,1) K2(3,2) K2(3,3)];
S=S1+S2;
%%
%%Transpose matrix
%for member1
T1=trans(xb1,xe1,yb1,ye1);
%for member2
T2=trans(xb2,xe2,yb2,ye2);
%%Transpose matrix
function [T]=trans(xb,xe,yb,ye)
L=sqrt((xe-xb)^2+(ye-yb)^2); %length of member 1 is in m
co=(xe-xb)/L; % cos anagle
s=(ye-yb)/L; % sine angle
z=zeros(3,3);
y=[co s 0;-s co 0;0 0 1];
T=[y z;z y];
%%
%%fixed end forces calculations
%for member 2
%local fixed end forces
w2=0.125;%K/in
Qf2=fixed_end_forces(xb2,xe2,yb2,ye2,w2);
%%fixed_end_forces
function [Qf]=fixed_end_forces(xb,xe,yb,ye,w)
L=sqrt((xe-xb)^2+(ye-yb)^2); %length of member 1 is in m
co=(xe-xb)/L; % cos anagle
s=(ye-yb)/L;
Fab=0;
Fsb=w*L/2;
Fmb=w*L^2/12;
Fae=0;
Fse=w*L/2;
Fme=-w*L^2/12;
Qf=[Fab;Fsb;Fmb;Fae;Fse;Fme];
%global fixed end forces
Ff2=T2.'*Qf2;
%for member 1
%local fixed end forces
Qf1=fixed_end_forces2(xb1,xe1,yb1,ye1);
%%fixed_end_forces
function [Qf]=fixed_end_forces(xb,xe,yb,ye)
L=sqrt((xe-xb)^2+(ye-yb)^2); %length of member 1 is in m
co=(xe-xb)/L; % cos anagle
s=(ye-yb)/L;
Fab=90*s/2;
Fsb=90*co/2;
Fmb=90*co*L/8;
Fae=90*s/2;;
Fse=90*co/2;
Fme=-90*co*L/8;
Qf=[Fab;Fsb;Fmb;Fae;Fse;Fme];
%global fixed end forces
Ff1=T1.'*Qf1;
%%
%% Structure fixed joint force vector
pf1=[Ff1(4,1); Ff1(5,1); Ff1(6,1)];
pf2=[Ff2(1,1); Ff2(2,1); Ff2(3,1)];
pf=pf1+pf2;
%% Strcuture Joint force vectors
p=[0;0;-1500];
%%
%% calculation of joint displacements
d=inv(S)*(p-pf);
d1=d(1,1);
d2=d(2,1);
d3=d(3,1);
%%
%% local stiffness matrix
%for member 1
k1=local_stiffness_matrix(xb1,xe1,yb1,ye1);
%for member 2
k2=local_stiffness_matrix(xb2,xe2,yb2,ye2);
%local stiffness matrix
function [k]=local_stiffness_matrix(xb,xe,yb,ye)
E=29000; % KN/m2 modulus of elasticity
A=11.8; % sectional area of members
I=310; % Moment of inertia of members
L=sqrt((xe-xb)^2+(ye-yb)^2); %length of member 1 is in m
co=(xe-xb)/L; % cos angle
s=(ye-yb)/L; % sine angle
EI=E*I; %modulus of rigidity
% calcualtion of member of local stiffness matrix for easiness
r=A*L^2/I;
k=(EI/L^3)*[r 0 0 -r 0 0;0 12 6*L 0 -12 6*L;0 6*L 4*L^2 0 -6*L 2*L^2;
-r 0 0 r 0 0;0 -12 -6*L 0 12 -6*L;0 6*L 2*L^2 0 -6*L 4*L^2];

%% member end forces calculations


%for member 1
v1=[0;0;0;d1;d2;d3];
u1=T1*v1;
Q1=k1*u1+Qf1% member end forces
F1=T1.'*Q1% support reactions
%for member 2
v2=[d1;d2;d3;0;0;0];
u2=T2*v2;
Q2=k2*u2+Qf2% member end forces
F2=T2.'*Q2 % support reactions

You might also like