Skip to content

Conversation

@yardasol
Copy link
Contributor

Description

This PR adds a chi cross section to the existing MGXS machinery. This cross section will be used in the kinetic random ray simulation mode. I have not been able to find anywhere in the MGMC code where chi_prompt or chi_delayed are used, so I have been unable to add chi to the MGMC machinery. If anyone knows where in the source code these cross sections are used, that would be helpful. But if they aren't no problem I suppose.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@nelsonag
Copy link
Contributor

nelsonag commented Jan 16, 2026 via email

@jtramm
Copy link
Contributor

jtramm commented Jan 22, 2026

@nelsonag - the way we have implemented the random ray solver we do currently use Chi (math is here):

https://docs.openmc.org/en/latest/methods/random_ray.html#power-iteration

Let me know if there's another way of doing this though!

@yardasol - we currently use CHI_PROMPT for random ray's Chi variable, as empirically this seemed to be where the Chi we needed was stored. Should the random ray solver now use CHI instead?

@yardasol
Copy link
Contributor Author

yardasol commented Jan 22, 2026

@jtramm Both CHI and CHI_PROMPT are needed for kinetic simulations (the former for establishing an initial condition, the latter for the actual kinetic simulation). This PR adds such functionality to the MGXS machinery, and modifies the random ray machinery to use CHI in lieu of CHI_PROMPT (since the current simulation mode assumes the system is static). This is done in the associated changes for flat_source_domain.cpp

@yardasol
Copy link
Contributor Author

@nelsonag Thanks for that clarification! Do you recall which file this machinery lives in?

@nelsonag
Copy link
Contributor

nelsonag commented Jan 23, 2026 via email

@yardasol
Copy link
Contributor Author

@nelsonag Thanks for that explanation! @jtramm My understanding based on FlatSourceDomain::flatten_xs() is that chi_ is a flattened source_region x energy vector. If the mgxs machinery truly is returning a chi matrix, then aren't we just picking the diagonals of the matrix and missing all the off-diagonal components? Should we fix this for users using fission matrices for their MGXS?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants