Closed smharper closed 2 years ago
@smharper One thought on this issue -- is it not sufficient to just change the default temperature to 293.606 K in this case? i.e.
settings.temperature = {'default': 293.606}
Setting the default to 293.606 does not work, but 293.607 does.
@johnnyliu27, you said you wanted to try a small OpenMC PR, right? This could be a good one to fix. If you're interested, maybe we could talk about how to add this tolerance to the interpolation code.
Thanks! @smharper I'll try to fix this one.
@johnnyliu27, you and I discussed whether or not we should output a warning for when the code substitutes 293.606 for 293.600. After thinking about it a little more, I don't think we should print out a warning. If we print too many warnings, we risk having users ignore them. If our tolerance for this substitution is something like 1 K, then I'm not worried about a "silent" adjustment because the uncertainty on the underlying data itself probably dwarfs the effects of a <1 K change.
@smharper Yes I agree, then the value for the tolerance might be the next thing to discuss, like 1.0 K or 0.5 K? As @paulromano mentioned in #838, the value for "default room temperature" could be either 293.15 K or 293.6 K, and a tolerance of 0.5 K will work for both values.
Let's use 1K. That makes the most sense to me since we round to the nearest K anyway in our programming structures.
I met some challenges when giving a second try to fix this issue. I was trying to fix it by a more flexible fix inside "_sabheader.F90" than just changing the default temperature in OpenMC. My plan was to adjust the desired temperature (like 293.6 K, the default) to the coldest temperature (~293.6061 K) in the sab library if it’s below the coldest sab temperature by less than 1 K. However, this will cause problems when computing cross sections, because then we will need to use two different temperature values for sab isotopes and other isotopes. (I assume we don’t want to adjust the temperature for non-sab isotopes.) If so, we also have to modify the temperature
variable in a more complex way.
As I talked with @smharper about this issue, an if
statement in "_sabheader.F90" can make the code more forgiving if the desired temperature is just slightly below the coldest sab temperature, but we don’t want to put the same if
statement into the module for computing sab cross sections. Then in this case, maybe changing the default temperature is a better idea for this specific issue.
Any thoughts on this? Thanks!
I've run into an issue with the
interpolation
temperature method near 293.6 K. With the MCNP ENDF71 library, the coldest light water s(alpha, beta) table is at 293.606 K, above our default temperature of 293.600. So trying to use the MCNP s(a, b) with interpolation will giveThe error is technically correct, but it would be nice if we built in some tolerance for these tiny out-of-bounds errors. Maybe we also want some way to have the
interpolation
method revert back tonearest
when the temperature of a cell is very close to a temperature in the data.