Introducing mf6Voronoi: A Python package for generating MODFLOW6 DISV Voronoi meshes

Groundwater modeling with several boundary conditions and complex hydrogeological setups require advanced tools for mesh discretizacion that ensures adequate refinement in the zone of interest while preserving a minimal cell account. Type of mesh has to be engineered in a way to preserve computational resources and represent adequately the groundwater flow regime.

mf6Voronoi

This python package creates a Voronoi mesh for MODFLOW6 with the DISV (discretized by vertices) option. The package work with geospatial files and has options for selective refinement based on the boundary condition.

These are the main python package characteristics:

  • Works with geospatial files on ESRI Shapefile format

  • Progressive refinement can be modified with a multiplier

  • Summary of the point cloud generated for the Voronoi meshing

  • Tested on more than 5 groundwater model datasets

  • Output as polygon ESRI Shapefile

  • Few steps and arguments for mesh generation

Github repository:

github.com/hatarilabs/mf6Voronoi

Pipy link:

pypi.org/project/mf6Voronoi/

Install the package with Pip with this command:

pip install mf6Voronoi

Screenshots

Example

This is an example of the minimal code required to create a Voronoi mesh with mf6Voronoi:

# Import the package
from mf6Voronoi.geoVoronoi import createVoronoi

# Create mesh object specifying the coarse mesh and the multiplier
vorMesh = createVoronoi(meshName='regionalModel',maxRef = 200, multiplier=1.5)

# Open limit layers and refinement definition layers
vorMesh.addLimit('basin','../../examples/regionalModel/shp/Angascancha_Basin_Extension.shp')
vorMesh.addLayer('river','../../examples/regionalModel/shp/rios.shp',50)

# Generate point pair array
vorMesh.generateOrgDistVertices()

# Generate the point cloud and voronoi mesh
vorMesh.createPointCloud()
vorMesh.generateVoronoi()

# Export generated voronoi mesh
vorMesh.getVoronoiAsShp(outputPath='output')
Comment

Saul Montoya

Saul Montoya es Ingeniero Civil graduado de la Pontificia Universidad Católica del Perú en Lima con estudios de postgrado en Manejo e Ingeniería de Recursos Hídricos (Programa WAREM) de la Universidad de Stuttgart con mención en Ingeniería de Aguas Subterráneas y Hidroinformática.

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.