示例#1
0
    def _setup(self):
        """Initialize the materials, geometry, and tracks."""
        super(TrackingGridTestHarness, self)._create_geometry()
        super(TrackingGridTestHarness, self)._create_trackgenerator()

        # Initialize track objects
        self.tracks['Diagonal Track'] = openmoc.Track()
        self.tracks['Nudged Diagonal Track'] = openmoc.Track()
        self.tracks['Horizontal Track'] = openmoc.Track()
        self.tracks['Vertical Track'] = openmoc.Track()
        self.tracks['Reverse Diagonal Track'] = openmoc.Track()

        # Set track trajectories and locations
        self.tracks['Diagonal Track'].setValues(-3, -3, 3, 3, math.atan(1))
        nudge = 1e-5
        self.tracks['Nudged Diagonal Track'].setValues(-3+nudge, -3, 3,\
                                                       3-nudge, math.atan(1))
        self.tracks['Horizontal Track'].setValues(-3, 0, 3, 0, 0)
        self.tracks['Vertical Track'].setValues(0, -3, 0, 3, math.pi / 2)
        self.tracks['Reverse Diagonal Track'].setValues(3, 3, -3, -3,\
                                                        math.pi + math.atan(1))
    def _setup(self):
        """Initialize the materials, geometry, and tracks."""
        super(TrackingPinCellCMFDTestHarness, self)._create_geometry()

        # Initialize track objects
        self.tracks['Diagonal Track'] = openmoc.Track()
        self.tracks['Tangent Track'] = openmoc.Track()
        self.tracks['Nudged Tangent Track'] = openmoc.Track()
        self.tracks['Horizontal Track'] = openmoc.Track()
        self.tracks['Vertical Track'] = openmoc.Track()
        self.tracks['Reverse Diagonal Track'] = openmoc.Track()

        # Set track trajectories and locations
        self.tracks['Diagonal Track'].setValues(-2, -2, 0, 2, 2, 0,\
                                                math.atan(1))
        offset = math.sqrt(2) - 2
        self.tracks['Tangent Track'].setValues(offset, -2, 0, 2, -offset,\
                                               0, math.atan(1))
        offset -= 1e-6
        self.tracks['Nudged Tangent Track'].setValues(offset, -2, 0, 2,\
                                                      -offset, 0, math.atan(1))
        self.tracks['Horizontal Track'].setValues(-2, 0, 0, 2, 0, 0, 0)
        self.tracks['Vertical Track'].setValues(0, -2, 0, 0, 2, 0, math.pi / 2)
        self.tracks['Reverse Diagonal Track'].setValues(2, 2, 0, -2, -2, 0,\
                                                        math.pi + math.atan(1))