예제 #1
0
def depletionModel():
    # Roughly one-fourth volume of fuel in PWR
    VOLUME = math.pi * 0.49**2 * 360 * 264 / 4
    fuel1 = hydep.BurnableMaterial("partially burned PWR fuel",
                                   adens=2.6858e-2,
                                   temperature=900,
                                   volume=VOLUME)

    ISO_THRESH = 1e-10
    CONC_FILE = pathlib.Path(__file__).parent / "partial_burned.dat"
    with CONC_FILE.open("r") as stream:
        for line in stream:
            za, adens = line.split()
            adens = float(adens)
            if adens < ISO_THRESH:
                continue
            z, a = divmod(int(za), 1000)
            fuel1[(z, a, 0)] = adens

    water = hydep.Material("water", mdens=0.7, H1=2, O16=1)
    clad = hydep.Material("clad", mdens=6.6, Zr96=1)

    fuel2 = fuel1.copy()
    fuel3 = fuel1.copy()
    fuel4 = hydep.BurnableMaterial(
        "other fuel",
        adens=fuel1.adens,
        temperature=fuel1.temperature,
        volume=VOLUME,
        O16=4.643355421e-4,
        U234=4.742255584e-9,
        U235=7.403701961e-4,
        U236=1.090905903e-5,
        U238=2.550365361e-2,
    )

    pin1 = hydep.Pin([0.39, 0.42], [fuel1, clad], outer=water)
    pin2 = hydep.Pin([0.39, 0.42], [fuel2, clad], outer=water)
    pin3 = hydep.Pin([0.39, 0.42], [fuel3, clad], outer=water)
    pin4 = hydep.Pin([0.39, 0.42], [fuel4, clad], outer=water)

    PITCH = 1.2

    cart = hydep.CartesianLattice(nx=2,
                                  ny=2,
                                  pitch=1.2,
                                  array=[[pin1, pin2], [pin3, pin4]],
                                  outer=water)

    assembly = hydep.LatticeStack(1, [0, 360], [cart])
    assembly.bounds = ((-PITCH, PITCH), (-PITCH, PITCH), (0, 360))

    # TODO Retrieve boundaries from model if given
    model = hydep.Model(assembly)
    model.bounds = assembly.bounds

    yield model
예제 #2
0
def pinFromBundle(materials, bundle):
    return hydep.Pin(
        bundle.radii[:-1],
        [materials[k] for k in bundle.materials[:-1]],
        materials[bundle.materials[-1]],
        name=bundle.name,
    )
예제 #3
0
def beavrsInstrumentTube(beavrsMaterials):
    """Return an instrumentation tube"""
    return hydep.Pin(
        [0.43688, 0.48387, 0.56134, 0.60198],
        [beavrsMaterials[m] for m in ["air", "zirc4", "water", "zirc4"]],
        outer=beavrsMaterials["water"],
        name="Bare instrumentation tube")
예제 #4
0
def toy2x2lattice():
    """A simple 2x2 model with 4 UO2 fuel pins"""
    fuel = hydep.BurnableMaterial("fuel", mdens=10.4, U235=8e-4, U238=2e-2, O16=4e-4)
    clad = hydep.Material("clad", mdens=6, Zr91=4e-2)
    water = hydep.Material("water", mdens=1, H1=5e-2, O16=2e-2)

    pin = hydep.Pin([0.42, 0.45], [fuel, clad], outer=water)

    return hydep.CartesianLattice(2, 2, 1.23, [[pin, pin], [pin, pin]])
예제 #5
0
def beavrsFuelPin(beavrsMaterials):
    """Return a fuel pin using 3.2 wt% enriched fuel

    No radial divisions are performed in the fuel region

    """
    return hydep.Pin(
        [0.39218, 0.40005, 0.45720],
        [beavrsMaterials[m] for m in ["fuel32", "helium", "zirc4"]],
        outer=beavrsMaterials["water"])
예제 #6
0
def beavrsControlPin(beavrsMaterials):
    """Return a control pin using boroscillicate glass poison

    No radial divisions are performed in the boroscillicate glass

    """
    return hydep.Pin(
        [0.2140, 0.2305, 0.2413, 0.4267, 0.4369, 0.4839, 0.5613, 0.6020], [
            beavrsMaterials[m] for m in [
                "air", "ss304", "helium", "bglass", "helium", "ss304", "water",
                "zirc4"
            ]
        ],
        outer=beavrsMaterials["water"])
