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:
Install the package with Pip with this command:
pip install mf6VoronoiScreenshots
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')
  

 
                     
             
              
              
                
                  
                   
              
              
                
                  
                   
              
              
                
                  
                   
              
              
                
                  
                   
              
              
                
                  
                   
      
      
    
  
  
    
    
      
       
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
             
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
      
      
    
  
  
    
    
     
             
            