arfc / msr-neutronics

To hold development code, milestones, and developments for msr neutronics.
BSD 3-Clause "New" or "Revised" License
7 stars 9 forks source link

MSR Flows Testing Initial Commit #51

Closed LukeSeifert closed 3 years ago

LukeSeifert commented 3 years ago

This PR is my work on generating Serpent inputs that allow for functional cyclical flow. The code isn't terribly clean because this is more of a testing phase. I am currently trying to determine the best way to get flows working with Serpent so the method can be incorporated into a more complex geometry.

The input.py file contains the user defined terms (i.e. cycles and such).

The complex_serpent_builder.py and serpent_builder.py files contain the scripts used by input.py to build the Serpent inputs, where complex_serpent_builder.py uses the multiple core approach while serpent_builder.py uses a cyclic flow approach. Due to the Serpent bug in cyclic flows, the functionality of serpent_builder.py has been suppressed and it only sends flow through the core once.

The res_dep_analysis.py file is used to analyze the results and depletion outputs, and is used to generate the plots.

I plan on adding my next, and hopefully fully successful, approach using restart scripts in my next PR. These approaches are flawed due to the aforementioned Serpent bug and the excessive run time with the multiple core approach.

To run these scripts, the sss2 executable is put into the same directory as the rest of the scripts. Then, the input.py script is run, and the plots will be generated along with the various Serpent output files.

The msr_cycle_test directory contains all of the Serpent outputs as well as the generated plots.

pep8speaks commented 3 years ago

Hello @LukeSeifert! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-04-02 17:03:32 UTC
robfairh commented 3 years ago

Thanks for your PR @LukeSeifert. I will take a look at your PR later. In the meantime, try fixing the PEP8 issues.

robfairh commented 3 years ago

I have the following general comments:

A more specific comments:

I will continue later with the review. I'm sorry but the PR is quite big.

Finally, you mentioned the following in the description of the PR:

To run these scripts, the sss2 executable is put into the same directory as the rest of the scripts.

This is Okay, but this is better:

LukeSeifert commented 3 years ago

Thank you for your comments! I will go through and address the things you brought up.

LukeSeifert commented 3 years ago

I made some fixes and also changed the restart run type so it will move the material as I wanted it to. However, in order to not get an error while running, the error code in burnmaterials.c in the Serpent source code has to be suppressed. That is why in the code instead of using sss2 to run the code, sss2_test is used, which is a recompiled version of Serpent I used that has that error suppressed.

robfairh commented 3 years ago

@LukeSeifert let me know when this is ready for the second review

LukeSeifert commented 3 years ago

@LukeSeifert let me know when this is ready for the second review

@robfairh thank you for reminding me, I forgot to let you know! It is ready, but I would recommend if you try running it to read through the readme first. I had to change part of the Serpent source code to get my script to run (planning on writing an issue on it in a bit). Thanks!

robfairh commented 3 years ago

Great job! Thanks for addressing all of my comments @LukeSeifert. Merging.