Пример #1
0
def defineSettings():
    """Define settings for the DRAGON plugin."""
    settings = [
        setting.Option(CONF_OPT_DRAGON, neutronicsSettings.CONF_XS_KERNEL),
        setting.Setting(
            CONF_DRAGON_PATH,
            default="dragon",
            label="DRAGON exe path",  # label appears on GUI buttons
            description="Path to the DRAGON executable",
        ),
        setting.Setting(
            CONF_DRAGON_DATA_PATH,
            default="draglibendfb7r1SHEM361",
            label="DRAGON nuclear data path",
            description="Path to the DRAGON nuclear data file to use.",
        ),
        setting.Setting(
            CONF_DRAGON_TEMPLATE_PATH,
            default=os.path.join(THIS_DIR, "resources",
                                 "DRAGON_Template_0D.txt"),
            label="DRAGON template path",
            description="Path to the DRAGON template to be rendered",
        ),
    ]
    return settings
Пример #2
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_FP_MODEL,
            default="infinitelyDilute",
            label="Fission Product Model",
            description="The fission product model to use in this ARMI run",
            options=[
                "noFissionProducts",
                "infinitelyDilute",
                "2ndOrder",
                "2ndOrderWithTransmutation",
                "MO99",
            ],
        ),
        setting.Setting(
            CONF_MAKE_ALL_BLOCK_LFPS_INDEPENDENT,
            default=False,
            label="Use Independent LFPs",
            description=
            "Flag to make all blocks have independent lumped fission products",
        ),
        setting.Setting(
            CONF_LFP_COMPOSITION_FILE_PATH,
            default=fissionProductModel.REFERENCE_LUMPED_FISSION_PRODUCT_FILE,
            label="LFP Definition File",
            description=
            ("Path to the file that contains lumped fission product composition "
             "definitions (e.g. equilibrium yields)"),
        ),
    ]
    return settings
Пример #3
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_DB,
            default=True,
            label="Activate Database",
            description=
            "Write the state information to a database at every timestep",
        ),
        setting.Setting(CONF_DEBUG_DB, default=False, label="Debug Database"),
        setting.Setting(
            CONF_RELOAD_DB_NAME,
            default="",
            label="Database Input File",
            description=
            "Name of the database file to load initial conditions from",
            oldNames=[("snapShotDB", None)],
        ),
        setting.Setting(
            CONF_LOAD_FROM_DB_EVERY_NODE,
            default=False,
            label="Load Database at EveryNode",
            description="Every node loaded from reference database",
        ),
        setting.Setting(
            CONF_DB_STORAGE_AFTER_CYCLE,
            default=0,
            label="Database Storage After Cycle",
            description="Only store cycles after this cycle in the database (to "
            "save storage space)",
            schema=vol.All(vol.Coerce(int), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_ZERO_OUT_NUCLIDES_NOT_IN_DB,
            default=True,
            label="Load Nuclides Not in Database",
            description=
            "If a nuclide was added to the problem after a previous case"
            " was run, deactivate this to let it survive in a restart run",
        ),
        setting.Setting(
            CONF_SYNC_AFTER_WRITE,
            default=False,
            label="Sync Database After Write",
            description=
            ("Copy the output database from the fast scratch space to the shared "
             "network drive after each write."),
        ),
        setting.Setting(
            CONF_FORCE_DB_PARAMS,
            default=[],
            label="Force Database Write of Parameters",
            description=
            ("A list of parameter names that should always be written to the "
             "database, regardless of their Parameter Definition's typical saveToDB "
             "status. This is only honored if the DatabaseInterface is used."),
        ),
    ]
    return settings
Пример #4
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_BETA_COMPONENTS,
            default=[],
            label="Beta Components",
            description="Manually set individual precursor group delayed neutron fractions",
        ),
        setting.Setting(
            CONF_DECAY_CONSTANTS,
            default=[],
            label="Decay Constants",
            description="Manually set individual precursor group delayed neutron decay constants",
        ),
    ]
    return settings
Пример #5
0
class SettingsRenameTests(unittest.TestCase):
    testSettings = [
        setting.Setting(
            "testSetting1",
            default=None,
            oldNames=[("oSetting1", None),
                      ("osetting1", datetime.date.today())],
        ),
        setting.Setting("testSetting2",
                        default=None,
                        oldNames=[("oSetting2", None)]),
        setting.Setting("testSetting3", default=None),
    ]

    def test_rename(self):
        renamer = settingsIO.SettingRenamer(
            {setting.name: setting
             for setting in self.testSettings})

        self.assertEqual(renamer.renameSetting("testSetting1"),
                         ("testSetting1", False))
        self.assertEqual(renamer.renameSetting("oSetting1"),
                         ("testSetting1", True))
        # this one is expired
        self.assertEqual(renamer.renameSetting("osetting1"),
                         ("osetting1", False))
        self.assertEqual(renamer.renameSetting("oSetting2"),
                         ("testSetting2", True))
        self.assertEqual(renamer.renameSetting("testSetting2"),
                         ("testSetting2", False))
        self.assertEqual(renamer.renameSetting("testSetting3"),
                         ("testSetting3", False))

        # No rename; let it through
        self.assertEqual(renamer.renameSetting("boo!"), ("boo!", False))

    def test_collidingRenames(self):
        settings = {
            setting.name: setting
            for setting in self.testSettings + [
                setting.Setting("someOtherSetting",
                                default=None,
                                oldNames=[("oSetting1", None)])
            ]
        }
        with self.assertRaises(SettingException):
            _ = settingsIO.SettingRenamer(settings)
Пример #6
0
 def test_listCoercion(self):
     """Make sure list setting values get coerced right."""
     listSetting = setting.Setting(
         "aList", default=[0.2, 5], label="Dummy list", description="whatever"
     )
     listSetting.value = [1, 2, 3]
     self.assertEqual(listSetting.value, [1.0, 2.0, 3.0])
     self.assertTrue(isinstance(listSetting.value[0], float))
Пример #7
0
 def test_typeDetection(self):
     """Ensure some of the type inference operations work."""
     listSetting = setting.Setting(
         "aList",
         default=[],
         label="label",
         description="desc",
         schema=vol.Schema([float]),
     )
     self.assertEqual(listSetting.containedType, float)
     listSetting = setting.Setting(
         "aList",
         default=[],
         label="label",
         description="desc",
         schema=vol.Schema([vol.Coerce(float)]),
     )
     self.assertEqual(listSetting.containedType, float)
Пример #8
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_GEN_REPORTS,
            default=True,
            label="Enable Reports",
            description=
            "Employ the use of the reporting utility for ARMI, generating "
            "HTML and ASCII summaries of the run",
            oldNames=[("summarizer", None)],
        ),
        setting.Setting(
            CONF_ASSEM_POW_SUMMARY,
            default=False,
            label="Summarize Assembly Power",
            description=
            "Print out a summary of how much power is in each assembly "
            "type at every timenode.",
        ),
        setting.Setting(
            CONF_ZONE_FLOW_SUMMARY,
            default=True,
            label="Zone Flow Summary",
            description=
            "print flow and power edits for peak and average assemblies",
        ),
        setting.Setting(
            CONF_SUMMARIZE_ASSEM_DESIGN,
            default=True,
            label="Summarize Assembly Design",
            description=
            "Printout a summary of the assembly design details at BOL",
        ),
        setting.Setting(
            CONF_TIMELINE_INCLUSION_CUTOFF,
            default=0.03,
            label="Timer Cutoff",
            description=
            "Timers who are not active for this percent of the run will "
            "not be presented in the timeline graphic.",
        ),
    ]
    return settings
Пример #9
0
    def test_listsMutable(self):
        listSetting = setting.Setting(
            "aList", default=[], label="Dummy list", description="whatever"
        )

        listSetting.value = [1, 2, 3]
        self.assertEqual([1, 2, 3], listSetting.value)

        listSetting.value[-1] = 4
        self.assertEqual([1, 2, 4], listSetting.value)
Пример #10
0
def defineSettings():
    """Define generic thermal/hydraulic settings."""
    settings = [
        setting.Setting(
            CONF_DO_TH,
            default=False,
            label="Run Thermal Hydraulics",
            description=
            (f"Activate thermal hydraulics calculations using the physics module defined in "
             f"`{CONF_TH_KERNEL}`"),
        ),
        setting.Setting(
            CONF_TH_KERNEL,
            default=False,
            label="Thermal Hydraulics Kernel",
            description="Name of primary T/H solver in this run",
        ),
    ]
    return settings
