Forum Navigation
You need to log in to create posts and topics.

About the SurfaceMeshModifier

Hi,

I'm using the surface mesh modifier to calculate the cavity fraction in the system. I'm wondering if it is possible to get more properties about the cavities such as the number and average volume?

Thanks,

Jiahui

Hi,

I am afraid the OVITO's surface mesh modifier doesn't provide this capability (yet).

For the inverse type of problem, i.e. several disconnected solid particles in a vacuum, the modifier is already able to calculate the volume and the surface area of each individual particle. However, for voids embedded in a medium, it cannot do the same. The reason for this limitation is that calculating the volume of an empty region is significantly more difficult, especially in a simulation box with periodic boundary conditions. In a periodic domain, a pore can potentially have infinite volume if it spans across the entire simulation box. Standard algorithms for computing the enclosed volume of a non-convex polyhedron typically cannot take into account periodic boundary conditions. They can only handle finite regions. Thus, additional research will be needed to develop a robust solution for this type of geometric problem. I can give you a more detailed problem description if you are interested in the topic.

In case your problem is not periodic, a solution could be found more easily. But most likely you simulations are based on periodic boundary conditions, right?

-Alex

I would like to add to my previous statement: In any case it is possible to export the surface triangle mesh computed by the Construct Surface Mesh modifier to a geometry output file or to directly access the list of triangles and vertices of that mesh from a Python script. In principle, this gives you the option to perform the analysis externally, either with some third-party software or by implementing your own algorithm for computing the volumes enclosed by the pore surfaces.

Hi Alex,

Thanks for answering my question. Yes, it is periodic boundary condition in my simulations.

I've read some articles about a method that used discretization and griding to make this problem easier, so it would be great if you can tell me more about this topic. Thanks!

Jiahui

Hi Jiahui,

It took me some time to work out a robust solution to this problem, but I was now able to extended the capabilities of the Construct Surface Mesh modifier to allow for a detailed analysis of pores (i.e. voids, cavities). The modifier can now identify all cavities in a system individually and compute their volumes and surface areas. In principle this now gives you the opportunity to count these microstructures features and compute the size distribution of pores etc.

I still need to complete the documentation for this new function, but a first a first introduction is given on this page in the section "Identification of volumetric regions":

https://www.ovito.org/docs/current/particles.modifiers.construct_surface_mesh.php

I could now use some sample data to test whether this new capability works well in real-world situations. Would you be willing to share some of your simulation datasets with me for testing purposes?

Hi Alex,

I just obtained a trial license for the pro version and tried the new features of the surface mesh modifier. I often get the error message  'Cannot construct mesh for this input dataset. Adjacent cell face not found.'. Is this related to PBCs?

Another thing is that when I use the modifier from a Python script with a certain input LAMMPS dump file it gets stuck (using 100% CPU time). On the other hand, doing the same thing in the Ovito GUI it seems to work fine. The radius parameter I used was 1.8 which is around first peak in g(r).

I attached the dump file (test.dump) and also a script (get_voids.py) I wrote to get the surface properties from a series of frames. (Run command was ovitos get_voids.py test.dump 1.8)

Ovito version is 3.0.0

-Antti

 

 

Uploaded files:
  • You need to login to have access to uploads.

Hi again Alex,

Update to my previous post: By changing the boundary conditions manually from periodic to shrink wrap in the dump file everything went fine.

-Antti

Hi Antti,

I was able to reproduce the error message "Cannot construct mesh for this input dataset. Adjacent cell face not found." and I am now looking into the problem.

Yes, the error can probably be avoided by turning off periodic boundary conditions (because then the task for the Construct Surface Mesh algorithm becomes much easier), but that's not a proper solution, of course. If you have periodic system, you want to treat it like that during analysis. Otherwise you risk missing voids located right at the edge of the simulation cell.

-Alex

Antti,

OVITO 3.0.1 contains a fix for the error "Adjacent cell face not found." that was occasionally reported by the Construct Surface Mesh modifier (and which is not related to the recently introduced Identify Regions option). I adjusted an internal algorithm parameter controlling the ghost layer thickness in systems with periodic boundary conditions. This slightly increases the computational cost and memory footprint of the algorithm, but it got rid of all occurrences of the error message in my tests. I hope you don't see the error ever again either.

You mentioned also that your Python script got completely stuck sometimes. Let me know if that happens again. I don't think such a behavior is related to the above error message, meaning it would call for further investigation.

-Alex

Hi Alex,

Thanks. It now works fine (after I changed 'solid' to 'filled' in some attribute names).

-Antti