Meshing two-phase material from CT scan

226 views
Skip to first unread message

rajath

unread,
Oct 15, 2020, 11:16:34 AM10/15/20
to iso2mesh-users
Hi Dr. Fang,

Thank you for the amazing meshing tool. I have beginner-level understanding of meshing and I started using iso2mesh a week ago. This is my first post. I have only used GUI-based applications such as COMSOL to create meshes and model in the past. I am interested in modeling heat conduction in particle polymer composites directly using 3D X-ray micro computed tomography image data. I want to use iso2mesh to mesh the image data and export to COMSOL for modeling.

I see that voxels with grey value of 0 are not meshed -- in my binary image stack, the particles have a grey value of 255, and the polymer 0. Moreover, the outer surface of the sample is curved and there are non-material regions. That is, in an M x N x P image, the material occupies a central region. Sorry, but I'm unable to attach any file to this post.

In my trial runs using iso2mesh, I see that only particles are meshed. In principle, I could work with a rectangular volume from the dataset and assign and assign a grey value of 1 to the polymer (and 255 for particles). This should mesh both the particles and the polymer. Or is there a way to mesh the entire dataset (with curved boundary) without having to select a rectangular region? Am I missing something fundamental? Please let me know

Thank you very much,
Rajath

Fang, Qianqian

unread,
Oct 15, 2020, 12:20:39 PM10/15/20
to iso2mes...@googlegroups.com, rajath

hi Rajath,

iso2mesh has multiple options to mesh a binary volume with the background included.

first, you can simply run v2m/vol2mesh with the cgalmesh and set background to 1 and inclusions to 2, by

[node,elem]=v2m(uint8((binimg==255)+1), [], 10,100,'cgamesh');

this will give you both background and inclusions, and label them accordingly (1 for background, 2 for inclusions).

the downside of the cgalmesh path is that the bounding box will not be perfectly flat.


if you want to have a clean bounding box, what you can do is to

1. extract your particle surfaces via [noobj, fcobj]=v2s(binimg==255, ...)

2. create a bounding box mesh, just slightly smaller than the original volume, by calling [nobox,fcbox]=meshabox(...)

3. reorient both surfaces before boolean: [noobj,fcobj]=surfreorient(noobj,fcobj); [nobox,fcbox]=surfreorient(...)

4. call surfboolean to get a combined mesh: [no,fc]=surfboolean(nobox, fcbox, 'first', noobj, fcobj);

5. call surf2mesh to create the final tetrahedral mesh.

it takes more steps, but the overall mesh quality will be much better. see some pervious examples from this link

https://groups.google.com/g/iso2mesh-users/search?q=surfboolean%20meshasphere
https://groups.google.com/g/iso2mesh-users/search?q=surfboolean%20meshacylinder


Qianqian



Thank you very much,
Rajath
--
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/ee1932e0-52b7-49f1-bc1f-182cd0a4e1ffn%40googlegroups.com.


rajath

unread,
Oct 15, 2020, 12:51:19 PM10/15/20
to iso2mesh-users
Thanks for the swift reply, Dr. Fang. I think I followed your train of thought, but I wonder if the bounding box method might mesh additional regions that are outside the two-phase material. In that case, I will need to somehow label the surfaces for particles, polymer and everything outside the composite material. This is important when exporting mesh to, say, COMSOL and assigning boundary conditions i.e., I will need a way to create particle and polymer selections. Please see link to the 3D reconstructed image below 

3D X-ray CT reconstructed      

The material has curved boundaries, so it will not fit in a tight bounding box, as is the case in many published works that I have seen. I cropped the cross-sectional images and narrowed down on the region of interest, but since the surface is curved, non-material regions in the image are inevitable. I can try the steps you suggested and will look through the recommended posts. My knowledge about meshing is limited, so please let me know if what I'm thinking is impractical. 

Thank you  

Fang, Qianqian

unread,
Oct 15, 2020, 10:01:07 PM10/15/20
to iso2mes...@googlegroups.com

Hi Rajath,

 

Perhaps I misunderstood. I thought when you referred your 0-valued region as “polymer”, the union of the zero-valued polymer and the non-zero-valued particle would make the entire volume, which has a boundary of the bounding box.

 

Are you saying your polymer may not be the complement space of your particles? Then what is polymer’s boundary?

 

By the way, the link to your CT reconstruction is broken and I can not open it.

 

Qianqian

Rajath Kantharaj

unread,
Oct 16, 2020, 10:30:57 AM10/16/20
to iso2mes...@googlegroups.com
Hi Dr. Fang,

Please see attached 3D reconstructed images and a single reconstructed cross-section of the two-phase material consisting of particles and polymer. This material is a mixture of metal particles in a polymer that is solidified prior to imaging. The material is seen within the yellow boundary (seen in the reconstructed cross-section). Everything outside the yellow boundary in the image is non-material region. After processing the image dataset using ImageJ, I am left with a 0 grey value for polymer, 1 (or 255) for the particles and also 0 for the non-material or background region (that is everything outside the yellow boundary). 

The polymer is not the only complement space of the particles. Other non-material regions are also the complement space of particles because, as I mentioned earlier, particles have a grey value of 1 and the polymer and other regions have grey value of 0.

