siddharth-maddali/HierarchicalSmooth

Outer surface triangulation for grains on the boundaries of RVE.

Opened this issue · 5 comments

Hi siddharth,

Thank you for the code. Very good concept & implementation.
To perform volumetric meshing, each grain has to be a closed surface. But from the smoothing process we obtain grains on the outer surfaces that are not closed. So after the smoothing process I tried to generate the outer surfaces for these grains, but haven't been able to do it successfully.

I realized that I need to have Triangulation information and its face labels to obtain outer surface. Do you have any suggestion in this regard?
Is it possible to output complete triangulation information of grains on outer surface of RVE ?

Best regards,
MP

rve
rve2

Hi @jammyDex,
Glad you like the software! C++? I'd recommend that over the slower Matlab and Python codes.

Like you said, you need triangulation information for the outside faces in advance. For now, I would suggest putting your microstructure through DREAM.3D, creating a surface mesh and then dumping it out to files that hierarchical-smooth can read. It's roundabout, but it will give you boundary triangulations you need.

Hey siddharth,

I am currently using the Matlab version of the code. I will try the C++ code soon.

Yes, the attached 1st image from my previous post is an RVE generated in DREAM.3D and smoothed using your code. Additionally, I also added the outer surface triangulation after the smoothing process. On the outset RVE looks perfect!! But when when you zoom into regions between 2 grains (as you see in my 2nd image) there are elements overlapping between the 2 grains.

For the grains on the outer surface of the RVE:

Problem: The old triangulation information (generated from DREAM.3D) can't be used to close grains of the smoothed RVE. Because the nodes between the 2 grains have been smoothed, the old connectivity is not valid anymore.

Possible solution 1: During/After the smoothing operation, is it possible to get all the (outer surface) nodes which belong to a particular grain and output them ?

Possible solution 2: After the smoothing operation, is it possible to triangulate the outer surface of these grains ?

Also, I noticed that periodicity of the nodes on RVE outer surface will be lost after smoothing. What is your view on this?

Br,
M.P

Hey MP,
if the zoom-in in your second image is from an internal grain boundary, then what you're seeing is not an overlap; it's because of some of the triangular mesh elements are squeezed very thin because 1) the smoothing does the triple lines first and then 2) holds those points fixed while smoothing the interior of the grain boundary. Of course, I cannot speak for overlaps that might have occurred with the additions that you made after smoothing.

One of the main features of the smoothing algorithm is that it preserves the exact same node connectivity that you gave it before smoothing. It doesn't generate a new mesh or create new points. I might build that into it someday, but not for now.

I think DREAM.3D does actually generate the outer surface nodes and triangulations; you should look at the information in the FaceLabel array. Each integer pair signifies the grain ID on the left and right of the boundary. If I remember correctly, DREAM.3D treats the side buffer area of the volume as a 'grain' with grain ID -1, and the top/bottom buffer with grain ID 0 (I might have got -1 and 0 switched). So a mesh element with FaceLabel ( 5, 0 ), for example, belongs to a 'grain boundary' with grain 5 on one side and the side buffer on the other. DREAM.3D automatically generates all this information for you.

I'm drawing all this from memory, it's been a while since I used DREAM.3D. You should verify all this independently, but I'm fairly confident that DREAM.3D provides you all you need and you shouldn't have to patch up the volume manually like you did.

Hey Siddharth,

The internal grain boundary is perfect, no complains about that. (Actually, thank you again for it 👍)

I think there's some slight misunderstanding. All grains within the RVE are closed by internal grain boundaries, but those on the surface of RVE are still open. I am working on closing them.

I do know that DREAM3D provides the triangulation and outer surface nodes information. In fact, I have used that info to close the grains which lies on the outer surfaces of the RVE.

What I was trying to say is that, when I use this Triangulation info to close the grains the overlap of elements happen.

The zoom-in image is that of grain boundary on the RVE surface.
Br,
M.P

Ok I see. It's difficult to tell why the overlap is occurring without actually deep-diving into the data.

The best suggestion I can offer is that you input everything all at once for smoothing, including the outer surface points and meshes that DREAM.3D gives you. In other words, make sure that P and tri and everything else contain information from the outer surface as well.

If you want nice, flat outer surfaces after smoothing, you might need to pay special attention to the NodeType values of the GB points that intersect with the outer surface. Have you tried manipulating their NodeType prior to smoothing? For example, intersection of the triple lines with the outer surface can be manually given a NodeType 14 (external quad point), while intersection points of the GB interface with the outer surface can be set to NodeType 13 (external triple junction).

I suppose this renaming of the NodeTypes at the surface amounts to a slight manipulation of the physical microstructure, but it should be accurate enough and certainly good for visual purposes. You shouldn't see overlaps if you input everything at once.

Let me know if this works.