# How can I generate mesh rectangular with cross members with input nodal coordinates as outline and elements number and degree of freedom nodes?

10 visualizaciones (últimos 30 días)
Aya Ragab el 11 de Abr. de 2023
Respondida: Amith el 25 de Abr. de 2023
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 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (1)

Amith el 25 de Abr. de 2023
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 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

R2023a

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by