More accurately simulate the neutron flux profile - #3653
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3653 +/- ##
==========================================
+ Coverage 47.81% 50.23% +2.41%
==========================================
Files 143 154 +11
Lines 29993 30750 +757
==========================================
+ Hits 14342 15447 +1105
+ Misses 15651 15303 -348 ☔ 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
…ng the strength of the macroscopic (self and other) scattering matrix.
…(...)), instead of using complex number to cover both +ve and -ve sign in the sqrt.
…esmos). Next step is to write the program for solving multi-group fluxes.
|
@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 |
|
I'll add a bit of context for your consideration while thinking about refactoring away the descriptors: Regarding the @summarize_values decorators, I think they can be improved upon as well, for the following reasons:
|
…ation of flux. Fixed the group structure in the test_scattering_matrix as well.
… of flux as it downscatters.
|
Listing all of the methods available under the NeutronProfile class (for my own use/sanity): Continuous range of values per layer:
One value per layer:
This gives a total of 27 available methods. |
… factorize where possible, and use fsum where possible.
| class AutoPopulatingDict: | ||
| """ | ||
| Class that behaves like a dictionary, but if the required key does not | ||
| exist in the dictionary, it will call the populating_method to populate | ||
| that specific key. | ||
| """ |
There was a problem hiding this comment.
…re put into regression.
…ote tests based on that.



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: