You are on page 1of 6

ĐẠI HỌC QUỐC GIA THÀNH PHỐ HỒ CHÍ MINH

TRƯỜNG ĐẠI HỌC BÁCH KHOA


KHOA KỸ THUẬT GIAO THÔNG
------  ------

LUẬN VĂN TỐT NGHIỆP ĐẠI HỌC

TÍNH TOÁN TRÊN PHẦN MỀM CALFEM

SVTH : Nguyễn Ngọc Trực – 2170108


: Phạm Tiến Đạt – 2070439
: Mai Nhật Khải – 2170106
GVHD : PGS. TS. Lê Đình Tuân

TP. HỒ CHÍ MINH, 11/2021


Phương pháp tính toán số cho kết cấu phương tiện

Đề 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 stiffness matrix K, we have 18 Dofs → Create Matrix 18x18:


>> K=zeros(18,18);

GVHD: PGS. TS. Lê Đình Tuân 1


Phương pháp tính toán số cho kết cấu phương tiện

➢ Define load vector f:


>> f=zeros(18,1);

➢ Input load from example, at dof 13, value = 1:


>> f(13)=1;

➢ 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];

GVHD: PGS. TS. Lê Đình Tuân 2


Phương pháp tính toán số cho kết cấu phương tiện

➢ The element coordinates:


• For beams:
>> [Ex1,Ey1]=coordxtr(Edof1,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

• 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])

Figure 1: Beam Elements

GVHD: PGS. TS. Lê Đình Tuân 3


Phương pháp tính toán số cho kết cấu phương tiện

• For bars:
>> eldraw2(Ex2,Ey2,[1 2 1])

Figure 2: Bar Elements

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

GVHD: PGS. TS. Lê Đình Tuân 4


Phương pháp tính toán số cho kết cấu phương tiện

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:

Figure 3: The displacements of beams and bars

GVHD: PGS. TS. Lê Đình Tuân 5

You might also like