changes of settings.xml to make new openmc work?

Hello All,

I didn’t update my openmc branch until the new version. I have some questions about settings.xml:

  1. How to get statepointxxx.h5 for each active generation?
    I used to write the below tags.
    But now after simulation, I only have statepointxxx.h5 for the last generation. And xml parser didn’t report error for the tags below.

<state_point>
1
</state_point>

  1. How to get source file for a specific generation?
    I used to write the below tags.

<source_point>
1000
true
true
</source_point>

But the new version does not even allow the 1000 and gives error as:

Reading settings XML file…
ERROR: Sourcepoint batches are not a subset of statepoint batches.

The changes may not result from the latest update. I’m sorry to be stuck with older versions for long.

Thanks!
Jilang

Hi Jilang,

The ‘interval’ option for specifying statepoints was removed because the same effect can be achieved easily from the Python API. For example, if you wanted to specify that a statepoint be written every 5 batches, from the Python API this would look like:

settings = openmc.Settings()
settings.statepoint = {‘batches’: range(1, n, 5)}

If you are writing XML directly, you will now have to explicitly write out all the batch numbers.

For the sourcepoint issue, there is a constraint that a statepoint be written whenever you want the source to be written. So, in your particular case, you just need to specify that a statepoint be written at batch 1000 as well. The ‘separate’ feature should still work fine.

Best,
Paul

Hi Paul,

Thanks for the quick response!
The python API works perfectly for the ‘interval’ option by writing explicitly the batch numbers.

For the sourcepoint issue, how can I let some batches write statepoint but not write sourcepoint?

Thanks!
Jilang

If you want some batches to write a statepoint file but not a sourcepoint file, just specify those batches under <state_point> but not <source_point>, e.g.

<state_point>
10 20
</state_point>
<source_point>
10
</source_point>

This would create a statepoint at batch 20 that doesn’t include the source (if you used true, then you would get a sourcepoint file only at batch 10).

Best,
Paul

It turns out I didn’t understand this sentence well: “For the sourcepoint issue, there is a constraint that a statepoint be written whenever you want the source to be written.”
I got the sourcepoint error because “Sourcepoint batches are not a subset of statepoint batches.”

Thanks!
Jilang