3D Mesh with hexahedral finite elements

22 views (last 30 days)
Araceli
Araceli on 21 Jun 2011
Answered: Longying Xiao on 10 Jun 2019
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

Answers (3)

Friedrich
Friedrich on 21 Jun 2011
Hi,
Doing a triangulation for hexahedral elements wont work well I think. I would go for the patch command here, e.g.:

Araceli
Araceli on 21 Jun 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 on 10 Jun 2019
Hey.. have you solved the problem?

Community Treasure Hunt

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

Start Hunting!