Top Banner
8-Beam Element Dr. Ahmet Zafer Şenalp e-mail: [email protected] Mechanical Engineering Department Gebze Institute of Technology ME 520 Fundamentals of Finite Element Analysis
62

8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: [email protected]@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Apr 01, 2015

Download

Documents

Bria Harford
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

8-Beam Element

Dr. Ahmet Zafer Şenalpe-mail: [email protected]

Mechanical Engineering DepartmentGebze Institute of Technology

ME 520Fundamentals of Finite Element Analysis

Page 2: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

L: LengthI: Moment of inertia of the cross-sectional areaE: Elastic modulusv=v(x): Deflection (lateral displacement) of the neutral axis

F=F(x): Shear forceM=M(x): Moment about z-axis

Simple Plane Beam Element

ME 520 Dr. Ahmet Zafer Şenalp 2Mechanical Engineering Department, GYTE

8-Beam Element

dx

dv : Rotation about the z-axis

Page 3: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Elementary Beam Theory:

Direct MethodUsing the results from elementary beam theory to compute each column of the stiffness matrix. Element stiffness equation (local node: i, j or 1, 2):

Simple Plane Beam Element

ME 520 Dr. Ahmet Zafer Şenalp 3Mechanical Engineering Department, GYTE

8-Beam Element

Page 4: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 1

ME 520 Dr. Ahmet Zafer Şenalp 4Mechanical Engineering Department, GYTE

8-Beam Element

Find; (a) The deflection and rotation at the center node(b) the reaction forces and moments at the two ends

Solution:

Connectivity table: E# N1 N2

1 1 2

2 2 3

Page 5: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 1

ME 520 Dr. Ahmet Zafer Şenalp 5Mechanical Engineering Department, GYTE

8-Beam Element

Boundary conditions: Displacement boundary conditions:

Force boundary conditions:

a) Element Stiffness Matrices:

0 ,0v ,0 ,0v ,0,0v 332211

0M ,0F ,MM ,PF ,0M,0F 3y32y21y1

Page 6: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 1

ME 520 Dr. Ahmet Zafer Şenalp 6Mechanical Engineering Department, GYTE

8-Beam Element

Global FE equation is:

Applying BC’s:

Reaction Forces:

Page 7: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 1

ME 520 Dr. Ahmet Zafer Şenalp 7Mechanical Engineering Department, GYTE

8-Beam Element

Stresses in the beam at the two ends can be calculated using the formula,

Note that the FE solution is exact according to the simple beam theory, since no distributed load is present between the nodes.

Page 8: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Equivalent Nodal Loads of Distributed Transverse Load

ME 520 Dr. Ahmet Zafer Şenalp 8Mechanical Engineering Department, GYTE

8-Beam Element

2 element case:

Page 9: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 2

ME 520 Dr. Ahmet Zafer Şenalp 9Mechanical Engineering Department, GYTE

8-Beam Element

Find ; (a) The deflection and rotation at the right end(b) The reaction force and moment at the left end.

Solution:Connectivity table:

Equivalent system:

E# N1 N2

1 1 2

Page 10: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 2

ME 520 Dr. Ahmet Zafer Şenalp 10Mechanical Engineering Department, GYTE

8-Beam Element

Boundary conditions: Displacement boundary conditions:

Force boundary conditions:

The structure FE equation:

0 ,0v ,0,0v 2211

mM ,fF ,0M,0F 2y21y1

Page 11: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 2

ME 520 Dr. Ahmet Zafer Şenalp 11Mechanical Engineering Department, GYTE

8-Beam Element

Reaction forces:

This force vector gives the total effective nodal forces which include the equivalent nodal forces for the distributed lateral load p given by :

The correct reaction forces can be obtained as follows,

Page 12: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 3

ME 520 Dr. Ahmet Zafer Şenalp 12Mechanical Engineering Department, GYTE

8-Beam Element

Given;

Find ; (a) Deflections, rotations(b) reaction forces

Solution:Connectivity table: E# N1 N2

1 1 2

2 2 3

3 3 4

Page 13: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 3

ME 520 Dr. Ahmet Zafer Şenalp 13Mechanical Engineering Department, GYTE

8-Beam Element

Boundary conditions: Displacement boundary conditions:

Force boundary conditions :

The spring stiffness matrix :

Adding this stiffnessmatrix to the global FE equation:

0v ,0 ,0v,0 ,0v ,0,0v 4332211

