Skip to main content

Mesh statistics and quality

You can use a set of quality metrics to measure the mesh quality. The SurfaceSearch and VolumeSearch classes allow you to verify surface and volume mesh quality, respectively.

Connectivity checks

Surface diagnostics are important prior to generating a volume mesh. You can get a surface diagnostic summary by using the SurfaceSearch.get_surface_diagnostic_summary() method. The SurfaceDiagnosticSummaryParams class provides for diagnosing surface connectivity for the given scope and controls:
  • Duplicate faces
  • Free face edges
  • Multi face edges
  • Self intersections
This code determines if a wrap surface is closed:
This code prints the results of the surface diagnostic summary:

Face metrics

The FaceQualityMeasure class offers various types of measures to verify face quality metrics.
  • The SKEWNESS metric ranges between 0 (ideal) and 1 (worst).
  • The ASPECTRATIO metric is greater than 1. The smaller the aspect ratio, the higher the quality of an element.
  • The ELEMENTQUALITY metric ranges between 0 (worst) and 1 (ideal).
This code gets face quality measures:
This code prints face quality summary results:

Cell metrics

The CellQualityMeasure class offers various types of measures to verify cell quality metrics.
  • The SKEWNESS metric ranges between 0 (ideal) and 1 (worst).
  • The ASPECTRATIO metric is greater than 1. The smaller the aspect ratio, the higher the quality of an element.
  • The FLUENTASPECTRATIO metric is greater than 1. The smaller the Fluent aspect ratio, the higher the quality of an element.
  • The ELEMENTQUALITY metric ranges between 0 (worst) and 1 (ideal).
This code gets cell quality measures:
This code prints cell quality summary results:

Mesh counts

The Part.get_summary() method provides the number of nodes, faces, or cells after meshing with the given parameters. This code gets mesh counts:
This code prints mesh counts:

Mesh improvement

When the metrics show that the mesh quality is low, the VolumeMeshTool class provides various volume mesh improvement algorithms for improving the mesh.

Auto node move

You can improve volume mesh by auto node move using the VolumeMeshTool.improve_by_auto_node_move() method with given parameters. In addition, you can verify the mesh using the VolumeMeshTool.check_mesh() method. This code improves and checks the volume mesh:
This code prints the results of checking mesh operation: