ME 520 Fundamentals of Finite Element Analysis

Slides:



Advertisements
Similar presentations
1 A B C
Advertisements

Computer Graphics: 2D Transformations
Simplifications of Context-Free Grammars
AP STUDY SESSION 2.
1
Select from the most commonly used minutes below.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
INTRODUCTION TO MECHANICS FOR SOLIDS AND STRUCTURES
STATISTICS INTERVAL ESTIMATION Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National Taiwan University.
David Burdett May 11, 2004 Package Binding for WS CDL.
Create an Application Title 1Y - Youth Chapter 5.
Add Governors Discretionary (1G) Grants Chapter 6.
CALENDAR.
ES3C7 Structural Design and Analysis SELF-LEARNING EXERCISE
The 5S numbers game..

Media-Monitoring Final Report April - May 2010 News.
Chapter 7: Steady-State Errors 1 ©2000, John Wiley & Sons, Inc. Nise/Control Systems Engineering, 3/e Chapter 7 Steady-State Errors.
Break Time Remaining 10:00.
Factoring Quadratics — ax² + bx + c Topic
Turing Machines.
Table 12.1: Cash Flows to a Cash and Carry Trading Strategy.
PP Test Review Sections 6-1 to 6-6
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
Adding Up In Chunks.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Artificial Intelligence
When you see… Find the zeros You think….
Before Between After.
Subtraction: Adding UP
1 Lab 17-1 ONLINE LESSON. 2 If viewing this lesson in Powerpoint Use down or up arrows to navigate.
Bell Busters! Unit 1 #1-61. Purposes of Government 1. Purposes of government 2. Preamble to the Constitution 3. Domestic tranquility 4. Common defense.
: 3 00.
5 minutes.
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
1 Titre de la diapositive SDMO Industries – Training Département MICS KERYS 09- MICS KERYS – WEBSITE.
Essential Cell Biology
12 System of Linear Equations Case Study
Converting a Fraction to %
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Clock will move after 1 minute
PSSA Preparation.
Copyright © 2013 Pearson Education, Inc. All rights reserved Chapter 11 Simple Linear Regression.
Physics for Scientists & Engineers, 3rd Edition
Select a time to count down from the clock above
1 Physics for Scientists and Engineers Chapter 21: The Electric Field I: Discrete Charge Distributions Copyright © 2004 by W. H. Freeman & Company Paul.
Copyright Tim Morris/St Stephen's School
1.step PMIT start + initial project data input Concept Concept.
9. Two Functions of Two Random Variables
1 Dr. Scott Schaefer Least Squares Curves, Rational Representations, Splines and Continuity.
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
1 Non Deterministic Automata. 2 Alphabet = Nondeterministic Finite Accepter (NFA)
4. Spring Element Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical University.
ME 520 Fundamentals of Finite Element Analysis
7-Bar Elements in 3-D Space Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
6-Bar Elements in 2-D Space Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
10-Beam Elements in 2-D Space (Plane Frame Element) Dr. Ahmet Zafer Şenalp Mechanical Engineering.
9-Beam Element with Axial Force Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
13-Linear Triangular Element Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
14-Quadratic Triangular Element Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
11-Beam Elements in 3-D Space (Space Frame Element)
15-Bilinear Quadrilateral Element Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
Presentation transcript:

ME 520 Fundamentals of Finite Element Analysis 8-Beam Element Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gyte.edu.tr Mechanical Engineering Department Gebze Institute of Technology

