05-Bar Element Duzeltilmis
05-Bar Element Duzeltilmis
05-Bar Element Duzeltilmis
5-Bar Element
Bar Element
ME 520
Dr. Ahmet Zafer enalp
5-Bar Element
Bar Element
Consider a uniform prismatic bar:
FE Model
L: length
A: cross-sectional area
E: elastic modulus
u=u(x): displacement
=(x): strain
=(x): stress
Strain-displacement relation:
Stress-strain relation:
ME 520
Dr. Ahmet Zafer enalp
5-Bar Element
The bar is acting like a spring in this case and we conclude that
element stiffness matrix is:
ME 520
Dr. Ahmet Zafer enalp
5-Bar Element
We derive the same stiffness matrix for the bar using a formal
approach which can be applied to many other more complicated
situations:
Define two linear shape functions as follows:
ME 520
Dr. Ahmet Zafer enalp
5-Bar Element
5-Bar Element
5-Bar Element
ME 520
Dr. Ahmet Zafer enalp
5-Bar Element
Example 1
FE Model
1
Find;
(a) the global stiffness matrix
(b) displacements of nodes
(c) the reaction forces
(d) stresses at the elements
Solution :
Connectivity table:
ME 520
Dr. Ahmet Zafer enalp
E
#
N1
N2
5-Bar Element
Example 1
Boundary conditions :
Displacement boundary conditions
u1 0,:u 2 0, u 3 0
F1 :0, F2 P, F3 0
Force boundary conditions
ME 520
Dr. Ahmet Zafer enalp
10
5-Bar Element
Example 1
Equilibrium (FE)
equation for
the whole system is;
ME 520
Dr. Ahmet Zafer enalp
11
5-Bar Element
Example 1
u1 0, u 2 0, u 3 0 F1 0, F2 P, F3 0
b) Applying boundary conditions;
ME 520
Dr. Ahmet Zafer enalp
12
5-Bar Element
Example 1
0
u1
u 2 0.5208 mm
u
0
3
ME 520
Dr. Ahmet Zafer enalp
13
5-Bar Element
Example 1
c) From the 1st and 3rd row of the finite element equation, the reaction
forces can be calculated as;
F1 -33333.3 N
F2 -16666.7 N
1 83.33 MPa
2 83.33 MPa
ME 520
Dr. Ahmet Zafer enalp
14
5-Bar Element
Notes
ME 520
Dr. Ahmet Zafer enalp
15
5-Bar Element
5-Bar Element
f k u
where f is the 2x1 element force vector and u is the 2x1
element displacement vector.
The element stress is obtained by using local stiffness matrix
and local displacement vector.
ME 520
Dr. Ahmet Zafer enalp
17
5-Bar Element
LinearBarElementStiffness(E,A,L)
This function returns the element stiffness matrix for a linear bar
with modulus of elasticity E, cross-sectional area A, and length L.
The size of the element stiffness matrix is 2 x 2.
Function contents:
function y = LinearBarElementStiffness(E,A,L)
%LinearBarElementStiffness
This function returns the element
%
stiffness matrix for a linear bar with
%
modulus of elasticity E, cross-sectional
%
area A, and length L. The size of the
%
element stiffness matrix is 2 x 2.
y = [E*A/L -E*A/L ; -E*A/L E*A/L];
ME 520
Dr. Ahmet Zafer enalp
18
5-Bar Element
LinearBarAssemble(K,k,i,j)
This function assembles the element stiffness matrix k of the linear
bar with nodes i and j into the global stiffness matrix K. This
function returns the global stiffness
matrix K after the
element stiffness matrix k is assembled.
Function contents:
function y = LinearBarAssemble(K,k,i,j)
%LinearBarAssemble
This function assembles the element stiffness
%
matrix k of the linear bar with nodes i and j
%
into the global stiffness matrix K.
%
This function returns the global stiffness
%
matrix K after the element stiffness matrix
%
k is assembled.
K(i,i) = K(i,i) + k(1,1);
K(i,j) = K(i,j) + k(1,2);
K(j,i) = K(j,i) + k(2,1);
K(j,j) = K(j,j) + k(2,2);
y = K;
ME 520
Dr. Ahmet Zafer enalp
19
5-Bar Element
LinearBarElementForces(k,u)
This function returns the element nodal force vector given the
element stiffness
matrix k and the element nodal displacement vector u.
Function contents:
function y = LinearBarElementForces(k,u)
%LinearBarElementForces
This function returns the element nodal
%
force vector given the element stiffness
%
matrix k and the element nodal displacement
%
vector u.
y = k * u;
ME 520
Dr. Ahmet Zafer enalp
20
5-Bar Element
LinearBarElementStressess_az(k, u, L, E)
This function returns the element nodal stress vector given the
element stiffness
matrix k, the element nodal
displacement vector u, the length of the element and E
Function contents:
function y = LinearBarElementStresses_az(k, u, L, E)
%LinearBarElementStresses
This function returns the element nodal
%
stress vector given the element stiffness
%
matrix k, the element nodal displacement
%
vector u, the length of the element and E
L_m=[-1/L 1/L];
y = E*L_m*u;
ME 520
Dr. Ahmet Zafer enalp
21
5-Bar Element
Solution of Example 1
with Matlab
Solution:
Use the 7 steps to solve the problem using linear bar element.
Step 1-Discretizing the domain:
This problem is already discretized. The domain is subdivided into
2 elements and 3 nodes.
The units used in Matlab calculations are N and milimeter. The
element connectivity is:
ME 520
Dr. Ahmet Zafer enalp
E
#
N1
N2
22
Solution of Example 1
with Matlab
5-Bar Element
P 5x10 4 N, E 2x10 4 N / mm 2
A 200 mm 2 , L 125 mm
23
Solution of Example 1
with Matlab
5-Bar Element
P 5x10 4 N, E 2x10 4 N / mm 2
A 200 mm 2 , L 125 mm
-64000
64000
>>k2=LinearBarElementStiffness(E,A(2),L)
ME 520
Dr. Ahmet Zafer enalp
24
Solution of Example 1
with Matlab
5-Bar Element
P 5x10 4 N, E 2x10 4 N / mm 2
A 200 mm 2 , L 125 mm
>>k2=LinearBarElementStiffness(E,A(2),L)
k2 =
32000
-32000
-32000
32000
25
5-Bar Element
Solution of Example 1
with Matlab
P 5x10 4 N, E 2x10 4 N / mm 2
A 200 mm 2 , L 125 mm
>>K=zeros(3,3)
K=
0
0
0
0
0
0
0
0
0
>>K=LinearBarAssemble(K,k1,1,2)
K=
64000
-64000
0
-64000
64000
0
0
0
0
>>K=LinearBarAssemble(K,k2,2,3)
K=
64000
-64000
0
-64000
96000
-32000
0
-32000
32000
ME 520
Dr. Ahmet Zafer enalp
26
5-Bar Element
Solution of Example 1
with Matlab
P 5x10 4 N, E 2x10 4 N / mm 2
A 200 mm 2 , L 125 mm
0
- 32000 32000
u1
F1
u 2 F2
u
F
3
3
u1 0, u 2 0, u 3 0
F1 0, F2 P, F3 0
0
- 32000 32000
ME 520
Dr. Ahmet Zafer enalp
0
F1
u 2 50000
0
F
3
27
5-Bar Element
Solution of Example 1
with Matlab
0
- 32000 32000
0
F1
u 2 50000
0
F
3
96000u 2 50000
>>u2=50000/96
000
u 0.5208
2
Step 7-Post-processing:
In this step we obtain the reactions at nodes 1 and 3 and the
stresses at each element using Matlab as follows.
First we set up the global nodal displacement vector U, then we
calculate the nodal force vector F.
ME 520
Dr. Ahmet Zafer enalp
28
Solution of Example 1
with Matlab
5-Bar Element
>>U=[0; u2; 0]
U=
0
0.5208
0
>>F=K*U
F=
1.0e+04 *
-3.3333
5.0000
-1.6667
ME 520
Dr. Ahmet Zafer enalp
29
Solution of Example 1
with Matlab
5-Bar Element
P 5x10 4 N, E 2x10 4 N / mm 2
A 200 mm 2 , L 125 mm
>>u_el_1=[U(1); U(2)]
>>u_el_2=[U(2); U(3)]
>>stress1=LinearBarElementStresses_az(k1, u_el_1, L, E)
>>stress2=LinearBarElementStresses_az(k2, u_el_2, L, E)
stress1 =
83.3333
:element stresses
stress2 =
-83.3333
ME 520
Dr. Ahmet Zafer enalp
30
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
Create a directory
Copy
LinearBarElementStiffness.m
LinearBarAssemble.m
LinearBarElementForces.m
LinearBarElementStresses_az.m
files under the created directory
Open Matlab;
Open Set Path command and by using Add Folder command add the
current directory.
ME 520
Dr. Ahmet Zafer enalp
31
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
32
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
ME 520
Dr. Ahmet Zafer enalp
33
5-Bar Element
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
u1 0, u 2 0, u 3 0.002
A 0.003 m 2
node 3 is displayed to the right
F1 0, F2 P, F3 0
by 0.002 m
FE Equation is:
0
420000 - 420000
0
- 630000 630000
u1
F1
u2 F2
u
F
3
3
0
- 630000 630000
ME 520
Dr. Ahmet Zafer enalp
F1 0, F2 P, F3 0
0
F1
u2 10
0.002
F
34
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
ME 520
Dr. Ahmet Zafer enalp
35
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
36
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
In this step, we obtain the reactions at nodes 1 and 3, and the stress in
each bar using Matlab as follows.
First we set up the global displacement vector; U, then we calculate the
golbal force vector F.
>>U=[0; u; u0]
>>F=K*U
results;
F=
-500.0000
-10.0000
510.0000
ME 520
Dr. Ahmet Zafer enalp
37
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
ME 520
Dr. Ahmet Zafer enalp
38
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
>>u2=[U(2); U(3)]
>>f2=LinearBarElementForces(k2,u2)
result is;
f2 =
-510.0000
510.0000
Finally, we call LinearBarElementStresses_az to calculate stresses.
>>sigma1=LinearBarElementStresses_az(k1, u1, L1, E)
results;
sigma1 =
1.6667e+05
ME 520
Dr. Ahmet Zafer enalp
39
Solution of Example 2
with Matlab
P 10 kN, E 210 GPa
A 0.003 m 2
node 3 is displayed to the right
5-Bar Element
u1 0, u 2 0, u 3 0.002
F1 0, F2 P, F3 0
by 0.002 m
ME 520
Dr. Ahmet Zafer enalp
40
5-Bar Element
Example 3
Given;
Find;
The support reaction forces at the two ends of the bar
Solution :
Connectivity table:
ME 520
Dr. Ahmet Zafer enalp
E#
N1
N2
41
5-Bar Element
Example 3
We first check to see if or not the contact of the bar with the wall on
the right will occur. To do this, we imagine the wall on the right is
removed and calculate the displacement at the right end,
contact occurs
BCs; u1 0, u 2 0, u 3
F1 0, F2 P, F3 0
ME 520
Dr. Ahmet Zafer enalp
42
5-Bar Element
Example 3
u1 0, u 2 0, u 3
Applying boundary conditions;
ME 520
Dr. Ahmet Zafer enalp
F1 0, F2 P, F3 0
43
5-Bar Element
Example: 3
Reaction forces:
ME 520
Dr. Ahmet Zafer enalp
44
5-Bar Element
Solution of Example 3
with Matlab
E
#
N1
N
2
contact occurs
BCs;
u1 0, u 2 0, u 3
F1 0, F2 P, F3 0
ME 520
Dr. Ahmet Zafer enalp
45
Solution of Example 3
with Matlab
5-Bar Element
E
#
N1
N
2
u1 0, u 2 0, u 3
F1 0, F2 P, F3 0
Create a directory
Copy
LinearBarElementStiffness.m
LinearBarAssemble.m
LinearBarElementForces.m
LinearBarElementStresses_az.m
files under the created directory
Open Matlab;
Open Set Path command and by using Add Folder
command add the current directory.
ME 520
Dr. Ahmet Zafer enalp
46
Solution of Example 3
with Matlab
5-Bar Element
E
#
N1
N
2
u1 0, u 2 0, u 3
F1 0, F2 P, F3 0
Start solving the problem in Command Window:
>>clearvars
>>clc
Enter the data
>>P=6e4
>>E=2e4
>>A=250
>>L=150
>>DELTA=1.2
Calculate stiffness matrices
>>k1=LinearBarElementStiffness(E,A,L)
>>k2=LinearBarElementStiffness(E,A,L)
ME 520
Dr. Ahmet Zafer enalp
47
Solution of Example 3
with Matlab
5-Bar Element
E
#
N1
N
2
u1 0, u 2 0, u 3
Assemble the global stiffness matrix;
>>K=zeros(3,3)
>>K=LinearBarAssemble(K,k1,1,2)
>>K=LinearBarAssemble(K,k2,2,3)
K is calculated as:
F1 0, F2 P, F3 0
K=
1.0e+04 *
3.3333 -3.3333
0
-3.3333 6.6667 -3.3333
0 -3.3333 3.3333
ME 520
Dr. Ahmet Zafer enalp
48
5-Bar Element
Solution of Example 3
with Matlab
E
#
N1
N
2
u1 0, u 2 0, u 3
F1 0, F2 P, F3 0
FE Equation is:
0
33333 - 33333
- 33333 66667 - 33333
0
- 33333 33333
u1
F1
u 2 F2
u
F
3
3
Apply BCs:u1 0, u 2 0, u 3
0
33333 - 33333
- 33333 66667 - 33333
0
- 33333 33333
ME 520
Dr. Ahmet Zafer enalp
F1 0, F2 P, F3 0
0
F1
u 2 60000
1 .2
F
3
49
Solution of Example 3
with Matlab
5-Bar Element
E
#
N1
N
2
u1 0, u 2 0, u 3
F1 0, F2 P, F3 0
50
Solution of Example 3
with Matlab
5-Bar Element
E
#
N1
N
2
u1 0, u 2 0, u 3
F1 0, F2 P, F3 0
>>U=[0; u; u0]
>>F=K*U
results;
F=
-50000
60000
-10000
ME 520
Dr. Ahmet Zafer enalp
51
Solution of Example 3
with Matlab
5-Bar Element
E
#
N1
N
2
u1 0, u 2 0, u 3
>>u1=[0; U(2)]
>>f1=LinearBarElementForces(k1,u1
)
results;
f1 =
F1 0, F2 P, F3 0
-50000
50000
>>u2=[U(2); U(3)]
>>f2=LinearBarElementForces(k2,u2
)
results;
f2 =
ME 520
Dr. Ahmet Zafer enalp
10000
52
Solution of Example 3
with Matlab
5-Bar Element
E
#
N1
N
2
u1 0, u 2 0, u 3
>>sigma1=LinearBarElementStresses_az(
k1, u1, L, E)
results;
sigma1 =
F1 0, F2 P, F3 0
200
>>sigma2=LinearBarElementStresses_az(
k2, u2, L, E)
results;
sigma2 =
-40
ME 520
Dr. Ahmet Zafer enalp
53
5-Bar Element
Distributed Load
ME 520
Dr. Ahmet Zafer enalp
54
5-Bar Element
Distributed Load
ME 520
Dr. Ahmet Zafer enalp
55
5-Bar Element
Distributed Load
ME 520
Dr. Ahmet Zafer enalp
56