0F,0M ,PF,0M ,0F ,0M,0F y43y32y21y1

Page 14: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 3

ME 520 Dr. Ahmet Zafer Şenalp 14Mechanical Engineering Department, GYTE

8-Beam Element

Aplying BC’s:

Page 15: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Example 3

ME 520 Dr. Ahmet Zafer Şenalp 15Mechanical Engineering Department, GYTE

8-Beam Element

Reaction Forces:

Checking the results: Draw free body diagram of the beam:

Page 16: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 16Mechanical Engineering Department, GYTE

8-Beam Element

It is clear that the beam element has 4 degrees of freedom (2 at each node)

The sign convension used is that the displacement is positive if it points upwards and the rotation is positive if it is counterclockwise.

For a structure with n nodes, the global stiffness matrix K will be of size 2nx2n.

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;

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.

FUK

Solution procedure with matlab

Page 17: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 17Mechanical Engineering Department, GYTE

8-Beam Element

Finally once the unkown displacements and and reactions are found, the force is obtained for each element as follows:

where f is the 4x1 nodal force vector in the element and u is the 4x1 element displacement vector.

The first and second elements in each vector are the transverse displacement and rotation, respectively, at the first node, while the third and fourth elements in each vector are the transverse displacement and rotation, respectively, at the second node.

uKf

Solution procedure with matlab

u

u

Page 18: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Matlab functions used

ME 520 Dr. Ahmet Zafer Şenalp 18Mechanical Engineering Department, GYTE

8-Beam Element

The 5 Matlab functions used for the beam element are:

BeamElementStiffness(E,I,L)This function returns the element stiffness matrix for a beam element with modulus of elasticity E, moment of inertia I, and length L. The size of the element stiffness matrix is 4 x 4.Function contents:function y = BeamElementStiffness(E,I,L)%BeamElementStiffness This function returns the element % stiffness matrix for a beam % element with modulus of elasticity E, % moment of inertia I, and length L.% The size of the element stiffness % matrix is 4 x 4.y = E*I/(L*L*L)*[12 6*L -12 6*L ; 6*L 4*L*L -6*L 2*L*L ; -12 -6*L 12 -6*L ; 6*L 2*L*L -6*L 4*L*L];

Page 19: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Matlab functions used

ME 520 Dr. Ahmet Zafer Şenalp 19Mechanical Engineering Department, GYTE

8-Beam Element

BeamAssemble(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 2nx2n global stiffness matrix K after the element stiffness matrix k is assembled.Function contents:function y = BeamAssemble(K,k,i,j)%BeamAssemble 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.

Page 20: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Matlab functions used

ME 520 Dr. Ahmet Zafer Şenalp 20Mechanical Engineering Department, GYTE

8-Beam Element

K(2*i-1,2*i-1) = K(2*i-1,2*i-1) + k(1,1);K(2*i-1,2*i) = K(2*i-1,2*i) + k(1,2);K(2*i-1,2*j-1) = K(2*i-1,2*j-1) + k(1,3);K(2*i-1,2*j) = K(2*i-1,2*j) + k(1,4);K(2*i,2*i-1) = K(2*i,2*i-1) + k(2,1);K(2*i,2*i) = K(2*i,2*i) + k(2,2);K(2*i,2*j-1) = K(2*i,2*j-1) + k(2,3);K(2*i,2*j) = K(2*i,2*j) + k(2,4);K(2*j-1,2*i-1) = K(2*j-1,2*i-1) + k(3,1);K(2*j-1,2*i) = K(2*j-1,2*i) + k(3,2);K(2*j-1,2*j-1) = K(2*j-1,2*j-1) + k(3,3);K(2*j-1,2*j) = K(2*j-1,2*j) + k(3,4);K(2*j,2*i-1) = K(2*j,2*i-1) + k(4,1);K(2*j,2*i) = K(2*j,2*i) + k(4,2);K(2*j,2*j-1) = K(2*j,2*j-1) + k(4,3);K(2*j,2*j) = K(2*j,2*j) + k(4,4);y = K;

Page 21: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Matlab functions used

ME 520 Dr. Ahmet Zafer Şenalp 21Mechanical Engineering Department, GYTE

8-Beam Element

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 4x1 element force vecor fFunction 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;

Page 22: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Matlab functions used

ME 520 Dr. Ahmet Zafer Şenalp 22Mechanical Engineering Department, GYTE

8-Beam Element

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')

Page 23: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

Matlab functions used

ME 520 Dr. Ahmet Zafer Şenalp 23Mechanical Engineering Department, GYTE

8-Beam Element

BeamElementMomentDiagram(f, L)This function plots the bending moment diagram for the beam element with nodalforce 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')

Page 24: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 24Mechanical Engineering Department, GYTE

8-Beam Element

Consider the beam as shownGiven E=210 GPaI=60x10-6 m4

P=20 kNL=2 mDetermine:a) the global stiffness matrix for the structureb) vertical displacement at node 2c) rotations at nodes 2 and 3d) the reactions at nodes 1 and 3e) the forces (shears and moments) in each elementf) the shear force diagram for each elementg) the bending moment diagram for each element

Solution of Example 4 with Matlab

Page 25: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 25Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 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:

E# N1 N2

1 1 2

2 2 3

Page 26: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 26Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

Step 2-Copying relevant files and starting MatlabCreate a directory

Copy BeamElementStiffness.mBeamAssemble.mBeamElementForces.mBeamElementShearDiagram.mBeamElementMomentDiagram.mfiles 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

Page 27: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 27Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

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. Each matrix has size 4x4.Enter the data>>E=210e6>>I=60e-6>>L=2>>k1=BeamElementStiffness(E,I,L)k1 =

18900 18900 -18900 18900 18900 25200 -18900 12600 -18900 -18900 18900 -18900 18900 12600 -18900 25200

Page 28: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 28Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>k2=BeamElementStiffness(E,I,L)k2 =

18900 18900 -18900 18900 18900 25200 -18900 12600 -18900 -18900 18900 -18900 18900 12600 -18900 25200Step 4-Assembling the global stiffness matrix:Since the structure has 3 nodes, the size of the global stiffness matrix is 6x6.>>K=zeros(6,6)>>K=BeamAssemble(K,k1,1,2)>>K=BeamAssemble(K,k2,2,3)K =

18900 18900 -18900 18900 0 0 18900 25200 -18900 12600 0 0 -18900 -18900 37800 0 -18900 18900 18900 12600 0 50400 -18900 12600 0 0 -18900 -18900 18900 -18900 0 0 18900 12600 -18900 25200

Page 29: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 29Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

Step 5-Applying the boundary conditions:Finite element equation for the problem is;

The boundary conditions for the problem are;

3

y3

2

y2

1

y1

3

3

2

2

1

1

M

F

M

F

M

F

v

v

v

K

0 ,0 v,0 ,0 v,0 ,0v 332211

0M ,0F ,0M ,20F ,0M ,0F 33y22y1y1

Page 30: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 30Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

Inserting the above conditions into finite element equation

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 3 to 4 and column 6, row 6 and columns 3 to 4, and row 6 and column 6. Therefore we obtain:

0

F

0

20

M

F

0

v

0

0

2.259.186.129.1800

9.189.189.189.1800

6.129.184.5006.129.18

9.189.1808.379.189.18

006.129.182.259.18

009.189.189.189.18

10

y3

1

y1

3

2

23

0

0

20u

2.256.129.18

6.124.500

9.1808.37

10

3

2

23

Page 31: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 31Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

The solution of the above system is obtained using Matlab as follows.Note that the ‘\’ operator is used for Gaussian elimination.

>>k=[K(3:4,3:4) K(3:4,6) ; K(6,3:4) K(6,6)]

k =

37800 0 18900 0 50400 12600 18900 12600 25200

>>f=[-20 ; 0 ; 0]

f =

-20 0 0

Page 32: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 32Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>u=k\fu =

1.0e-03 *

-0.9259 -0.1984 0.7937It is now clear that the vertical displacement at node 2=0.0009259 m (downward) rotation at node 2 =0.0001984 rad (clockwise)rotation at node 3 =0.0007937 rad (counterclockwise)

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.

Page 33: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 33Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>U=[0 ; 0 ; u(1) ; u(2) ; 0 ; u(3)]U =

1.0e-03 *

0 0 -0.9259 -0.1984 0 0.7937>>F=K*UF =

13.7500 15.0000 -20.0000 0 6.2500 -0.0000

Page 34: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 34Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

thus the recations are;Force at node 1=13.75 kNMoment at node 1=15 kNm (countereclockwise)Force at node 3=6.25 kN

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)]u1 =

1.0e-03 *

0 0 -0.9259 -0.1984

Page 35: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 35Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>> u2=[U(3) ; U(4) ; U(5) ; U(6)]u2 =

1.0e-03 *

