Skip to content

Conversation

@OceanNuclear
Copy link
Contributor

@OceanNuclear OceanNuclear commented May 2, 2025

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
Copy link

codecov-commenter commented May 2, 2025

Codecov Report

❌ Patch coverage is 30.34056% with 450 lines in your changes missing coverage. Please review.
✅ Project coverage is 42.77%. Comparing base (633a49e) to head (73734e3).
⚠️ Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
process/neutronics.py 24.89% 344 Missing ⚠️
process/neutronics_data.py 43.61% 106 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3653      +/-   ##
==========================================
- Coverage   45.98%   42.77%   -3.22%     
==========================================
  Files         123      125       +2     
  Lines       28550    38543    +9993     
==========================================
+ Hits        13129    16486    +3357     
- Misses      15421    22057    +6636     

☔ View full report in Codecov by Sentry.
📢 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
…nded_boundary, to be self-populating dictionaries (populated by solve_group_n).
…d populated the docstring of NeutronFluxProfile.
…of commits ago (because I was in a hurry) in groupwise_neutron_current_through_interface
…nup successful: unit test and regression test (1-group regression test case only) passed. Only the plotting function remains to be fixed for this conversion to infinite-layer model.
…haviour of (NeutronFluxProfile.coefficients, NeutronFluxProfile.l2, NeutronFluxProfile.diffusion_const)
…aries (i.e. interfaces) are properly drawn. Will need to make heating calculation method.
…r both flux and current, but not for heating yet.
…so they're still valid under the new units (J, instead of eV)
…iscontinuity present are all justified (i.e. have physical meaning). This in turn updated the behaviour of some methods, and notably two new methods are added to calculate the heating in a per-layer fashion. Docstring updates as well.
… exist without first re-writing solve_lowest_group
…p while keeping _calculate_mean_energy_and_incident_bin as a staticmethod.
@OceanNuclear
Copy link
Contributor Author

OceanNuclear commented Nov 24, 2025

Snapshot of where I'm at before taking a break for 3 weeks:

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 not yet tested
  • Need to incorporate real data (The correct incident neutron flux from the plasma, and download the 1-group/multi-group cross-sections for various materials & then collapse them into the correct group structure.)
  • Need to test the downloading and collapsing of cross-section.
  • Plotting is already available, example 1-group 2-layer model:
current flux heating
  • I have no idea how to test plotting TBH.

…each NeutronFluxProfile.coefficient[:, n] will contain self.n_groups coefficients rather than n coefficients.
…'s coefficients (i.e. coefficients used to cancel the flux shapes contributed by other groups).
… coefficient length = total number of groups rather than the current group number.
…the programmer won't have to write them out explicitly every time.
…us layer can be written as an affine transformation in linear algebra (y = Ax+b). The method _get_propagation_matrix_and_offset_vec returns A and b. num_coef_pairs is no longer needed so is deleted.
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