Skip to main content

Mesh Quality Inspector

Project description

neatmesh

Mesh Quality Inspector

buildLicense: MIT Code style: black

neatmesh is a 2D/3D finite volume mesh quality inspector and a python library that computes cells volumes, face areas, centers, normals and many more. neatmesh works with all formats supported by meshio.

neatmesh is in early active development stage, and all sort of contributions are welcome (specially if you're new to open source contribution! ☺️)

neatmesh

Installation

Install with:

pip install neatmesh

Usage

Using neatmesh is simple:

neatmesh my_awesome_mesh.su2

or

import neatmesh as nm

mesh = nm.read('my_awesome_mesh.su2')
# mesh.face_areas, mesh.face_centers, mesh.owner_neighbor,
# mesh.n_points, mesh.n_edges, mesh.n_faces, ..... 

What does neatmesh report?

neatmesh will report file size, mesh bounding box, mesh dimensionality, points count, duplicate points count, face counts and types, cell counts and types, and the following quality statistics

  1. Face Area: face area in mesh units.
  2. Face Aspect Ratio: ratio between max. and min. length of face bounding rectangle.
  3. Cell Volume: volume of 3D cell, current supported cell types: hexahedron, tetrahedron, wedge and pyramid.
  4. Non-Orthogonality: angle in degrees between (a) vector connecting two elements centers NP and (b) normal vector to the shared face or edge between the elements

Non-ortho example

Source: Introduction to Computational Fluid Dynamics: Governing Equations, Turbulence Modeling Introduction and Finite Volume Discretization Basics. - Joel Guerrero

  1. Neighbor Element Volume/Area Ratio: ratio between the volume (for 3D mesh) or area (for 2D mesh) of all neighboring cells, defined as max_vol / min_vol or max_area / min_area, so it's always greater than or equal 1.

Quality Rules

neatmesh will look for a quality rule file in current working directory, neatmesh.toml or quality.toml or my_awesome_mesh.toml. A quality rule file sets maximum values for quality metrics calculated by neatmesh, for example this is the content of a typical neatmesh.toml file:

max_non_orhto = 50
max_face_aspect_ratio = 10
max_neighbor_volume_ratio = 3
max_neighbor_area_ratio = 3

In case no quality rules file was present, neatmesh will use default max. values:

max_non_orhto = 60
max_face_aspect_ratio = 20
max_neighbor_volume_ratio = 15
max_neighbor_area_ratio = 15

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neatmesh-0.1.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neatmesh-0.1.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file neatmesh-0.1.0.tar.gz.

File metadata

  • Download URL: neatmesh-0.1.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neatmesh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b59f772eff19af10336bcd213a9a5979f572ea1e4d6f5f5e725eb7c79340b532
MD5 d08b0b72d091fa3328fa7e51e7438d14
BLAKE2b-256 e5e6219706361adda009694f23887bc05b1b113a720cc1fe0f9b97f42dda5392

See more details on using hashes here.

Provenance

The following attestation bundles were made for neatmesh-0.1.0.tar.gz:

Publisher: publish.yml on eigemx/neatmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neatmesh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: neatmesh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for neatmesh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5ffc6553b2bb29447d5790dd246a723f0ac03065b921e29471b3fd2a4de1dba
MD5 707c29da092a6fb13d6ebbe7be2b6076
BLAKE2b-256 624aa3e12959ed658a9e22acc32d88c35db985a05971b03665c729deb4c5af9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for neatmesh-0.1.0-py3-none-any.whl:

Publisher: publish.yml on eigemx/neatmesh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page