Пример #11
0
 def defineSettings():
     return [
         setting.Setting(
             "extendableOption",
             default="DEFAULT",
             label="Neutronics Kernel",
             description="The neutronics / depletion solver for global flux solve.",
             enforcedOptions=True,
             options=["DEFAULT", "OTHER"],
         )
     ]
Пример #12
0
 def test_collidingRenames(self):
     settings = {
         setting.name: setting
         for setting in self.testSettings + [
             setting.Setting("someOtherSetting",
                             default=None,
                             oldNames=[("oSetting1", None)])
         ]
     }
     with self.assertRaises(SettingException):
         _ = settingsIO.SettingRenamer(settings)
Пример #13
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_DB,
            default=True,
            label="Activate Database",
            description=
            "Write the state information to a database at every timestep.",
        ),
        setting.Setting(CONF_DEBUG_DB, default=False, label="Debug DB"),
        setting.Setting(
            CONF_RELOAD_DB_NAME,
            default="",
            label="Database Input File",
            description=
            "Name of the database file to load initial conditions from",
            oldNames=[("snapShotDB", None)],
        ),
        setting.Setting(
            CONF_LOAD_FROM_DB_EVERY_NODE,
            default=False,
            label="Load Database at EveryNode",
            description="Every node loaded from reference database",
        ),
        setting.Setting(
            CONF_DB_STORAGE_AFTER_CYCLE,
            default=0,
            label="DB Storage After Cycle",
            description=
            "Only store cycles after this cycle in the DB (to save storage space)",
        ),
        setting.Setting(
            CONF_ZERO_OUT_NUCLIDES_NOT_IN_DB,
            default=True,
            label="Load Nuclides not in Database",
            description=
            "If a nuclide was added to the problem after a previous case was run, deactivate this to let it survive in a restart run",
        ),
        setting.Setting(
            CONF_SYNC_AFTER_WRITE,
            default=False,
            label="Sync DB after write",
            description=
            ("Copy the output DB from the fast scratch space to the shared network drive "
             "after each write."),
        ),
    ]
    return settings
Пример #14
0
    def test_copySetting(self):
        """Ensure that when we copy a Setting() object, the result is sound.
        NOTE: In particuar, self.schema and self._customSchema on a Setting object are
              removed by Setting.__getstate__, and that has been a problem in the past.
        """
        # get a baseline: show how the Setting object looks to start
        s1 = setting.Setting("testCopy", 765)
        self.assertEquals(s1.name, "testCopy")
        self.assertEquals(s1._value, 765)
        self.assertTrue(hasattr(s1, "schema"))
        self.assertTrue(hasattr(s1, "_customSchema"))

        # show that copy(Setting) is working correctly
        s2 = copy.copy(s1)
        self.assertEquals(s2._value, 765)
        self.assertEquals(s2.name, "testCopy")
        self.assertTrue(hasattr(s2, "schema"))
        self.assertTrue(hasattr(s2, "_customSchema"))
Пример #15
0
    def test_copySettingNotDefault(self):
        """Ensure that when we copy a Setting() object, the result is sound
        when the Setting value is set to a non-default value.
        """
        # get a baseline: show how the Setting object looks to start
        s1 = setting.Setting("testCopy", 765)
        s1.value = 999
        self.assertEqual(s1.name, "testCopy")
        self.assertEqual(s1._value, 999)
        self.assertTrue(hasattr(s1, "schema"))
        self.assertTrue(hasattr(s1, "_customSchema"))

        # show that copy(Setting) is working correctly
        s2 = copy.copy(s1)
        self.assertEqual(s2._value, 999)
        self.assertEqual(s2.name, "testCopy")
        self.assertTrue(hasattr(s2, "schema"))
        self.assertTrue(hasattr(s2, "_customSchema"))
Пример #16
0
def defineSettings():
    """Define generic fuel performance settings."""
    settings = [
        setting.Setting(
            CONF_FUEL_PERFORMANCE_ENGINE,
            default="",
            label="Fuel Performance Engine",
            description=(
                "Fuel performance engine that determines fission gas removal, bond removal,"
                " axial growth, wastage, and cladding strain."
            ),
            options=[""],
        ),
        setting.Setting(
            CONF_AXIAL_EXPANSION,
            default=False,
            label="Fuel Axial Expansion",
            description="Perform axial fuel expansion. This will adjust fuel block lengths.",
        ),
        setting.Setting(
            CONF_BOND_REMOVAL,
            default=False,
            label="Thermal Bond Removal",
            description="Toggles fuel performance bond removal. This will remove thermal bond from the fuel.",
        ),
        setting.Setting(
            CONF_FGR_REMOVAL,
            default=False,
            label="Fission Gas Removal",
            description="Toggles fuel performance fission gas removal.  This will remove fission gas from the fuel.",
        ),
        setting.Setting(
            CONF_CLADDING_WASTAGE,
            default=False,
            label="Cladding Wastage",
            description="Evaluate cladding wastage. ",
        ),
        setting.Setting(
            CONF_CLADDING_STRAIN,
            default=False,
            label="Cladding Strain",
            description="Evaluate cladding strain. ",
        ),
    ]
    return settings
Пример #17
0
 def test_default(self):
     """Make sure default updating mechanism works."""
     a = setting.Setting("testsetting", 0)
     newDefault = setting.Default(5, "testsetting")
     a.changeDefault(newDefault)
     self.assertEqual(a.value, 5)
