Skip to content

More accurately simulate the neutron flux profile - #3653

Open
OceanNuclear wants to merge 177 commits into
mainfrom
neutronics
Open

OceanNuclear wants to merge 177 commits into
mainfrom
neutronics

Conversation

@OceanNuclear

@OceanNuclear OceanNuclear commented May 2, 2025 •

Copy link
Copy Markdown
Contributor

Description

Calculates the neutron flux profile in the first wall and blanket, using an extremely simplified diffusion-based model of an infinite slab sandwich.

Reason for choosing this model

It's better than not having a neutronics model.
It's also very simplified, so it can be calculated on the fly, without installing any deterministic neutron transport codes as dependency.

Checklist

I confirm that I have completed the following checks:

  • My changes follow the PROCESS style guide
  • I have justified any large differences in the regression tests caused by this pull request in the comments.
  • I have added new tests where appropriate for the changes I have made.
  • If I have had to change any existing unit or integration tests, I have justified this change in the pull request comments.
  • If I have made documentation changes, I have checked they render correctly.
  • I have added documentation for my change, if appropriate.

@codecov-commenter

codecov-commenter commented May 2, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.98817% with 355 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.19%. Comparing base (771e4d2) to head (8c2cce6).
⚠️ Report is 307 commits behind head on main.

Files with missing lines Patch % Lines
process/models/neutronics/base.py 51.51% 224 Missing ⚠️
process/models/neutronics/data.py 65.43% 131 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3653      +/-   ##
==========================================
+ Coverage   47.81%   50.19%   +2.37%     
==========================================
  Files         143      154      +11     
  Lines       29993    31115    +1122     
==========================================
+ Hits        14342    15618    +1276     
+ Misses      15651    15497     -154     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@OceanNuclear
OceanNuclear requested a review from chris-ashe May 2, 2025 21:04
@chris-ashe chris-ashe added Physics Relating to the physics models Neutronics Power Cycle and removed Physics Relating to the physics models labels May 6, 2025
@OceanNuclear
OceanNuclear force-pushed the neutronics branch 2 times, most recently from a7c3d81 to 56884d7 Compare June 4, 2025 15:47
@OceanNuclear OceanNuclear changed the title First commit - made a mockup of NeutronFluxProfile calculator. More accurately simulate the neutron flux profile, to get a more accurate estimate of the neutronics quantities. Jun 4, 2025
@OceanNuclear OceanNuclear changed the title More accurately simulate the neutron flux profile, to get a more accurate estimate of the neutronics quantities. More accurately simulate the neutron flux profile Jun 4, 2025
@OceanNuclear
OceanNuclear force-pushed the neutronics branch 3 times, most recently from 5ada3ea to 3336c23 Compare October 30, 2025 15:13
@OceanNuclear

OceanNuclear commented Nov 24, 2025 •

Copy link
Copy Markdown
Contributor Author

The current state of this branch is:

  • 1-group 2-layer model is written
  • 1-group 2-layer model is fully tested (regression & unit tests)
  • Multi-group model & >2-layer model is written
  • Multi-group model & >2-layer model is tested
  • incorporated real data
  • Wrote function that accepts collapsed cross-section data (The downloading and collapsing of nuclear data has to be done by the user using a class that inherits from ENDFRecord.)
  • Plotting is already available, example 1-group 2-layer model:
current flux heating
  • Plotting is tested

…e basically one-line alias of _groupwise_cs_value/differential_in_layer. Hence they're deleted and replaced with the appropriate terms.
…ve 'basis_group'; fixed some typing of npt.NDArray[float] to npt.NDArray[np.float64], tidied one docstring.
…the scope of 'NeutronProfile.solve_group_n' to a persistent attribute inside MaterialInfo, and renamed 'conversion_factor'. Also created NeutronProfile.extended_boundary statically as an array, rather than using AutoPopulatingDict.
…ed as a static value, rather than a property. The warning for any collision in characteristic lengths between groups is ported to inside the data.py file as well. Used sigma_source in base.py.
…ot of the complexity associated with the AutoPopulatingDict/LayerSpecificGroupwiseConstants classes. Amended tests as well.
…e code complexity, and increasing backwards compatibility as preserve_whitespace was not an argument before tabulate version 0.10.0.
…arbitrary dimensions of c_va/s_val, c_int/s_int, c_diff/s_diff.
…of the summations handled with less redundancy & more automatically.
… by turning fsum back to np.sum (which is also useful in preparation for the next commit).
…sholds scaled by the total neutron flux/local neutron flux and currents for flagging nonconvergence at the end of solve_group_n, since the current scheme causes a lot of unnecessary warnings being raised when the flux is large.
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.

4 participants