Top Banner
5-Bar Element Dr. Ahmet Zafer Şenalp e-mail: [email protected] Mechanical Engineering Department Gebze Technical University ME 520 Fundamentals of Finite Element Analysis
56

5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: [email protected]@gmail.com Mechanical Engineering Department Gebze Technical University.

Dec 14, 2015

Download

Documents

Lara Lathan
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: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

5-Bar Element

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

Mechanical Engineering DepartmentGebze Technical University

ME 520Fundamentals of Finite Element Analysis

Page 2: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Bar (truss) structures:

Bar Element

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

5-Bar Element

Cross section examples forbar structures

Page 3: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Consider a uniform prismatic bar:

L: lengthA: cross-sectional areaE: elastic modulusu=u(x): displacemente=e(x): strains=s(x): stress

Strain-displacement relation:

Stress-strain relation:

Bar Element

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

5-Bar Element

i j

FE Model

Page 4: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Assuming that the displacement u is varying linearly along the axis of the bar, i.e.,

The bar is acting like a spring in this case and we conclude that element stiffness matrix is:

Stiffness Matrix - Direct Method

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

5-Bar Element

D: elongation, F: force in bar

k: stiffness of the bar

Page 5: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

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:

B: Element strain-displacement matrix

Stiffness Matrix - A Formal Approach

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

5-Bar Element

Page 6: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Stress can be written as:

Consider the strain energy stored in the bar:

The work done by the two nodal forces is:

For conservative system, we state that:

which gives:

Stiffness Matrix - A Formal Approach

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

5-Bar Element

Page 7: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

k is the element stiffness matrix. The above expression is a general result which can be used for the construction of other types of elements. This expression can also be derived using other more rigorous approaches, such as the Principle of Minimum Potential Energy, or the Galerkin’s Method.Now, we evaluate for the bar element

which is the same as we derived using the direct method. Strain energy in the element can be written as:

Stiffness Matrix - A Formal Approach

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

5-Bar Element

Page 8: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Number of components of the displacement vector at a node.For 1-D bar element: one dof at each node.

Physical Meaning of the Coefficients in k:The jth column of k (here j = 1 or 2) represents the forcesapplied to the bar to maintain a deformed shape with unitdisplacement at node j and zero displacement at the other node.

Degree of Freedom (dof)

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

5-Bar Element

Page 9: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 1

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

5-Bar Element

Find; (a) the global stiffness matrix(b) displacements of nodes (c) the reaction forces (d) stresses at the elements

Solution :

Connectivity table: E# N1 N2

1 1 2

2 2 3

1 3

FE Model

2

21

Page 10: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 1

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

5-Bar Element

Boundary conditions : Displacement boundary conditions :

Force boundary conditions :

a) Element Stiffness Matrices :

0u ,0u ,0u 321

0F ,PF ,0F 321

Page 11: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 1

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

5-Bar Element

Construction of global stiffness matrix :

Equilibrium (FE) equation for the whole system is;

Page 12: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 1

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

5-Bar Element

b) Applying boundary conditions; 0u ,0u ,0u 321 0F ,PF ,0F 321

Page 13: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 1

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

5-Bar Element

For the data given;

mm 125L ,mm 200A

mm/N 2x10E ,N 10x5P

2

244

mm

0

0.5208

0

u

u

u

3

2

1

Page 14: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 1

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

5-Bar Element

c) From the 1st and 3rd row of the finite element equation, the reaction forces can be calculated as;

d) Stresses in the elements:

N -16666.7F

N -33333.3F

2

1

MPa 33.83

MPa 33.83

2

1

Page 15: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

· In this case, the calculated stresses in elements 1 and 2 are exact within the linear theory for 1-D bar structures. It will not help if we further divide element 1 or 2 intosmaller finite elements.· For tapered bars, averaged values of the cross-sectional areas should be used for the elements. · We need to find the displacements first in order to find the stresses, since we are using the displacement based FEM.

Notes

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

5-Bar Element

Page 16: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

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

5-Bar Element

As linear bar element has 2 degrees of freedom (1 at each node) for a structure with n nodes, the global stiffness matrix K will be of size nxn.

The global stiffness matrix K is obtained by making calls to the Matlab function LinearBarAssemble which is written for this purpose.

Once the global stiffness matrix; K is obtained we have the following structure equation;

At this step boundary conditions are applied manually to the vectors U and F.

Then the matrix equation is solved by portioning and Gaussion elimination.

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

FUK

Solution procedure with matlab

Page 17: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

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

5-Bar Element

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.

ukf

Solution procedure with matlab

Page 18: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Matlab functions used

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

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];

Page 19: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Matlab functions used

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

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;

Page 20: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Matlab functions used

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

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;

Page 21: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Matlab functions used

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

5-Bar Element

LinearBarElementStressess_azLinearBarElementStresses_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 EFunction 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 EL_m=[-1/L 1/L];y = E*L_m*u;

Page 22: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

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

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:

Solution of Example 1with Matlab

E# N1 N2

1 1 2

2 2 3

5-Bar Element

Page 23: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

5-Bar Element

Step 2-Copying relevant files and starting MatlabCreate a directoryCopy LinearBarElementStiffness.m LinearBarAssemble.mLinearBarElementForces.mLinearBarElementStresses_az.m files under the created directoryOpen Matlab;Open ‘Set Path’ command and by using ‘Add Folder’ command add the current directory.

mm 125L ,mm 200A

mm/N 2x10E ,N 10x5P

2

244

Page 24: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

5-Bar Element

Start solving the problem in Command Window:>>clearvars>>clcEnter the data>>E=2e4>>A(1)=400>>A(2)=200>>L=125

Step 3-Writing the element stiffness matrices:>>k1=LinearBarElementStiffness(E,A(1),L)k1 =

64000 -64000 -64000 64000>>k2=LinearBarElementStiffness(E,A(2),L)

mm 125L ,mm 200A

mm/N 2x10E ,N 10x5P

2

244

Page 25: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

5-Bar Element

>>k2=LinearBarElementStiffness(E,A(2),L)k2 =

32000 -32000 -32000 32000

Step 4-Assembling the global stiffness matrix:

Since the structure has 3 nodes, the size of the global stiffness matrix is 3x3.Therefore to obtain K we first set up a zero matrix of size 3x3 then make 2 calls to the Matlab function LinearBarAssemble since we have 2 bar elements in the system.Each call to the function will assemble one element. The following are the Matlab commands:

mm 125L ,mm 200A

mm/N 2x10E ,N 10x5P

2

244

Page 26: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

5-Bar Element

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

mm 125L ,mm 200A

mm/N 2x10E ,N 10x5P

2

244

Page 27: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

5-Bar Element

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

The boundary conditions for the problem are;

Inserting the above conditions into finite element equation

mm 125L ,mm 200A

mm/N 2x10E ,N 10x5P

2

244

3

2

1

3

2

1

F

F

F

u

u

u

3200032000-0

32000-9600064000-

064000-64000

3

1

2

F

50000

F

0

u

0

3200032000-0

32000-9600064000-

064000-64000

0u ,0u ,0u 321 0F ,PF ,0F 321

Page 28: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

5-Bar Element

3

1

2

F

50000

F

0

u

0

3200032000-0

32000-9600064000-

064000-64000

50000u96000 2

0.5208u 2

>>u2=50000/96000

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;

Step 7-Post-processing:In this step we obtain the reactions at nodes 1 and 3 and the force in each spring using Matlab as follows.First we set up the global nodal displacement vector U, then we calculate the nodal force vector F.

Page 29: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

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

Page 30: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 1with Matlab

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

5-Bar Element

mm 125L ,mm 200A

mm/N 2x10E ,N 10x5P

2

244

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

stress2 =

-83.3333

:element stresses

Page 31: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

Create a directoryCopy LinearBarElementStiffness.m LinearBarAssemble.mLinearBarElementForces.mLinearBarElementStresses_az.m files under the created directoryOpen Matlab;Open ‘Set Path’ command and by using ‘Add Folder’ command add the current directory.

Page 32: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

Start solving the problem in Command Window:>>clearvars>>clcEnter the data>>E=210e6>>A=0.003>>L1=1.5>>L2=1

Calculate stiffness matrices>>k1=LinearBarElementStiffness(E,A,L1)>>k2=LinearBarElementStiffness(E,A,L2)

Page 33: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

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:

K =

420000 -420000 0 -420000 1050000 -630000 0 -630000 630000

Page 34: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

FE Equation is:

Apply BCs:

3

2

1

3

2

1

F

F

F

u

u

u

630000630000-0

630000-1050000420000-

0420000-420000

3

1

2

F

10000

F

002.0

u

0

3200032000-0

32000-9600064000-

064000-64000

002.0u ,0u ,0u 321 0F ,PF ,0F 321

Page 35: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

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 submatrix in row 2 and column 2 which turns to be a 1x1 matrix.

