Exemple #1
0
    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()
Exemple #2
0
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
    probAss1.set_geometry(dim=1, core=COREASS1, lattices=LATT, pins=PIN)
    OUTPUT = dict([("homogenize", True)])
    probAss1.set_settings(method=METHOD,
                          fe_settings=FE_SETTINGS,
                          output=OUTPUT)
    # -------------------------------------------------------------------------
    probAss2 = RunForest(prob_name=PROB_ASS2, description=DESCRIPTION)
    probAss2.set_materials(ngroups=7, mix=MIX)
    probAss2.set_geometry(dim=1, core=COREASS2, lattices=LATT, pins=PIN)
    probAss2.set_settings(method=METHOD,
                          fe_settings=FE_SETTINGS,
                          output=OUTPUT)
    # Running forest ----------------------------------------------------------
    # -------------------------------------------------------------------------
    probAss1.run()
    probAss1.clean()
    # -------------------------------------------------------------------------
    probAss2.run()
    probAss2.clean()

    # -------------------------------------------------------------------------
    # Assembly homogenized
    # -------------------------------------------------------------------------
    PROB_HOMASS = '1dg7_c5g7_heter_HOMASS'
    DESCRIPTION = ("Homogenized version of the c5g7.")
    probHomAss = RunForest(prob_name=PROB_HOMASS, description=DESCRIPTION)
    # Geometry ----------------------------------------------------------------
    COREHOM = dict([
        ('composed', True),
        ('name', 'Core'),
        ('nnodes', [3]),
Exemple #4
0
    MIX[0] = dict([('name', 'water'), ('SigmaT', [0.1889751875, 1.4632718759]),
                   ('Chi', [1.0000000000, 0.0000000000]),
                   ('SigmaS', [[0.1506751875, 0.0000000000],
                               [0.0380000000, 1.4535718759]]),
                   ('NuSigF', [0.0000000000, 0.0000000000])])
    MIX[1] = dict([('name', 'FuelI'), ('SigmaT', [0.2262955419, 1.0119409026]),
                   ('Chi', [1.0000000000, 0.0000000000]),
                   ('SigmaS', [[0.2005955419, 0.0000000000],
                               [0.0161000000, 0.9355409026]]),
                   ('NuSigF', [0.0067000000, 0.1241000000])])
    MIX[2] = dict([('name', 'FuelII'), ('SigmaT', [0.2251643699,
                                                   0.9914733293]),
                   ('Chi', [1.0000000000, 0.0000000000]),
                   ('SigmaS', [[0.1994643699, 0.0000000000],
                               [0.0156000000, 0.9013733293]]),
                   ('NuSigF', [0.0078000000, 0.1542000000])])
    MIX[3] = dict([('name', 'FuelIIg'),
                   ('SigmaT', [0.2172685004, 1.0605578534]),
                   ('Chi', [1.0000000000, 0.0000000000]),
                   ('SigmaS', [[0.1901685004, 0.0000000000],
                               [0.0136000000, 0.5732578534]]),
                   ('NuSigF', [0.0056000000, 0.0187000000])])
    forest_hom.set_materials(ngroups=2, mix=MIX)
    forest_het.set_materials(ngroups=2, mix=MIX)
    # Running forest ----------------------------------------------------------
    forest_hom.run()
    forest_hom.clean()

    forest_het.run()
    forest_het.clean()