Repository navigation
Small Fixes to Allow Random Ray to Work with DAGMC - #3374
Conversation
|
Fantastic @jtramm!!! Can't wait to try this out!
I'd say we should adopt some of the same mechanics as the plotting methods and perform the whole multi-group conversion in a tmpdir context like the Line 938 in cdc254c
Ah yeah there are sometimes zero distance intersections at times in DAGMC when crossing through geometric curves. As for the second bullet, the issue with temperatures applies to a CSG model as well right? Or is this a DAGMC-specific problem? |
|
Good thinking on the The temperature issue does affect CSG geometries as well. For CSG, the user at least has the ability to easily edit any cell/material temperatures, so the fatal warning didn't seem as big of an issue. In the case of CAD though, I'm thinking that not everyone running a model may be able to edit the |
Ahhh I see. It's a matter of changing the temperatures, not just reading them. Yeah, we'd need to extend the current capability related to materials to apply to temperatures as well in this case. 👍🏻 |
…void residual XML files appearing in user directory
|
I've made the necessary changes to allow for |
|
|
||
| # Determine if this is a DAGMC geometry. If so, we need to syncronize | ||
| # the dagmc materials with cells. | ||
| # TODO: Can this be done without having to init/finalize? |
There was a problem hiding this comment.
Not at the moment. Detecting the current material assignments and DAGMC cell IDs as used during transport requires loading the file with the DAGMC library in C++.
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
Problem
Currently there are a few small issues with running DAGMC geometries in random ray mode:
Fixes
This PR makes a few small tweaks to avoid the above issues:
model.convert_to_multigroup()function:which ensures that all materials are registered properly. It would be nice in the future to not have to call
init_lib()andfinalize_lib(), so as to avoid generating all the extra.xmlfiles. @pshriwise - any other options?Previously the random ray transport code considered a "distance to boundary" of 0.0 to be an error. We now only consider a negative number an error. This seems to fix the issues and several CAD test models are running cleanly now.
The fatal error at launch regarding multiple temperatures being detected has been downgraded to a warning. If using the
model.convert_to_multigroup()function, the data will be isothermal anyway, even if there are multiple temperatures in the model. Notably, the MGXS data is always material-wise currently, so if you have the same material at multiple different temperatures in different cells, then the MC solve will be combining all those regions into one material tally. If you created different materials each with a different temperature, then they will remain different when moving to MGXS. The MGXS library is not universally isothermal over all materials, it is just isothermal for each material. In summary, we will just pick the first temperature now and warn the user about the issue.Results
We're now able to run some pretty cool DAGMC geometries with random ray & FW-CADIS, e.g. an unconverged stellarator:
Just a few iterations of results here, so pretty noisy, but good to see DAGMC working as expected for random ray.
Checklist