MODFLOW-USGS / modflow6

USGS Modular Hydrologic Model
https://modflow6.readthedocs.io/
Other
241 stars 114 forks source link

Add BOUNDNAME of terminating sink/source to Particle Track Output #1851

Open cneyens opened 2 months ago

cneyens commented 2 months ago

Is your feature request related to a problem? Please describe. We've been playing around with the new PRT model in MODFLOW 6. As a feature request, I was wondering if it would be possible to include the BOUNDNAME of the terminating sink/source boundary condition for a given particle in the output file, if a boundname is given.

Describe the solution you'd like An extra column in the Particle Track Output file containing the BOUNDNAME (if any) of the boundary condition which terminates a particle. While the particle is still active, this column could remain empty or contain a placeholder string.

Describe alternatives you've considered Using the IZONE functionality. This requires setting up a IZONE array a priori, and also does not distinguish between different boundary conditions within a cell which might terminate the particle trace, e.g. at different cell faces. Lastly, we could always do this in postprocessing by comparing the endpoint locations and the boundary condition locations.

wpbonelli commented 1 month ago

Hey @cneyens, thanks for this. @aprovost-usgs and I gave it some thought. We see the utility, but there are complications.

If a cell has multiple boundary conditions any of which do not have IFLOWFACE configured, or if any boundaries share the same IFLOWFACE, PRT may not be able to distinguish which is responsible for termination. As implemented, PRT just sees flows across cell faces — face flows are summed before they are provided to the model. If multiple boundaries are assigned to the same face, we cannot currently disambiguate, nor can we if the cell behaves as an internal sink (i.e. at least one has no IFLOWFACE).

To support this, we'd need to keep face flow constituents distinct. I don't yet have a precise sense for the level of effort involved, but safe to say it's a significant refactor, even if the wider MF6 framework can accommodate it at the moment (still TBD).

And the proposed extra column would need a special value indicating when a terminating boundary can't be determined. Or alternatively we'd need to report all candidates.

Let us know if you see better ways around this.

cneyens commented 1 month ago

Hi @wpbonelli, that does sound more complicated than I initially thought! We were looking for a way to see which boundary condition terminates a particle. The IZONE functionality gets us there for the most part, so we'll use that.

Thanks for the response!