Closed rlbarker closed 12 months ago
Hello, I was facing the same issue some days ago. I think the bug is in the interpolate_lagrangian function:
in particular, I think that "ys[i]" should be ys[idx + i] but I still haven't done any test.
Giovanni
Thanks for reporting this @rlbarker! And @giovanni-mariano I believe your fix is correct. 👍🏻
I'll submit a PR and add a test to our C++ test suite to ensure the behavior of the interpolate_lagrangian
is correct going forward.
Thanks everyone!
Thanks for the example above @rlbarker. After the fix in #2775 things look better. If those plots above are relatively easy to reproduce, mind posting them after a re-run with that fix?
cubic: 18.110131567651347 pSv cm2
log_log: 18.098182424892507 pSv cm2
linear_linear: 18.09241280539433 pSv cm2
linear_log: 18.155939740734116 pSv cm2
log_linear: 18.034918963809766 pSv cm2
Here are the updated plots - looks much better! Thank you
Fantastic. Thanks @rlbarker!
Bug Description
When running a prompt photon dose simulation I have noticed very different results when using cubic interpolation of dose coefficients compared to all other types of interpolation. This effect is consistent whichever dose coefficients you use. The cubic interpolation provides a dose that is an order of magnitude lower than all other interpolation methods.
For example, I have attached a plot produced from a shutdown dose simulation of a steel sphere that was first irradiated with neutrons and the photon dose from the activated steel then plotted on a mesh. Results are consistent between different dose coefficients and interpolation methods (I used ICRP116 and ICRU57 + Pellicioni which Fluka uses) except for cubic interpolation.
Steps to Reproduce
I have put below a python script with a simple (2 spheres) geometry and a photon source. Dose tallies are performed for all 5 interpolation methods. All tally results agree the dose is roughly 18 pSvcm2, except the cubic interpolation tally which calculates 2 pSvcm2.
Environment
I am using the development branch of openmc version 0.13.4-dev. ENDF VIII data. Ubuntu OS.