The yellow boundary shows that the material has a curved surface. This yellow boundary takes on different shapes as you move along the material cross-section. Ideally, I'd want to mesh the only material region -- in many cases seen in literature, there is a bounding box within which one or more material phases can be meshed. Selecting such a bounding box for my images is possible, and I can potentially work with just a smaller sub-volume and mesh that per your suggestion. But I will also end up with non-material regions and I think this complicates the meshing.

Please let me know if you need more clarification.  

Thank you,
Rajath


side_view_reconstructed.png
front_view_reconstructed.png
reconstructed_cross_section.png

Fang, Qianqian

unread,
Oct 16, 2020, 10:49:29 AM10/16/20
to iso2mes...@googlegroups.com

> I am left with a 0 grey value for polymer, 1 (or 255) for the particles and also 0 for the non-material or background region (that is everything outside the yellow boundary). 

 

Hi Rajath,

 

If you want to create meshes for both polymer and particles, you will have to separate them from the background. That means, you should assign polymer and particles with different non-zero labels. For example: 0- background, 1-polymer and 2-particles. Is this possible?

 

Once you do so, you can then call v2m(uint8(myvolume),[],…,’cgalmesh’) to mesh this multi-labeled volume.

 

Qianqian

Rajath Kantharaj

unread,
Oct 16, 2020, 1:37:42 PM10/16/20
to iso2mes...@googlegroups.com
Dr. Fang,

That's what I thought too. I don't know of a relatively fast way of assigning a material boundary for just the particle and polymer regions. It can be done manually by selecting polygonal regions based on the cross-section images. Thanks for your suggestions and I will work on this. 

On a separate note, is there a way to label different boundaries or surfaces once it is meshed? I think that is important when the mesh is exported to, say, COMSOL and boundary conditions are required to be assigned. Specifically, using iso2mesh functionality, can I identify the following regions?

1. Particle-polymer interface regions  
2. Material outer surface -- front, back, top, bottom and sides
3. Group together all the particle meshes
4. Group together all the polymer meshes

One way I can think of is to examine the node coordinates and compare with a given coordinate or position, but this might not be able to select curved surfaces. Please let me know your thoughts 

Thanks,
Rajath


Fang, Qianqian

unread,
Oct 25, 2020, 4:50:48 PM10/25/20
to iso2mes...@googlegroups.com, Rajath Kantharaj
On 10/16/20 1:37 PM, Rajath Kantharaj wrote:
Dr. Fang,

That's what I thought too. I don't know of a relatively fast way of assigning a material boundary for just the particle and polymer regions. It can be done manually by selecting polygonal regions based on the cross-section images. Thanks for your suggestions and I will work on this.


hi Rajath,

not entirely sure I understood the question - if you have previously segmented the particle and polymer regions separately, then calling v2s/v2m separately, or merge the segmentation then call v2m, will be able to produce separate labels for the two materials. or, are you trying to use iso2mesh as a segmentation tool?


On a separate note, is there a way to label different boundaries or surfaces once it is meshed? I think that is important when the mesh is exported to, say, COMSOL and boundary conditions are required to be assigned. Specifically, using iso2mesh functionality, can I identify the following regions?


yes, please run the built-in sample script iso2mesh/sample/demo_directplc_ex1.m

then try plotting the generated surfaces via

plotmesh(node,face,'x>0');
unique(face(:,end))
unique(elem(:,end))

see screenshot in the attachment:

the left panel shows the input surface to surf2mesh - each piece of the surface is labeled with unique number. The middle panel shows the output surface mesh (node,face), and each surface also contains a unique label that matches its origin in the input surface; the right panel shows the output tetrahedral mesh, which contains volumetric labels that matches the regions input.

you can separate the output surface triangles by pre-label its input surface, as shown by the first and 2nd panels. You can also separate the output region surfaces using the labels of the volumetric mesh (node,elem) by calling volface(), for example,

surf1=volface(elem(elem(:,5)==0),:);
surf2=volface(elem(elem(:,5)==1),:);
surfboth=volface(elem(elem(:,5)>=0),:);

extracts the exterior surfaces of the tetrahedral mesh region labeled as 0, 1 or either.

let me know if this answers your question.

Qianqian


direct_plc_label_surface.png

Stanislav Buklovskyi

unread,
Feb 6, 2022, 4:39:53 PM2/6/22
to iso2mesh-users
Hello everyone,

I have a similar issue with meshing a two-phase material. (see images attached). I wonder if someone could give any suggestions on the issue. 

input.JPG Input - grains are labeled as 1 and interphase layer (dark blue in between grains) labeled as 2.

The idea is to get either a volumetric or better surface mesh of this volume image. I tried surf mesh using two iso values but it didn't produce a congruent mesh. 
The other way I tried was to mesh two phases separately, reorient and use surfboolean. Meshes were connected but the final result had distorted elements between two phases(attached)

output.JPG  Output mesh after surfboolean. 

Please let me know if you guys have any ideas or suggestions.

Best regards,
Stas


воскресенье, 25 октября 2020 г. в 16:50:48 UTC-4, q.fang:
Reply all
Reply to author
Forward
0 new messages