-0.9259 -0.1984 0 0.7937>>f1 =BeamElementForces(k1,u1)f1 =

13.7500 15.0000 -13.7500 12.5000

Page 36: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 36Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>f2 =BeamElementForces(k2,u2)f2 =

-6.2500 -12.5000 6.2500 -0.0000Shear force at centilever region=13.75 kNBending moment at centilever region=15 kNmShear force at pin joint=6.25 kN

Finally we call the Matlab functions BeamElementShearDiagram and BeamElementMomentDiagram, respectively for each element.

Page 37: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 37Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>BeamElementShearDiagram(f1,L)

Page 38: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 38Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>BeamElementShearDiagram(f2,L)

Page 39: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 39Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>BeamElementMomentDiagram(f1, L)

Page 40: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 40Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 4 with Matlab

>>BeamElementMomentDiagram(f2, L)

Page 41: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 41Mechanical Engineering Department, GYTE

8-Beam Element

Consider the beam as shownGiven E=210 GPaI=5x10-6 m4

w=7 kN/m

Determine:a) the global stiffness matrix for the structureb) rotations at nodes 1, 2 and 3c) the reactions at nodes 1, 2, 3 and 4d) the forces (shears and moments) in each elemente) the shear force diagram for each elementf) the bending moment diagram for each element

Solution of Example 5 with Matlab

Page 42: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 42Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Solution:

Step 1-Discretizing the domain:We need first to replace the distributed loading on element 2 by equivalent nodal loads. This is performed as follows for element 2 with a uniformly distributed load. The resulting beam with eqivalent nodal load is shown below:

(**)

kNm 9.333

kN 14

kNm 9.333-

kN 14

12

wL2

wL12

wL2

wL

p

2

2

2

Page 43: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 43Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

The units used in Matlab calculations are kN and meter. The element connectivity is:

E# N1 N2

1 1 2

2 2 3

3 3 4

Page 44: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 44Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Step 2-Copying relevant files and starting MatlabCreate a directory

Copy BeamElementStiffnessBeamAssembleBeamElementForcesBeamElementShearDiagramBeamElementMomentDiagramfiles 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

Page 45: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 45Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

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. Each matrix has size 4x4.Enter the data>>E=210e6>>I=5e-6>>L1=3>>L2=4>>L3=2>>k1=BeamElementStiffness(E,I,L1)k1 =

1.0e+03 *

0.4667 0.7000 -0.4667 0.7000 0.7000 1.4000 -0.7000 0.7000 -0.4667 -0.7000 0.4667 -0.7000 0.7000 0.7000 -0.7000 1.4000

Page 46: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 46Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>k2=BeamElementStiffness(E,I,L2)k2 =

1.0e+03 *

0.1969 0.3937 -0.1969 0.3937 0.3937 1.0500 -0.3937 0.5250 -0.1969 -0.3937 0.1969 -0.3937 0.3937 0.5250 -0.3937 1.0500>>k3=BeamElementStiffness(E,I,L3)k3 =

1575 1575 -1575 1575 1575 2100 -1575 1050 -1575 -1575 1575 -1575 1575 1050 -1575 2100

Page 47: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 47Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Step 4-Assembling the global stiffness matrix:Since the structure has 4 nodes, the size of the global stiffness matrix is 8x8.>>K=zeros(8,8)>>K=BeamAssemble(K,k1,1,2)>>K=BeamAssemble(K,k2,2,3)>>K=BeamAssemble(K,k3,3,4)K =

1.0e+03 *

0.4667 0.7000 -0.4667 0.7000 0 0 0 0 0.7000 1.4000 -0.7000 0.7000 0 0 0 0 -0.4667 -0.7000 0.6635 -0.3063 -0.1969 0.3937 0 0 0.7000 0.7000 -0.3063 2.4500 -0.3937 0.5250 0 0 0 0 -0.1969 -0.3937 1.7719 1.1812 -1.5750 1.5750 0 0 0.3937 0.5250 1.1812 3.1500 -1.5750 1.0500 0 0 0 0 -1.5750 -1.5750 1.5750 -1.5750 0 0 0 0 1.5750 1.0500 -1.5750 2.1000

Page 48: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 48Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Step 5-Applying the boundary conditions:Finite element equation for the problem is;

The boundary conditions for the problem are;

4

y4

3

y3

2

y2

1

y1

4

4

3

3

2

2

1

1

M

F

M

F

M

F

M

F

v

v

v

v

K

0 ,0 v,0 ,0 v,0 ,0 v,0 ,0v 44332211

