Closed dbrakenhoff closed 5 months ago
@dbrakenhoff, thanks for this. I'll take a look. I'm guessing that due to rounding errors the code is creating two vertices very close to one another rather than generating a single vertex. Just a hunch. We also noticed that the MODFLOW 6 DISV package will accept a line as a valid cell, and so we are planning to add a trap for that.
This test case sees occasional failures which may be related:
The number of cells per layer in the generated grid is sometimes off by 3.
With #2076 flopy should no longer produce invalid voronoi cell geometries, though mf6 does not yet have a corresponding trap to my knowledge.
Ignore my prior comments, they refer to unrelated issues. Reproduced in #2119
I'm guessing that due to rounding errors the code is creating two vertices very close to one another rather than generating a single vertex.
Confirmed @langevin-usgs' theory — flopy's gridgen driver should catch these duplicates and remove them
When the
delr
anddelc
of the original structured grid are not whole numbers, the resulting DISV grid produced by gridgen can cause convergence issues when trying to run the MF6 model. I couldn't find out if there were requirements for the original grid for gridgen, but since it a produces a seemingly valid DISV grid, this seems like a bug?This example showcases the issue, adapted from the example notebook flopy3_gridgen.ipynb. When
delr
/delc
are set to[1.1, 1.2, 1.3, 1.4, 1.6, 1.7, 1.8, 1.9]
the model fails to converge, but[1.25, 1.5, 1.75]
work fine.