0% found this document useful (0 votes)
230 views10 pages

Fem Odev

This document contains the solution of a planar truss system using the finite element method. It presents the node coordinates, element connectivity, applied loads, computation of the global stiffness matrix by element, boundary conditions, solution for displacements, and output of displacements, reactions, and element stresses. Element stiffness matrices are also provided for three elements.

Uploaded by

Okan Eryilmaz
Copyright
© Attribution Non-Commercial (BY-NC)
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)
230 views10 pages

Fem Odev

This document contains the solution of a planar truss system using the finite element method. It presents the node coordinates, element connectivity, applied loads, computation of the global stiffness matrix by element, boundary conditions, solution for displacements, and output of displacements, reactions, and element stresses. Element stiffness matrices are also provided for three elements.

Uploaded by

Okan Eryilmaz
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 10

ITU FACULTY OF MECHANICAL ENG.

Finite Element Analysis in Engineering


MAK 525E

Prof. Dr. Ata MUAN
2011-2012 Spring Term
1st Homework

Okan ERYILMAZ
503101232
Q1. Solve tapered beam with a hole drilled at one end using finite element method



Boundary Conditions;

Q
1
=0, M
1
=0

Tip angular rotation;


GIp
L
1
1
1
1
|

\
|
|
.

Q
1
Q
2
|

\
|
|
|
.

M
1
M
2
|

\
|
|
|
.
:=
GIp
L
1
1
1
1
|

\
|
|
.

Q
1
Q
2
|

\
|
|
|
.

GIp
L
1
1
1
1
|

\
|
|
.

Q
1
Q
2
|

\
|
|
|
.

I
p
(z):

*1mm length of shaft is divided 3pieces. So, 2500(tip point of shaft ) is equal to 7500 in the graph.

t(z):


Q2.Solve the planar truss system using the finite element
FEM CODE
% clear memory
clear all

% E; modulus of elasticity
% A: area of cross section
% L: length of bar

E=200000; A=200; EA=E*A;

% generation of coordinates and connectivities

elementNodes=[1 2;1 3;2 3;2 4;3 4;4 5;3 5;3 6;6 5;5 7;6 7;8 7;6 8];

nodeCoordinates=[0 0;0 300;300 300;300 600;600 600;900 300; 900 600;1200 300];
numberElements=size(elementNodes,1);
numberNodes=size(nodeCoordinates,1);

xx=nodeCoordinates(:,1);
yy=nodeCoordinates(:,2);

% for structure:
% displacements: displacement vector
% force: force vector
% stiffness: stiffness matrix

GDof=2*numberNodes;

% GDof: total number of degrees of freedom

displacements=zeros(GDof,1);
force=zeros(GDof,1);

% applied load at node 5,6 and 7

force(10)=-10000;
force(13)=10000;
force(12)=-20000;

% computation of the system stiffness matrix

stiffness=zeros(GDof);

for e=1:numberElements;

% elementDof: element degrees of freedom (Dof)

indice=elementNodes(e,:);

elementDof=[ indice(1)*2-1 indice(1)*2 indice(2)*2-1 indice(2)*2] ;

xa=xx(indice(2))-xx(indice(1));

ya=yy(indice(2))-yy(indice(1));

length_element=sqrt(xa*xa+ya*ya);

C=xa/length_element;

S=ya/length_element;

k1=EA/length_element*[C*C C*S -C*C -C*S; C*S S*S -C*S -S*S; -C*C -C*S C*C C*S;-C*S -S*S C*S
S*S];

if e==8

elmThirdStiff=k1;

elseif e==9

elmSecondStiff=k1;

elseif e==10

elmFirstStiff=k1;

end


stiffness(elementDof,elementDof)=stiffness(elementDof,elementDof)+k1;

end


% boundary conditions and solution

prescribedDof=[1 2 15 16];

% function to find solution in terms of global displacements

activeDof=setdiff([1:GDof], [prescribedDof]);

U=stiffness(activeDof,activeDof)\force(activeDof);

displacements=zeros(GDof,1);

displacements(activeDof)=U;






% stresses at elements

for e=1:numberElements

indice=elementNodes(e,:);

elementDof=[ indice(1)*2-1 indice(1)*2 indice(2)*2-1 indice(2)*2] ;

xa=xx(indice(2))-xx(indice(1));

ya=yy(indice(2))-yy(indice(1));

length_element=sqrt(xa*xa+ya*ya);

C=xa/length_element;

S=ya/length_element;

sigma(e)=E/length_element*[-C -S C S]*displacements(elementDof);

end

disp('stresses')

sigma

% output of displacements and reactions in tabular form
% GDof: total number of degrees of freedom of the problem

% displacements

disp('Displacements')

%displacements=displacements1;

jj=1:GDof; format
[jj' displacements]

% reactions

F=stiffness*displacements;
reactions=F(prescribedDof);
disp('reactions')









Displacements
n1 0
n2 0
n3 -0,03841
n4 -0,00576
n5 -0,03265
n6 -0,15775
n7 0,091517
n8 -0,15199
n9 0,085755
n10 -0,48286
n11 -0,0096
n12 -0,57278
n13 0,008834
n14 -0,42086
n15 0
n16 0

Reactions
R1x 8975,652
R1y 9743,913
R2x -18975,7
R2y 20256,09


Stresses

2 -3,84131
3 -63,4674
4 3,841306
5 -5,43243
6 3,841306
7 -3,84131
8 -68,8999
9 7,682612
10 -1,81081
11 -51,2804
12 101,2804
13 -143,232
14 6,402177




Element stiffness matrices;

Element1:
133333,3 0
0 0
-133333 0
0 0

Element2:
47140,45 -47140,5 -47140,5 47140,45
-47140,5 47140,45 47140,45 -47140,5
-47140,5 47140,45 47140,45 -47140,5
47140,45 -47140,5 -47140,5 47140,45

Element3:
66666,67 0 -66666,7 0
0 0 0 0
-66666,7 0 66666,67 0
0 0 0 0

You might also like