armi.reactor.blueprints.tests.test_customIsotopics module

Unit test custom isotopics.

class armi.reactor.blueprints.tests.test_customIsotopics.TestCustomIsotopics(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

yamlString = '\nnuclide flags:\n    U238: {burn: true, xs: true}\n    U235: {burn: true, xs: true}\n    U234: {burn: true, xs: true}\n    ZR: {burn: false, xs: true}\n    AL: {burn: false, xs: true}\n    FE: {burn: false, xs: true}\n    C: {burn: false, xs: true}\n    DUMP2: {burn: true, xs: true}\n    DUMP1: {burn: true, xs: true}\n    LFP35: {burn: true, xs: true}\n    PU239: {burn: true, xs: true}\n    NP237: {burn: true, xs: true}\n    LFP38: {burn: true, xs: true}\n    LFP39: {burn: true, xs: true}\n    PU240: {burn: true, xs: true}\n    PU236: {burn: true, xs: true}\n    PU238: {burn: true, xs: true}\n    U236: {burn: true, xs: true}\n    LFP40: {burn: true, xs: true}\n    PU241: {burn: true, xs: true}\n    AM241: {burn: true, xs: true}\n    LFP41: {burn: true, xs: true}\n    PU242: {burn: true, xs: true}\n    AM243: {burn: true, xs: true}\n    CM244: {burn: true, xs: true}\n    CM242: {burn: true, xs: true}\n    AM242: {burn: true, xs: true}\n    CM245: {burn: true, xs: true}\n    NP238: {burn: true, xs: true}\n    CM243: {burn: true, xs: true}\n    CM246: {burn: true, xs: true}\n    CM247: {burn: true, xs: true}\n    NI: {burn: true, xs: true}\n    W: {burn: true, xs: true, expandTo: ["W182", "W183", "W184", "W186"]}\n    MN: {burn: true, xs: true}\n    CR: {burn: true, xs: true}\n    V: {burn: true, xs: true}\n    SI: {burn: true, xs: true}\n    MO: {burn: true, xs: true}\n\ncustom isotopics:\n    uranium isotopic mass fractions:\n        input format: mass fractions\n        U238: 0.992742\n        U235: 0.007204\n        U234: 0.000054\n        density: 19.1\n\n    # >>> from armi.nucDirectory import elements, nuclideBases\n    # >>> import numpy\n    # >>> u = elements.bySymbol[\'U\']\n    # >>> w_i = numpy.array([n.abundance for n in u.getNaturalIsotopics()])\n    # >>> Mi = numpy.array([n.weight for n in u.getNaturalIsotopics()])\n    # >>> Ni = w_i * 19.1 * 6.0221e23 / Mi\n    # >>> N_norm = Ni / sum(Ni)\n    # >>> N_norm.round(6)\n    # array([  5.50000000e-05,   7.29500000e-03,   9.92650000e-01])\n    uranium isotopic number fractions:\n        input format: number fractions\n        U238: 0.992650\n        U235: 0.007295\n        U234: 0.000055\n        density: 19.1\n\n    # >>> from armi.nucDirectory import elements, nuclideBases\n    # >>> import numpy\n    # >>> u = elements.bySymbol[\'U\']\n    # >>> Mi = numpy.array([n.weight for n in u.getNaturalIsotopics()])\n    # >>> w_i = numpy.array([n.abundance for n in u.getNaturalIsotopics()])\n    # >>> Ni = 19.1 * w_i * 6.0221e23 / Mi\n    # array([  2.65398007e+18,   3.52549755e+20,   4.79692055e+22])\n    # >>> for n, ni in zip(u.getNaturalIsotopics(), Ni):\n    # >>>     print \'        {}: {:.7e}\'.format(n.name, ni) # requires 7 decimal places!\n    uranium isotopic number densities: &u_isotopics\n        input format: number densities\n        U234: 2.6539102e-06\n        U235: 3.5254048e-04\n        U238: 4.7967943e-02\n\n    linked uranium number densities: *u_isotopics\n\n    steel:\n        input format: mass fractions\n        FE: 0.7\n        C: 0.3\n        density: 7.0\n\nblocks:\n    uzr fuel: &block_0\n        fuel: &basic_fuel\n            shape: Hexagon\n            material: UZr\n            Tinput: 25.0\n            Thot: 600.0\n            ip: 0.0\n            mult: 1.0\n            op: 10.0\n\n        clad:\n            shape: Circle\n            material: HT9\n            Tinput: 25.0\n            Thot: 600.0\n            id: 0.0\n            mult: 1.0\n            od: 10.0\n\n    uranium fuel from isotopic mass fractions : &block_1\n        fuel:\n            <<: *basic_fuel\n            material: Custom\n            isotopics: uranium isotopic mass fractions\n\n    wrong material: &block_2\n        fuel:\n            <<: *basic_fuel\n            isotopics: uranium isotopic mass fractions\n\n    uranium fuel from number fractions: &block_3\n        fuel:\n            <<: *basic_fuel\n            material: Custom\n            isotopics: uranium isotopic number fractions\n\n    uranium fuel from number densities: &block_4\n        fuel:\n            <<: *basic_fuel\n            material: Custom\n            isotopics: uranium isotopic number densities\n\n    uranium fuel from nd link: &block_5\n        fuel:\n            <<: *basic_fuel\n            material: Custom\n            isotopics: linked uranium number densities\n\n    steel: &block_6\n        clad:\n            shape: Hexagon\n            material: Custom\n            isotopics: steel\n            Tinput: 25.0\n            Thot: 600.0\n            ip: 0.0\n            mult: 169.0\n            op: 0.86602\n\n\n\nassemblies:\n    fuel a: &assembly_a\n        specifier: IC\n        blocks: [*block_0, *block_1, *block_2, *block_3, *block_4, *block_5, *block_6]\n        height: [10, 10, 10, 10, 10, 10,10]\n        axial mesh points: [1, 1, 1, 1, 1, 1,1]\n        xs types: [A, A, A, A, A, A,A]\n'
test_unmodified()[source]

Ensure that unmodified components have the correct isotopics.

test_massFractionsAreApplied()[source]
test_numberFractions()[source]
test_numberDensities()[source]
test_numberDensitiesAnchor()[source]
test_expandedNatural()[source]
test_unrepresentedAreOnlyNatural()[source]

Make sure nuclides specified as In-Problem but not actually in any material are only natural isotopics.

class armi.reactor.blueprints.tests.test_customIsotopics.TestCustomIsotopics_ErrorConditions(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_densityMustBePositive()[source]
test_nonConformantElementName()[source]
test_numberDensitiesCannotSpecifyDensity()[source]
class armi.reactor.blueprints.tests.test_customIsotopics.TestNuclideFlagsExpansion(methodName='runTest')[source]

Bases: TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

yamlString = '\nnuclide flags:\n    U238: {burn: false, xs: true}\n    U235: {burn: false, xs: true}\n    ZR: {burn: false, xs: true}\n    AL: {burn: false, xs: true}\n    FE: {burn: false, xs: true, expandTo: ["FE54"]}\n    C: {burn: false, xs: true}\n    NI: {burn: true, xs: true}\n    MN: {burn: true, xs: true}\n    CR: {burn: true, xs: true}\n    V: {burn: true, xs: true}\n    SI: {burn: true, xs: true}\n    MO: {burn: true, xs: true}\n    W: {burn: true, xs: true}\nblocks:\n    uzr fuel: &block_0\n        fuel:\n            shape: Hexagon\n            material: UZr\n            Tinput: 25.0\n            Thot: 600.0\n            mult: 1.0\n            op: 10.0\n        clad:\n            shape: Circle\n            material: HT9\n            Tinput: 25.0\n            Thot: 600.0\n            id: 0.0\n            mult: 1.0\n            od: 10.0\nassemblies:\n    fuel a:\n        specifier: IC\n        blocks: [*block_0]\n        height: [10]\n        axial mesh points: [1]\n        xs types: [A]\n    '
test_expandedNatural()[source]