Пример #18
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_GROUP_STRUCTURE,
            default="ANL33",
            label="Number of Energy Groups",
            description=
            "Energy group structure to use in neutronics simulations",
            options=[
                "ANL9",
                "ANL33",
                "ANL70",
                "ANL230",
                "ANL703",
                "ANL1041",
                "ANL2082",
                "ARMI33",
                "ARMI45",
                "CINDER63",
                "348",
            ],
        ),
        setting.Setting(
            CONF_GLOBAL_FLUX_ACTIVE,
            default="Neutron",
            label="Global Flux Calculation",
            description=
            "Calculate the global flux at each timestep for the selected "
            "particle type(s) using the specified neutronics kernel (see Global Flux "
            "tab).",
            options=["", "Neutron", "Neutron and Gamma"],
        ),
        setting.Setting(
            CONF_GEN_XS,
            default="",
            label="Multigroup Cross Sections Generation",
            description=
            "Generate multigroup cross sections for the selected particle "
            "type(s) using the specified lattice physics kernel (see Lattice Physics "
            "tab). When not set, the XS library will be auto-loaded from an existing ISOTXS "
            "within then working directory and fail if the ISOTXS does not exist.",
            options=["", "Neutron", "Neutron and Gamma"],
        ),
        setting.Setting(
            CONF_DPA_PER_FLUENCE,
            default=4.01568627451e-22,
            label="DPA Per Fluence",
            description="A quick and dirty conversion that is used to get "
            "dpaPeak by multiplying the factor and fastFluencePeak",
        ),
        setting.Setting(
            CONF_BC_COEFFICIENT,
            default=0.0,
            label="Parameter A for generalized BC",
            description=
            "Value for the parameter A of the DIF3D generalized boundary "
            "condition.",
        ),
        setting.Setting(
            CONF_BOUNDARIES,
            default="Extrapolated",
            label="Neutronic BCs",
            description=
            "External Neutronic Boundary Conditions. Reflective does not "
            "include axial.",
            options=[
                "Extrapolated",
                "Reflective",
                "Infinite",
                "ZeroSurfaceFlux",
                "ZeroInwardCurrent",
                "Generalized",
            ],
        ),
        setting.Setting(
            CONF_NEUTRONICS_KERNEL,
            default="",
            label="Neutronics Kernel",
            description=
            "The neutronics / depletion solver for global flux solve.",
            options=[],
            enforcedOptions=True,
        ),
        setting.Setting(
            CONF_NEUTRONICS_TYPE,
            default="real",
            label="Neutronics Type",
            description="The type of neutronics solution that is desired.",
            options=["real", "adjoint", "both"],
        ),
        setting.Setting(
            CONF_EIGEN_PROB,
            default=True,
            label="Eigenvalue Problem",
            description=
            "Whether this is a eigenvalue problem or a fixed source problem",
        ),
        setting.Setting(
            CONF_EXISTING_FIXED_SOURCE,
            default="",
            label="Existing fixed source input",
            description="Specify an exiting fixed source input file.",
            options=["", "FIXSRC", "VARSRC"],
        ),
        setting.Setting(
            CONF_NUMBER_MESH_PER_EDGE,
            default=1,
            label="Number of Mesh per Edge",
            description=
            "Number of mesh per block edge for finite-difference planar "
            "mesh refinement.",
            oldNames=[("hexSideSubdivisions", None)],
        ),
        setting.Setting(
            CONF_EPS_EIG,
            default=1e-07,
            label="Eigenvalue Epsilon",
            description="convergence criterion for calculating the eigenvalue",
        ),
        setting.Setting(
            CONF_EPS_FSAVG,
            default=1e-05,
            label="FS Avg. epsilon",
            description="Convergence criteria for average fission source",
        ),
        setting.Setting(
            CONF_EPS_FSPOINT,
            default=1e-05,
            label="FS Point epsilon",
            description="Convergence criteria for point fission source",
        ),
        setting.Setting(
            CONF_LOAD_PAD_ELEVATION,
            default=0.0,
            label="Load pad elevation (cm)",
            description=
            ("The elevation of the bottom of the above-core load pad (ACLP) in cm "
             "from the bottom of the upper grid plate. Used for calculating the load "
             "pad dose"),
        ),
        setting.Setting(
            CONF_LOAD_PAD_LENGTH,
            default=0.0,
            label="Load pad length (cm)",
            description=
            "The length of the load pad. Used to compute average and peak dose.",
        ),
        setting.Setting(
            CONF_ACLP_DOSE_LIMIT,
            default=80.0,
            label="ALCP dose limit",
            description=
            "Dose limit in dpa used to position the above-core load pad (if one exists)",
        ),
        setting.Setting(
            CONF_RESTART_NEUTRONICS,
            default=False,
            label="Restart neutronics",
            description=
            "Restart global flux case using outputs from last time as a guess",
        ),
        setting.Setting(
            CONF_GRID_PLATE_DPA_XS_SET,
            default="dpa_EBRII_HT9",
            label="Grid plate DPA XS",
            description=
            ("The cross sections to use for grid plate blocks DPA when computing "
             "displacements per atom."),
            options=CONF_OPT_DPA,
        ),
        setting.Setting(
            CONF_DPA_XS_SET,
            default="dpa_EBRII_HT9",
            label="DPA Cross Sections",
            description=
            "The cross sections to use when computing displacements per atom.",
            options=CONF_OPT_DPA,
        ),
        # moved from XSsettings
        setting.Setting(
            CONF_CLEAR_XS,
            default=False,
            label="Clear XS",
            description=
            "Delete all cross section libraries before regenerating them.",
        ),
        setting.Setting(
            CONF_DPA_XS_DIRECTORY_PATH,
            default=
            "\\\\albert\\apps\\dev\\mc2\\3.2.2\\libraries\\endfb-vii.0\\damage_xs",
            label="DPA XS Directory Path",
            description="DPA XS Directory Path",
            options=[
                "\\\\albert\\apps\\dev\\mc2\\3.2.2\\libraries\\endfb-vii.0\\damage_xs"
            ],
        ),
        setting.Setting(
            CONF_MINIMUM_FISSILE_FRACTION,
            default=0.045,
            label="Minimum Fissile Fraction",
            description=
            "Minimum fissile fraction (fissile number densities / heavy metal number densities).",
            oldNames=[("mc2.minimumFissileFraction", None)],
        ),
        setting.Setting(
            CONF_MINIMUM_NUCLIDE_DENSITY,
            default=1e-15,
            label="Minimum nuclide density",
            description=
            "Density to use for nuclides and fission products at infinite dilution. This is also used as the minimum density.",
        ),
        setting.Setting(
            CONF_INFINITE_DILUTE_CUTOFF,
            default=1e-10,
            label="Infinite Dillute Cutoff",
            description=
            "Do not model nuclides with density less than this cutoff. Used with PARTISN and SERPENT.",
        ),
        setting.Setting(
            CONF_TOLERATE_BURNUP_CHANGE,
            default=0.0,
            label="Cross Section Burnup Group Tolerance",
            description=
            "Burnup window for computing cross sections. If the prior cross sections were computed within the window, new cross sections will not be generated and the prior calculated cross sections will be used.",
        ),
        setting.Setting(
            CONF_XS_BLOCK_REPRESENTATION,
            default="FluxWeightedAverage",
            label="Cross Section Block Averaging Method",
            description=
            "The type of averaging to perform when creating cross sections for a group of blocks",
            options=[
                "Median",
                "Average",
                "FluxWeightedAverage",
                "ComponentAverage1DSlab",
            ],
        ),
        setting.Setting(
            CONF_DISABLE_BLOCK_TYPE_EXCLUSION_IN_XS_GENERATION,
            default=False,
            label="Include All Block Types in XS Generation",
            description=
            "Use all blocks in a cross section group when generating a representative block. When this is disabled only `fuel` blocks will be considered",
        ),
        setting.Setting(
            CONF_XS_KERNEL,
            default="MC2v3",
            label="Lattice Physics Kernel",
            description=
            "Method to determine broad group cross sections for assemblies",
            options=["", "MC2v2", "MC2v3", "MC2v3-PARTISN", "SERPENT"],
        ),
        setting.Setting(
            CONF_XS_SCATTERING_ORDER,
            default=3,
            label="Scattering Order",
            description="Scattering order for the lattice physics calculation",
        ),
        setting.Setting(
            CONF_XS_BUCKLING_CONVERGENCE,
            default=1e-05,
            label="Buckling Convergence Criteria",
            description=
            "The convergence criteria for the buckling iteration if it is available in the lattice physics solver",
            oldNames=[
                ("mc2BucklingConvergence", None),
                ("bucklingConvergence", None),
            ],
        ),
        setting.Setting(
            CONF_XS_EIGENVALUE_CONVERGENCE,
            default=1e-05,
            label="Eigenvalue Convergence Criteria",
            description="The convergence criteria for the eigenvalue",
        ),
    ]

    return settings
Пример #19
0
def defineSettings() -> List[setting.Setting]:
    """Return a list of global framework settings."""
    settings = [
        setting.Setting(
            CONF_NUM_PROCESSORS,
            default=1,
            label="CPUs",
            description="Number of CPUs to request on the cluster",
            schema=vol.All(vol.Coerce(int), vol.Range(min=1)),
        ),
        setting.Setting(
            CONF_BURN_CHAIN_FILE_NAME,
            default=os.path.join(context.RES, "burn-chain.yaml"),
            label="Burn Chain File",
            description=
            "Path to YAML file that has the depletion chain defined in it",
        ),
        setting.Setting(
            CONF_ZONING_STRATEGY,
            default="byRingZone",
            label="Automatic core zone creation strategy",
            description="Channel Grouping Options for Safety;"
            "everyFA: every FA is its own channel, "
            "byRingZone: based on ringzones, "
            "byFuelType: based on fuel type, "
            "Manual: you must specify 'zoneDefinitions' setting",
            options=[
                "byRingZone", "byOrifice", "byFuelType", "everyFA", "manual"
            ],
        ),
        setting.Setting(
            CONF_AXIAL_MESH_REFINEMENT_FACTOR,
            default=1,
            label="Axial Mesh Refinement Factor",
            description=
            "Multiplicative factor on the Global Flux number of mesh per "
            "block. Used for axial mesh refinement.",
            schema=vol.All(vol.Coerce(int), vol.Range(min=0,
                                                      min_included=False)),
        ),
        setting.Setting(
            CONF_DETAILED_AXIAL_EXPANSION,
            default=False,
            label="Detailed Axial Expansion",
            description=
            ("Allow each assembly to expand independently of the others. Results in non-uniform "
             "axial mesh. Neutronics kernel must be able to handle."),
        ),
        setting.Setting(
            CONF_INPUT_HEIGHTS_HOT,
            default=True,
            label="Input Height Considered Hot",
            description=
            ("This is a flag to determine if block heights, as provided in blueprints, are at hot dimensions. "
             "If false, block heights are at cold/as-built dimensions and will be thermally expanded as appropriate."
             ),
        ),
        setting.Setting(
            CONF_CONDITIONAL_MODULE_NAME,
            default="",
            label="Burn End Conditional",
            description="File name (directory not included) of the Python "
            "module that contains a conditional function to determine the end of burn "
            "cycles",
        ),
        setting.Setting(
            CONF_AUTOMATIC_VARIABLE_MESH,
            default=False,
            label="Automatic Neutronics Variable Mesh",
            description="Flag to let ARMI add additional mesh points if the "
            "neutronics mesh is too irregular",
        ),
        setting.Setting(
            CONF_TRACE,
            default=False,
            label="Use the Python Tracer",
            description=
            "Activate Python trace module to print out each line as it's "
            "executed",
            isEnvironment=True,
        ),
        setting.Setting(
            CONF_PROFILE,
            default=False,
            label="Turn On the Profiler",
            description=
            "Turn on the profiler for the submitted case. The profiler "
            "results will not include all import times.",
            isEnvironment=True,
            oldNames=[
                ("turnOnProfiler", None),
            ],
        ),
        setting.Setting(
            CONF_COVERAGE,
            default=False,
            label="Turn On Coverage Report Generation",
            description=
            "Turn on coverage report generation which tracks all the lines "
            "of code that execute during a run",
            isEnvironment=True,
        ),
        setting.Setting(
            CONF_MIN_MESH_SIZE_RATIO,
            default=0.15,
            label="Minimum Mesh Size Ratio",
            description=
            "This is the minimum ratio of mesh sizes (dP1/(dP1 + dP2)) "
            "allowable -- only active if automaticVariableMesh flag is set to True",
            schema=vol.All(vol.Coerce(float),
                           vol.Range(min=0, min_included=False)),
        ),
        setting.Setting(
            CONF_CYCLE_LENGTH,
            default=365.242199,
            label="Cycle Length",
            description=
            "Duration of one single cycle in days. If `availabilityFactor` is below "
            "1, the reactor will be at power less than this. If variable, use "
            "`cycleLengths` setting.",
            oldNames=[
                ("burnTime", None),
            ],
            schema=(vol.Any(
                vol.All(vol.Coerce(float), vol.Range(min=0,
                                                     min_included=False)),
                None,
            )),
        ),
        setting.Setting(
            CONF_CYCLE_LENGTHS,
            default=[],
            label="Cycle Durations",
            description="List of durations of each cycle in days. The at-power "
            "duration will be affected by `availabilityFactor`. R is repeat. For "
            "example [100, 150, '9R'] is 1 100 day cycle followed by 10 150 day "
            "cycles. Empty list is constant duration set by `cycleLength`.",
            schema=vol.Any([vol.Coerce(str)], None),
        ),
        setting.Setting(
            CONF_AVAILABILITY_FACTOR,
            default=1.0,
            label="Plant Availability Factor",
            description=
            "Availability factor of the plant. This is the fraction of the "
            "time that the plant is operating. If variable, use `availabilityFactors` "
            "setting.",
            oldNames=[
                ("capacityFactor", None),
            ],
            schema=(vol.Any(vol.All(vol.Coerce(float), vol.Range(min=0)),
                            None)),
        ),
        setting.Setting(
            CONF_AVAILABILITY_FACTORS,
            default=[],
            label="Availability Factors",
            description=
            "List of availability factor of each cycle as a fraction "
            "(fraction of time plant is not in an outage). R is repeat. For example "
            "[0.5, 1.0, '9R'] is 1 50% followed by 10 100%. Empty list is "
            "constant duration set by `availabilityFactor`.",
            schema=vol.Any([vol.Coerce(str)], None),
        ),
        setting.Setting(
            CONF_POWER_FRACTIONS,
            default=[],
            label="Power Fractions",
            description=
            "List of power fractions at each cycle (fraction of rated "
            "thermal power the plant achieves). R is repeat. For example [0.5, 1.0, "
            "'9R'] is 1 50% followed by 10 100%. Specify zeros to indicate "
            "decay-only cycles (i.e. for decay heat analysis). None implies "
            "always full rated power.",
            schema=vol.Any([vol.Coerce(str)], None),
        ),
        setting.Setting(
            CONF_BURN_STEPS,
            default=4,
            label="Burnup Steps per Cycle",
            description=
            "Number of depletion substeps, n, in one cycle. Note: There "
            "will be n+1 time nodes and the burnup step time will be computed as cycle "
            "length/n when the simple cycles input format is used.",
            schema=(vol.Any(vol.All(vol.Coerce(int), vol.Range(min=0)), None)),
        ),
        setting.Setting(
            CONF_BETA,
            default=None,
            label="Delayed Neutron Fraction",
            description="Individual precursor group delayed neutron fractions",
            schema=vol.Any(
                [
                    vol.All(
                        vol.Coerce(float),
                        vol.Range(
                            min=0, min_included=True, max=1,
                            max_included=True),
                    )
                ],
                None,
                vol.All(
                    vol.Coerce(float),
                    vol.Range(min=0,
                              min_included=True,
                              max=1,
                              max_included=True),
                ),
                msg="Expected NoneType, float, or list of floats.",
            ),
            oldNames=[
                ("betaComponents", None),
            ],
        ),
        setting.Setting(
            CONF_DECAY_CONSTANTS,
            default=None,
            label="Decay Constants",
            description=
            "Individual precursor group delayed neutron decay constants",
            schema=vol.Any(
                [
                    vol.All(vol.Coerce(float),
                            vol.Range(min=0, min_included=True))
                ],
                None,
                vol.All(vol.Coerce(float), vol.Range(min=0,
                                                     min_included=True)),
                msg="Expected NoneType, float, or list of floats.",
            ),
        ),
        setting.Setting(
            CONF_BRANCH_VERBOSITY,
            default="error",
            label="Worker Log Verbosity",
            description="Verbosity of the non-master MPI nodes",
            options=[
                "debug",
                "extra",
                "info",
                "important",
                "prompt",
                "warning",
                "error",
            ],
            isEnvironment=True,
        ),
        setting.Setting(
            CONF_MODULE_VERBOSITY,
            default={},
            label="Module-Level Verbosity",
            description="Verbosity of any module-specific loggers that are set",
            isEnvironment=True,
        ),
        setting.Setting(
            CONF_BU_GROUPS,
            default=[10, 20, 30, 100],
            label="Burnup Groups",
            description=
            "The range of burnups where cross-sections will be the same "
            "for a given assembly type (units of %FIMA)",
            schema=vol.Schema([
                vol.All(vol.Coerce(int),
                        vol.Range(min=0, min_included=False, max=100))
            ]),
        ),
        setting.Setting(
            CONF_BURNUP_PEAKING_FACTOR,
            default=0.0,
            label="Burn-up Peaking Factor",
            description="None",
            schema=vol.All(vol.Coerce(float), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_CIRCULAR_RING_PITCH,
            default=1.0,
            label="Circular Ring Relative Pitch",
            description=
            "The relative pitch to be used to define a single circular "
            "ring in circular shuffling",
        ),
        setting.Setting(
            CONF_COMMENT,
            default="",
            label="Case Comments",
            description="A comment describing this case",
        ),
        setting.Setting(CONF_COPY_FILES_FROM,
                        default=[],
                        label="None",
                        description="None"),
        setting.Setting(CONF_COPY_FILES_TO,
                        default=[],
                        label="None",
                        description="None"),
        setting.Setting(
            CONF_CREATE_ASSEMBLY_TYPE_ZONES,
            default=False,
            label="Create Fuel Zones Automatically",
            description=
            "Let ARMI create zones based on fuel type automatically ",
        ),
        setting.Setting(CONF_DEBUG,
                        default=False,
                        label="Python Debug Mode",
                        description="None"),
        setting.Setting(
            CONF_DEBUG_MEM,
            default=False,
            label="Debug Memory",
            description=
            "Turn on memory debugging options to help find problems with "
            "the code",
        ),
        setting.Setting(
            CONF_DEBUG_MEM_SIZE,
            default=False,
            label="Debug Memory Size",
            description="Show size of objects during memory debugging",
        ),
        setting.Setting(
            CONF_DEFAULT_SNAPSHOTS,
            default=False,
            label="Basic Reactor Snapshots",
            description="Generate snapshots at BOL, MOL, and EOL.",
        ),
        setting.Setting(
            CONF_DETAIL_ALL_ASSEMS,
            default=False,
            label="Detailed Assems - All",
            description=
            "All assemblies will have 'detailed' treatment. Note: This "
            "option is interpreted differently by different modules.",
        ),
        setting.Setting(
            CONF_DETAIL_ASSEM_LOCATIONS_BOL,
            default=[],
            label="Detailed Assems - BOL Location",
            description=
            "Assembly locations for assemblies that will have 'detailed' "
            "treatment. This option will track assemblies in the core at BOL. Note: "
            "This option is interpreted differently by different modules.",
        ),
        setting.Setting(
            CONF_DETAIL_ASSEM_NUMS,
            default=[],
            label="Detailed Assems - ID",
            description="Assembly numbers(IDs) for assemblies that will have "
            "'detailed' treatment. This option will track assemblies that not in the "
            "core at BOL. Note: This option is interpreted differently by different "
            "modules.",
            schema=vol.Schema([int]),
        ),
        setting.Setting(
            CONF_DUMP_SNAPSHOT,
            default=[],
            label="Detailed Reactor Snapshots",
            description=
            "List of snapshots to dump detailed reactor analysis data. Can "
            "be used to perform follow-on analysis (i.e., reactivity coefficient "
            "generation).",
        ),
        setting.Setting(
            CONF_DO_ORIFICED_TH,
            default=False,
            label="Perform Core Orificing",
            description=
            "Perform orificed thermal hydraulics (requires bounds file "
            "from a previous case)",
        ),
        setting.Setting(
            CONF_EQ_DIRECT,
            default=False,
            label="Direct Eq Shuffling",
            description=
            "Does the equilibrium search with repetitive shuffing but with "
            "direct shuffling rather than the fast way",
        ),
        setting.Setting(
            CONF_FLUX_RECON,
            default=False,
            label="Flux/Power Reconstruction",
            description="Perform detailed flux and power reconstruction",
        ),
        setting.Setting(
            CONF_FRESH_FEED_TYPE,
            default="feed fuel",
            label="Fresh Feed Type",
            description="None",
            options=["feed fuel", "igniter fuel", "inner driver fuel"],
        ),
        setting.Setting(
            CONF_GEOM_FILE,
            default="",
            label="Core Map Input File",
            description="Input file containing BOL core map",
        ),
        setting.Setting(
            CONF_GROW_TO_FULL_CORE_AFTER_LOAD,
            default=False,
            label="Expand to Full Core on Snapshot Load",
            description="Grows from 1/3 to full core after loading a 1/3 "
            "symmetric snapshot. Note: This is needed when a full core model is needed "
            "and the database was produced using a third core model.",
        ),
        setting.Setting(
            CONF_START_CYCLE,
            default=0,
            label="Start Cycle",
            description=
            "Cycle number to continue calculation from. Database will "
            "load from the time step just before. For snapshots use `dumpSnapshot`.",
            oldNames=[
                ("loadCycle", None),
            ],
            schema=vol.All(vol.Coerce(int), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_LOADING_FILE,
            default="",
            label="Blueprints File",
            description="The blueprints/loading input file path containing "
            "component dimensions, materials, etc.",
        ),
        setting.Setting(
            CONF_START_NODE,
            default=0,
            label="Start Node",
            description=
            "Timenode number (0 for BOC, etc.) to continue calulation from. "
            "Database will load from the time step just before.",
            oldNames=[
                ("loadNode", None),
            ],
            schema=vol.All(vol.Coerce(int), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_LOAD_STYLE,
            default="fromInput",
            label="Load Style",
            description="Description of how the ARMI case will be initialized",
            options=["fromInput", "fromDB"],
        ),
        setting.Setting(
            CONF_LOW_POWER_REGION_FRACTION,
            default=0.05,
            label="Low-power Region Fraction",
            description="Description needed",
            schema=vol.All(vol.Coerce(float), vol.Range(min=0, max=1)),
        ),
        setting.Setting(
            CONF_MEM_PER_NODE,
            default=2000,
            label="Memory per Node",
            description="Memory requested per cluster node",
        ),
        setting.Setting(
            CONF_MPI_TASKS_PER_NODE,
            default=0,
            label="MPI Tasks per Node",
            description=
            "Number of independent processes that are allocated to each "
            "cluster node. 0 means 1 process per CPU.",
            schema=vol.All(vol.Coerce(int), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_N_CYCLES,
            default=1,
            label="Number of Cycles",
            description=
            "Number of cycles that will be simulated. Fuel management "
            "happens at the beginning of each cycle. Can include active (full-power) "
            "cycles as well as post-shutdown decay-heat steps.",
            schema=vol.All(vol.Coerce(int), vol.Range(min=1)),
        ),
        setting.Setting(
            CONF_NUM_CONTROL_BLOCKS,
            default=6,
            label="Number of Control Blocks",
            description=
            "Number of blocks with control for a REBUS poison search",
        ),
        setting.Setting(
            CONF_NUM_COUPLED_ITERATIONS,
            default=0,
            label="Tight Coupling Iterations",
            description=
            "Number of tight coupled physics iterations to occur at each "
            "timestep",
            schema=vol.All(vol.Coerce(int), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_OPERATOR_LOCATION,
            default="",
            label="Operator Location",
            description=
            "The path to the operator code to execute for this run (for "
            "custom behavior)",
        ),
        setting.Setting(
            CONF_OUTPUT_FILE_EXTENSION,
            default="jpg",
            label="Plot File Extension",
            description="The default extension for plots",
            options=["jpg", "png", "svg", "pdf"],
        ),
        setting.Setting(
            CONF_PLOTS,
            default=False,
            label="Plot Results",
            description=
            "Generate additional plots throughout the ARMI analysis",
        ),
        setting.Setting(
            CONF_POWER,
            default=0.0,
            label="Reactor Thermal Power (W)",
            description=
            "Nameplate thermal power of the reactor. Can be varied by "
            "setting the powerFractions setting.",
            schema=vol.All(vol.Coerce(float), vol.Range(min=0)),
        ),
        setting.Setting(CONF_REMOVE_PER_CYCLE,
                        default=3,
                        label="Move per Cycle",
                        description="None"),
        setting.Setting(
            CONF_RUN_TYPE,
            default="Standard",
            label="Run Type",
            description=
            "Type of run that this is, e.g. a normal run through all "
            "cycles, a snapshot-loaded reactivity coefficient run, etc.",
            options=["Standard", "Equilibrium", "Snapshots"],
        ),
        setting.Setting(
            CONF_EXPLICIT_REPEAT_SHUFFLES,
            default="",
            label="Explicit Shuffles File",
            description=
            "Path to file that contains a detailed shuffling history that "
            "is to be repeated exactly.",
            oldNames=[("movesFile", None), ("shuffleFileName", None)],
        ),
        setting.Setting(
            CONF_SKIP_CYCLES,
            default=0,
            label="Number of Cycles to Skip",
            description=
            "Number of cycles to be skipped during the calculation. Note: "
            "This is typically used when repeating only a portion of a calculation or "
            "repeating a run.",
            schema=vol.All(vol.Coerce(int), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_SMALL_RUN,
            default=False,
            label="Clean Up Files at EOL",
            description=
            "Clean up intermediate files after the run completes (EOL)",
        ),
        setting.Setting(
            CONF_REALLY_SMALL_RUN,
            default=False,
            label="Clean Up Files at BOC",
            description="Clean up files at the beginning of each cycle (BOC)",
        ),
        setting.Setting(
            CONF_STATIONARY_BLOCKS,
            default=[],
            label="Stationary Blocks",
            description=
            "Blocks with these indices (int values) will not move in "
            "moves",
        ),
        setting.Setting(
            CONF_TARGET_K,
            default=1.005,
            label="Criticality Search Target (k-effective)",
            description=
            "Target criticality (k-effective) for cycle length, branch, "
            "and equilibrium search",
            schema=vol.All(vol.Coerce(float), vol.Range(min=0)),
        ),
        setting.Setting(
            CONF_TRACK_ASSEMS,
            default=True,
            label="Save Discharged Assemblies",
            description=
            "Track assemblies for detailed fuel histories. Disable in case "
            "you get memory errors.",
        ),
        setting.Setting(
            CONF_VERBOSITY,
            default="info",
            label="Master Log Verbosity",
            description="How verbose the output will be",
            options=[
                "debug",
                "extra",
                "info",
                "important",
                "prompt",
                "warning",
                "error",
            ],
            isEnvironment=True,
        ),
        setting.Setting(
            CONF_ZONE_DEFINITIONS,
            default=[],
            label="Zone Definitions",
            description=
            "Definitions of zones as lists of assembly locations (e.g. "
            "'zoneName: loc1, loc2, loc3') . Zones are groups of assemblies used by "
            "various summary and calculation routines.",
        ),
        setting.Setting(
            CONF_ACCEPTABLE_BLOCK_AREA_ERROR,
            default=1e-05,
            label="Acceptable Block Area Error",
            description="The limit of error between a block's cross-"
            "sectional area and the reference block used during the assembly area "
            "consistency check",
            schema=vol.All(vol.Coerce(float),
                           vol.Range(min=0, min_included=False)),
        ),
        setting.Setting(
            CONF_RING_ZONES,
            default=[],
            label="Ring Zones",
            description=
            "Define zones by concentric radial rings. Each zone will get "
            "independent reactivity coefficients.",
            schema=vol.Schema([int]),
        ),
        setting.Setting(
            CONF_SPLIT_ZONES,
            default=True,
            label="Split Zones",
            description=
            "Automatically split defined zones further based on number of "
            "blocks and assembly types",
        ),
        setting.Setting(
            CONF_INDEPENDENT_VARIABLES,
            default=[],
            label="Independent Variables",
            description="List of (independentVarName, value) tuples to inform "
            "optimization post-processing",
        ),
        setting.Setting(
            CONF_HCF_CORETYPE,
            default="TWRC",
            label="Hot Channel Factor Set",
            description=
            "Switch to apply different sets of hot channel factors based "
            "on design being analyzed",
            options=["TWRC", "TWRP", "TWRC-HEX"],
        ),
        setting.Setting(
            CONF_LOOSE_COUPLING,
            default=False,
            label="Activate Loose Physics Coupling",
            description="Update material densities and dimensions after running "
            "thermal-hydraulics. Note: Thermal-hydraulics calculation is needed "
            "to perform the loose physics coupling calculation.",
        ),
        setting.Setting(
            CONF_T_IN,
            default=360.0,
            label="Inlet Temperature",
            description="The inlet temperature of the reactor in C",
            schema=vol.All(vol.Coerce(float), vol.Range(min=-273.15)),
        ),
        setting.Setting(
            CONF_T_OUT,
            default=510.0,
            label="Outlet Temperature",
            description="The outlet temperature of the reactor in C",
            schema=vol.All(vol.Coerce(float), vol.Range(min=-273.15)),
        ),
        setting.Setting(
            CONF_USE_INPUT_TEMPERATURES_ON_DBLOAD,
            default=False,
            label="Temperatures From Input on DB Load",
            description="When loading from a database, first set all component "
            "temperatures to the input temperatures. Required when a coupled TH "
            "case is being derived from a case without any coupled TH.",
        ),
        setting.Setting(
            CONF_DEFERRED_INTERFACES_CYCLE,
            default=0,
            label="Deferred Interface Start Cycle",
            description=
            "The supplied list of interface names in deferredInterfaceNames"
            " will begin normal operations on this cycle number",
        ),
        setting.Setting(
            CONF_DEFERRED_INTERFACE_NAMES,
            default=[],
            label="Deferred Interface Names",
            description=
            "Interfaces to delay the normal operations of for special "
            "circumstance problem avoidance",
        ),
        setting.Setting(
            CONF_OUTPUT_CACHE_LOCATION,
            default="",
            label="Location of Output Cache",
            description="Location where cached calculations are stored and "
            "retrieved if exactly the same as the calculation requested. Empty "
            "string will not cache.",
            isEnvironment=True,
        ),
        setting.Setting(
            CONF_MATERIAL_NAMESPACE_ORDER,
            default=[],
            label="Material Namespace Order",
            description=
            ("Ordered list of Python namespaces for finding materials by class name. "
             "This allows users to choose between different implementations of reactor "
             "materials. For example, the framework comes with a basic UZr material, "
             "but power users will want to override it with their own UZr subclass. "
             "This allows users to specify to get materials out of a plugin rather "
             "than from the framework."),
        ),
        # It may make sense to remove this setting when MILs become more stable.
        setting.Setting(
            CONF_BLOCK_AUTO_GRID,
            default=True,
            label="Auto-generate Block grids",
            description=
            "Should block blueprints attempt to auto-generate a spatial "
            "grid upon construction? This feature makes heavy use of multi-index "
            "locations, which are not yet universally supported.",
        ),
        setting.Setting(
            CONF_CYCLES,
            default=[],
            label="Cycle information",
            description=
            "YAML list defining the cycle history of the case. Options"
            " at each cycle include: `name`, `cumulative days`, `step days`, `availability"
            " factor`, `cycle length`, `burn steps`, and `power fractions`."
            " If specified, do not use any of the case settings `cycleLength(s)`,"
            " `availabilityFactor(s)`, `powerFractions`, or `burnSteps`. Must also"
            " specify `nCycles` and `power`.",
            schema=vol.Schema([
                vol.All(
                    {
                        "name":
                        str,
                        "cumulative days":
                        vol.All([vol.Any(float, int)], _isMonotonicIncreasing),
                        "step days": [vol.Coerce(str)],
                        "power fractions": [vol.Coerce(str)],
                        "availability factor":
                        vol.All(vol.Coerce(float), vol.Range(min=0, max=1)),
                        "cycle length":
                        vol.All(vol.Coerce(float), vol.Range(min=0)),
                        "burn steps":
                        vol.All(vol.Coerce(int), vol.Range(min=0)),
                    },
                    _mutuallyExclusiveCyclesInputs,
                )
            ]),
        ),
    ]
    return settings
Пример #20
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_DB,
            default=True,
            label="Activate Database",
            description=
            "Write the state information to a database at every timestep.",
        ),
        setting.Setting(CONF_DEBUG_DB, default=False, label="Debug DB"),
        setting.Setting(
            CONF_RELOAD_DB_NAME,
            default="",
            label="Database Input File",
            description=
            "Name of the database file to load initial conditions from",
        ),
        setting.Setting(
            CONF_BLOCK_TYPES_TO_IGNORE_ON_DB_LOADING,
            default=[],
            label="Excluded Block Types",
            description="Block types to exclude when loading the database",
        ),
        setting.Setting(
            CONF_BLOCK_PARAMETER_NAMES_TO_IGNORE_ON_DB_LOADING,
            default=[],
            label="Excluded Block Parameters",
            description=
            "Block parameter data (names) to exclude when loading from the database",
        ),
        setting.Setting(
            CONF_BLOCK_PARAMETER_NAMES_TO_INCLUDE_ON_DB_LOADING,
            default=[],
            label="Exclusive Block Parameters",
            description=
            "Block parameter data (names) to load from the database",
        ),
        setting.Setting(
            CONF_UPDATE_MASS_FRACTIONS_FROM_DB,
            default=True,
            label="Update Mass Fractions on Load",
            description=
            "Update the mass fractions when loading from the database",
        ),
        setting.Setting(
            CONF_LOAD_FROM_DB_EVERY_NODE,
            default=False,
            label="Load Database at EveryNode",
            description="Every node loaded from reference database",
        ),
        setting.Setting(
            CONF_UPDATE_INDIVIDUAL_ASSEMBLY_NUMBERS_ON_DB_LOAD,
            default=True,
            label="Update Assembly Numbers on Load",
            description=
            "When a DB is loaded, this will update assembly numbers as well as other state",
        ),
        setting.Setting(
            CONF_DB_STORAGE_AFTER_CYCLE,
            default=0,
            label="DB Storage After Cycle",
            description=
            "Only store cycles after this cycle in the DB (to save storage space)",
        ),
        setting.Setting(
            CONF_ZERO_OUT_NUCLIDES_NOT_IN_DB,
            default=True,
            label="Load Nuclides not in Database",
            description=
            "If a nuclide was added to the problem after a previous case was run, deactivate this to let it survive in a restart run",
        ),
        setting.Setting(
            CONF_SYNC_AFTER_WRITE,
            default=False,
            label="Sync DB after write",
            description=
            ("Copy the output DB from the fast scratch space to the shared network drive "
             "after each write."),
        ),
    ]
    return settings
Пример #21
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_DIF3D_DB,
            default=False,
            label="Output database with DIF3D neutronics mesh",
            description=
            "If enabled, a database will be created containing the results "
            "of the most recent DIF3D invocation before converting back to the input "
            "mesh. This is useful for visualizing/analyzing the direct results of the "
            "DIF3D run without any mesh conversions taking place.",
        ),
        setting.Option(CONF_OPT_DIF3DNODAL,
                       neutronicsSettings.CONF_NEUTRONICS_KERNEL),
        setting.Option(CONF_OPT_DIF3DFD,
                       neutronicsSettings.CONF_NEUTRONICS_KERNEL),
        setting.Option(CONF_OPT_VARIANT,
                       neutronicsSettings.CONF_NEUTRONICS_KERNEL),
        setting.Setting(
            CONF_ASYMP_EXTRAP_OF_OVER_RELAX_CALC,
            default=0,
            label="Acceleration of optimum overrelaxation factor calculation",
            description=
            ("Asymptotic source extrapolation of power iterations used to estimate "
             "the spectral radius of each within group iteration matrix. Intended "
             "for problems with overrelaxation factor > 1.8."),
        ),
        setting.Setting(
            CONF_ASYMP_EXTRAP_OF_NODAL_CALC,
            default=0,
            label="Perform asymptotic source extrapolation.",
            description=
            ("Perform asymptotic source extrapolation on the the nodal outer "
             "iterations. Applies to DIF3D-Nodal and VARIANT."),
        ),
        setting.Setting(
            CONF_LIST_ISOTXS,
            default=False,
            label="listIsotxs",
            description="list ISOTXS in the DIF3D output file",
        ),
        setting.Setting(
            CONF_NODAL_APPROX_XY,
            default=40,
            label="XY Nodal approx",
            description=
            ("Approximation controls in XY-Plane (LMN). L can either be 0 (diffusion) "
             "or 1 (transport), M is the flux approximation order (2: quadratic, "
             "3: cubic, or 4: quartic), and N is the leakage approximation order "
             "(0: constant or 2: quadratic). For details, see A.DIF3D file formats "
             "document, under TYPE 10."),
        ),
        setting.Setting(
            CONF_NODAL_APPROX_Z,
            default=32,
            label="Z Nodal approx",
            description=
            ("Approximation controls in Z-direction. M is the flux approximation "
             "order (2: quadratic, 3: cubic, or 4: quartic), and N is the leakage approximation "
             "order (0: constant or 2: quadratic). For details, see A.DIF3D file formats"
             " document, under TYPE 10."),
        ),
        setting.Setting(
            CONF_COARSE_MESH_REBALANCE,
            default=0,
            label="Coarse mesh rebalance",
            description=
            ("Sets the coarse-mesh rebalance acceleration to something other than the "
             "default."),
        ),
        setting.Setting(
            CONF_D3D_MEM,
            default=24000000,
            label="Extended Core Memory Size",
            description=
            ("POINTR container array size in extended core memory for A.DIF3D card of "
             "DIF3D/REBUS. Max recommended=159999000"),
        ),
        setting.Setting(
            CONF_D3D_MEM2,
            default=40000000,
            label="Fast Core Memory Size",
            description=
            ("POINTR container array size in fast core memory in REAL*8 words "
             "in A.DIF3D card of DIF3D/REBUS. Max recommended=40000000"),
        ),
        setting.Setting(
            CONF_DIF3D_PATH,
            default="dif3d",
            label="DIF3D path",
            description="The path do the DIF3D executable",
            options=[],
        ),
        setting.Setting(
            CONF_ERF,
            default=0.04,
            label="Inner iteration error reduction factor",
            description=
            ("Error reduction factor to be achieved by each series of inner "
             "iteration for each group during a shape calculation in DIF3D/REBUS. "
             "Reduce to 0.01 if dominance ratio estimate is sporadic, or if pointwise "
             "fission source convergence is not monotonic."),
        ),
        setting.Setting(
            CONF_NEGLECT_FIS,
            default=0.001,
            label="Min. fission source",
            description=
            ("Any pointwise fission source will be neglected in the pointwise "
             "fission source convergence test if it is less than this factor "
             "times the RMS fission source in DIF3D/REBUS"),
        ),
        setting.Setting(
            CONF_NIP_MEM,
            default=40000000,
            label="Memory for A.NIP3",
            description=
            ("Size of main core storage array for geometry processing module "
             "(GNIP4C) in A.NIP card of DIF3D/REBUS. Max recommended=40000000"
             ),
        ),
        setting.Setting(
            CONF_OUTERS,
            default=100,
            label="Max Outer Iterations",
            description="Max number of outer iterations to converge",
        ),
        setting.Setting(
            CONF_INNERS,
            default=0,
            label="Inner Iterations",
            description=
            ("XY and Axial partial current sweep inner iterations. 0 is let DIF3D "
             "pick or use default if can't pick."),
        ),
        setting.Setting(
            CONF_XS_MEM,
            default=40000000,
            label="XS Processing Memory Size",
            description=
            ("Size of main core storage array for cross section processing modules. "
             "Max recommended=40000000"),
        ),
        setting.Setting(
            CONF_VARIANT_TRANSPORT_AND_SCATTER_ORDER,
            default="",
            label="VARIANT Flux/Leakage Angle and Scattering Orders",
            description=
            ("The flux/leakage angle and scattering orders to use with neutronics "
             "kernel VARIANT."),
            options=["", "P1P0", "P3P1", "P3P3", "P5P1", "P5P3"],
        ),
        setting.Setting(
            CONF_EPS_BURN_TIME,
            default=1.0,
            label="Burn time eps",
            description=("Burn time eps (Cycle length convergence.  "
                         "Set to 1.0 if the cycle length is known.)"),
        ),
        setting.Setting(
            CONF_EPS_CYCLIC,
            default=0.001,
            label="Cyclic density eps",
            description=
            "max relative error in isotope stage density during cyclics  (0.001)",
        ),
        setting.Setting(
            CONF_EPS_NDENS,
            default=0.001,
            label="Region Ndens eps",
            description=
            "max relative error in any isotope in region density (0.001)",
        ),
        setting.Setting(
            CONF_NEUTRONICS_OUTPUTS_TO_SAVE,
            default="Input/Output",
            label="Save DIF3D Files",
            description=
            ("Defines outputs from DIF3D-based neutronics kernel to be copied from "
             "the fast path to the network drive for inspection, restarts, debugging, "
             "etc."),
            options=["", "Input/Output", "Flux files", "Restart files", "All"],
        ),
        setting.Setting(
            CONF_USE_RADIAL_INNER_ITERATION_ALGORITHM,
            default=False,
            label="Use Radial Inner Iter Algorithm",
            description=
            ("Use the VARIANT Radial Inner Iteration Algorithm which is helpful for "
             "cases with small node mesh. Type 12 card in A.DIF3D"),
        ),
        setting.Setting(
            CONF_VARIANT_NODAL_SPATIAL_APPROXIMATION,
            default="20501",  # minimum required for hex
            label="VARIANT Nodal Spatial Approx.",
            description=
            ("The Nodal Spatial polynomial approximation in VARIANT. See Type 12 card "
             "in A.DIF3D for information."),
        ),
    ]
    return settings
Пример #22
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_GROUP_STRUCTURE,
            default="ANL33",
            label="Number of Energy Groups",
            description=
            "Energy group structure to use in neutronics simulations",
            options=[
                "ANL9",
                "ANL33",
                "ANL70",
                "ANL230",
                "ANL703",
                "ANL1041",
                "ANL2082",
                "ARMI33",
                "ARMI45",
                "CINDER63",
                "348",
            ],
        ),
        setting.Setting(
            CONF_GLOBAL_FLUX_ACTIVE,
            default="Neutron",
            label="Global Flux Calculation",
            description=
            "Calculate the global flux at each timestep for the selected "
            "particle type(s) using the specified neutronics kernel (see Global Flux "
            "tab).",
            options=["", "Neutron", "Neutron and Gamma"],
        ),
        setting.Setting(
            CONF_GEN_XS,
            default="",
            label="Multigroup Cross Sections Generation",
            description=
            "Generate multigroup cross sections for the selected particle "
            "type(s) using the specified lattice physics kernel (see Lattice Physics "
            "tab). When not set, the XS library will be auto-loaded from an existing ISOTXS "
            "within then working directory and fail if the ISOTXS does not exist.",
            options=["", "Neutron", "Neutron and Gamma"],
        ),
        setting.Setting(
            CONF_DPA_PER_FLUENCE,
            default=4.01568627451e-22,
            label="DPA Per Fluence",
            description="A quick and dirty conversion that is used to get "
            "dpaPeak by multiplying the factor and fastFluencePeak",
        ),
        setting.Setting(
            CONF_BC_COEFFICIENT,
            default=0.0,
            label="Parameter A for generalized BC",
            description=
            "Value for the parameter A of the DIF3D generalized boundary "
            "condition.",
        ),
        setting.Setting(
            CONF_BOUNDARIES,
            default="Extrapolated",
            label="Neutronic BCs",
            description=
            "External Neutronic Boundary Conditions. Reflective does not "
            "include axial.",
            options=[
                "Extrapolated",
                "Reflective",
                "Infinite",
                "ZeroSurfaceFlux",
                "ZeroInwardCurrent",
                "Generalized",
            ],
        ),
        setting.Setting(
            CONF_NEUTRONICS_KERNEL,
            default="",
            label="Neutronics Kernel",
            description=
            "The neutronics / depletion solver for global flux solve.",
            options=[],
            enforcedOptions=True,
        ),
        setting.Setting(
            CONF_NEUTRONICS_TYPE,
            default="real",
            label="Neutronics Type",
            description="The type of neutronics solution that is desired.",
            options=["real", "adjoint", "both"],
        ),
        setting.Setting(
            CONF_EIGEN_PROB,
            default=True,
            label="Eigenvalue Problem",
            description=
            "Whether this is a eigenvalue problem or a fixed source problem",
        ),
        setting.Setting(
            CONF_EXISTING_FIXED_SOURCE,
            default="",
            label="Existing fixed source input",
            description="Specify an exiting fixed source input file.",
            options=["", "FIXSRC", "VARSRC"],
        ),
        setting.Setting(
            CONF_NUMBER_MESH_PER_EDGE,
            default=1,
            label="Number of Mesh per Edge",
            description=
            "Number of mesh per block edge for finite-difference planar mesh refinement.",
        ),
        setting.Setting(
            CONF_EPS_EIG,
            default=1e-07,
            label="Eigenvalue Epsilon",
            description="convergence criterion for calculating the eigenvalue",
        ),
        setting.Setting(
            CONF_EPS_FSAVG,
            default=1e-05,
            label="FS Avg. epsilon",
            description="Convergence criteria for average fission source",
        ),
        setting.Setting(
            CONF_EPS_FSPOINT,
            default=1e-05,
            label="FS Point epsilon",
            description="Convergence criteria for point fission source",
        ),
        setting.Setting(
            CONF_LOAD_PAD_ELEVATION,
            default=0.0,
            label="Load pad elevation (cm)",
            description=
            ("The elevation of the bottom of the above-core load pad (ACLP) in cm "
             "from the bottom of the upper grid plate. Used for calculating the load "
             "pad dose"),
        ),
        setting.Setting(
            CONF_LOAD_PAD_LENGTH,
            default=0.0,
            label="Load pad length (cm)",
            description=
            "The length of the load pad. Used to compute average and peak dose.",
        ),
        setting.Setting(
            CONF_ACLP_DOSE_LIMIT,
            default=80.0,
            label="ALCP dose limit",
            description=
            "Dose limit in dpa used to position the above-core load pad (if one exists)",
        ),
        setting.Setting(
            CONF_RESTART_NEUTRONICS,
            default=False,
            label="Restart neutronics",
            description=
            "Restart global flux case using outputs from last time as a guess",
        ),
        setting.Setting(
            CONF_GRID_PLATE_DPA_XS_SET,
            default="dpa_EBRII_HT9",
            label="Grid plate DPA XS",
            description=
            ("The cross sections to use for grid plate blocks DPA when computing "
             "displacements per atom."),
            options=CONF_OPT_DPA,
        ),
        setting.Setting(
            CONF_DPA_XS_SET,
            default="dpa_EBRII_HT9",
            label="DPA Cross Sections",
            description=
            "The cross sections to use when computing displacements per atom.",
            options=CONF_OPT_DPA,
        ),
    ]

    return settings
Пример #23
0
    def defineSettings():
        settings = [
            setting.Setting(
                CONF_ASSEMBLY_ROTATION_ALG,
                default="",
                label="Assembly Rotation Algorithm",
                description=
                "The algorithm to use to rotate the detail assemblies while shuffling",
                options=[
                    "", "buReducingAssemblyRotation", "simpleAssemblyRotation"
                ],
                enforcedOptions=True,
            ),
            setting.Setting(
                CONF_ASSEM_ROTATION_STATIONARY,
                default=False,
                label="Rotate stationary assems",
                description=(
                    "Whether or not to rotate assemblies that are not shuffled."
                    "This can only be True if 'rotation' is true."),
            ),
            setting.Setting(
                CONF_CIRCULAR_RING_MODE,
                default=False,
                description=
                "Toggle between circular ring definitions to hexagonal ring definitions",
                label="Use Circular Rings",
            ),
            setting.Setting(
                CONF_CIRCULAR_RING_ORDER,
                default="angle",
                description=
                "Order by which locations are sorted in circular rings for equilibrium shuffling",
                label="Eq. circular sort type",
                options=["angle", "distance", "distanceSmart"],
            ),
            setting.Setting(
                CONF_CUSTOM_FUEL_MANAGEMENT_INDEX,
                default=0,
                description=
                ("An index that determines which of various options is used in management. "
                 "Useful for optimization sweeps. "),
                label="Custom Shuffling Index",
            ),
            setting.Setting(
                CONF_RUN_LATTICE_BEFORE_SHUFFLING,
                default=False,
                description=
                ("Forces the Generation of Cross Sections Prior to Shuffling the Fuel Assemblies. "
                 "Note: This is recommended when performing equilibrium shuffling branching searches."
                 ),
                label="Generate XS Prior to Fuel Shuffling",
            ),
            setting.Setting(
                CONF_SHUFFLE_LOGIC,
                default="",
                label="Shuffle Logic",
                description=
                ("Python script written to handle the fuel shuffling for this case.  "
                 "This is user-defined per run as a dynamic input."),
                # schema here could check if file exists, but this is a bit constraining in testing.
                # For example, some tests have relative paths for this but aren't running in
                # the right directory, and IsFile doesn't seem to work well with relative paths.
                # This is left here as an FYI about how we could check existence of files if we get
                # around these problem.
                #                 schema=vol.All(
                #                     vol.IsFile(),  # pylint: disable=no-value-for-parameter
                #                     msg="Shuffle logic input must be an existing file",
                #                 ),
            ),
            setting.Setting(
                CONF_PLOT_SHUFFLE_ARROWS,
                default=False,
                description="Make plots with arrows showing each move.",
                label="Plot shuffle arrows",
            ),
        ]

        return settings
