Ejemplo n.º 1
0
    def _run_openmoc(self):
        """Plot the tracks."""

        # Run an eigenvalue calculation to setup track generator
        super(PlotTracksTestHarness, self)._run_openmoc()

        # Create Matplotlib Figures for the tracks
        self.figures = [plot_tracks(self.track_generator, get_figure=True)]
Ejemplo n.º 2
0
    def _run_openmoc(self):
        """Plot the tracks."""

        # Run an eigenvalue calculation to setup track generator
        super(PlotTracksTestHarness, self)._run_openmoc()

        # Create Matplotlib Figures for the tracks
        self.figures = [plot_tracks(self.track_generator, get_figure=True)]
Ejemplo n.º 3
0
track_generator.setSegmentFormation(openmoc.OTF_STACKS)
track_generator.generateTracks()


###############################################################################
###########################   Running a Simulation   ##########################
###############################################################################

solver = openmoc.CPUSolver(track_generator)
solver.setNumThreads(num_threads)
solver.setConvergenceThreshold(tolerance)
solver.computeEigenvalue(max_iters)
solver.printTimerReport()


###############################################################################
#                             Generating Plots
###############################################################################

log.py_printf('NORMAL', 'Plotting data...')

plotter.plot_tracks(track_generator, plot_3D=True)
plotter.plot_materials(geometry, gridsize=500, plane='xy', offset=0.)
plotter.plot_cells(geometry, gridsize=500, plane='xy', offset=0.)
plotter.plot_flat_source_regions(geometry, gridsize=500, plane='xy', offset=0.)
plotter.plot_spatial_fluxes(solver, energy_groups=[1,2,3,4,5,6,7], \
  plane='xy', offset=0.)
plotter.plot_energy_fluxes(solver, fsrs=range(geometry.getNumFSRs()))

log.py_printf('TITLE', 'Finished')
Ejemplo n.º 4
0
track_generator.setNumThreads(num_threads)
track_generator.setZCoord(0.1)
track_generator.generateTracks()


###############################################################################
###########################   Running a Simulation   ##########################
###############################################################################

solver = openmoc.CPUSolver(track_generator)
solver.setNumThreads(num_threads)
solver.setConvergenceThreshold(tolerance)
solver.computeEigenvalue(max_iters)
solver.printTimerReport()

###############################################################################
#                             Generating Plots
###############################################################################

log.py_printf('NORMAL', 'Plotting data...')

plotter.plot_tracks(track_generator)
plotter.plot_materials(geometry, gridsize=500, plane='xy', offset=0.)
plotter.plot_cells(geometry, gridsize=500, plane='xy', offset=0.)
plotter.plot_flat_source_regions(geometry, gridsize=500, plane='xy', offset=0.)
plotter.plot_spatial_fluxes(solver, energy_groups=[1,2,3,4,5,6,7], \
  plane='xy', offset=0.)
plotter.plot_energy_fluxes(solver, fsrs=range(geometry.getNumFSRs()))

log.py_printf('TITLE', 'Finished')