Skip to content

Conversation

@Ebiwonjumi
Copy link

@Ebiwonjumi Ebiwonjumi commented Jul 1, 2025

See #3179 that was closed.

This PR adds tally to score sensitivity coefficients. The tally is useful to perform sensitivity and uncertainty analysis. This feature extends the development by @alhajri on eigenvalue sensitivity analysis to fixed-source problems.
N.B. Benchmarking the sensitivity tally is still ongoing and still needs lot of work. Folks can take a look to provide advice and help clean up the code.
The feature is applicable to both criticality and fixed-source problems. My verification is however focused on fixed-source applications. Usage for fixed-source problems requires to run one OpenMC simulation during which the sensitivity coefficients are calculated. Usage for criticality problems requires two OpenMC runs. Details of how to calculate the sensitivity coefficients can be found in here

@pferney05
Copy link

Nice work, I have been using your branch to compute sensitivities. I got some results who seemed consistent. I haven't validated with another code though.

A few problems to address :
-> I can't get data with get_pandas_dataframe when I have more than 1 energy group in my Tally.
-> I get a warning if I only have a sensitivity Tally
-> I had to attribute a score list to my tally, which doesn't make sense as the cross section is already given in the sensitivity
-> No documentation

A few suggestions:
-> Could the Importance Filter be optional ? For my problem I used an importance map equal to 1 everywhere. It's not rigorous but it is simpler the importance is hard to compute so it is not something that will necessarily be done all the time sensitivity will be computed.
-> The way to provide the importance is not ideal. In case I have a 3 dimensional mesh, I want to be able to provide an array with 3 dimensional shape.

However, this tool is definitely important to include in OpenMC.

@Ebiwonjumi
Copy link
Author

Ebiwonjumi commented Oct 10, 2025

@pferney05, thanks for your review. From your comments I suppose you are solving eigenvalue problem. I have not finished work on the python side to get the result from the statepoint file. I can share script with you to extract energy-dependent sensitivities from the statepoint file.

I'm mostly using the code for fixed-source problems where I compute the importance on-the-fly and sensitivities and don't use any importance mesh or filter. Importance of 1 everywhere would work but could give incorrect answers. For the eigenvalue problem, I have not looked at changing the Importance Filter. Computing the importance in an eigenvalue problem can be done within the code in a first run before tallying the sensitivity coefficients in a second run.

@pferney05
Copy link

@pferney05, thanks for your review. From your comments I suppose you are solving eigenvalue problem. I have not finished work on the python side to get the result from the statepoint file. I can share script with you to extract energy-dependent sensitivities from the statepoint file.

I'm mostly using the code for fixed-source problems where I compute the importance on-the-fly and sensitivities and don't use any importance mesh or filter. Importance of 1 everywhere would work but could give incorrect answers. For the eigenvalue problem, I have not looked at changing the Importance Filter. Computing the importance in an eigenvalue problem can be done within the code in a first run before tallying the sensitivity coefficients in a second run.

Yes, I am using the eigenvalue mode. I didn't know you could compute importance on the fly in fixed source mode. For eigenvalue mode, you need to use random ray, hence generate mgxs which can be heavy. So I would probably just generate a source from eigenvalue mode and use it in fixed source mode to avoid the need of generating mgxs.
I have my own script to get the sensitivities from the tallies.out file, so no emergency in modifying the code just for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants