fix(prt): balance budget, add termination term #2452
Draft
+872
−375
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Particle mass previously remained in storage regardless of particle status.
Add a termination budget term and (for now) assign all terminating particle mass to it. This balances the cumulative storage budget. This is first in a sequence of budget reworks. Next planned is an analog to transport's SSM so that mass terminating at assigned boundaries can be reported for the boundary as done for transport models. After that, advanced packages in the same pattern. But even then, a term for non-boundary termination will still be needed.
Also, report the cell-by-cell storage term, only the cumulative was reported up to now.
Incidentally, add a function to get a particle's unique ID (composite key of model ID, PRP ID, release point ID, and release time) as a string. We had this before, and removed it as it went unused, but it's convenient to use here as a hash table key to track which particles have terminated.
This PR includes a new test focused on the cumulative and cell by cell budget reporting, and renames an existing test which was called "budget" but really focused on intercell mass flows.
Checklist of items for pull request
ruffon new and modified python scripts in .doc, autotests, doc, distribution, pymake, and utils subdirectories.fprettify