mit-crpg / OpenMOC

A method of characteristics code for nuclear reactor physics calculations.
https://mit-crpg.github.io/OpenMOC/
Other
148 stars 83 forks source link

Sample input file LRA.py breaks on material creation #91

Closed wbinventor closed 10 years ago

wbinventor commented 10 years ago

The LRA.py sample input file does not work anymore and breaks with the following log output:

... [ INFO ] Set the Universe pointer for Lattice ID = 7 for Universe ID = 26 [ INFO ] Added Lattice with ID = 7 to Geometry [ INFO ] Added Universe with ID = 7 to Geometry. [ NORMAL ] Number of flat source regions: 12100 [ INFO ] CMFD Mesh level: 2, max mesh level: 2 [ NORMAL ] Number of mesh cells: 12100 [ ERROR ] Unable to set sigma_t for group 0 for Material 6 which contains 2 [ ERROR ] ... energy groups

I think this error was introduced in PR #84. @PrezNattyGibbs updated the Material class' cross-section setter methods to take in energy groups starting at 1 rather than 0. I thought I had updated Cmfd.cpp to use this as well, but it appears that I am missing something. @samuelshaner can you take a look at this when you get a chance?

nathangibson14 commented 10 years ago

There were two issues here:

I fixed both of those and it runs fine now.

I also caught an amusing "bug", the error message in setDifHatByGroup and a few others had _uid and _num_groups reversed. So you get funny messages like: [ ERROR ] Unable to set diffusion coefficient correction for group 1 for [ ERROR ] ... Material 2 which contains 9246 energy groups when running a two group problem.

I'm working on a few other things in Material, and this patch will be included in the upcoming pull request.

wbinventor commented 10 years ago

This was fixed in PR #93.