Repository navigation
More accurately simulate the neutron flux profile - #3653
OceanNuclear wants to merge 187 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3653 +/- ##
==========================================
+ Coverage 50.26% 50.39% +0.13%
==========================================
Files 181 184 +3
Lines 30629 31548 +919
==========================================
+ Hits 15395 15899 +504
- Misses 15234 15649 +415 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a7c3d81 to
56884d7
Compare
5ada3ea to
3336c23
Compare
76579e7 to
fa6d266
Compare
fc5c51d to
710c90b
Compare
|
@chris-ashe In the new folder structure, would you prefer the neutronics.py and neutronics_data.py to live in |
je-cook
left a comment
There was a problem hiding this comment.
I'm not sure descriptors is the right way to go. Most descriptor stuff I've written I have eventually rewritten without descriptors because I found a better way.
On the atomic data is there any reason we cant use something like periodictable which we use in elsewhere.
|
Happy to hear out examples of where descriptors were removed and see if I can implement anything similar. So far I'm unaware of any other ways of writing the code that wouldn't make it even more spaghetti: the @summarize_values decorator is doing a lot of heavy lifting and cutting the amount of code that I have to write down by half. |
|
Great, need to have a think but will let you know |
|
I haven't figured out yet the right way of getting the abundance values in |
…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.
…ntly and has less complexity.
…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.
…g the summation inside the same block.
… 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.
…e and animate=False. Removed redundant _set_coefficient.
6fd4dcd to
8502e7f
Compare
…, and mp.sin when the argument is scalar. This speeds up the calculation of long flux values. Also, we revert to using np.sqrt instead of mp.sqrt to obtain l from self.materials[...].l2, which somehow makes the calculation more accurate as well.



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: