forest.set_settings(method=METHOD, fe_settings=FE_SETTINGS) # Geometry ---------------------------------------------------------------- CORE = dict([ ('composed', True), ('name', '2x2Pins2d'), ('nnodes', [1, 1]), ('length', [[3.78], [3.78]]), ('components', [0]), ('boundary', [2, 0, 2, 0]), ]) LATT = dict() LATT[0] = dict([ ('type', 'pin_map'), ('name', 'assembly'), ('nnodes', [3, 3]), ('components', [[1, 1, 0], [2, 1, 0], [0, 0, 0]]), ('length', [[1.26] * 3 for i in range(2)]), ]) PIN = dict() PIN[0] = newpin(ptype='box', mat=[0], name='moderator') PIN[1] = newpin(ptype='pin', mat=[0, 2], fradius=0.54, name='Pin') PIN[2] = newpin(ptype='pin', mat=[0, 1], fradius=0.34, name='Pin') forest.set_geometry(dim=2, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- from get_c5g7_materials import get_c5g7_materials MIX = get_c5g7_materials() forest.set_materials(ngroups=7, mix=MIX) # Running forest ---------------------------------------------------------- forest.run() forest.clean()
CORE = dict([ ('composed', True), ('name', 'Pin2d'), ('nnodes', [1, 1]), ('length', [[1.26], [1.26]]), ('components', [0]), ('boundary', [0, 0, 0, 0]), #('boundary', [2, 2, 2, 2]), ]) LATT = dict() LATT[0] = dict([ ('type', 'pin_map'), ('name', 'assembly'), ('nnodes', [1, 1]), ('components', [[0]]), ('water_gap', [0., 0., 0., 0.]), ('length', [[1.26], [1.26]]), ]) PIN = dict() PIN[0] = newpin(ptype='pinnew', mat=[0, 2], fradius=0.54, name='Pin'); forest.set_geometry(dim=2, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- from get_c5g7_materials import get_c5g7_materials MIX = get_c5g7_materials() forest.set_materials(ngroups=7, mix=MIX) # Running forest ---------------------------------------------------------- forest.run() #forest.clean()
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]), ('water_gap', [0., 0., 0., 0.]), ('length', [[1.0] * 17 for i in range(2)]), ]) PIN = dict() PIN[0] = newpin(ptype='pin', mat=[0, 1], fradius=0.4, name='Pin') forest.set_geometry(dim=2, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- MIX = dict() MIX[0] = dict([ ('name', 'moderator'), ('SigmaT', [0.3333694980, 0.5887110656, 1.6512246291]), ('Chi', [0.9996892490, 0.0003391680, 0.0000000000]), ('SigmaS', [[0.2432946408, 0.0000000000, 0.0000000000], [0.0898364840, 0.4413753398, 0.0000203109], [0.0000387911, 0.1465683257, 1.6300848232]]), ('NuSigF', [0.0000000000, 0.0000000000, 0.0000000000]), ]) MIX[1] = dict([ ('name', 'fuel'), ('SigmaT', [0.2822058997, 0.4997685502, 0.4323754911]),
('components', [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]), ('water_gap', [0., 0., 0., 0.]), ('length', [[1.0] * 5 for i in range(2)]), ]) LATT[2] = dict([ ('type', 'pin_map'), ('name', 'UO2'), ('nnodes', [5, 5]), ('components', [[2, 2, 2, 2, 2], [2, 1, 2, 1, 2], [2, 2, 2, 2, 2], [2, 1, 2, 1, 2], [2, 2, 2, 2, 2]]), ('water_gap', [0., 0., 0., 0.]), ('length', [[1.0] * 5 for i in range(2)]), ]) PIN = dict() PIN[0] = newpin(ptype='box', mat=[0], name='Pin') PIN[1] = newpin(ptype='pin', mat=[0, 1], fradius=0.45, name='Pin') PIN[2] = newpin(ptype='pin', mat=[0, 1], fradius=0.35, name='Pin') forest.set_geometry(dim=2, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- MIX = dict() MIX[0] = dict([ ('name', 'moderator'), ('SigmaT', [0.3333694980, 0.5887110656, 1.6512246291]), ('Chi', [0.9996892490, 0.0003391680, 0.0000000000]), ('SigmaS', [[0.2432946408, 0.0000000000, 0.0000000000], [0.0898364840, 0.4413753398, 0.0000203109], [0.0000387911, 0.1465683257, 1.6300848232]]), ('NuSigF', [0.0000000000, 0.0000000000, 0.0000000000]), ]) MIX[1] = dict([
if __name__ == "__main__": # ------------------------------------------------------------------------- #TESTDIR = "1dg7_c5g7_heter/" #PROB_NAME = "1dg7_c5g7_heter" DESCRIPTION = ("One-dimensional heterogeneous version of the c5g7.") # Settings ---------------------------------------------------------------- METHOD = setmethod(mtype='transport', quad=['GaussLegendre', 2]) #METHOD = setmethod(mtype='diffusion') FE_SETTINGS = dict([('degree', 0), ('n_ref', 0)]) # Materials --------------------------------------------------------------- from get_c5g7_materials import get_c5g7_materials MIX = get_c5g7_materials() # Geometry ---------------------------------------------------------------- PIN = dict() PIN[0] = newpin(ptype='box', mat=[0], name='moderator') PIN[1] = newpin(ptype='pin', mat=[0, 1], fradius=0.54, name='UO2') PIN[2] = newpin(ptype='pin', mat=[0, 2], fradius=0.54, name='MOX4.3') PIN[3] = newpin(ptype='pin', mat=[0, 3], fradius=0.54, name='MOX7.0') PIN[4] = newpin(ptype='pin', mat=[0, 4], fradius=0.54, name='MOX8.7') PIN[5] = newpin(ptype='pin', mat=[0, 5], fradius=0.54, name='fisschamber') PIN[6] = newpin(ptype='pin', mat=[0, 6], fradius=0.54, name='guidetube') LATT = dict() LATT[0] = dict([ ('type', 'grid'), ('name', 'REFLECTOR'), ('nnodes', [17]), ('components', [0] * 17), ('length', [[1.26] * 17]), ]) LATT[1] = dict([
def oneDc5g7_noupscattering(pinSize, method, nev=1, ncv=3): # ------------------------------------------------------------------------- # TESTDIR = "1d7g_c5g7_noupscattering/" pinSize_str = str(pinSize).replace('.', '') if method is 'kr': method_str = 'Krylov:' + str(nev) + ':' + str(ncv) PROB_NAME = ("1dg7_c5g7_" + method + '_' + pinSize_str + "cm" + '_nev' + str(nev) + '_ncv' + str(ncv)) else: method_str = 'PI' PROB_NAME = "1dg7_c5g7_" + method + '_' + pinSize_str + "cm" # If out file exists do not do anything out_file = PROB_NAME + '.out.xml' if (os.path.isfile(out_file)): return PROB_NAME DESCRIPTION = ("One-dimensional heterogeneous version of the c5g7.") forest = RunForest(prob_name=PROB_NAME, description=DESCRIPTION) # Settings ---------------------------------------------------------------- METHOD = setmethod(mtype='transport', quad=['GaussLegendre', 16]) #METHOD = setmethod(mtype='diffusion') FE_SETTINGS = dict([('degree', 2), ('n_ref', 1)]) ALGEBRA = setalgebra(matfree=True, eig=[method_str, 1.e-7, 1000, "Standard"], inner=["Krylov", 1.e-9, 1000]) forest.set_settings(method=METHOD, fe_settings=FE_SETTINGS, algebra=ALGEBRA) # Geometry ---------------------------------------------------------------- CORE = dict([ ('composed', True), ('name', 'Core'), ('nnodes', [3]), ('length', [[17 * pinSize, 17 * pinSize, 17 * pinSize]]), ('components', [[2, 1, 2]]), ('boundary', [2, 2]), ]) LATT = dict() LATT[1] = dict([ ('type', 'pin_map'), ('name', 'MOX'), ('nnodes', [17]), ('components', [[2, 3, 6, 4, 4, 6, 4, 4, 5, 4, 4, 6, 4, 4, 6, 3, 2]]), #('components', [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]]), ('water_gap', [0., 0.]), ('length', [[pinSize] * 17]), ]) LATT[2] = dict([ ('type', 'pin_map'), ('name', 'UOX'), ('nnodes', [17]), ('components', [[1, 1, 6, 1, 1, 6, 1, 1, 5, 1, 1, 6, 1, 1, 6, 1, 1]]), #('components', [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), ('water_gap', [0., 0.]), ('length', [[pinSize] * 17]), ]) PIN = dict() PIN[0] = newpin(ptype='box', mat=[0], name='moderator') PIN[1] = newpin(ptype='pin', mat=[0, 1], fradius=0.54, name='UO2') PIN[2] = newpin(ptype='pin', mat=[0, 2], fradius=0.54, name='MOX4.3') PIN[3] = newpin(ptype='pin', mat=[0, 3], fradius=0.54, name='MOX7.0') PIN[4] = newpin(ptype='pin', mat=[0, 4], fradius=0.54, name='MOX8.7') PIN[5] = newpin(ptype='pin', mat=[0, 5], fradius=0.54, name='fisschamber') PIN[6] = newpin(ptype='pin', mat=[0, 6], fradius=0.54, name='guidetube') forest.set_geometry(dim=1, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- from get_c5g7_materials import get_c5g7_materials MIX = get_c5g7_materials() forest.set_materials(ngroups=7, mix=MIX) # Running forest ---------------------------------------------------------- forest.run() forest.clean() return PROB_NAME
LATT[2] = dict([ ('type', 'grid'), ('name', 'assembly'), ('nnodes', [1, 9]), ('components', [[0], [0], [0], [0], [0], [0], [0], [0], [0]]), ('length', [[0.7], [1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4, 1.4]]), ]) LATT[3] = dict([ ('type', 'grid'), ('name', 'assembly'), ('nnodes', [1, 1]), ('components', [0]), ('length', [[0.7], [0.7]]), ]) PIN = dict() PIN[0] = newpin(ptype='box', mat=[0], name='Pin') PIN[1] = newpin(ptype='pinbox', mat=[0, 1], fradius=0.575, name='Pin') forest.set_geometry(dim=2, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- MIX = dict() MIX[0] = dict([ ('name', 'moderator'), ('SigmaT', [0.3333694980, 0.5887110656, 1.6512246291]), ('Chi', [0.9996892490, 0.0003391680, 0.0000000000]), ('SigmaS', [[0.2432946408, 0.0000000000, 0.0000000000], [0.0898364840, 0.4413753398, 0.0000203109], [0.0000387911, 0.1465683257, 1.6300848232]]), ('NuSigF', [0.0000000000, 0.0000000000, 0.0000000000]), ]) MIX[1] = dict([ ('name', 'fuel'),
# Geometry ---------------------------------------------------------------- CORE = dict([ ('composed', True), ('name', 'Pin3d'), ('nnodes', [1, 1, 1]), ('length', [[1.26], [1.26], [1.26]]), ('components', [0]), ('boundary', [0, 0, 0, 0, 0, 0]), #('boundary', [2, 2, 2, 2, 2, 2]), ]) LATT = dict() LATT[0] = dict([ ('type', 'pin_map'), ('name', 'assembly'), ('nnodes', [1, 1, 1]), ('components', [[0]]), ('water_gap', [0., 0., 0., 0.]), ('length', [[1.26], [1.26], [1.26]]), ]) PIN = dict() PIN[0] = newpin(ptype='pin', mat=[0, 2], fradius=0.54, name='MOX4.3') #PIN[0] = newpin(ptype='pinnew', mat=[,2], fradius=0.54, name='Pin'); forest.set_geometry(dim=3, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- from get_c5g7_materials import get_c5g7_materials MIX = get_c5g7_materials() forest.set_materials(ngroups=7, mix=MIX) # Running forest ---------------------------------------------------------- forest.run() #forest.clean()
forest.set_settings(method=METHOD, fe_settings=FE_SETTINGS) # Geometry ---------------------------------------------------------------- CORE = dict([ ('composed', True), ('name', '2x2Pins2d'), ('nnodes', [1, 1]), ('length', [[2.52], [2.52]]), ('components', [0]), ('boundary', [2, 2, 2, 2]), ]) LATT = dict() LATT[0] = dict([ ('type', 'pin_map'), ('name', 'assembly'), ('nnodes', [2, 2]), ('components', [[1, 1], [1, 0]]), ('water_gap', [0., 0., 0., 0.]), ('length', [[1.26] * 2 for i in range(2)]), ]) PIN = dict() PIN[0] = newpin(ptype='box', mat=[0], name='moderator') PIN[1] = newpin(ptype='pin', mat=[0, 2], fradius=0.54, name='MOX4.3') forest.set_geometry(dim=2, core=CORE, lattices=LATT, pins=PIN) # Materials --------------------------------------------------------------- from get_c5g7_materials import get_c5g7_materials MIX = get_c5g7_materials() forest.set_materials(ngroups=7, mix=MIX) # Running forest ---------------------------------------------------------- forest.run() forest.clean()