-
Notifications
You must be signed in to change notification settings - Fork 146
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
Dose deposited in vacuum in DOSRZnrc #1061
Comments
Looking back through our emails, @dworogers, I see that I'd traced this to electrons reflected back to the vacuum region and then immediately being discarded. Moreover, I was able to replicate this issue using dosxyznrc. After looking into it a bit more, I became fixated on this block of coding from subroutine ELECTR:
The first condition:
only allows ECUT discard after the step if there has been no region change (i.e. irnew=irl). But then it seems the second condition:
retroactively allows ECUT discard anyway, and energy deposition the next time through the loop, even if the region has been changed (in your example, to the vacuum region). This gives rise to a couple of questions:
|
my take on question 2: Zero the does, and this ought to be low level in |
Okay, I'll go ahead and do this, @ftessier. As a result of this fix, though, some user codes--I'm looking at you, dosxyznrc--may need to be modified to handle (zero energy/zero mass) better, because (finite energy/zero mass) = Inf, which seems to be handled okay, while (zero energy/zero mass) = NAN, which causes a crash at the end of the run. |
Using DOSRZnrc with a vacuum region on the surface, I occasionally get dose deposited in the vacuum region which is impossible. The attached file takes some time to run but shorter runs don't see the dose deposited. Blake looked into this in Oct 2022 and in a series of emails isolated the problem but the solution wasn't obvious. I can forward emails if not found at NRC.
vac_bug.txt
The text was updated successfully, but these errors were encountered: