Hello Dr. Fang,
My goal is to create three-phase tetrahedral FE mesh from tiff stack (unit8). I was using cgalmesh method within the vol2mesh function for this purpose. The mesh generation was successful and I saved the mesh to Abaqus inp file using mesh2abaqus by Michael Wang & Paul Mignone in previous post. However, when I loaded the mesh to Abaqus and submitted a job, the error showed that the volume of the elements is zero, small or negative. The detailed message is shown below.
I was wondering if the failure was due to the complexity of the tiff. So I simplified the problem, made binary images and tried the cgalmesh method again. Still failed with the same error message. Then I tried the vol2surf (cgalpoly) + cgals2m (cgalpoly) for the binary images and this time it worked. In both cases, I used the same opt parameters and mesh2abaqus to save mesh.
Although the vol2surf+cgals2m worked, I couldn’t use it for multi-phase images as the vol2surf only accept binaries. So I am wonder how can I solve the issue. I have attached the code for multi-phase and two-phase cases as well as the images in this link (https://www.dropbox.com/sh/61px1dinp00pfde/AADsO2nZAYoVeMmjp3AKVEMka?dl=0). A little explanation for the images: they represent porous material, so that one of the phases “void” (black) is not meshed and the corresponding space is left empty.
Another observation is that the mesh created with vol2mesh (cgalmesh) looked problematic indeed in Abaqus, which is very different from the one created with vol2surf+cgals2m. A picture comparison can also be found in the same link.
Thank you in advance for your help.
Regards,
Chuanyue
hi Chuanyue
cgalmesh and tetgen won't generate zero-volumed (degenerated) elements.
I think what likely happened was that when you export, the label column was messed up, making those part of the meshing data. try removing the label columns before saving.
if the mesh shape was correct, but abaqus still complains about the volume sign, you should call meshreorient() to reorient your element list (remember to take out the label first).
let me know if these fix the problem.
Qianqian
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/54cb246a-b2d6-4cc5-b94e-78dba0a47dfe%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2me...@googlegroups.com.
Hello Dr. Fang,
Thank you very much for the reply.
The label column in element matrix is for differentiating phases, so I think it might be necessary to keep it in the mesh inp file. However, I tried to remove the label column for the two-phase case, but the mesh still gets errors in Abaqus.
I also called the meshreorient() with label removed, but it had no success.
I am not sure how you used the results from meshreorient, but from reading the mesh2abaqus.m script, it requires elem to have 5 columns, so this is what you should do
elem(:,1:4)=meshreorient(node(:,1:3),elem(:,1:4));
and make sure you do not lose the 5th column.
if you want to verify the element volume, you can use
vol=elemvolume(node(:,1:3),elem(:,1:4),'signed');
you can print the element volume that Abaqus complains and see if that is a real problem. if the element iso2mesh created is not degenerated but abaqus still complains, the best path to get that resolved is to contact abaqus' support or post on its forum.
Qianqian
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/349883d2-46f5-4fc9-925c-a1c0fbae02bb%40googlegroups.com.
Hi Dr. Fang,
Thank you very much. I used what exactly as you mentioned. And the elem volume are verified positive after calling the meshreorient(), but the Abaqus still complained. I will contact the Abaqus support to find if there is a solution.
I tried to use the iso2mesh/sample to create mesh and save to Abaqus (using mesh2abaqus.m as well) to target the problem. This time meshreorient() wasn't used and the elem volume had some negatives, but that did not make the issue because based on some experiments I guess Abaqus may have some functions to reorient.It seems cgalmesh is the only case that won't work. I am just confused what makes cgalmesh so different. Can you explain a little if possible?
- 'demo_grayscale_ex1.m' with v2m (cgalsurf) worked;
- 'demo_label_sizing.m' with v2m (cgalmesh) failed;
- 'demo_surf2mesh.m' worked;
- 'demo_vol2mesh_ex1.m' with cgalsurf method worked;
- 'demo_vol2mesh_ex1b.m' with simplify method worked;
- 'demo_vol2mesh_ex1c.m' with cgalmesh;
- 'demo_vol2mesh_ex2.m' with cgalsurf worked.
I don't exactly what abaqus expects, nor had experience in converting iso2mesh mesh data to abaqus.
just from the perspective of the mesh data generated from these sample scripts, I do not see any major difference between the 4 involved meshing workflows:
1. v2m (cgalmesh)
2. v2s (cgalsurf) -> s2m(tetgen)
3. v2s (cgalsurf) -> s2m(cgalpoly)
4. v2s (simplify) -> s2m(tetgen)
the only possible difference is that cgalmesh outputs a 4-column node and 5-column elem array. The last column is the label (in both the node and elem). In comparison, most others either do not have any label, or only contains the elem label.
Please make sure that the 4-th column in node is removed before conversion. Other than that, I don't see any other difference can cause different behaviors.
Qianqian
Thank you,Chuanyue
On Sunday, July 28, 2019 at 10:08:39 AM UTC-5, q.fang wrote:On 7/28/19 1:53 AM, Chuanyue Shen wrote:
Hello Dr. Fang,
Thank you very much for the reply.
The label column in element matrix is for differentiating phases, so I think it might be necessary to keep it in the mesh inp file. However, I tried to remove the label column for the two-phase case, but the mesh still gets errors in Abaqus.
I also called the meshreorient() with label removed, but it had no success.
I am not sure how you used the results from meshreorient, but from reading the mesh2abaqus.m script, it requires elem to have 5 columns, so this is what you should do
elem(:,1:4)=meshreorient(node(:,1:3),elem(:,1:4));
and make sure you do not lose the 5th column.
if you want to verify the element volume, you can use
vol=elemvolume(node(:,1:3),elem(:,1:4),'signed');
you can print the element volume that Abaqus complains and see if that is a real problem. if the element iso2mesh created is not degenerated but abaqus still complains, the best path to get that resolved is to contact abaqus' support or post on its forum.
Qianqian
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/671f2fd0-f326-40da-b98b-e5cf69d5b27c%40googlegroups.com.
Thank you so much Dr. Fang. Just one more question. Except using vol2mesh with cgalmesh, are there other possible ways to create multi-label volumetric mesh? Can we first generate a multi-label surface mesh, then convert it to volume mesh?
hi Chuanyue
yes, you can. surface-based meshing pipeline is the recommended method, but involves more work.
are you trying to mesh combinations of simple shapes, or segmented complex volumes like medical images?
for the 1st case, you can create primitives and use surfboolean to merge them, and then s2m to mesh.
for the 2nd case, it is not trivial. We have done some work on meshing multi-layered brain, and a specialized brain meshing toolbox can be found at
https://github.com/fangq/brain2mesh
this approach was described in one of our preprint papers
https://arxiv.org/abs/1708.08954
From Fig. 3 of this paper, you can see that it involves many steps. But the output mesh quality is quite nice.
Or can we create different single-label meshes and combine them together?
unfortunately, no, we do not have volumetric mesh merging capability, nor am I aware of other tools that can do that.
Qianqian
Thanks,Chuanyue
On Monday, July 29, 2019 at 11:05:08 AM UTC-5, q.fang wrote:On 7/29/19 3:46 AM, Chuanyue Shen wrote:
Hi Dr. Fang,
Thank you very much. I used what exactly as you mentioned. And the elem volume are verified positive after calling the meshreorient(), but the Abaqus still complained. I will contact the Abaqus support to find if there is a solution.
I tried to use the iso2mesh/sample to create mesh and save to Abaqus (using mesh2abaqus.m as well) to target the problem. This time meshreorient() wasn't used and the elem volume had some negatives, but that did not make the issue because based on some experiments I guess Abaqus may have some functions to reorient.It seems cgalmesh is the only case that won't work. I am just confused what makes cgalmesh so different. Can you explain a little if possible?
- 'demo_grayscale_ex1.m' with v2m (cgalsurf) worked;
- 'demo_label_sizing.m' with v2m (cgalmesh) failed;
- 'demo_surf2mesh.m' worked;
- 'demo_vol2mesh_ex1.m' with cgalsurf method worked;
- 'demo_vol2mesh_ex1b.m' with simplify method worked;
- 'demo_vol2mesh_ex1c.m' with cgalmesh;
- 'demo_vol2mesh_ex2.m' with cgalsurf worked.
I don't exactly what abaqus expects, nor had experience in converting iso2mesh mesh data to abaqus.
just from the perspective of the mesh data generated from these sample scripts, I do not see any major difference between the 4 involved meshing workflows:
1. v2m (cgalmesh)
2. v2s (cgalsurf) -> s2m(tetgen)
3. v2s (cgalsurf) -> s2m(cgalpoly)
4. v2s (simplify) -> s2m(tetgen)the only possible difference is that cgalmesh outputs a 4-column node and 5-column elem array. The last column is the label (in both the node and elem). In comparison, most others either do not have any label, or only contains the elem label.
Please make sure that the 4-th column in node is removed before conversion. Other than that, I don't see any other difference can cause different behaviors.
Qianqian
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/c81f22fa-7ef2-444e-bb38-5dedecc259bc%40googlegroups.com.
iso2mesh should not create degenerated elements (neither CGAL tools or tetgen allows output mesh to have degeneracy), so, I think is like a book-keeping issue when saving/exporting your mesh.
can you save a copy of your node/elem variables to a .mat file and share it somewhere?
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/db37ca0e-c9af-435c-ac9b-ef3fb2b4ce9an%40googlegroups.com.
how did you plot the mesh? usually this is caused by the label column - plot/export the mesh without the 4th column of node and 5th column of elem, unless you need the labels.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/186d4648-6c4c-44fb-9388-0bc60a497e89n%40googlegroups.com.
I exported the mesh in FEA software, the plot is from there. I do need labels and I kept the 5th column of elem but I din’t keep 4th column of node because it didn’t consist of integer numbers. I had my phases marked as [1, 2] but labels for nodes were [1.5, 2.5]. Do they correspond to [1,2] elem sets? Is it correct that they’re not integers?
Stas
From: Qianqian Fang
Sent: Monday, May 23, 2022 11:03 PM
To: iso2mes...@googlegroups.com; Stanislav Buklovskyi
Subject: Re: [iso2mesh-users] Multi-phase meshing problem with cgalmesh
how did you plot the mesh? usually this is caused by the label column - plot/export the mesh without the 4th column of node and 5th column of elem, unless you need the labels.
On 5/23/22 19:26, Stanislav Buklovskyi wrote:
Hello Dr. Fang,
then it is very likely your exported files are either misaligned
or misnumbered. does your FEA software use 1 as the first node
index or 0?
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/A0AD77E0-5031-4A52-A5FE-8D0562F112F6%40hxcore.ol.
Thanks for the tip. I think the software uses 1 as the first node index. Also, why do nodes have float labels (1.5 and 2.5 in my case, instead of 1 and 2)? Is that how it’s supposed to be?
Thanks,
Chuanyue
Hi Dr. Fang,
1. 'demo_grayscale_ex1.m' with v2m (cgalsurf) worked;
2. 'demo_label_sizing.m' with v2m (cgalmesh) failed;
3. 'demo_surf2mesh.m' worked;
4. 'demo_vol2mesh_ex1.m' with cgalsurf method worked;
5. 'demo_vol2mesh_ex1b.m' with simplify method worked;
6. 'demo_vol2mesh_ex1c.m' with cgalmesh;
7. 'demo_vol2mesh_ex2.m' with cgalsurf worked.
your "good" mesh were exported by other software using other
exporters. since cgalmesh output looks fine in matlab, I am pretty
sure the issue came from your exporter - is the exporting function
part of iso2mesh or something else?
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/9c62a4d9-28fd-450d-8bec-bc72e303ff3an%40googlegroups.com.