220 likes | 673 Views
Finite Element Method. Equations assembling Displacement boundary conditions Gaussian elimination. Monday, 11/11/2002. Corrections to Homework (node coordinates). We have 6 nodes, their coordinates are coor=(0.1,0.1; 0,0.6; 0.6,0; 0.5,0.4; 1.2 ,0.2; 1.2 ,0.5);.
E N D
Finite Element Method Equations assembling Displacement boundary conditions Gaussian elimination Monday, 11/11/2002
Corrections to Homework(node coordinates) We have 6 nodes, their coordinates are coor=(0.1,0.1; 0,0.6; 0.6,0; 0.5,0.4; 1.2,0.2; 1.2,0.5);
Corrections to Homework(element area) • In MATLAB with the above definite of elmt and coor, the area can be calculated with • A=0.5*det([1, coor(elmt(e,1),1), coor(elmt(e,1),2); … • 1, coor(elmt(e,2),1), coor(elmt(e,2),2); … • 1, coor(elmt(e,3),1), coor(elmt(e,3),2)])
Assembled System Equations N: number of nodes
MATLAB form If T_x, F_x, T_y, and F_y are column vector F = [T_x+F_x; T_y+F_y] K = [Kxx,Kxy; Kyx,Kyy]
Displacement Boundary Conditions To solve: F = K * u u = gaussElim(K,F) u(5) u(6) u(11) u(12)
Keep Stiffness Matrix Symmetric % apply displacement boundary condition for node 5 % in y direction ibound = 5 + nNode; for i = 1:2*nNode if(i ~= ibound) K(i,ibound)=0; K(ibound,i)=0; end end F(ibound)=0;
Gaussian Elimination MATLAB Tutorial, Tutorial on subroutines. gaussElim.m: