Beispiel #1
0
def createMaterials(directory, assembly_name):

    log.py_printf('NORMAL', 'Importing materials data from HDF5...')

    materials = materialize.materialize(directory + assembly_name + '-materials.hdf5')
    
    return materials
Beispiel #2
0
num_azim = options.getNumAzimAngles()
tolerance = options.getTolerance()
max_iters = options.getMaxIterations()

log.set_log_level("NORMAL")

log.py_printf("TITLE", "Simulating the OECD's C5G7 Benchmark Problem...")


###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf("NORMAL", "Importing materials data from HDF5...")

materials = materialize.materialize("../../c5g7-materials.h5")

uo2_id = materials["UO2"].getId()
mox43_id = materials["MOX-4.3%"].getId()
mox7_id = materials["MOX-7%"].getId()
mox87_id = materials["MOX-8.7%"].getId()
guide_tube_id = materials["Guide Tube"].getId()
fiss_id = materials["Fission Chamber"].getId()
water_id = materials["Water"].getId()


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf("NORMAL", "Creating surfaces...")
Beispiel #3
0
num_azim = options.getNumAzimAngles()
tolerance = options.getTolerance()
max_iters = options.getMaxIterations()

log.set_log_level('NORMAL')

log.py_printf('TITLE', 'Simulating the OECD\'s C5G7 Benchmark Problem...')


###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from py...')

materials = materialize.materialize('../../c5g7-materials.h5')

uo2_id = materials['UO2'].getId()
mox43_id = materials['MOX-4.3%'].getId()
mox7_id = materials['MOX-7%'].getId()
mox87_id = materials['MOX-8.7%'].getId()
guide_tube_id = materials['Guide Tube'].getId()
fiss_id = materials['Fission Chamber'].getId()
water_id = materials['Water'].getId()


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating surfaces...')
Beispiel #4
0
num_azim = options.getNumAzimAngles()
tolerance = options.getTolerance()
max_iters = options.getMaxIterations()

log.set_log_level('NORMAL')

log.py_printf('TITLE', 'Simulating the LRA Benchmark Problem...')


###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from py...')

materials = materialize.materialize('LRA-materials.py')


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating surfaces...')

left = XPlane(x=-82.5)
right = XPlane(x=82.5)
bottom = YPlane(y=-82.5)
top = YPlane(y=82.5)
left.setBoundaryType(REFLECTIVE)
right.setBoundaryType(VACUUM)
bottom.setBoundaryType(REFLECTIVE)
Beispiel #5
0
track_spacing = options.getTrackSpacing()
num_azim = options.getNumAzimAngles()
tolerance = options.getTolerance()
max_iters = options.getMaxIterations()

log.set_log_level('NORMAL')

log.py_printf('TITLE', 'Simulating the LRA Benchmark Problem...')

###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from py...')

materials = materialize.materialize('LRA-materials.py')

region1 = materials['region_1'].getId()
region2 = materials['region_2'].getId()
region3 = materials['region_3'].getId()
region4 = materials['region_4'].getId()
region5 = materials['region_5'].getId()
region6 = materials['region_6'].getId()

###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating surfaces...')

planes = []
Beispiel #6
0
num_threads = options.num_omp_threads
track_spacing = options.track_spacing
num_azim = options.num_azim
tolerance = options.tolerance
max_iters = options.max_iters

log.setLogLevel('DEBUG')

###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from HDF5...')

materials = materialize.materialize('BWR_materials.hdf5')

uo2_id = materials['UO2'].getId()
moderator_id = materials['MODERATOR'].getId()
clad_id = materials['CLAD'].getId()
gd2o3_id = materials['UO2 + GD2O3'].getId() 


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating Surfaces...')

#creates list of circle and plane surfaces
circles = [] 
Beispiel #7
0
max_iters = options.getMaxIterations()
acceleration = options.getCmfdAcceleration()
relax_factor = options.getCmfdRelaxationFactor()
mesh_level = options.getCmfdMeshLevel()

log.set_log_level('NORMAL')

log.py_printf('TITLE', 'Simulating the OECD\'s C5G7 Benchmark Problem...')

###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from HDF5...')

materials = materialize.materialize('../../c5g7-materials.py')

uo2_id = materials['UO2'].getId()
mox43_id = materials['MOX-4.3%'].getId()
mox7_id = materials['MOX-7%'].getId()
mox87_id = materials['MOX-8.7%'].getId()
guide_tube_id = materials['Guide Tube'].getId()
fiss_id = materials['Fission Chamber'].getId()
water_id = materials['Water'].getId()

###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating surfaces...')
relax_factor = options.getCmfdRelaxationFactor()
mesh_level = options.getCmfdMeshLevel()