Пример #24
0
def defineSettings():
    settings = [
        setting.Setting(
            CONF_CLEAR_XS,
            default=False,
            label="Clear XS",
            description=
            "Delete all cross section libraries before regenerating them.",
        ),
        setting.Setting(
            CONF_DPA_XS_DIRECTORY_PATH,
            default=
            "\\\\albert\\apps\\dev\\mc2\\3.2.2\\libraries\\endfb-vii.0\\damage_xs",
            label="DPA XS Directory Path",
            description="DPA XS Directory Path",
            options=[
                "\\\\albert\\apps\\dev\\mc2\\3.2.2\\libraries\\endfb-vii.0\\damage_xs"
            ],
        ),
        setting.Setting(
            CONF_MINIMUM_FISSILE_FRACTION,
            default=0.045,
            label="Minimum Fissile Fraction",
            description=
            "Minimum fissile fraction (fissile number densities / heavy metal number densities).",
        ),
        setting.Setting(
            CONF_MINIMUM_NUCLIDE_DENSITY,
            default=1e-15,
            label="Minimum nuclide density",
            description=
            "Density to use for nuclides and fission products at infinite dilution. This is also used as the minimum density.",
        ),
        setting.Setting(
            CONF_INFINITE_DILUTE_CUTOFF,
            default=1e-10,
            label="Infinite Dillute Cutoff",
            description=
            "Do not model nuclides with density less than this cutoff. Used with PARTISN and SERPENT.",
        ),
        setting.Setting(
            CONF_TOLERATE_BURNUP_CHANGE,
            default=0.0,
            label="Cross Section Burnup Group Tolerance",
            description=
            "Burnup window for computing cross sections. If the prior cross sections were computed within the window, new cross sections will not be generated and the prior calculated cross sections will be used.",
        ),
        setting.Setting(
            CONF_XS_BLOCK_REPRESENTATION,
            default="FluxWeightedAverage",
            label="Cross Section Block Averaging Method",
            description=
            "The type of averaging to perform when creating cross sections for a group of blocks",
            options=[
                "Median",
                "Average",
                "FluxWeightedAverage",
                "ComponentAverage1DSlab",
            ],
        ),
        setting.Setting(
            CONF_DISABLE_BLOCK_TYPE_EXCLUSION_IN_XS_GENERATION,
            default=False,
            label="Include All Block Types in XS Generation",
            description=
            "Use all blocks in a cross section group when generating a representative block. When this is disabled only `fuel` blocks will be considered",
        ),
        setting.Setting(
            CONF_XS_KERNEL,
            default="MC2v3",
            label="Lattice Physics Kernel",
            description=
            "Method to determine broad group cross sections for assemblies",
            options=["", "MC2v2", "MC2v3", "MC2v3-PARTISN", "SERPENT"],
        ),
        setting.Setting(
            CONF_XS_SCATTERING_ORDER,
            default=3,
            label="Scattering Order",
            description="Scattering order for the lattice physics calculation",
        ),
        setting.Setting(
            CONF_XS_BUCKLING_CONVERGENCE,
            default=1e-05,
            label="Buckling Convergence Criteria",
            description=
            "The convergence criteria for the buckling iteration if it is available in the lattice physics solver",
        ),
        setting.Setting(
            CONF_XS_EIGENVALUE_CONVERGENCE,
            default=1e-05,
            label="Eigenvalue Convergence Criteria",
            description="The convergence criteria for the eigenvalue",
        ),
    ]
    return settings