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.
- yamlPreamble = '\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 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 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 bad uranium isotopic mass fractions:\n input format: mass fractions\n U238: 0.992742\n U235: 0.007204\n U234: 0.000054\n density: 0\n\n negative uranium isotopic mass fractions:\n input format: mass fractions\n U238: 0.992742\n U235: 0.007204\n U234: 0.000054\n density: -1\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\n'
- yamlGoodBlocks = '\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 fuel with no modifications: &block_6 # after a custom density has been set\n fuel:\n <<: *basic_fuel\n\n overspecified fuel: &block_7\n fuel:\n <<: *basic_fuel\n material: UraniumOxide\n isotopics: uranium isotopic number densities\n\n density set via number density: &block_8\n fuel:\n <<: *basic_fuel\n isotopics: uranium isotopic number densities\n\n steel: &block_9\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\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, *block_7, *block_8, *block_9]\n height: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]\n axial mesh points: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n xs types: [A, A, A, A, A, A, A, A, A, A]\n material modifications:\n TD_frac: ["", "", "", "", "", "", "", 0.1, "", ""]\n\n'
- yamlBadBlocks = '\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 custom void: &block_1\n fuel:\n <<: *basic_fuel\n material: Void\n isotopics: uranium isotopic number densities\n\n steel: &block_2\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 no density uo2: &block_3\n fuel:\n <<: *basic_fuel\n material: UraniumOxide\n isotopics: uranium isotopic number densities\n\n no density uo2: &block_4\n fuel:\n <<: *basic_fuel\n material: UraniumOxide\n isotopics: bad uranium isotopic mass fractions\n \n no density uo2: &block_5\n fuel:\n <<: *basic_fuel\n material: UraniumOxide\n isotopics: bad uranium isotopic mass fractions\n\n\nassemblies:\n fuel a: &assembly_a\n specifier: IC\n blocks: [*block_0, *block_1, *block_2]\n height: [10, 10, 10]\n axial mesh points: [1, 1, 1]\n xs types: [A, A, A]\n material modifications:\n TD_frac: ["", "", ""]\n \n fuel b: &assembly_b\n specifier: IC\n blocks: [*block_0, *block_3, *block_2]\n height: [10, 10, 10]\n axial mesh points: [1, 1, 1]\n xs types: [A, A, A]\n material modifications:\n TD_frac: ["", "0.0", ""] # set density to 0 to cause error in custom density\n\n fuel c: &assembly_c\n specifier: IC\n blocks: [*block_0, *block_4, *block_2]\n height: [10, 10, 10]\n axial mesh points: [1, 1, 1]\n xs types: [A, A, A]\n\n fuel d: &assembly_d\n specifier: IC\n blocks: [*block_0, *block_5, *block_2]\n height: [10, 10, 10]\n axial mesh points: [1, 1, 1]\n xs types: [A, A, A]\n\n'
- 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 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 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 bad uranium isotopic mass fractions:\n input format: mass fractions\n U238: 0.992742\n U235: 0.007204\n U234: 0.000054\n density: 0\n\n negative uranium isotopic mass fractions:\n input format: mass fractions\n U238: 0.992742\n U235: 0.007204\n U234: 0.000054\n density: -1\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\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 fuel with no modifications: &block_6 # after a custom density has been set\n fuel:\n <<: *basic_fuel\n\n overspecified fuel: &block_7\n fuel:\n <<: *basic_fuel\n material: UraniumOxide\n isotopics: uranium isotopic number densities\n\n density set via number density: &block_8\n fuel:\n <<: *basic_fuel\n isotopics: uranium isotopic number densities\n\n steel: &block_9\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\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, *block_7, *block_8, *block_9]\n height: [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]\n axial mesh points: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n xs types: [A, A, A, A, A, A, A, A, A, A]\n material modifications:\n TD_frac: ["", "", "", "", "", "", "", 0.1, "", ""]\n\n'
- yamlStringWithError
meta hide-value:
- test_massFractionsAreApplied()[source]
Ensure that the custom isotopics can be specified via mass fractions.
- test_densitiesAppliedToNonCustomMaterials()[source]
Ensure that a density can be set in custom isotopics for components using library materials.
- test_customDensityLogsAndErrors()[source]
Test that the right warning messages and errors are emitted when applying custom densities.
- test_numberFractions()[source]
Ensure that the custom isotopics can be specified via number fractions.
- 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.
- 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}\n ZN: {burn: true, xs: true}\n O: {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\n dummy:\n shape: Circle\n material: ZnO\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 '