Download presentation
Presentation is loading. Please wait.
Published byMelissa Conley Modified over 9 years ago
1
7-Bar Elements in 3-D Space e-mail: Dr. Ahmet Zafer Şenalp e-mail: azsenalp@gmail.comazsenalp@gmail.com Mechanical Engineering Department Gebze Technical University ME 520 Fundamentals of Finite Element Analysis
2
Bar (truss) structures: Bar Element ME 520 Dr. Ahmet Zafer Şenalp 2Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Cross section examples for bar structures
3
ME 520 Dr. Ahmet Zafer Şenalp 3Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Element stiffness matrices are calculated in the local coordinate systems and then transformed into the global coordinate system (X, Y, Z) where they are assembled. FEA software packages will do this transformation automatically. Input data for bar elements: · (X, Y, Z) for each node · E and A for each element The space truss element is characterized by linear shape functions.
4
ME 520 Dr. Ahmet Zafer Şenalp 4Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space
5
ME 520 Dr. Ahmet Zafer Şenalp 5Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Each truss element has two nodes and is inclined with angles measured from the global X, Y and Z axes respectively to the local x axis as shown below;
6
Stiffness matrix ME 520 Dr. Ahmet Zafer Şenalp 6Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Let In this case the element stiffness matrix is as folllows;
7
ME 520 Dr. Ahmet Zafer Şenalp 7Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space As space truss element has 6 degrees of freedom (3 at each node) for a structure with n nodes, the global stiffness matrix K will be of size 3nx3n. The global stiffness matrix K is obtained by making calls to the Matlab function SpaceTrussAssemble 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 partioning and Gaussion elimination. Finally once the unkown displacements and and reactions are found, the force is obtained for each element as follows: Solution procedure with matlab Solution procedure with matlab
8
ME 520 Dr. Ahmet Zafer Şenalp 8Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space where f is the force in this element (a scalar) and u is the 6x1 element displacement vector. The element stress is obtained by dividing the element force by the cross- sectional area A. Solution procedure with matlab Solution procedure with matlab
9
Matlab functions used ME 520 Dr. Ahmet Zafer Şenalp 9Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space SpaceTrussElementLength(x1,y1,z1,x2,y2,z2) This function returns the length of the space truss element whose first node has coordinates (x 1,y 1,z 1 ) and second node has coordinates (x 2,y 2,z 2 ) Function contents: function y = SpaceTrussElementLength(x1,y1,z1,x2,y2,z2) %SpaceTrussElementLength This function returns the length of the % space truss element whose first node has % coordinates (x1,y1,z1) and second node has % coordinates (x2,y2,z2). y = sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1));
10
Matlab functions used ME 520 Dr. Ahmet Zafer Şenalp 10Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space SpaceTrussElementStiffness(E,A,L,thetax,thetay,thetaz) This function returns the element stiffness matrix for a space truss element with modulus of elasticity E, cross-sectional area A, length L, and angles thetax, thetay, thetaz (in degrees). The size of the element stiffness matrix is 6 x 6. Function contents: function y = SpaceTrussElementStiffness(E,A,L,thetax,thetay,thetaz) %SpaceTrussElementStiffness This function returns the element % stiffness matrix for a space truss % element with modulus of elasticity E, % cross-sectional area A, length L, and % angles thetax, thetay, thetaz % (in degrees). The size of the element % stiffness matrix is 6 x 6. x = thetax*pi/180; u = thetay*pi/180; v = thetaz*pi/180; Cx = cos(x); Cy = cos(u); Cz = cos(v); w = [Cx*Cx Cx*Cy Cx*Cz ; Cy*Cx Cy*Cy Cy*Cz ; Cz*Cx Cz*Cy Cz*Cz]; y = E*A/L*[w -w ; -w w];
11
Matlab functions used ME 520 Dr. Ahmet Zafer Şenalp 11Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space SpaceTrussAssemble(K,k,i,j) This function assembles the element stiffness matrix k of the space truss element with nodes i and j into the global stiffness matrix K. This function returns the 3nx3n global stiffness matrix K after the element stiffness matrix k is assembled. Function contents: function y = SpaceTrussAssemble(K,k,i,j) %SpaceTrussAssemble This function assembles the element stiffness % matrix k of the space truss element with nodes % i and j into the global stiffness matrix K. % This function returns the global stiffness % matrix K after the element stiffness matrix % k is assembled. K(3*i-2,3*i-2) = K(3*i-2,3*i-2) + k(1,1); K(3*i-2,3*i-1) = K(3*i-2,3*i-1) + k(1,2); K(3*i-2,3*i) = K(3*i-2,3*i) + k(1,3); K(3*i-2,3*j-2) = K(3*i-2,3*j-2) + k(1,4); K(3*i-2,3*j-1) = K(3*i-2,3*j-1) + k(1,5); K(3*i-2,3*j) = K(3*i-2,3*j) + k(1,6); K(3*i-1,3*i-2) = K(3*i-1,3*i-2) + k(2,1); K(3*i-1,3*i-1) = K(3*i-1,3*i-1) + k(2,2); K(3*i-1,3*i) = K(3*i-1,3*i) + k(2,3); K(3*i-1,3*j-2) = K(3*i-1,3*j-2) + k(2,4); K(3*i-1,3*j-1) = K(3*i-1,3*j-1) + k(2,5); K(3*i-1,3*j) = K(3*i-1,3*j) + k(2,6);
12
Matlab functions used ME 520 Dr. Ahmet Zafer Şenalp 12Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space K(3*i,3*i-2) = K(3*i,3*i-2) + k(3,1); K(3*i,3*i-1) = K(3*i,3*i-1) + k(3,2); K(3*i,3*i) = K(3*i,3*i) + k(3,3); K(3*i,3*j-2) = K(3*i,3*j-2) + k(3,4); K(3*i,3*j-1) = K(3*i,3*j-1) + k(3,5); K(3*i,3*j) = K(3*i,3*j) + k(3,6); K(3*j-2,3*i-2) = K(3*j-2,3*i-2) + k(4,1); K(3*j-2,3*i-1) = K(3*j-2,3*i-1) + k(4,2); K(3*j-2,3*i) = K(3*j-2,3*i) + k(4,3); K(3*j-2,3*j-2) = K(3*j-2,3*j-2) + k(4,4); K(3*j-2,3*j-1) = K(3*j-2,3*j-1) + k(4,5); K(3*j-2,3*j) = K(3*j-2,3*j) + k(4,6); K(3*j-1,3*i-2) = K(3*j-1,3*i-2) + k(5,1); K(3*j-1,3*i-1) = K(3*j-1,3*i-1) + k(5,2); K(3*j-1,3*i) = K(3*j-1,3*i) + k(5,3); K(3*j-1,3*j-2) = K(3*j-1,3*j-2) + k(5,4); K(3*j-1,3*j-1) = K(3*j-1,3*j-1) + k(5,5); K(3*j-1,3*j) = K(3*j-1,3*j) + k(5,6); K(3*j,3*i-2) = K(3*j,3*i-2) + k(6,1); K(3*j,3*i-1) = K(3*j,3*i-1) + k(6,2); K(3*j,3*i) = K(3*j,3*i) + k(6,3); K(3*j,3*j-2) = K(3*j,3*j-2) + k(6,4); K(3*j,3*j-1) = K(3*j,3*j-1) + k(6,5); K(3*j,3*j) = K(3*j,3*j) + k(6,6); y = K;
13
Matlab functions used ME 520 Dr. Ahmet Zafer Şenalp 13Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space SpaceTrussElementForce(E,A,L,thetax,thetay,thetaz,u) This function returns the element force given the modulus of elasticity E, the cross-sectional area A, the length L, the angle theta (in degrees), and the element nodal displacement vector u. Function contents: function y = SpaceTrussElementForce(E,A,L,thetax,thetay,thetaz,u) %SpaceTrussElementForce This function returns the element force % given the modulus of elasticity E, the % cross-sectional area A, the length L, % the angles thetax, thetay, thetaz % (in degrees), and the element nodal % displacement vector u. x = thetax * pi/180; w = thetay * pi/180; v = thetaz * pi/180; Cx = cos(x); Cy = cos(w); Cz = cos(v); y = E*A/L*[-Cx -Cy -Cz Cx Cy Cz]*u;
14
Matlab functions used ME 520 Dr. Ahmet Zafer Şenalp 14Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space SpaceTrussElementStress(E,L,thetax,thetay,thetaz,u) This function returns the element stress given the modulus of elasticity E, the the length L, the angle theta (in degrees), and the element nodal displacement vector u. Function contents: function y = SpaceTrussElementStress(E,L,thetax,thetay,thetaz,u) %SpaceTrussElementStress This function returns the element stress % given the modulus of elasticity E, the % length L, the angles thetax, thetay, % thetaz (in degrees), and the element % nodal displacement vector u. x = thetax * pi/180; w = thetay * pi/180; v = thetaz * pi/180; Cx = cos(x); Cy = cos(w); Cz = cos(v); y = E/L*[-Cx -Cy -Cz Cx Cy Cz]*u;
15
ME 520 Dr. Ahmet Zafer Şenalp 15Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Consider the space truss shown below. The supports at nodes 1, 2, and 3 are ball-and-socket joints allowing rotation but no translation. Given E=200 GPa A 14 =0.001 m 2 A 24 =0.002 m 2 A 34 =0.001 m 2 P=12 kN Determine: a)The global stiffness matrix for the structure b)the displacement at node 4 c)the reactions at nodes 1, 2, and 3 d)the stress in each element Solution of Example 1 with Matlab
16
ME 520 Dr. Ahmet Zafer Şenalp 16Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Solution: Use the 7 steps to solve the problem using space truss element. Step 1-Discretizing the domain: This problem is already discretized. The domain is subdivided into three elements and four nodes. The units used in Matlab calculations are KN and meter. The element connectivity is: E#N1N2 114 224 334 Solution of Example 1 with Matlab
17
ME 520 Dr. Ahmet Zafer Şenalp 17Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Step 2-Copying relevant files and starting Matlab Create a directory Copy SpaceTrussElementLength.m SpaceTrussElementStiffness.m SpaceTrussAssemble.m SpaceTrussElementForce.m SpaceTrussElementStress.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 Solution of Example 1 with Matlab
18
ME 520 Dr. Ahmet Zafer Şenalp 18Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Step 3-Writing the element stiffness matrices: Enter the data >>E=200e6 >>A1=0.001 >>A2=0.002 >>A3=0.001 >>L1=SpaceTrussElementLength(0,0,-4,0,5,0) L1 = 6.4031 >>L2=SpaceTrussElementLength(-3,0,0,0,5,0) L2 = 5.8310 >>L3=SpaceTrussElementLength(0,0,4,0,5,0) L3 = 6.4031 Solution of Example 1 with Matlab
19
ME 520 Dr. Ahmet Zafer Şenalp 19Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >>theta1x=acos(0/L1)*180/pi theta1x = 90 >>theta1y=acos(5/L1)*180/pi theta1y = 38.6598 >>theta1z=acos(4/L1)*180/pi theta1z = 51.3402 >>theta2x=acos(3/L2)*180/pi theta2x = 59.0362 Solution of Example 1 with Matlab
20
ME 520 Dr. Ahmet Zafer Şenalp 20Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >>theta2y=acos(5/L2)*180/pi theta2y = 30.9638 >>theta2z=acos(0/L2)*180/pi theta2z = 90 >>theta3x=acos(0/L3)*180/pi theta3x = 90 >>theta3y=acos(5/L3)*180/pi theta3y = 38.6598 >>theta3z=acos(-4/L3)*180/pi theta3z = 128.6598 Solution of Example 1 with Matlab
21
ME 520 Dr. Ahmet Zafer Şenalp 21Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >>k1=SpaceTrussElementStiffness(E,A1,L1,theta1x,theta1y,theta1z) k1 = 1.0e+04 * 0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 1.9046 1.5236 -0.0000 -1.9046 -1.5236 0.0000 1.5236 1.2189 -0.0000 -1.5236 -1.2189 -0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 -0.0000 -1.9046 -1.5236 0.0000 1.9046 1.5236 -0.0000 -1.5236 -1.2189 0.0000 1.5236 1.2189 >>k2=SpaceTrussElementStiffness(E,A2,L2,theta2x,theta2y,theta2z) k2 = 1.0e+04 * 1.8159 3.0264 0.0000 -1.8159 -3.0264 -0.0000 3.0264 5.0441 0.0000 -3.0264 -5.0441 -0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000 -1.8159 -3.0264 -0.0000 1.8159 3.0264 0.0000 -3.0264 -5.0441 -0.0000 3.0264 5.0441 0.0000 -0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 Solution of Example 1 with Matlab
22
ME 520 Dr. Ahmet Zafer Şenalp 22Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >>k3=SpaceTrussElementStiffness(E,A3,L3,theta3x,theta3y,theta3z) k3 = 1.0e+04 * 0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 0.0000 1.9046 -1.5236 -0.0000 -1.9046 1.5236 -0.0000 -1.5236 1.2189 0.0000 1.5236 -1.2189 -0.0000 -0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 -1.9046 1.5236 0.0000 1.9046 -1.5236 0.0000 1.5236 -1.2189 -0.0000 -1.5236 1.2189 Step 4-Assembling the global stiffness matrix: Since the structure has 4 nodes, the size of the golbal stiffness matrix is 12x12. >>K=zeros(12,12) K = 0 0 0 0 0 0 0 0 0 0 0 0 Solution of Example 1 with Matlab
23
ME 520 Dr. Ahmet Zafer Şenalp 23Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >>K=SpaceTrussAssemble(K,k1,1,4) >>K=SpaceTrussAssemble(K,k2,2,4) >>K=SpaceTrussAssemble(K,k3,3,4) yields; K = 1.0e+04 * 0.0000 0.0000 0.0000 0 0 0 0 0 0 -0.0000 -0.0000 -0.0000 0.0000 1.9046 1.5236 0 0 0 0 0 0 -0.0000 -1.9046 -1.5236 0.0000 1.5236 1.2189 0 0 0 0 0 0 -0.0000 -1.5236 -1.2189 0 0 0 1.8159 3.0264 0.0000 0 0 0 -1.8159 -3.0264 -0.0000 0 0 0 3.0264 5.0441 0.0000 0 0 0 -3.0264 -5.0441 -0.0000 0 0 0 0.0000 0.0000 0.0000 0 0 0 -0.0000 -0.0000 -0.0000 0 0 0 0 0 0 0.0000 0.0000 -0.0000 -0.0000 -0.0000 0.0000 0 0 0 0 0 0 0.0000 1.9046 -1.5236 -0.0000 -1.9046 1.5236 0 0 0 0 0 0 -0.0000 -1.5236 1.2189 0.0000 1.5236 -1.2189 -0.0000 -0.0000 -0.0000 -1.8159 -3.0264 -0.0000 -0.0000 -0.0000 0.0000 1.8159 3.0264 0.0000 -0.0000 -1.9046 -1.5236 -3.0264 -5.0441 -0.0000 -0.0000 -1.9046 1.5236 3.0264 8.8532 0 -0.0000 -1.5236 -1.2189 -0.0000 -0.0000 -0.0000 0.0000 1.5236 -1.2189 0.0000 0 2.4378 Solution of Example 1 with Matlab
24
ME 520 Dr. Ahmet Zafer Şenalp 24Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Step 5-Applying the boundary conditions: Finite element equation for the problem is; The boundary conditions for the problem are; Solution of Example 1 with Matlab
25
ME 520 Dr. Ahmet Zafer Şenalp 25Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space 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 submatrix in rows 10 to 12 and columns 10 to 12. Solution of Example 1 with Matlab
26
ME 520 Dr. Ahmet Zafer Şenalp 26Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space 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(10:12,10:12) k = 1.0e+04 * 1.8159 3.0264 0.0000 3.0264 8.8532 0 0.0000 0 2.4378 >>f=[12; 0; 0] f = 12 0 Solution of Example 1 with Matlab
27
ME 520 Dr. Ahmet Zafer Şenalp 27Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space u=k\f u = 0.0015 -0.0005 -0.0000 Step 7-Post-processing: In this step we obtain the reactions at nodes 1, 2, and 3 and the stress in each 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 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; u] U = 0 0.0015 -0.0005 -0.0000 Solution of Example 1 with Matlab
28
ME 520 Dr. Ahmet Zafer Şenalp 28Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >>F=K*U F = 0.0000 10.0000 8.0000 -12.0000 -20.0000 -0.0000 0.0000 10.0000 -8.0000 12.0000 -0.0000 so the recation forces are; at node 1: (0,10,8) N at node 2: (-12,-20,0) N at node 3: (0,10,-8) N Obviously force equilibrium is satisfied for this problem. Solution of Example 1 with Matlab
29
ME 520 Dr. Ahmet Zafer Şenalp 29Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space Next we set up the element nodal displacement vectors u 1, u 2 and u 3 then we calculate the element stresses sigma1, sigma2 and sigma3 by making calls to the Matlab function SpaceTrussElementStress. >> u1=[U(1) ; U(2) ; U(3) ; U(10) ; U(11); U(12)] u1 = 0 0.0015 -0.0005 -0.0000 >> u2=[U(4) ; U(5) ; U(6) ; U(10) ; U(11); U(12)] u2 = 0 0.0015 -0.0005 -0.0000 Solution of Example 1 with Matlab
30
ME 520 Dr. Ahmet Zafer Şenalp 30Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >> u3=[U(7) ; U(8) ; U(9) ; U(10) ; U(11); U(12)] u3 = 0 0.0015 -0.0005 -0.0000 >>sigma1=SpaceTrussElementStress(E,L1,theta1x,theta1y,theta1z,u1) sigma1 = -1.2806e+04 >>sigma2=SpaceTrussElementStress(E,L2,theta2x,theta2y,theta2z,u2) sigma2 = 1.1662e+04 Solution of Example 1 with Matlab
31
ME 520 Dr. Ahmet Zafer Şenalp 31Mechanical Engineering Department, GTU 7-Bar Elements in 3-D Space 7-Bar Elements in 3-D Space >>sigma3=SpaceTrussElementStress(E,L3,theta3x,theta3y,theta3z,u3) sigma3 = -1.2806e+04 Thus it is clear that the stresses: In element 1=12.806 MPa (compressive) In element 2=11.662 MPa (tensile) In element 3=12.806 MPa (compressive) The symmetry in the results regarding elements 1 and 3 is obvious.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.