How can I generate mesh rectangular with cross members with input nodal coordinates as outline and elements number and degree of freedom nodes?
5 次查看(过去 30 天)
显示 更早的评论
I have input text file as
%#nodes
4
%#elements
3
%initial nodal coordinates (X,Y,Z coordinates)
0 0 0
0 120 0
24 120 0
120 120 0
list of dofs (1st col: node#, 2nd col: local dof#)
1 1
1 2
1 3
2 3
3 1
3 3
4 1
4 2
4 3
and with this input I had the frame outline , I am trying to generate 3D rectangular with cross members mesh and utomaticately get the connectivity matrix ? how can I start to generate such a meah ?
0 个评论
回答(1 个)
Amith
2023-4-25
Hi,
According to my understanding you wanted to generate 3d rectangular with cross member mesh and automatically get the connectivity matrix.
To generate a 3D rectangular mesh with cross members, you can use the generateMesh function in MATLAB. This function can generate a mesh based on a geometry description, which can be created using the cuboidGeometry function in the Partial Differential Equation Toolbox.
Here's an example MATLAB code that generates a 3D rectangular mesh with cross members:
% Define the dimensions of the rectangular mesh
L = 2; % length
W = 1; % width
H = 1; % height
% Create a cuboid geometry description
g = cuboidGeometry(L, W, H);
% Define the cross member dimensions
M = 0.1; % thickness
N = 0.5; % width
% Create the cross member geometry description
g2 = extrudeShape([0, M, 0; 0, M+N, 0; 0, M+N, H; 0, M, H], L, 'Quads');
% Combine the cuboid and cross member geometries
gd = [g; g2];
% Create the mesh
hmax = 0.05; % maximum element size
[p, t] = generateMesh(gd, 'Hmax', hmax);
% Get the connectivity matrix
C = connectivityMatrix(t);
You can refer to the generateMesh documentation from the below link
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!