3D Mesh with hexahedral finite elements

Hi,
I want to plot a 3D mesh using hexahedral elements with 8-nodes. I have two files: 1. nodes for cube 2. coordinates (x,y,z) of each node
So far I have used the "trisurf" function to plot the same problem in 2D and it worked out perfectly fine. But in 3D the elements are not fully connected to each other.
How can I plot the mesh?
Thx in advance

Réponses (3)

Friedrich
Friedrich le 21 Juin 2011

2 votes

Hi,
Doing a triangulation for hexahedral elements wont work well I think. I would go for the patch command here, e.g.:
Araceli
Araceli le 21 Juin 2011
It won't work, since patch only creates one patch at a time with neighboring nodes. For example my first element has nodes {1,2,57,56,12,13,68,67} and the second element {2,3,58,57,13,14,69,68}.
I programmed following lines, but a warning pops out: "Values in patch Faces must be in [1:rows(Vertices)]
for j=1:size(n4e,1)
P = n4e(j,:);
[faces_matrix,vertices_matrix]=create_patch(P);
patch('Vertices',vertices_matrix,'Faces', faces_matrix);
end
Longying Xiao
Longying Xiao le 10 Juin 2019

0 votes

Hey.. have you solved the problem?

Catégories

En savoir plus sur Polar Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by