3점 가우스 구적법을 이용한 4x4 행렬
계산 및 비교
20201309 이재현
1. 목적
3점 가우스 구적법을 이용하여 1차 막대 요소로 구성된 구조물의 강성행렬을
수치적으로 적분하여 구하고, 기준값과의 차이를 비교하는 것이다.
2. 이론
가우스 구적법은 정규화된 구간에서 함수의 수치적분을 효율적으로 수행할 수 있는
방법이다. 특히, 3점 구적법은 5차 이하 다항식을 정확히 적분할 수 있는 장점이 있다. 1차
막대 요소의 강성행렬은 다음과 같이 표현된다.
Kₑ = ∫[-1,1] Bᵀ E A B · (Lₑ / 2) dξ
3. 파라미터
• E = 1000
• h = 1
• b = 1 → A = 1
• Lₑ = 10
4. 코드
% Parameters
E = 1000;
b = 1;
h = 1;
A = b * h;
Le = 10;
% Gauss points and weights for 3-point quadrature
xi = [-sqrt(3/5), 0, sqrt(3/5)];
w = [5/9, 8/9, 5/9];
% Shape function derivatives in local coordinates (B-matrix)
% For 2-node bar element in 1D
B = [-1/Le, 1/Le];
% Initialize element stiffness matrix
Ke = zeros(2,2);
% Integration using Gauss quadrature
for i = 1:3
Ke = Ke + (B' * E * A * B) * (Le/2) * w(i);
end
% Display 2x2 element matrix
disp('2x2 Element stiffness matrix:');
disp(Ke);
% Expand to a 4x4 matrix for two connected elements (e.g., global assembly)
K_global = zeros(4,4);
K_global(1:2,1:2) = Ke;
K_global(2:3,2:3) = K_global(2:3,2:3) + Ke;
K_global(3:4,3:4) = K_global(3:4,3:4) + Ke;
disp('Assembled 4x4 stiffness matrix:');
disp(K_global);
% Compare with expected matrix (exact or assumed)
K_exact = [10 -10 0 0;
-10 20 -10 0;
0 -10 20 -10;
0 0 -10 10]; % example value
disp('Expected (exact) 4x4 matrix:');
disp(K_exact);
% Compute error
error_matrix = abs(K_global - K_exact);
disp('Absolute Error Matrix:');
disp(error_matrix);
5. 결과
계산된 요소 행렬 (2x2):
[10, -10;
-10, 10]
전체 시스템 행렬 (4x4):
[10, -10, 0, 0;
-10, 20, -10, 0;
0, -10, 20, -10;
0, 0, -10, 10]
기준행렬과 일치 → 가우스 구적법의 정확성 입증