Approximate multigroup velocity #3766
Conversation
paulromano
left a comment
There was a problem hiding this comment.
@nelsonag would love to get your thoughts on this one!
|
Why not tally a 1/v based on the group midpoint energy (I assume logarithmic midpoint is best) if no specific data is present? This could be done void or not. |
|
Do you mean instead of defaulting to speed 0 when 1/v data is missing using velocity that match the logarithmic energy midpoint of the group? |
|
Yep!
…On Fri, Feb 6, 2026, 3:10 PM GuySten ***@***.***> wrote:
*GuySten* left a comment (openmc-dev/openmc#3766)
<#3766 (comment)>
Do you mean instead of defaulting to speed 0 when 1/v data is missing
using velocity that match the logarithmic energy midpoint of the group?
—
Reply to this email directly, view it on GitHub
<#3766 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH5GM276B2D4K5FJGJCUMT4KT7NLAVCNFSM6AAAAACT4QSIHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQNRSGU4DENBQGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@nelsonag, I've implemented your suggestions and now the code is alot simpler. Now the approximate inverse velocity data is stored only once. |
This reverts commit fe7e5a3.
|
I've implemented a test, discovered a bug and fixed it and now all regression tests pass without change. |
This reverts commit f7b0fd4.
|
Now this PR is ready again. |
|
Looking good! One more thing, sorry I should have realized sooner. We should update the docs to explain what happens when inverse-velocity is not provided in an Mgxs.h5 |
|
@nelsonag, I've added a section in the theory manual. |
Minor editorial correction to cross_sections.rst
| :math:`v(E)` is the neutron velocity calculated using relativistic kinematics, | ||
| :math:`k` is a normalization constant for the :math:`\frac{1}{E}` spectrum. | ||
|
|
||
| The solution to this equation is: |
There was a problem hiding this comment.
Add under what conditions this solution is derived. I could have added it but I want it to come from you so I dont incorrectly state the assumptions.
There was a problem hiding this comment.
One more item, add a statement in the docs/source/io_formats/mgxs_library.rst file, under inverse-velocity that says what happens when the value is not provided but a tally of such data is requested. Feel free to point to this cross_sections.rst as much as you wish.
| .. math:: | ||
|
|
||
| v_g = \frac{1}{c \log\left(\frac{E_{\text{max}}^g}{E_{\text{min}}^g}\right)} | ||
| \left[ 2(\arctan(k_\text{max}) - \arctan(k_\text{min})) + (k_\text{max}-k_\text{min})) \right] |
There was a problem hiding this comment.
I couldn't get this solution independently. As best as I can tell, the solution should use arctanh(1/k) instead of arctan(k). Here's the solution from ChatGPT 5.4 Thinking. Also, it's confusing to me to use k as a normalization constant above and then use k in a change or variables too.
Description
Currently, void regions in multigroup mode makes openmc crash (#3723).
This PR implements the following changes:
Checklist