Because of the applied displacement of 0.002 m at node 3, we need to extract the submatrix in row 2 and column 3 which also turns out to be a 1x1 matrix.

Therefore we obtain;

10002.0630000u1050000 2

Page 36: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

The solution of the above system is obtained using Matlab as follows. Note that the backslash operator ‘\’ is used for Gaussian elimination.>>k=K(2,2)>>k0=K(2,3)>>u0=0.002>>f=[-10]>>f0=f-k0*u0>>u=k\f0result is;u =

0.0012

Page 37: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

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*Uresults;F =

-500.0000 -10.0000 510.0000

Page 38: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

Next step is to set up element nodal displacement vectors u1 and u2.Then we calculate the element force vectors f1 and f2 by making calls to the Matlab function LinearBarElementForces.>>u1=[0; U(2)]>>f1=LinearBarElementForces(k1,u1)result is;f1 =

-500.0000 500.0000

Page 39: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

>>u2=[U(2); U(3)]>>f2=LinearBarElementForces(k2,u2)result is;f2 =

-510.0000 510.0000Finally, we call LinearBarElementStresses_az to calculate stresses.>>sigma1=LinearBarElementStresses_az(k1, u1, L1, E) results;sigma1 =

1.6667e+05

Page 40: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 2with Matlab

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

5-Bar Element

m 0.002by

right the todisplayed is 3 node

m 003.0A

GPa 012E ,Nk 10P2

002.0u ,0u ,0u 321

0F ,PF ,0F 321

>>sigma2=LinearBarElementStresses_az(k2, u2, L2, E) results;sigma2 =

1.7000e+05

Page 41: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 3

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

5-Bar Element

Given;

Find; The support reaction forces at the two ends of the bar

Solution :

Connectivity table:E# N1 N2

1 1 2

2 2 3

Page 42: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 3

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

5-Bar Element

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,

BCs;

contact occurs

The global FE equation is found to be,

321 u ,0u ,0u 0F ,PF ,0F 321

Page 43: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example 3

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

5-Bar Element

Applying boundary conditions; 321 u ,0u ,0u 0F ,PF ,0F 321

Page 44: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Example: 3

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

5-Bar Element

Reaction forces:

Page 45: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321

contact occurs

BCs;

Page 46: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321

Create a directoryCopy LinearBarElementStiffness.m LinearBarAssemble.mLinearBarElementForces.mLinearBarElementStresses_az.m files under the created directoryOpen Matlab;Open ‘Set Path’ command and by using ‘Add Folder’ command add the current directory.

Page 47: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321 Start solving the problem in Command Window:>>clearvars>>clcEnter 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)

Page 48: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321 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:

K =

1.0e+04 *

3.3333 -3.3333 0 -3.3333 6.6667 -3.3333 0 -3.3333 3.3333

Page 49: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321

FE Equation is:

Apply BCs:

3

2

1

3

2

1

F

F

F

u

u

u

3333333333-0

33333-6666733333-

033333-33333

321 u ,0u ,0u 0F ,PF ,0F 321

3

1

2

F

60000

F

2.1

u

0

3333333333-0

33333-6666733333-

033333-33333

Page 50: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321

600002.133333u66667 2

>>k=K(2,2)>>k0=K(2,3)>>u0=1.2>>f=[60000]>>f0=f-k0*u0>>u=k\f0result is;u =

1.5000

Page 51: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321

>>U=[0; u; u0]>>F=K*Uresults;F =

-50000 60000 -10000

Page 52: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321 >>u1=[0; U(2)]>>f1=LinearBarElementForces(k1,u1)results;f1 =

-50000 50000>>u2=[U(2); U(3)]>>f2=LinearBarElementForces(k2,u2)results;f2 =

10000 -10000

Page 53: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Solution of Example 3with Matlab

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

5-Bar Element

E# N1 N2

1 1 2

2 2 3

321 u ,0u ,0u

0F ,PF ,0F 321 >>sigma1=LinearBarElementStresses_az(k1, u1, L, E) results;sigma1 =

200>>sigma2=LinearBarElementStresses_az(k2, u2, L, E) results;sigma2 =

-40

Page 54: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Uniformly distributed axial load q (N/mm, N/m, lb/in) can be converted to two equivalent nodal forces of magnitude qL/2.We verify this by considering the work done by the load q,

Distributed Load

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

5-Bar Element

Page 55: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Thus, from the U=W concept for the element, we have:

The new nodal force vector is:

Distributed Load

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

5-Bar Element

Page 56: 5-Bar Element e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University.

Distributed Load

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

5-Bar Element