log.set_log_level('NORMAL')

log.py_printf('TITLE', 'Simulating a Design-a-Critical Reactor Problem...')


###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from HDF5...')

materials = materialize.materialize('design-a-reactor-materials.hdf5')

uo2_id = materials['UO2'].getId()
mox43_id = materials['MOX-4.3%'].getId()
mox7_id = materials['MOX-7%'].getId()
mox87_id = materials['MOX-8.7%'].getId()
guide_tube_id = materials['Guide Tube'].getId()
fiss_id = materials['Fission Chamber'].getId()
water_id = materials['Water'].getId()


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating surfaces...')
Beispiel #9
0
num_azim = options.getNumAzimAngles()
tolerance = options.getTolerance()
max_iters = options.getMaxIterations()

log.set_log_level('NORMAL')

log.py_printf('TITLE', 'Simulating the OECD\'s C5G7 Benchmark Problem...')


###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from HDF5...')

materials = materialize.materialize('../../c5g7-materials.py')

uo2_id = materials['UO2'].getId()
mox43_id = materials['MOX-4.3%'].getId()
mox7_id = materials['MOX-7%'].getId()
mox87_id = materials['MOX-8.7%'].getId()
guide_tube_id = materials['Guide Tube'].getId()
fiss_id = materials['Fission Chamber'].getId()
water_id = materials['Water'].getId()


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating surfaces...')
Beispiel #10
0
num_azim = options.getNumAzimAngles()
tolerance = options.getTolerance()
max_iters = options.getMaxIterations()

log.set_log_level("NORMAL")

log.py_printf("TITLE", "Simulating the LRA Benchmark Problem...")


###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf("NORMAL", "Importing materials data from py...")

materials = materialize.materialize("LRA-materials.py")


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf("NORMAL", "Creating surfaces...")

left = XPlane(x=-82.5)
right = XPlane(x=82.5)
bottom = YPlane(y=-82.5)
top = YPlane(y=82.5)
left.setBoundaryType(REFLECTIVE)
right.setBoundaryType(VACUUM)
bottom.setBoundaryType(REFLECTIVE)
Beispiel #11
0
from generatehdf5 import generate
import openmoc.materialize as materialize
import os

assembly_names = ['pwru160c00','pwru240c00','pwru240w12', 'pwru240w16', 'pwru310c00', 'pwru310w06', 'pwru310w12', 'pwru310w15', 'pwru310w16', 'pwru310w20']
group_types = ['2-group/','8-group/']

materials = {}


# create materials for each assembly and number of groups
for group in group_types:
  materials[group[0]] = {}
  for name in assembly_names:
    if not os.path.isfile('casmo-data/'+ group[0] + '-group/' + name + '-avg-materials.hdf5'):
      generate([name], [group])
      ## only runs when these files don't exist already!! 

    materials[group[0]][name] = materialize.materialize('casmo-data/'+ group[0] + '-group/' + name + '-avg-materials.hdf5')
Beispiel #12
0
acceleration = options.getCmfdAcceleration()
relax_factor = options.getCmfdRelaxationFactor()
mesh_level = options.getCmfdMeshLevel()

log.set_log_level("NORMAL")

log.py_printf("TITLE", "Simulating the OECD's C5G7 Benchmark Problem...")


###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf("NORMAL", "Importing materials data from HDF5...")

materials = materialize.materialize("../../c5g7-materials.py")

uo2_id = materials["UO2"].getId()
mox43_id = materials["MOX-4.3%"].getId()
mox7_id = materials["MOX-7%"].getId()
mox87_id = materials["MOX-8.7%"].getId()
guide_tube_id = materials["Guide Tube"].getId()
fiss_id = materials["Fission Chamber"].getId()
water_id = materials["Water"].getId()


###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf("NORMAL", "Creating surfaces...")
Beispiel #13
0
track_spacing = options.track_spacing
num_azim = options.num_azim
tolerance = options.tolerance
max_iters = options.max_iters

log.setLogLevel('NORMAL')

###############################################################################
###########################   Creating Materials   ############################
###############################################################################

log.py_printf('NORMAL', 'Importing materials data from HDF5...')

#The following assigns the dictionary returned by the materialize function in
#the materialize python file to the variable materials
materials = materialize.materialize('BWR_materials.hdf5')

#finds the identification number for each material
uo2_id = materials['UO2'].getId()
moderator_id = materials['MODERATOR'].getId()
clad_id = materials['CLAD'].getId()
gd2o3_id = materials['UO2 + GD2O3'].getId()

###############################################################################
###########################   Creating Surfaces   #############################
###############################################################################

log.py_printf('NORMAL', 'Creating Surfaces...')

#creates list of circle and plane surfaces
circles = []