openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Condensing diffusion instead of transport

Open mkreher13 opened this issue 4 years ago • 0 comments

I wanted to build on our discussion from the weekend. What was recently merged was a fix that took a completely broken diffusion coefficient condensing function and made it workable by condensing all the underlying tallies which amounts to condensing the transport cross section and then re-calculating the diffusion coefficient. In this case, condensed_diffusion = 1/(3*condensed_tr).

However, per our conversation, it is more accurate to condense the diffusion coefficient instead (which amounts to condensing 1/tr). In this PR, I believe I've done that. As you can see in the results of mgxs_library_condense, condensed_diffusion is NOT equal to 1/(3*condensed_tr).

I think a knowledgeable user will score the diffusion coefficient on a very fine energy grid, and then use the condense function to get the diffusion coefficient on the energy grid they actually want to use for the problem.

The changes in xs_tally are necessary because when condensing, the diffusion coefficient is calculated, so you can't re-calculate it in xs_tally later (for instance, you can't re-slice the P1 scattering tally since it no longer exists after slicing it once). This change ensures that get_condensed_xs and xs_tally are compatible.

I'm hoping for feedback. Did I make any mistakes? What does everybody think? @gridley @nelsonag

mkreher13 avatar Nov 23 '21 06:11 mkreher13