예제 #7
0
def pincell():
    fuel = hydep.BurnableMaterial("fuel", mdens=10.4, volume=math.pi * 0.39 * 0.39)
    fuel["O16"] = 4.6391716e-2
    fuel["U234"] = 9.3422610e-6
    fuel["U235"] = 1.0452130e-3
    fuel["U236"] = 4.7875776e-6
    fuel["U238"] = 2.2145310e-2

    water = hydep.Material("water", mdens=1, temperature=600)
    water["H1"] = 5.01543e-2
    water["O16"] = 2.50771e-2
    water.addSAlphaBeta("HinH2O")

    clad = hydep.Material("clad", mdens=6.6, temperature=600)
    clad["Fe56"] = 1.24985e-2
    clad["H1"] = 3.34334e-2
    clad["O16"] = 1.66170e-2

    pin = hydep.Pin([0.39, 0.402], [fuel, clad], outer=water)

    HPITCH = 0.63
    model = hydep.Model(pin)
    model.bounds = pin.bounds = ((-HPITCH, HPITCH), (-HPITCH, HPITCH), None)
    return model
예제 #8
0
def simpleSfvProblem(endfChain):
    PIN_RAD = 0.39
    PIN_HEIGHT = 10
    PITCH = 1.2

    volume = math.pi * PIN_RAD**2 * PIN_HEIGHT

    fuel1 = hydep.BurnableMaterial("partial burned PWR fuel",
                                   adens=2.6856e-2,
                                   temperature=900,
                                   volume=volume)

    fuel1[80160] = 4.643e-04
    fuel1[922340] = 4.742e-9
    fuel1[922350] = 7.404e-4
    fuel1[922360] = 1.091e-5
    fuel1[922380] = 2.550e-5
    fuel1[942390] = 2.569e-05
    fuel1[942400] = 1.099e-06
    fuel1[942410] = 1.225e-07
    fuel1[942420] = 1.866e-09

    fuel2 = fuel1.copy()
    fuel3 = fuel1.copy()

    fuel4 = hydep.BurnableMaterial(
        "other fuel",
        adens=fuel1.adens,
        temperature=fuel1.temperature,
        volume=volume,
        O16=4.6433e-4,
        U234=4.742e-9,
        U235=7.403e-4,
        U236=1.091e-5,
        U238=2.55e-2,
    )

    water = hydep.Material("water", mdens=0.7, H1=2, O16=1)
    clad = hydep.Material("clad", mdens=6.6, Zr96=1)

    pin1 = hydep.Pin([PIN_RAD, 0.42], [fuel1, clad], outer=water)
    pin2 = hydep.Pin([PIN_RAD, 0.42], [fuel2, clad], outer=water)
    pin3 = hydep.Pin([PIN_RAD, 0.42], [fuel3, clad], outer=water)
    pin4 = hydep.Pin([PIN_RAD, 0.42], [fuel4, clad], outer=water)

    cart = hydep.CartesianLattice(nx=2,
                                  ny=2,
                                  pitch=1.2,
                                  array=[[pin1, pin2], [pin3, pin4]],
                                  outer=water)

    assembly = hydep.LatticeStack(2, [0, PIN_HEIGHT, 2 * PIN_HEIGHT],
                                  [cart, cart])
    assembly.bounds = ((-PITCH, PITCH), (-PITCH, PITCH), (0, 2 * PIN_HEIGHT))

    model = hydep.Model(assembly)
    model.bounds = assembly.bounds
    model.root.differentiateBurnableMaterials()

    problem = Mock()
    problem.model = model
    problem.dep.burnable = tuple(model.root.findBurnableMaterials())
    problem.dep.chain = endfChain

    settings = hydep.settings.Settings(fittingOrder=1, numFittingPoints=2)
    settings.sfv.densityCutoff = 0.0
    settings.sfv.modes = len(problem.dep.burnable) - 2
    problem.settings = settings

    yield problem
예제 #9
0
def beavrsGuideTube(beavrsMaterials):
    """Return a guide tube"""
    return hydep.Pin([0.50419, 0.5641],
                     [beavrsMaterials[m] for m in ["water", "zirc4"]],
                     outer=beavrsMaterials["water"])