Mechanical Engineering Department, GYTE 8-Beam Element Simple Plane Beam Element L: Length I: Moment of inertia of the cross-sectional area E: Elastic modulus v=v(x): Deflection (lateral displacement) of the neutral axis F=F(x): Shear force M=M(x): Moment about z-axis : Rotation about the z-axis ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Simple Plane Beam Element Elementary Beam Theory: Direct Method Using the results from elementary beam theory to compute each column of the stiffness matrix. Element stiffness equation (local node: i, j or 1, 2): ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 1 Find; The deflection and rotation at the center node the reaction forces and moments at the two ends Solution: Connectivity table: E# N1 N2 1 2 3 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 1 Boundary conditions: Displacement boundary conditions: Force boundary conditions: Element Stiffness Matrices: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 1 Global FE equation is: Applying BC’s: Reaction Forces: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 1 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. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Equivalent Nodal Loads of Distributed Transverse Load 2 element case: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 2 Find ; The deflection and rotation at the right end The reaction force and moment at the left end. Solution: Connectivity table: Equivalent system: E# N1 N2 1 2 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 2 Boundary conditions: Displacement boundary conditions: Force boundary conditions: The structure FE equation: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 2 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, ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 3 Given; Find ; Deflections, rotations reaction forces Solution: Connectivity table: E# N1 N2 1 2 3 4 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 3 Boundary conditions: Displacement boundary conditions: Force boundary conditions : The spring stiffness matrix : Adding this stiffness matrix to the global FE equation: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 3 Aplying BC’s: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Example 3 Reaction Forces: Checking the results: Draw free body diagram of the beam: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution procedure with matlab 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. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution procedure with matlab 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. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Matlab functions used 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]; ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Matlab functions used 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. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Matlab functions used 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; ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Matlab functions used 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 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, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Matlab functions used 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, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Matlab functions used 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, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab Consider the beam as shown Given E=210 GPa I=60x10-6 m4 P=20 kN L=2 m Determine: the global stiffness matrix for the structure vertical displacement at node 2 rotations at nodes 2 and 3 the reactions at nodes 1 and 3 the forces (shears and moments) in each element the shear force diagram for each element the bending moment diagram for each element ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 2 3 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab Step 2-Copying relevant files and starting Matlab Create a directory Copy BeamElementStiffness.m BeamAssemble.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, GYTE

Mechanical 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 25200 Step 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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; ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab >>u=k\f u = 1.0e-03 * -0.9259 -0.1984 0.7937 It 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. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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.9259 -0.1984 0.7937 >>F=K*U F = 13.7500 15.0000 -20.0000 6.2500 -0.0000 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab thus the recations are; Force at node 1=13.75 kN Moment 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.9259 -0.1984 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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.7937 >>f1 =BeamElementForces(k1,u1) f1 = 13.7500 15.0000 -13.7500 12.5000 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab >>f2 =BeamElementForces(k2,u2) f2 = -6.2500 -12.5000 6.2500 -0.0000 Shear force at centilever region=13.75 kN Bending moment at centilever region=15 kNm Shear force at pin joint=6.25 kN Finally we call the Matlab functions BeamElementShearDiagram and BeamElementMomentDiagram, respectively for each element. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab >>BeamElementShearDiagram(f1,L) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab >>BeamElementShearDiagram(f2,L) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab >>BeamElementMomentDiagram(f1, L) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 4 with Matlab >>BeamElementMomentDiagram(f2, L) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab Consider the beam as shown Given E=210 GPa I=5x10-6 m4 w=7 kN/m Determine: the global stiffness matrix for the structure rotations at nodes 1, 2 and 3 the reactions at nodes 1, 2, 3 and 4 the forces (shears and moments) in each element the shear force diagram for each element the bending moment diagram for each element ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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: ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 2 3 4 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab Step 2-Copying relevant files and starting Matlab Create a directory Copy BeamElementStiffness BeamAssemble BeamElementForces BeamElementShearDiagram BeamElementMomentDiagram 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, GYTE

Mechanical 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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; ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>f=[0 ; -9.333 ; 9.333] f = -9.3330 9.3330 >>u=k\f u = 0.0027 -0.0054 0.0039 It 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) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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.0027 -0.0054 0.0039 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>F=K*U F = -1.8937 -0.0000 1.2850 -9.3330 6.6954 9.3330 -6.0867 4.0578 thus the recations are; Force at node 1=-1.8937 kN Force at node 2=1.2850 kN Force at node 3=6.6954 kN Force at node 4=-6.0867 kN Moment at node 4 (at fixed support)=4.0578 kNm (counterclockwise) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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.0027 -0.0054 >> u2=[U(3) ; U(4) ; U(5) ; U(6)] u2 = 0.0039 >> u3=[U(5) ; U(6) ; U(7) ; U(8)] u3 = ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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 ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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.1157 Element 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. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical 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. ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>BeamElementShearDiagram(f1,L1) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>BeamElementShearDiagram(f2,L2) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>BeamElementShearDiagram(f3,L3) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>BeamElementMomentDiagram(f1, L1) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>BeamElementMomentDiagram(f2, L2) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE

Mechanical Engineering Department, GYTE 8-Beam Element Solution of Example 5 with Matlab >>BeamElementMomentDiagram(f3, L3) ME 520 Dr. Ahmet Zafer Şenalp Mechanical Engineering Department, GYTE