kip-hart / MicroStructPy

Microstructure modeling, mesh generation, analysis, and visualization.
https://docs.microstructpy.org
MIT License
68 stars 19 forks source link

fix for amorphous and void phases in gmsh #39

Closed kip-hart closed 3 years ago

kip-hart commented 3 years ago

PR Summary

Purpose

This PR resolves an issue with amorphous and void phases in the gmsh output.

For example 1, switching to gmsh created a TriMesh that look like this: trimesh_was

After the switch, the mesh looks like this: trimesh_is

Approach

The regions and facets of the PolyMesh are all considered physical in the gmsh input geometry. Once the mesh has been created, elements in void regions are removed and facets between amorphous regions of the same phase are removed.

The boundaries between amorphous regions are preserved in the TriMesh. This is an artifact of how a geometry is defined in gmsh. The image below shows all the boundaries between regions. These boundaries are apparent in the TriMesh output. polymesh

PR Checklist