BeamElementStiffness_axial_az( E,A,I,L)

advertisement
ME 520
Fundamentals of Finite Element Analysis
9-Beam Element with Axial Force
Dr. Ahmet Zafer Şenalp
e-mail: azsenalp@gmail.com
Mechanical Engineering Department
Gebze Technical University
9-Beam Element with Axial Force
Formal Approach
Apply the formula,
To derive this, we introduce the shape functions:
Then, we can represent the deflection as:
which is a cubic function. Notice that,
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
2
9-Beam Element with Axial Force
Formal Approach
which implies that the rigid body motion is represented by the assumed deformed
shape of the beam. Curvature of the beam is,
where the strain-displacement matrix B is given by,
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
3
9-Beam Element with Axial Force
Formal Approach
Strain energy stored in the beam element is:
We conclude that the stiffness matrix for the simple beam element is
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
4
Formal Approach
9-Beam Element with Axial Force
Combining the axial stiffness (bar element), we obtain the stiffness matrix of a general
2-D beam element:
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
5
Solution procedure with matlab
9-Beam Element with Axial Force
It is clear that the beam element has 6 degrees of freedom (3 at each node)
For a structure with n nodes, the global stiffness matrix K will be of size 3nx3n.
The global stiffness matrix K is obtained by making calls to the Matlab function
BeamAssemble which is written for this purpose.
Once the global stiffness matrix; K is obtained we have the following structure
equation;
K U  F
where U is the global nodal displacement vector and F is the global nodal force
vector.
At this step boundary conditions are applied manually to the vectors U and F.
Then the matrix equation is solved by partitioning and Gaussion elimination.
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
6
Solution procedure with matlab
9-Beam Element with Axial Force
Finally once the unknown displacements and and reactions are found, the force is
obtained for each element as follows:
f   K u
where f is the 6x1 nodal force vector in the element and u is the 6x1 element
displacement vector.
The first, second and third elements in each vector uare the axial displacement,
transverse displacement and rotation, respectively, at the first node, while the fourth
fifth and sixth elements in each vector uare the axial displacement, transverse
displacement and rotation, respectively, at the second node.
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
7
9-Beam Element with Axial Force
Matlab functions used
The 5 Matlab functions used for the beam element are:
BeamElementStiffness_axial_az( E,A,I,L)
This function returns the element stiffness matrix for a beam element with axial
force with modulus of elasticity E, area A, moment of inertia I, and length L. The
size of the element stiffness matrix is 6 x 6.
Function contents:
function y = BeamElementStiffness_axial_az(E,A,I,L)
%BeamElementStiffness
This function returns the element
%
stiffness matrix for a beam
%
element with axial force
%
with modulus of elasticity E,
%
with area A
%
moment of inertia I, and length L.
%
The size of the element stiffness
%
matrix is 6 x 6.
c=E*A/L;
c12=2*E*I/(L);
c14=4*E*I/(L);
c2=6*E*I/(L*L);
c3=12*E*I/(L*L*L);
y = [c 0 0 -c 0 0;
0 c3 c2 0 -c3 c2;
0 c2 c14 0 -c2 c12;
-c 0 0 c 0 0;
0 -c3 -c2 0 c3 -c2;
0 c2 c12 0 -c2 c14];
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
8
Matlab functions used
9-Beam Element with Axial Force
BeamAssemble_axial(K,k,i,j)
This function assembles the element stiffness matrix k of the beam element with
nodes i and j into the global stiffness matrix K. This function returns the 3nx3n
global stiffness matrix K after the element stiffness matrix k is assembled.
Function contents:
function y = BeamAssemble_axial(K,k,i,j)
%BeamAssemble_axial
This function assembles the element stiffness
%
matrix k of the beam element 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(3*i-2,3*i-2) = K(3*i-2,3*i-2) + k(1,1);
K(3*i-2,3*i-1) = K(3*i-2,3*i-1) + k(1,2);
K(3*i-2,3*i) = K(3*i-2,3*i) + k(1,3);
K(3*i-2,3*j-2) = K(3*i-2,3*j-2) + k(1,4);
K(3*i-2,3*j-1) = K(3*i-2,3*j-1) + k(1,5);
K(3*i-2,3*j) = K(3*i-2,3*j) + k(1,6);
K(3*i-1,3*i-2) = K(3*i-1,3*i-2) + k(2,1);
K(3*i-1,3*i-1) = K(3*i-1,3*i-1) + k(2,2);
K(3*i-1,3*i) = K(3*i-1,3*i) + k(2,3);
K(3*i-1,3*j-2) = K(3*i-1,3*j-2) + k(2,4);
K(3*i-1,3*j-1) = K(3*i-1,3*j-1) + k(2,5);
K(3*i-1,3*j) = K(3*i-1,3*j) + k(2,6);
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
9
9-Beam Element with Axial Force
Matlab functions used
K(3*i,3*i-2) = K(3*i,3*i-2) + k(3,1);
K(3*i,3*i-1) = K(3*i,3*i-1) + k(3,2);
K(3*i,3*i) = K(3*i,3*i) + k(3,3);
K(3*i,3*j-2) = K(3*i,3*j-2) + k(3,4);
K(3*i,3*j-1) = K(3*i,3*j-1) + k(3,5);
K(3*i,3*j) = K(3*i,3*j) + k(3,6);
K(3*j-2,3*i-2) = K(3*j-2,3*i-2) + k(4,1);
K(3*j-2,3*i-1) = K(3*j-2,3*i-1) + k(4,2);
K(3*j-2,3*i) = K(3*j-2,3*i) + k(4,3);
K(3*j-2,3*j-2) = K(3*j-2,3*j-2) + k(4,4);
K(3*j-2,3*j-1) = K(3*j-2,3*j-1) + k(4,5);
K(3*j-2,3*j) = K(3*j-2,3*j) + k(4,6);
K(3*j-1,3*i-2) = K(3*j-1,3*i-2) + k(5,1);
K(3*j-1,3*i-1) = K(3*j-1,3*i-1) + k(5,2);
K(3*j-1,3*i) = K(3*j-1,3*i) + k(5,3);
K(3*j-1,3*j-2) = K(3*j-1,3*j-2) + k(5,4);
K(3*j-1,3*j-1) = K(3*j-1,3*j-1) + k(5,5);
K(3*j-1,3*j) = K(3*j-1,3*j) + k(5,6);
K(3*j,3*i-2) = K(3*j,3*i-2) + k(6,1);
K(3*j,3*i-1) = K(3*j,3*i-1) + k(6,2);
K(3*j,3*i) = K(3*j,3*i) + k(6,3);
K(3*j,3*j-2) = K(3*j,3*j-2) + k(6,4);
K(3*j,3*j-1) = K(3*j,3*j-1) + k(6,5);
K(3*j,3*j) = K(3*j,3*j) + k(6,6);
y = K;
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
10
Matlab functions used
9-Beam Element with Axial Force
BeamElementForces(k,u)
This function calculates the element element force vector using the element
stiffness matrix k and the element displacement vector u. It returns the 6x1
element force vector f
Function contents:
function y = BeamElementForces(k,u)
%BeamElementForces
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
Mechanical Engineering Department, GTU
11
Matlab functions used
9-Beam Element with Axial Force
BeamElementShearDiagram(f, L)
This function plots the shear force diagram for the beam element with nodal
force vector f and length L.
Function contents:
function y = BeamElementShearDiagram(f, L)
%BeamElementShearDiagram
This function plots the shear force
%
diagram for the beam element with nodal
%
force vector f and length L.
x = [0 ; L];
z = [f(1) ; -f(3)];
hold on;
title('Shear Force Diagram');
plot(x,z);
y1 = [0 ; 0];
plot(x,y1,'k')
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
12
Matlab functions used
9-Beam Element with Axial Force
BeamElementMomentDiagram(f, L)
This function plots the bending moment diagram for the beam element with nodal
force vector f and length L.
Function contents:
function y = BeamElementMomentDiagram(f, L)
%BeamElementMomentDiagram
This function plots the bending moment
%
diagram for the beam element with nodal
%
force vector f and length L.
x = [0 ; L];
z = [-f(2) ; f(4)];
hold on;
title('Bending Moment Diagram');
plot(x,z);
y1 = [0 ; 0];
plot(x,y1,'k')
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
13
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
Consider the beam as shown
Given
E=210 GPa
A=0.025 m2
I=60x10-6 m4
P1=20 kN
P2=30 kN
L=2 m
Determine:
a) the global stiffness matrix for the structure
b) horizontal and vertical displacements at node 2
c) rotations at nodes 2 and 3
d) the reactions at nodes 1 and 3
e) the forces (shears and moments) in each element
f) the shear force diagram for each element
g) the bending moment diagram for each element
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
14
9-Beam Element with Axial Force
Solution of Example 1 with Matlab
Solution:
Use the 7 steps to solve the problem using beam element.
Step 1-Discretizing the domain:
We will put a node (node2) at the location of the concentrated force so that we
may determine the required quantities (displacements, rotation, shear, moment) at
that point.
The domain is subdivided into two elements and three nodes. The units used in
Matlab calculations are kN and meter. The element connectivity is:
ME 520
Dr. Ahmet Zafer Şenalp
E#
N1
N2
1
1
2
2
2
3
Mechanical Engineering Department, GTU
15
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
Step 2-Copying relevant files and starting Matlab
Create a directory
Copy
BeamElementStiffness_axial_az.m
BeamAssemble_axial.m
BeamElementForces.m
BeamElementShearDiagram.m
BeamElementMomentDiagram.m
files under the created directory
Open Matlab;
Open ‘Set Path’ command and by using ‘Add Folder’ command add the current
directory.
Start solving the problem in Command Window:
>>clearvars
>>clc
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
16
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
Step 3-Writing the element stiffness matrices:
The two element stiffness matrices k1 and k2 are obtained by making calls to the
Matlab function BeamElementStiffness_axial_az. Each matrix has size 6x6.
Enter the data
>>E=210e6
>>A=0.025
>>I=60e-6
>>L=2
>>k1=BeamElementStiffness_axial_az(E,A,I,L)
k1 =
2625000
0
0
18900
0
18900
-2625000
0
0 -18900
0
18900
ME 520
Dr. Ahmet Zafer Şenalp
0 -2625000
0
18900
0 -18900
25200
0 -18900
0 2625000
0
-18900
0
18900
12600
0 -18900
0
18900
12600
0
-18900
25200
Mechanical Engineering Department, GTU
17
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>k2=BeamElementStiffness_axial_az(E,A,I,L)
k2 =
2625000
0
0
18900
0
18900
-2625000
0
0 -18900
0
18900
0 -2625000
0
18900
0 -18900
25200
0 -18900
0 2625000
0
-18900
0
18900
12600
0 -18900
0
18900
12600
0
-18900
25200
Step 4-Assembling the global stiffness matrix:
Since the structure has 3 nodes, the size of the global stiffness matrix is 9x9.
>>K=zeros(9,9)
>>K=BeamAssemble_axial(K,k1,1,2)
>>K=BeamAssemble_axial(K,k2,2,3)
K=
2625000
0
0
18900
0
18900
-2625000
0
0 -18900
0
18900
0
0
0
0
0
0
0 -2625000
0
0
0
0
0
18900
0 -18900
18900
0
0
0
25200
0 -18900
12600
0
0
0
0 5250000
0
0 -2625000
0
0
-18900
0
37800
0
0 -18900
18900
12600
0
0
50400
0 -18900
12600
0 -2625000
0
0 2625000
0
0
0
0 -18900 -18900
0
18900 -18900
0
0
18900
12600
0 -18900
25200
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
18
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
Step 5-Applying the boundary conditions:
Finite element equation for the problem is;
 u1   F1x 
