opts = openmoc.options.Options() openmoc.log.set_log_level('NORMAL') openmoc.log.py_printf('TITLE', \ 'Simulating a one group homogeneous, two directional gradient...') ############################################################################### ######################### Load the Cubic Geometry ######################### ############################################################################### openmoc.log.py_printf('NORMAL', 'Importing cubic geometry...') left.setBoundaryType(openmoc.VACUUM) right.setBoundaryType(openmoc.VACUUM) top.setBoundaryType(openmoc.REFLECTIVE) bottom.setBoundaryType(openmoc.REFLECTIVE) ############################################################################### ######################## Creating the TrackGenerator ###################### ############################################################################### openmoc.log.py_printf('NORMAL', 'Initializing the track generator...') track_generator = openmoc.TrackGenerator(geometry, opts.num_azim, opts.azim_spacing) track_generator.setNumThreads(opts.num_omp_threads) track_generator.generateTracks() ############################################################################### ########################### Running a Simulation ##########################
############################################################################### openmoc.log.py_printf('NORMAL', 'Creating Cmfd mesh...') cmfd = openmoc.Cmfd() cmfd.setSORRelaxationFactor(1.5) cmfd.setLatticeStructure(25,1) ############################################################################### ######################### Load the Cubic Geometry ######################### ############################################################################### openmoc.log.py_printf('NORMAL', 'Importing cubic geometry...') left.setBoundaryType(openmoc.VACUUM) right.setBoundaryType(openmoc.VACUUM) top.setBoundaryType(openmoc.REFLECTIVE) bottom.setBoundaryType(openmoc.REFLECTIVE) geometry.setCmfd(cmfd) ############################################################################### ######################## Creating the TrackGenerator ###################### ############################################################################### openmoc.log.py_printf('NORMAL', 'Initializing the track generator...') track_generator = openmoc.TrackGenerator(geometry, opts.num_azim, opts.track_spacing) track_generator.setNumThreads(opts.num_omp_threads) track_generator.generateTracks()