%This example generates NE elements for a rectangular structure of
%length = Ly units and width = Lx units with Nx divisions on the x
%axis using femTriangularMeshGenerator function
% Kehinde Orolu
% Systems Engineering
% University of Lagos, Nigeria
% olukeh@yahoo.com
cla
Lx=100;
Ly=100;
Nx=8;
NE=144;
[coords cT nNodes ]=femTriangularMeshGenerator(Lx,Ly,Nx,NE);
disp(['Number of nodes = ',num2str(nNodes)])
disp('Connectivity Table')
disp(cT)
z=1;
for i=1:NE
figure(1),patch('Vertices',coords(z:z+2,:),'Faces',[1,2,3],'FaceColor','none','EdgeColor','g')
hold on
z=z+3;
end
figure(1),scatter(coords(:,1),coords(:,2),'MarkerFaceColor','r')
hold off

D145
本文介绍了一个使用MATLAB脚本生成矩形结构三角形网格的方法。该脚本通过femTriangularMeshGenerator函数创建了一个长度和宽度均为100单位、x轴方向划分成8份的网格,并展示了如何可视化这些网格元素。
1万+

被折叠的 条评论
为什么被折叠?



