Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prt): multiple fixes #1874

Merged
merged 3 commits into from
Jun 13, 2024
Merged

fix(prt): multiple fixes #1874

merged 3 commits into from
Jun 13, 2024

Conversation

wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Jun 13, 2024

The pollock and ternary methods could hang when a particle should terminate due to no (sub)cell exit face. This occurred because an advancing flag was not set in the proper location.

Entangled with this, the ternary method could erroneously terminate a particle and report no exit face (as described above, previously this would hang) due to precision error in the exit time/position calculation. This could happen when two conditions are both met: the particle enters the subcell very close to one of its vertices, and flow very nearly parallels one of the subcell's faces. We have encountered similar situations before, solved by nudging the particle a small distance into the interior of the subcell before applying the tracking method. This particular case is resolved by increasing the padding distance from DSAME to DSAME * 1000, i.e. machine precision * 10^5.

I will plan to update release notes in #1871

The pollock and ternary methods could hang when a particle should terminate due to no exit face. This was because we failed to set the advancing flag to false.

Entangled with this, the ternary method could erroneously terminate a particle and report no exit face (as described above, previously this would hang) due to precision error in the exit time/location calculation when two conditions obtain simultaneously: the particle enters the subcell extremely close to one of its vertices, and flow very nearly parallels one of the subcell's faces. We have encountered similar situations before, solved by nudging the particle some small distance into the interior of the subcell before applying the subcell tracking method. This particular case is resolved by increasing the nudge distance from (machine precision * 100) to (machine precision * 10000). Perhaps in future the nudge distance could be scaled by the size of the subcell.
@wpbonelli wpbonelli marked this pull request as ready for review June 13, 2024 21:43
@wpbonelli wpbonelli merged commit ebe5569 into MODFLOW-USGS:develop Jun 13, 2024
18 checks passed
@wpbonelli wpbonelli deleted the fix-prt branch June 13, 2024 21:49
wpbonelli added a commit to wpbonelli/modflow6 that referenced this pull request Jun 14, 2024
langevin-usgs added a commit that referenced this pull request Jun 15, 2024
* docs(release): mention #1865 in release notes

* mention #1874 in release notes

---------

Co-authored-by: langevin-usgs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant