exs_beambar2¶
- Purpose:
Analysis of a combined beam and bar structure.
- Description:
Consider a structure consisting of a beam with \(A_1=4.0 \times 10^{-3}\) m² and \(I_1=5.4 \times 10^{-5}\) m⁴ supported by two bars with \(A_2=1.0 \times 10^{-3}\) m². The beam as well as the bars have \(E=200\) GPa. The structure is loaded by a distributed load \(q=10\) kN/m. The corresponding finite element model consists of three beam elements and two bar elements and has 14 degrees of freedom.
- Example:
The computation is initialised by defining the topology matrix
Edof1for the beam elements andEdof2for the bar elements. The matrixK(14×14), and vectorf(14×1) are created and filled with zeros:>> Edof1=[1 1 2 3 4 5 6; >> 2 4 5 6 7 8 9; >> 3 7 8 9 10 11 12]; >> Edof2=[4 13 14 4 5; >> 5 13 14 7 8]; >> >> K=zeros(14); f=zeros(14,1);The element property vectors
ep1andep2and the element coordinate vectorsex1,ex2,ex3,ex4,ex5,ey1,ey2,ey3,ey4andey5are defined:>> E=200e9; A1=4.0e-3; A2=1.0e-3; I1=5.4e-5; >> >> ep1=[E A1 I1]; ep4=[E A2]; >> >> eq1=[0 0]; eq2=[0 -10e3]; >> >> ex1=[0 2]; ey1=[2 2]; >> ex2=[2 4]; ey2=[2 2]; >> ex3=[4 6]; ey3=[2 2]; >> ex4=[0 2]; ey4=[0 2]; >> ex5=[0 4]; ey5=[0 2];The element stiffness matrices
Ke1,Ke2andKe3are computed usingbeam2eandKe4andKe5are computed usingbar2e. Element load vectorsfe2andfe3are also given bybeam2e:>> Ke1=beam2e(ex1,ey1,ep1); >> [Ke2,fe2]=beam2e(ex2,ey2,ep1,eq2); >> [Ke3,fe3]=beam2e(ex3,ey3,ep1,eq2); >> Ke4=bar2e(ex4,ey4,ep4); >> Ke5=bar2e(ex5,ey5,ep4);Based on the topology information, the global stiffness matrix
Kand load vectorfare generated by assembling the element matrices usingassem:>> K=assem(Edof1(1,:),K,Ke1); >> [K,f]=assem(Edof1(2,:),K,Ke2,f,fe2); >> [K,f]=assem(Edof1(3,:),K,Ke3,f,fe3); >> K=assem(Edof2(1,:),K,Ke4); >> K=assem(Edof2(2,:),K,Ke5);Considering the prescribed displacements in
bc, the system of equations is solved using the functionsolveq, yielding displacementsaand support forcesr. According to the computation the vertical displacement at the end of the beam is \(13.0\) mm:>> bc=[1 0; 2 0; 3 0; 13 0; 14 0]; >> [a,r]=solveq(K,f,bc) a = r = 0 1.0e+04 * 0 0 -8.0702 0.0002 -0.6604 -0.0006 -0.1403 -0.0010 0 0.0004 -0.0000 -0.0046 -0.0000 -0.0033 0 0.0004 -0.0000 -0.0130 0.0000 -0.0045 0 0 0 0 -0.0000 8.0702 4.6604The section forces
es1,es2,es3,es4andes5are calculated usingbar2sandbeam2sfrom element displacementsed1,ed2,ed3,ed4anded5obtained usingextract. This yields the normal forces \(-35.4\) kN, \(-152.5\) kN in the bars and the maximum moment \(10.00\) kNm in the beam:>> Ed1=extract_ed(Edof1,a); >> Ed2=extract_ed(Edof2,a); >> >> es1=beam2s(ex1,ey1,ep1,Ed1(1,:),eq1,11) >> es2=beam2s(ex2,ey2,ep1,Ed1(2,:),eq2,11) >> es3=beam2s(ex3,ey3,ep1,Ed1(3,:),eq2,11) >> es4=bar2s(ex4,ey4,ep2,Ed2(1,:)) >> es5=bar2s(ex5,ey5,ep2,Ed2(2,:)) es1 = 1.0e+04 * 8.0702 0.6604 0.1403 8.0702 0.6604 0.0082 . . . 8.0702 0.6604 -1.1806 es2 = 1.0e+04 * 6.8194 -0.5903 -1.1806 6.8194 -0.3903 -1.0825 . . . . . . 6.8194 1.4097 -2.0000 es3 = 1.0e+04 * 0 -2.0000 -2.0000 0 -1.8000 -1.6200 . . . 0 0.0000 -0.0000 es4 = 1.0e+04 * -3.5376 -3.5376 es5 = 1.0e+05 * -1.5249 -1.5249