VOROGRIDGEN is a free utility that creates MODFLOW 6 DISV files based on user supplied input. Such DISV files can be imported into ModelMuse. VOROGRIDGEN is available at https://hydrosymple.com/en/vorogridgen/. It is one of several such utilities.
Useful links regarding creating Voronoi DISV meshes for MODFLOW 6 |
https://flopy.readthedocs.io/en/3.9.3/Notebooks/dis_voronoi_example.html |
https://ngwa.onlinelibrary.wiley.com/doi/full/10.1111/gwat.13327 |
Neither VOROGRIDGEN nor any of the other utilities is endorsed by the USGS.
To run VOROGRIDGEN, you create one or more objects in which the Voronoi cell size is set to a value greater than zero. Those objects will be used to specify where cell centers are desired. Cell centers will be spaced along the length of the object at approximately the specified spacing. The largest polygon object will determine the outer edge of the mesh. If holes in the mesh are desired, add additional polygon sections to the object that defines the outer boundary of the model. All other polygons will define regions in the mesh at which cells are generated at or near the specified spacing. However, cell centers are not defined along the edges of such polygons. Cell centers will be placed along the length of line objects and at the locations of point objects for which the Voronoi cell size is set to a value greater than zero. If you wish to specify variable spacing along the length of an object, use a vertex value with the key "Voronoi". The value you specify will replace the Voronoi cell size as the desired spacing for that node and subsequent nodes.
Besides the Voronoi cell size, there are a number of other controls on the generation of the DISV mesh. These are explained in depth in the VOROGRIDGEN documentation. They are briefly summarized here. ModelMuse includes an example of how to generate a Voronoi DISV mesh with VOROGRIDGEN and import it into ModelMuse. Some of the controls are optional. The optional controls have a checkbox next to them. Such controls will only be exported to the VOROGRIDGEN input file if the checkbox is checked.
•VOROGRIDGEN Location: is the location on your computer where the VOROGRIDGEN executable is located.
•Base name for VOROGRIDGEN output files (out_file_base): The output files from VOROGRIDGEN will start with this name followed by different extensions.
•Maximum centroid separation (max_centroid_separation): This is the maximum separation between cell centers anywhere in the new mesh. It should be greater than or equal to all of the Voronoi cell sizes specified by any of the objects.
•Maximum number of cells in model (maxcells): This is the maximum number of cells allowed in the generated DISV files. You can make a rough estimate of the number of cells that will be in the mesh by dividing the area of the object that defines the edge of mesh by the square of the smallest Voronoi cell size you are using.
•Growth rate of cells (poly_growth_rate): This specifies how much the sizes of neighboring cells can differ. Typically, a smaller cell size is used near features of interest.
•Dimension of search grid (nsdim, an odd number ≥ 5, optional): When generating the mesh, VOROGRIDGEN, will have an array of positions of size nsdim x nsdim around existing cell centers. These will be candidate locations for new grid cell centers.
•Maximum number of Lloyd iterations (max_lloyd, optional): After an initial DISV grid has been generated, VOROGRIDGEN will adjust the locations of cells to improve the grid quality. Max_lloyd limits the number of times this can occur.This process is called Lloyd iterations.
•Termination criterion for Lloyd iterations (eps_lloyd, optional): If the amount of cell center adjustment is small enough, Lloyd iterations will cease. Eps_lloyd determines how small is small enough.
•Damping factor for Lloyd iterations (lloyd_fac, optional): The amount that cell centers are moved is damped. Lloyd_fac is the damping factor.
•Safety factor for emplacing seeds (safety, optional): "With safety set to 0, VOROGRIDGEN examines points that were emplaced during the previous two point-emplacement cycles. This can be increased to a greater number of cycles by setting safety to a higher value."
VOROGRIDGEN may not always be able to generate a DISV file, In such cases, check the messages VOROGRIDGEN writes to the screen, read the VOROGRIDGEN documentation, and try to identify the problem. VOROGRIDGEN will flag warning messages with "***" before the beginning of lines containing warnings. If mesh generation fails, VOROGRIDGEN will typically issue an error message.
In MODFLOW 6, the flow computation assumes that the lines connecting the neighboring cell centers passes perpendicularly through the center of the face connecting the cells. It is unclear to this author how violations of these assumptions affect model results. Users can display the connections between cells by selecting View|Show Cell Connections.
VOROGRIDGEN generates a DISV mesh that is based on a Voronoi tessellation of the model area. However, the final mesh may not be an actual Voronoi tessellation. In a Voronoi tessellation, the lines connecting cell centers would always be perpendicular to the cell face connecting the neighboring cells. However, in the grids generated by VOROGRIDGEN, this perpendicularity property may be violated. This is most common near the edge of the mesh. However, VOROGRIDGEN does a better job of connecting neighboring cells through the centers of the face between the cells than would be typical of a true Voronoi mesh.
If dissatisfied with the mesh and changing the control parameters doesn't help, adding a few strategically place objects to define Voronoi cell centers may help.