allow overlay material#4027
Conversation
|
Marking as draft for now to give the F4E and UKAEA people interested in this feature a chance to comment. @alexvalentine94 @Radiation-Transport |
|
I think that another keyword like materials or virtual_materials is preferable. There are also some limitations to virtual materials. I do not think that supporting probability tables is straightforward. We won't be able to support analog estimator like you wrote. But I think we will have a problem with collision estimator especially in void cells. |
|
Thanks @GuySten I shall update and add it via a new kwarg |
paulromano
left a comment
There was a problem hiding this comment.
Very timely -- I was just working with @j-jeon on a workflow for computing dose in Si so I perfectly understand the need for this! However, I think this would be a lot simpler as a post-processing step on a tally from Python alone. For example, a method that you pass a material and it will multiply the atom densities for each matching nuclide and sum them up in the nuclide dimension. That could be done with a few lines of code rather than the 100s needed here to support it on the C++ side.
|
Thanks both for the suggestions. I should have mentioned this is what we do currently as a python only post process and we are looking for something a little more convenient for the user. Perhaps the additional C++ is too high a cost however, I did get a bit carried away there and like GuySten mention it does not work in various cases. Anyway putting this here for more context |
|
Thanks Jon, this is a very useful feature if implemented that we commonly use in fusion problems. I would agree it is favourable to have this on the input side to aid the reproducibility and lessen the work post processing. |
This PR allows a material to be used as a tally nuclide bin (virtual overlay material)
multiply_density=Falselets a tally respond to a nuclide that is not present in the geometry, and #3771 extended that to void so the response is scored everywhere. That combination is very useful in fusion neutronics: it gives you the dose, damage or reaction rate a detector or a component would see at any point in the model, without perturbing the transport problem by actually putting that material into the geometry.The gap is that the response is currently per nuclide and microscopic. Real questions are almost always about a material, not a nuclide: absorbed dose in a silicon diode for example. To get that today you have to tally every nuclide of the material separately and recombine the bins by hand, weighted by atom density.
This PR lets you pass the material itself.
What this adds
This produces a single bin holding the material's macroscopic response,
sum_i N_i * sigma_i, using the overlay material's own atom densities and evaluated everywhere in the geometry including void and regions filled withsomething else. For a
heatingscore the result is eV/cm^3 per source particle, so the absorbed dose in Gy is the result multiplied by 1.602e-19 J/eV and divided by the material's mass density in kg/cm^3.The overlay material does not need to be assigned to any cell.
Modelpicks up materials referenced by tallies and writes them out, so nothing extra is required from the user.Mixed bins work, for example
nuclides = ['Fe56', silicon].This is a bit of a hack as Tally.nuclides` is now doing two things: it is a list of nuclides, and it can also carry a material. Which is perhaps something we should avoid but the alternative was to add a separate keyword which I think would also not be popular.
Fixes # (issue)
Checklist