I’d like to know how to assess the quality of mesh generated by MFIX mesher. I’ve browsed through the forum for discussions on mesh quality, but it seems there isn’t a clear mention of criterion for evaluating mesh quality.
I’m particularly interested in understanding how one can determine whether a mesh is of good or poor quality. Are there specific criteria or metrics in MFIX that can be used to evaluate this?
Additionally, I’m curious to know if there are any best practices for adjusting mesh quality. Are there techniques or methods that are commonly recommended for improving mesh quality?
Any insights or pointers to relevant resources would be greatly appreciated.
This is my typical workflow (SMS workflow) when working with a non-rectangular geometry (STL file):
Before loading the STL, make sure there are no holes, collapsed triangles, extremely stretched triangles. Make sure the normal vectors are consistently oriented, and pointing towards the fluid region.
Adjust the MFiX box extents (xmin, xmax etc) so:
a. inlets/outlets stick out past the MFiX box. This will give better intersection and avoid conflicts if the STL geometry is closed.
b. The side walls are clear from the MFiX box. For example, if I want to model a vertical cylinder of diameter 0.1m, and height 1m, I would make the MFiX box slightly larger than 0.1m in the x and z direction. The MFiX box y-extent is 1m, and the stl is say 1.1 m in the y-direction and sticks out by 0.05 m below ymin and above ymax so I can set up a mass inlet at y=ymin and a pressure outlet at y=ymax.
Always double check the STL normals orientation. If they are not pointing towards the fluid region, use the flip normal filter.
Define regions that will be used as BCs: Walls, inlets, outlets. Assign a different color to each.
Set up the number of cells in each direction. Choose values so the background mesh cells have a decent aspect ratio (say less than 5). Use a grid spacing that is smaller than the smallest geometric element you want to resolve. If you have an internal wall, the mesh size must be at least 2-3 times smaller than the wall thickness.
Run the mesher with default tolerances.
Inspect the mesh (visually). Look at the boundary mesh, colored by BC ID. You should see a closed surface, meaning all BCs have been defined (easier to identify if you assigned a different color in step 4). Look at the boundary mesh, colored by small cells. You should as few small cells as possible.
Look at the stats. I usually look at the aspect ratio and cell volume distribution. Avoid very large aspect ratios (say more than 10) and small cells.
Adjust tolerances if needed. Increasing the small cell tolerance and the snapping tolerance should help reduce the number of small cells. Increasing the wall distance tolerance can help the numerical stability if you still have small cells. If you have stretched triangles or collapsed triangles in the stl file, set the small angle tolerance to zero. This may help but is is better to clean up the stl file in step 1. You can also play with the dot-product tolerance if there are missed intersections (increase or decrease by a factor of 10).