mit-crpg/OpenMOC — pull request #98 by samuelshaner (2014-08-21 17:58:20+00:00)
Title: Major updates to segmentation and CMFD

This PR contains modifications to many parts of OpenMOC and focuses on updating the track segmentation to track across overlapping cells and simplifying the CMFD module to utilize an arbitrary cartesian mesh. More details on all modifications are included below:
- Track segmentation: The track segmentation routines were updated so that tracks could be segmented across geometries that have overlapping cells. This is important when trying to represent the core barrel, as it typically overlaps with an underlying assembly lattice. The new segmentation strategy is to find the minimum distance to both the surfaces in the current cell and all the surfaces and lattice boundaries in the parent universes' cells and parent lattices, respectively.
- FSR index definition: Previously, the FSR index was "computable" in the sense that it could be computed based on its position in the universe/cell/lattice hierarchy. Since OpenMOC now supports segmentation across geometries that have overlapping cells, we needed a new method to identify FSRs. Now, FSR indices are defined by a unique std::string "key" that represents the universe/lattice/cell hierarchy. The key is mapped to an index that is assigned in the order that unique FSRs are encountered during segmentation. Therefore, FSRs are only created for regions that contain at least one segment.
- CMFD lattice definition: Previously, a CMFD lattice had to coincide with a lattice of the geometry. Now, the CMFD lattice consists of a cartesian lattice that is overlaid on the geometry. If a cell crosses a CMFD lattice boundary, the cell is broken up into multiple FSRs during segmentation.
- TrackGenerator geometry string: Previously, the const char* geometry string written to the tracks file did not contain the ending NULL character. This resulted in random lines showing up in the geometry string when a tracks file was parsed and new segments often being generated for identical geometries. The NULL character has been added and this issue resolved.
- Mesh.h/Mesh.cpp files: The methods from these files have been incorporated into the Cmfd.h/Cmfd.cpp files.
- Diffusion solver: The pure neutron diffusion solver has been removed from the Cmfd module.
- Cell surface map: The Cell surface map used to have Surface pointers as keys. This resulted in surfaces having a random ordering when written to the tracks file causing geometry strings for identical geometries to be different. The cell surface map now has surface indexes as keys and a struct with the Surface pointer and half space as values.
- CMFD in input files: Setting up CMFD in an input file has been simplified. All command line options for CMFD have been removed. Instead, users now use CMFD methods to set CMFD parameters, like the MOC flux update relaxation factor.
- CMFD optically thick correction factor: An error in computing this factor has been fixed and now this factor is turned on by default.
- CMFD corner splitting: The surface currents across CMFD cell corners are now split up equally to the adjoining surfaces. Previously, they were all given to one surface.
- Setting CMFD group structure: The index of the first group now starts at 1 instead of 0.
- Inconsistency with XPlane and YPlane constants: This has been fixed.