v   F 
 1   1y 
 1   M1 
   
u 2   F2 x 
K v 2    F2 y 
   M 
 2  2
u 3   F3 x 
v   F 
 3   3y 
 3  M 3 
The boundary conditions for the problem are;
u1  0, v1  0, 1  0, u 2  0, v 2  0,  2  0, u 3  0, v 3  0, 3  0
F1x  0, F1y  0, M1  0, F2x  30, F2y  20, M 2  0, F3x  0, F3y  0, M 3  0
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
19
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
Inserting the above conditions into finite element equation
 0   F1x 
0 F 
   1y 
 0   M1 
  

u
30
2
  

  
K v 2    20
   0 
 2 

0  0 
0 

   0 
 3   0 
Step 6-Solving the equations:
Solving the above system of equations will be performed by partitioning (manually)
and Gaussian elimination (with Matlab)
First we partition the above equation by extracting the submatrices in rows 4 to 6
and columns 4 to 6 and row 9 column 9. Therefore we obtain:
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
20
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
The solution of the above system is obtained using Matlab as follows.
Note that the ‘\’ operator is used for Gaussian elimination.
>>k=[K(4:6,4:6) K(4:6,9) ; K(9,4:6) K(9,9)]
k=
5250000
0
0
0
0
37800
0
18900
0
0
50400
12600
0
18900
12600
25200
>>f=[30; -20 ; 0 ; 0]
f=
-20
0
0
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
21
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>u=k\f
u=
1.0e-03 *
0.0057
-0.9259
-0.1984
0.7937
Step 7-Post-processing:
In this step we obtain the reactions at nodes 1 and 3 and the forces (shears and
moments) in each beam 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
Mechanical Engineering Department, GTU
22
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>U=[0 ; 0 ; 0; u(1) ; u(2) ; u(3); 0; 0; u(4)]
U=
 0   F1x 
0 F 
   1y 
 0   M1 
  

u
30
2
  

  
K v 2    20
   0 
 2 

0  0 
0 

0
  

 3   0 
1.0e-03 *
0
0
0
0.0057
-0.9259
-0.1984
0
0
0.7937
>>F=K*U
F=
-15.0000
13.7500
15.0000
30.0000
-20.0000
0
-15.0000
6.2500
-0.0000
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
23
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
Next we set up the element nodal displacement vectors u1 and u2 then we
calculate the element force vectors f1 and f2 by making calls to the Matlab function
BeamElementForces.
>> u1=[U(1) ; U(2) ; U(3) ; U(4) ; U(5) ; U(6)]
u1 =
1.0e-03 *
0
0
0
0.0057
-0.9259
-0.1984
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
24
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>> u2=[U(4) ; U(5) ; U(6) ; U(7) ; U(8) ; U(9)]
u2 =
1.0e-03 *
0.0057
-0.9259
-0.1984
0
0
0.7937
>>f1 =BeamElementForces(k1,u1)
f1 =
-15.0000
13.7500
15.0000
15.0000
-13.7500
12.5000
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
25
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>f2 =BeamElementForces(k2,u2)
f2 =
15.0000
-6.2500
-12.5000
-15.0000
6.2500
-0.0000
Finally we call the Matlab functions BeamElementShearDiagram and
BeamElementMomentDiagram, respectively for each element.
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
26
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>BeamElementShearDiagram(f1,L)
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
27
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>BeamElementShearDiagram(f2,L)
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
28
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>BeamElementMomentDiagram(f1, L)
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
29
Solution of Example 1 with Matlab
9-Beam Element with Axial Force
>>BeamElementMomentDiagram(f2, L)
ME 520
Dr. Ahmet Zafer Şenalp
Mechanical Engineering Department, GTU
30
Download