0M ,0F,33.9M ,14F ,33.9M ,14F ,0M ,0F 4y433y22y1y1

Page 49: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 49Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

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 2, 4 and 6 and columns2, 4 and 6. Therefore we obtain:

The solution of the above system is obtained using Matlab as follows.Note that the ‘\’ operator is used for Gaussian elimination.

>>k=[K(2,2) K(2,4) K(2,6) ; K(4,2) K(4,4) K(4,6) ; K(6,2) K(6,4) K(6,6)]k =

1400 700 0 700 2450 525 0 525 3150

333.9

333.9

0

15.353.00

53.045.270.0

07.04.1

10

3

2

13

Page 50: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 50Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>f=[0 ; -9.333 ; 9.333]f =

0 -9.3330 9.3330

>>u=k\fu =

0.0027 -0.0054 0.0039It is now clear that rotation at node 1 =0.0027 rad (counterclockwise)rotation at node 2 =0.0054 rad (clockwise)rotation at node 3 =0.0039 rad (counterclockwise)

Page 51: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 51Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Step 7-Post-processing:In this step we obtain the reactions at nodes 1, 2, 3 and 4 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.>>U=[0 ;u(1) ;0 ; u(2) ; 0 ; u(3); 0 ; 0]U =

0 0.0027 0 -0.0054 0 0.0039 0 0

Page 52: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 52Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>F=K*UF =

-1.8937 -0.0000 1.2850 -9.3330 6.6954 9.3330 -6.0867 4.0578thus the recations are;Force at node 1=-1.8937 kNForce at node 2=1.2850 kNForce at node 3=6.6954 kNForce at node 4=-6.0867 kNMoment at node 4 (at fixed support)=4.0578 kNm (counterclockwise)

Page 53: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 53Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Next we set up the element nodal displacement vectors u1, u2 and u3 then we calculate the element force vectors f1, f2 and f3 by making calls to the Matlab function BeamElementForces.>> u1=[U(1) ; U(2) ; U(3) ; U(4)]u1 =

0 0.0027 0 -0.0054

>> u2=[U(3) ; U(4) ; U(5) ; U(6)]u2 =

0 -0.0054 0 0.0039

>> u3=[U(5) ; U(6) ; U(7) ; U(8)]u3 =

0 0.0039 0 0

Page 54: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 54Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>f1 =BeamElementForces(k1,u1)f1 =

-1.8937 -0.0000 1.8937 -5.6810>>f2 =BeamElementForces(k2,u2)f2 =

-0.6087 -3.6520 0.6087 1.2173>>f3 =BeamElementForces(k3,u3)f3 =

6.0867 8.1157 -6.0867 4.0578

Page 55: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 55Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Note that the forces for element 2 need to be modified because of the distributed load. In order to obtain the correct forces for element 2 we need to subtract from f2 the vector of equivalent nodal loads given in equation (**). This is performed using Matlab as follows:

>>f2=f2-[-14 ; -9.333 ; -14 ; 9.333]f2 =

13.3913 5.6810 14.6087 -8.1157Element 1 has a shear force of -1.8937 kN and a bending moment of 0 kNm at its left end while it has a shear force of 1.8937 kN and a bending moment of -5.6810 kNm at its right end.

Element 2 has a shear force of 13.3913 kN and a bending moment of 5.6810 kNm at its left end while it has a shear force of 14.6087 kN and a bending moment of -8.1157 kNm at its right end.

Page 56: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 56Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

Element 3 has a shear force of 6.0867 kN and a bending moment of 8.1157 kNm at its left end while it has a shear force of -6.0867 kN and a bending moment of 4.0578 kNm at its right end.Obviously the roller at the left end has zero moment.

Finally we call the Matlab functions BeamElementShearDiagram and BeamElementMomentDiagram, respectively for each element.

Page 57: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 57Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>BeamElementShearDiagram(f1,L1)

Page 58: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 58Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>BeamElementShearDiagram(f2,L2)

Page 59: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 59Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>BeamElementShearDiagram(f3,L3)

Page 60: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 60Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>BeamElementMomentDiagram(f1, L1)

Page 61: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 61Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>BeamElementMomentDiagram(f2, L2)

Page 62: 8-Beam Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.trazsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology.

ME 520 Dr. Ahmet Zafer Şenalp 62Mechanical Engineering Department, GYTE

8-Beam Element

Solution of Example 5 with Matlab

>>BeamElementMomentDiagram(f3, L3)