Skip to content

Implement FNG-SDDR for OpenMC - #546

Draft
dodu94 wants to merge 8 commits into
developingfrom
implement-FNG-SDDR-for-openMC
Draft

Implement FNG-SDDR for OpenMC#546
dodu94 wants to merge 8 commits into
developingfrom
implement-FNG-SDDR-for-openMC

Conversation

@dodu94

@dodu94 dodu94 commented Jul 30, 2026

Copy link
Copy Markdown
Member

The following PR:

  • Implements D1S capabilities for OpenMC
  • Implements FNG-SDDR for OpenMC
  • Introduces small modifications to the MCNP processing of FNG-SDDR

This PR introduces D1S capabilities for OpenMC to JADE for the first time. Unlike MCNP, where D1S calculations are handled as if they were performed by a separate code, it was possible to simply extend the existing functionality of the openmc code without the need to create a new one.

Input generation and run

For D1SUNED, two additional files are required: one to specify the decay reactions to be followed and another to specify the time correction factors to be applied in order to obtain SDDR at different cooling times. Moreover, D1SUNED requires specially generated libraries that must be mixed with the transport library in the input.

OpenMC takes a different approach. Regarding the libraries, nothing changes compared to a standard transport calculation. The only additional requirement is that a chain file (containing all possible reactions) must be made available through an additional environmental variable (OPENMC_CHAIN_FILE). Moreover, time correction factors are not needed at run time. Results are computed at shutdown, and the dose at different cooling times is obtained during post-processing. This also means that an SDDR tally in OpenMC must always specify a filter indicating which daughters (called "parents" in OpenMC) need to be tracked, and no "total dose" tally is possible. This limitation cannot be avoided because, to obtain the dose at a different cooling time, the time correction factor for each daughter must be computed and applied.

All of this means that no modifications were needed for the generation or execution of OpenMC inputs, with the small exception of the irradiation file concept, which I will discuss in a moment.

Post-processing

While the OpenMC approach simplifies input generation and execution, it shifts the complexity to the post-processing stage. OpenMC provides its own methods to apply time correction factors to the results, but after looking into them, I found that integrating them into JADE would have been somewhat cumbersome.

I decided to use F4Enix to compute the time correction factors (I think the irradiation support we developed there is quite neat) and apply them to the dose tally. At that point, I could have followed two different approaches:

  1. Compute the factors outside JADE and then implement a new tally modifier to apply them.
  2. Implement routines to compute and apply the factors directly within the OpenMC simulation output class.

I chose the second approach. With only a couple of additional functions, JADE can now read a very simply formatted ASCII irradiation scenario (provided together with the input files) and use it to compute the appropriate time correction factors, apply them, and produce a tally in the [User, Time, Value, Error] DataFrame format, matching the D1SUNED output.

This should make it extremely straightforward to implement new D1S benchmarks with OpenMC.

As for the selection of daughters ("parents" in OpenMC), as mentioned earlier, they can simply be listed in a dedicated OpenMC filter inside tallies.xml.

Missing features

OpenMC can only filter by daughter isotopes (i.e., the ones producing the decay photons). It cannot filter for parent isotopes (i.e., the ones that gets activated and lead to the daughters radioactive isotopes). This is probably a feature that we need to request to OpenMC developers in the future. It will involve tallying how many daughters are produced by the different possible parents.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dc96498b-9f24-4743-8237-b7abcf126659

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.12598% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/jade/post/plotter.py 93.58% 5 Missing ⚠️
src/jade/run/input.py 50.00% 4 Missing ⚠️
src/jade/post/sim_output.py 97.36% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/jade/config/atlas_config.py 93.18% <100.00%> (+0.07%) ⬆️
src/jade/post/raw_processor.py 92.53% <100.00%> (+0.22%) ⬆️
src/jade/post/sim_output.py 93.87% <97.36%> (+0.44%) ⬆️
src/jade/run/input.py 86.85% <50.00%> (-1.22%) ⬇️
src/jade/post/plotter.py 94.41% <93.58%> (+0.17%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant