Vous êtes sur la page 1sur 9

Chapter 5

Trusses in 3D space

5.1 Basic formulation


We consider now trusses in 3D space. A typical two-noded 3D truss element is illustrated in gure 5.1. Each node has three global degrees of freedom. The stiness matrix in local coordinates is given by EA ) K=( L
2 Cx 2 Cx Cy Cx Cz Cx Cx Cy 2 2 Cy Cy Cz Cx Cy Cy 2 Cz Cx Cz Cy Cz 2 Cx Cx Cy 2 Cy

symmetry where the cosines are obtained as Cx = x2 x1 y2 y1 z2 z1 ; Cy = ; Cz = L L L

Cx Cz Cy Cz 2 Cz Cx Cz Cy Cz 2 Cz

We then perform a basis transformation in order to obtain the global stiness matrix and the global vector of equivalent nodal forces, as we did for 2D trusses.

5.2 A 3D truss problem


We consider the 3D truss problem illustrated in gure 5.2. The MATLAB code (problem7.m) is used to evaluate displacements, reactions and forces at elements.

A.J.M. Ferreira, MATLAB Codes for Finite Element Analysis: Solids and Structures, Solid Mechanics and Its Applications 157, c Springer Science+Business Media B.V. 2009

69

70 Y y 2

5 Trusses in 3D space

Z z

Fig. 5.1 Trusses in 3D coordinates: local and global coordinate sets 3

E = 1 . 2 e6 X1 = (72, 0, 0) X2 = (0, 36, 0) X3 = (0, 36, 72) y 2 U2 = U3 = U4 = (0, 0, 0) 1 1 4 3 1000 A1 = 0.729 A1 = 0.187 x A1 = 0.302 v1 = 0 X4 = (0, 0, 48)

Fig. 5.2 A 3D truss problem: geometry, mesh, loads and boundary nodes, problem7.m

5.2 A 3D truss problem

71

%................................................................ % % % % % MATLAB codes for problem7.m ref: D. Logan, A third Edition, A antonio ferreira Finite Element Analysis first couse in the finite element method, 3D truss example 2008

% clear memory clear all % E; modulus of elasticity % A: area of cross section % L: length of bar E=1.2e6; A=[0.302;0.729;0.187]; % area for various sections % generation of coordinates and connectivities nodeCoordinates=[72 0 0; 0 36 0; 0 36 72; 0 0 -48]; elementNodes=[1 2;1 3;1 4]; numberElements=size(elementNodes,1); numberNodes=size(nodeCoordinates,1); xx=nodeCoordinates(:,1); yy=nodeCoordinates(:,2); % for structure: % displacements: displacement vector % force : force vector % stiffness: stiffness matrix % GDof: global number of degrees of freedom GDof=3*numberNodes; U=zeros(GDof,1); force=zeros(GDof,1); % applied load at node 2 force(3)=-1000; % stiffness matrix [stiffness]=... formStiffness3Dtruss(GDof,numberElements,... elementNodes,numberNodes,nodeCoordinates,E,A);

72

5 Trusses in 3D space

% boundary conditions and solution prescribedDof=[2 4:12]; % solution displacements=solution(GDof,prescribedDof,stiffness,force); % output displacements/reactions outputDisplacementsReactions(displacements,stiffness,... GDof,prescribedDof) % stresses at elements stresses3Dtruss(numberElements,elementNodes,nodeCoordinates,... displacements,E) The results are in excellent agreement with analytical solution in [11]: Displacements ans = 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 10.0000 11.0000 12.0000 reactions ans = 2.0000 -223.1632 4.0000 256.1226 5.0000 -128.0613 6.0000 0 7.0000 -702.4491 8.0000 351.2245 9.0000 702.4491 -0.0711 0 -0.2662 0 0 0 0 0 0 0 0 0

5.3 A second 3D truss example

73

10.0000 11.0000 12.0000

446.3264 0 297.5509

Stresses in elements 1 -948.19142387 2 1445.36842298 3 -2868.54330060

5.3 A second 3D truss example


In gure 5.3 is illustrated a second example of a 3D truss.

%................................................................ % % % % % MATLAB codes for problem8.m ref: D. Logan, A third Edition, A antonio ferreira Finite Element Analysis first couse in the finite element method, second 3D truss example 2008

2(0, 4, 0) 1 3(0, 4, 6) 2 3 10000

E = 210GPa,A = 100mm2 U2 = U3 = U4 = U5 = (0, 0, 0) 1(4, 4, 3) 4

4(4, 0, 3) y x z Fig. 5.3 Second 3D problem, problem8.m

5(8, 1, 1)

74

5 Trusses in 3D space

% clear memory clear all % E; modulus of elasticity % A: area of cross section % L: length of bar E=210000; A=[100 100 100 100]; % area for various sections % generation of coordinates and connectivities nodeCoordinates=[4000 4000 3000; 0 4000 0; 0 4000 6000; 4000 0 3000; 8000 -1000 1000]; elementNodes=[1 2;1 3;1 4;1 5]; numberElements=size(elementNodes,1); numberNodes=size(nodeCoordinates,1); xx=nodeCoordinates(:,1); yy=nodeCoordinates(:,2); % for structure: % displacements: displacement vector % force : force vector % stiffness: stiffness matrix % GDof: global number of degrees of freedom GDof=3*numberNodes; U=zeros(GDof,1); force=zeros(GDof,1); % applied load at node 2 force(2)=-10000; % stiffness matrix [stiffness]=... formStiffness3Dtruss(GDof,numberElements,... elementNodes,numberNodes,nodeCoordinates,E,A); % boundary conditions and solution prescribedDof=[4:15]; % solution

5.3 A second 3D truss example

75

displacements=solution(GDof,prescribedDof,stiffness,force); % output displacements/reactions outputDisplacementsReactions(displacements,stiffness,... GDof,prescribedDof) % stresses at elements stresses3Dtruss(numberElements,elementNodes,nodeCoordinates,... displacements,E) The results are in excellent agreement with analytical solution in [11]: Displacements ans = 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000 7.0000 8.0000 9.0000 10.0000 11.0000 12.0000 13.0000 14.0000 15.0000 reactions ans = 1.0e+03 * 0.0040 0.0050 0.0060 0.0070 0.0080 0.0090 0.2709 0 0.2032 1.3546 0 -1.0160 -0.3024 -1.5177 0.2688 0 0 0 0 0 0 0 0 0 0 0 0

76

5 Trusses in 3D space

0.0100 0.0110 0.0120 0.0130 0.0140 0.0150

0 7.9681 0 -1.6255 2.0319 0.8128

Stresses in elements 1 -3.38652236 2 -16.93261180 3 -79.68086584 4 -27.26097914 >> >> Both codes problem7.m and problem8.m call functions formStiness3Dtruss.m for stiness computation

function [stiffness]=... formStiffness3Dtruss(GDof,numberElements,... elementNodes,numberNodes,nodeCoordinates,E,A); stiffness=zeros(GDof); % computation of the system stiffness matrix for e=1:numberElements; % elementDof: element degrees of freedom (Dof) indice=elementNodes(e,:) ; elementDof=[3*indice(1)-2 3*indice(1)-1 3*indice(1)... 3*indice(2)-2 3*indice(2)-1 3*indice(2)] ; x1=nodeCoordinates(indice(1),1); y1=nodeCoordinates(indice(1),2); z1=nodeCoordinates(indice(1),3); x2=nodeCoordinates(indice(2),1); y2=nodeCoordinates(indice(2),2); z2=nodeCoordinates(indice(2),3); L = sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) +... (z2-z1)*(z2-z1)); CXx = (x2-x1)/L;CYx = (y2-y1)/L;CZx = (z2-z1)/L; T = [CXx*CXx CXx*CYx CXx*CZx ; CYx*CXx CYx*CYx CYx*CZx ; ... CZx*CXx CZx*CYx CZx*CZx]; stiffness(elementDof,elementDof)=... stiffness(elementDof,elementDof)+E*A(e)/L*[T -T ; -T T]; end

5.3 A second 3D truss example

77

and function stresses3Dtruss.m for computation of stresses at 3D trusses.

function stresses3Dtruss(numberElements,elementNodes,... nodeCoordinates,displacements,E) % stresses in 3D truss elements fprintf(Stresses in elements\n) ff=zeros(numberElements,6); format for e=1:numberElements; % elementDof: element degrees of freedom (Dof) indice=elementNodes(e,:) ; elementDof=[3*indice(1)-2 3*indice(1)-1 3*indice(1)... 3*indice(2)-2 3*indice(2)-1 3*indice(2)] ; x1=nodeCoordinates(indice(1),1); y1=nodeCoordinates(indice(1),2); z1=nodeCoordinates(indice(1),3); x2=nodeCoordinates(indice(2),1); y2=nodeCoordinates(indice(2),2); z2=nodeCoordinates(indice(2),3); L = sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) +... (z2-z1)*(z2-z1)); CXx = (x2-x1)/L;CYx = (y2-y1)/L;CZx = (z2-z1)/L; u=displacements(elementDof); member_stress(e)=E/L*[-CXx -CYx -CZx CXx CYx CZx]*u; fprintf(%3d %12.8f\n,e, member_stress(e)); end

Vous aimerez peut-être aussi