-
Notifications
You must be signed in to change notification settings - Fork 25
Event tally #180
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
Event tally #180
Conversation
Added in the BEAVRS model with the D-bank partially inserted. Also fixed a flaw in the geometry where the outermost cell was defined such that there could be a rare particle lost between it and the geometry boundary.
Records events in a given region of phase space.
valeriaRaffuzzi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very nice, will be cool to have! Just minor comments and questions
| NS3 { type simpleCell; id 12; surfaces (-4 5 -10 11); filltype mat; material SS304;} | ||
| NS4 { type simpleCell; id 13; surfaces (-4 5 10 -11); filltype mat; material SS304;} | ||
|
|
||
| <<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn BEAVRS!!! It's everywhere
docs/User Manual.rst
Outdated
| factor rather than an integer due to constraints on the dictionary. | ||
| - freq (*optional*): an integer determining how often events are written to the file. | ||
| More often will incur more parallel overhead, less often will incur a larger memory | ||
| footprint. Set to 500k by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an estimate for the memory overhead of these input, i.e., 500k, and how big a file is with 10M events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's about 960MB with these settings. I have now included it in the docs.
| associate(ev => self % scores(:,id)) | ||
|
|
||
|
|
||
| ! Open the file and append the event info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe giving the option to write a binary rather than ascii might be useful, according to the application. It's easy enough in fortran, I think you just need to add access='stream'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added an option to write a binary output, but this will require creating some sort of post-processing script in the future.
|
|
||
|
|
||
| ! Open the file and append the event info | ||
| open(newunit=u, file=trim(self % outputFile), status='unknown', & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you are either creating the file or opening it, right? Is append happy with either?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems to be. I think the status='unknown' and append both allow me to get away with it.
| ! Collision info | ||
| real(defFlt) :: Edeposit | ||
| integer(shortInt) :: MT | ||
| !integer(shortInt) :: ZAID ! Don't yet have available data in interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this would be a hassle but not a massive one: might be worth it! It would take adding the ZAID to collDat in the collisionProcessor, and modifying the interface of reportOutColl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question here is maybe deciding what to do for MG. Let me make an issue and we can add that easily enough if needs be.
| !! | ||
| !! Send events in a thread's bank to a binary output file | ||
| !! | ||
| subroutine outputScoresBinary(self, id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to be annoying but this could have been done more compactly: the only difference between procedures is access. It could have been one function called outputScores (noting that form = 'unformatted' is default):
if (self % binary):
accessType = 'stream'
else
accessType = 'sequential'
end if
open(newunit=u, file=trim(self % outputFile), status='unknown', &
access=accessType, position='append', &
action='write', iostat=ios)
valeriaRaffuzzi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicer and compact now, looks good to me!
This adds a non-standard tally which records individual events. This can be used for, e.g., detector modelling. It does not use scoreMemory, but instead keeps a record of all events and periodically outputs them to a file.
This could be improved with a change to the tally interface or the particle to send information about the colliding nuclide to the tally.
Future complementary developments might include more analogue features in the collisions, e.g., more physical multiplicity models and fission neutron correlations.
If this looks good I will write some tests.