Professional Documents
Culture Documents
Đề bài:
Bài toán F: Plane frame stabilized with bars (consisting of both beams and bars) / Khung dầm và
thanh hổn hợp
Câu 1: The matrices of the global system i.e. the stiffness matrix K, the load vector f, the coordinate
matrix Coord, and the corresponding degrees of freedom matrix Dof are defined.
Câu 2: The material properties, the topology, and the element coordinates for the beams and bars
respectively, are defined.
Câu 3: To check the model, the finite element mesh can be drawn.
Câu 4: The element stiffness matrices are generated and assembled in two loops, one for the beams and
one for the bars. The element stiffness functions beam2e and bar2e use the element coordinate matrices
ex and ey. These matrices are extracted from the global coordinates Coord by the function coordxtr
above.
Câu 5: The global system of equations is solved considering the boundary conditions in bc.
Câu 6: and the deformed frame is displayed by the function eldisp2, where the displacements
are scaled by the variable sfac.
Bài giải:
Câu 1:
➢ Define the degree of freedom matrix, Dof:
>> Dof= [1 2 3;
4 5 6;
7 8 9;
10 11 12;
13 14 15;
16 17 18];
➢ Define the nodes coordinate respectively following the dofs have already defined:
>> Coord= [0 0;
1 0;
0 1;
1 1;
0 2;
1 2];
Câu 2:
➢ Element properties:
• For beams:
>> ep1=[1 1 1];
• For bars:
>> ep2=[1 1];
➢ The topology:
• For beams:
>> Edof1=[1 1 2 3 7 8 9;
2 7 8 9 13 14 15;
3 4 5 6 10 11 12;
4 10 11 12 16 17 18;
5 7 8 9 10 11 12;
6 13 14 15 16 17 18];
• For bars:
>> Edof2=[7 1 2 10 11;
8 7 8 16 17;
9 7 8 4 5;
10 13 14 10 11];
• For bars:
>> [Ex2,Ey2]=coordxtr(Edof2,Coord,Dof,2)
Ex1 = Ey1 =
0 0 0 1
0 0 1 2
1 1 0 1
1 1 1 2
0 1 1 1
0 1 2 2
Câu 3:
➢ Draw the finite element mesh:
• For beams:
>> eldraw2(Ex1,Ey1,[1 3 1])
• For bars:
>> eldraw2(Ex2,Ey2,[1 2 1])
Câu 4:
➢ Use ‘for’ loop to assembly element stiffness matrices to stiffness matrix K
• For beam elements:
>> for i=1:6
Ke=beam2e(Ex1(i,:),Ey1(i,:),ep1);
K=assem(Edof1(i,:),K,Ke);
end
• For bar elements:
>> for i=1:4
Ke=bar2e(Ex2(i,:),Ey2(i,:),ep2);
K=assem(Edof2(i,:),K,Ke);
end
Câu 5:
➢ Boundary conditions:
>> bc= [1 0; 2 0; 3 0; 4 0; 5 0; 6 0];
➢ Solve static finate equations considering boundary conditions:
>> [a,r]=solveq(K,f,bc);
a: solution including boundary values
r: reaction force vector
Câu 6:
➢ Calculate the displacement of beams:
>> Ed1=extract(Edof1,a);
➢ Calculate the displacement of bars:
>> Ed2=extract(Edof2,a);
➢ Define the scale factor of displacement:
>> [sfac]=scalfact2(Ex1,Ey1,Ed1,0.1) = 0.0835
➢ Draw the displacement of beams:
>> eldisp2(Ex1,Ey1,Ed1,[2 1 1],sfac);
➢ Draw the displacement of bars:
>> eldisp2(Ex2,Ey2,Ed2,[2 1 1],sfac);
➢ We combine the displacements with the meshes from ‘Câu 3’, we have figure: