⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lineartriangleelementstresses.m

📁 《matlab有限元分析与应用》书后源代码
💻 M
字号:
function y = LinearTriangleElementStresses(E,NU,t,xi,yi,xj,yj,xm,ym,p,u)
%LinearTriangleElementStresses   This function returns the element 
%                                stress vector for a linear   
%                                triangular element with modulus of 
%                                elasticity E, Poisson's ratio NU,  
%                                thickness t, coordinates of the 
%                                first node (xi,yi), coordinates of 
%                                the second node (xj,yj),  
%                                coordinates of the third node 
%                                (xm,ym), and element displacement 
%                                vector u. Use p = 1 for cases of 
%                                plane stress, and p = 2 for cases 
%                                of plane strain.
%                                The size of the element stress 
%                                vector is 3 x 1.
A = (xi*(yj-ym) + xj*(ym-yi) + xm*(yi-yj))/2;
betai = yj-ym;
betaj = ym-yi;
betam = yi-yj;
gammai = xm-xj;
gammaj = xi-xm;
gammam = xj-xi;
B = [betai 0 betaj 0 betam 0 ; 
   0 gammai 0 gammaj 0 gammam ;
   gammai betai gammaj betaj gammam betam]/(2*A);
if p == 1 
   D = (E/(1-NU*NU))*[1 NU 0 ; NU 1 0 ; 0 0 (1-NU)/2];
elseif p == 2
   D = (E/(1+NU)/(1-2*NU))*[1-NU NU 0 ; NU 1-NU 0 ; 0 0 (1-2*NU)/2];
end
y = D*B*u;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -