Пример #1
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",
        ),
        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
Пример #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="",
            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_AXIAL_DOLLARSS_PER,
            default=False,
            label="Axial $/K",
            description=
            "Compute axial reactivity coefficients in $/K instead of $/kg. useful for RELAP.",
        ),
        setting.Setting(
            CONF_PERCENT_NA_REDUCTION,
            default=1.0,
            label="Density perturbation %",
            description=
            "The percent that density will be perturbed in reactivity coefficients",
        ),
        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",
        ),
        setting.Setting(
            CONF_RADIAL_EXP_PT,
            default=False,
            label="Radial Expansion Reactivity Coefficient",
            description=
            "Compute the core-wide radial expansion reactivity coefficient with perturbation theory",
        ),
        setting.Setting(
            CONF_AXIAL_EXP_PT,
            default=False,
            label="Axial Expansion Reactivity Coefficient",
            description=
            "Compute the core-wide fuel axial expansion reactivity coefficient with perturbation theory.",
        ),
        setting.Setting(
            CONF_STRUCT_WORTH_PT,
            default=False,
            label=
            "Core wide Structure Density Reactivity Coefficient with perturbation theory",
            description="None",
        ),
        setting.Setting(
            CONF_NUCLIDE_HALFLIFE_LIBRARY_PATH,
            default="\\\\albert\\apps\\dev\\NuclearData\\RIPL\\halflives\\",
            label="Halflife Library Path",
            description="directory path to RIPL data for nuclide levels",
        ),
    ]
    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
 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)
Пример #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_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)
Пример #8
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"],
         )
     ]
Пример #9
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
Пример #10
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
Пример #11
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",
        ),
        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.",
        ),
        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_CONDITIONAL_MODULE_NAME,
            default="",
            label="",
            description=
            "This is 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="",
            description=
            "This is a flag to let armi add additional mesh points if the "
            "dif3d 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 its "
            "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,
        ),
        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="",
            description=
            "This is the minimum ratio of mesh sizes (dP1/(dP1 + dP2)) "
            "allowable -- only active if automaticVariableMesh flag is set to True",
        ),
        setting.Setting(
            CONF_CYCLE_LENGTH,
            default=365.242199,
            label="Cycle Length",
            description=
            "Duration of one single cycle. If availability factor is below "
            "1, the reactor will be at power less than this. If variable, use "
            "cycleLengths setting.",
        ),
        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 the availability factor. 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.Schema([vol.Coerce(str)]),
        ),
        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.",
        ),
        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% CF followed by 10 100 CF. Empty list is "
            "constant duration set by 'availabilityFactor'.",
            schema=vol.Schema([vol.Coerce(str)]),
        ),
        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% PF followed by 10 100% PF. Specify zeros to indicate "
            "decay-only cycles (i.e. for decay heat analysis). Empty list implies "
            "always full rated power.",
            schema=vol.Schema([vol.Coerce(str)]),
        ),
        setting.Setting(
            CONF_BURN_STEPS,
            default=4,
            label="Burnup Steps per Cycle",
            description=
            "Number of depletion substeps in one cycle, n. Note: There "
            "will be n+1 time nodes so the burnup step time will be computed as cycle "
            "length/n+1.",
        ),
        setting.Setting(
            CONF_BETA,
            default=0.0,
            label="Effective delayed neutron fraction",
            description=
            "Effective delayed neutron fraction. You may need to enter the "
            "precursor groups in detail elsewhere to do kinetics.",
        ),
        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_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",
            schema=vol.Schema([int]),
        ),
        setting.Setting(
            CONF_BURNUP_PEAKING_FACTOR,
            default=0.0,
            label="Burn-up Peaking Factor",
            description="None",
        ),
        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_LOCATION_SNAPSHOT,
            default=[],
            label="Detailed Assems - Snapshot Locations",
            description=
            "Assembly locations and snapshots to dump detailed assembly "
            "data.",
        ),
        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_FUEL_HANDLER_NAME,
            default="",
            label="Fuel Handler Name",
            description="None",
        ),
        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 from 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_JUMP_RING_NUM,
                        default=8,
                        label="Jump Ring Number",
                        description="None"),
        setting.Setting(
            CONF_LEVELS_PER_CASCADE,
            default=14,
            label="Move per cascade",
            description="None",
        ),
        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`",
        ),
        setting.Setting(
            CONF_LOADING_FILE,
            default="",
            label="Blueprints File",
            description=
            "Browse for the blueprints/loading input file containing "
            "component dimensions, materials, etc.",
        ),
        setting.Setting(
            CONF_START_NODE,
            default=0,
            label="StartNode",
            description=
            "Timenode number (0 for BOC, etc.) to continue calulation from. "
            "Database will load from the time step just before.",
        ),
        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",
        ),
        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="mpiTasksPerNode",
            description=
            "Number of independent processes that are allocated to each "
            "cluster node. 0 means 1 process per CPU (or 12 per node on some "
            "clusters). Set between 1-12 to increase RAM and number of cores needed "
            "for large problems. ",
        ),
        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.",
        ),
        setting.Setting(
            CONF_NUM_CONTROL_BLOCKS,
            default=6,
            label="numControlBlocks",
            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.",
        ),
        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 powerFraction setting.",
        ),
        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 rx. coefficient run, etc.",
            options=["Standard", "Equilibrium", "Snapshots"],
        ),
        setting.Setting(
            CONF_EXPLICIT_REPEAT_SHUFFLES,
            default="",
            label="Browse for shuffle history to repeat",
            description=
            "Path to file that contains a detailed shuffling history that "
            "is to be repeated exactly.",
        ),
        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.",
        ),
        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",
        ),
        setting.Setting(
            CONF_TRACK_ASSEMS,
            default=True,
            label="Save discharged assems",
            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="",
            description=
            "This is the limit of error in between the block's cross "
            "sectional area and the reference block used during the assembly area "
            "consistency check",
        ),
        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="Indep. Vars",
            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 T (C)",
            description="The inlet temperature of the reactor in C",
        ),
        setting.Setting(
            CONF_T_OUT,
            default=510.0,
            label="Outlet T (C)",
            description="The outlet temperature of the reactor in C",
        ),
        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."),
        ),
        setting.Setting(
            CONF_HEX_RING_GEOMETRY_CONVERSION,
            default=False,
            label="Convert Using Hexagonal Ring Zones",
            description=
            "Convert the core geometry model to RZ/RZT using hexagonal ring zones. Note: If this is disabled, circular ring zones will be used.",
        ),
    ]
    return settings
Пример #12
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",
        ),
    ]
    return settings
Пример #13
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)
Пример #14
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
Пример #15
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).",
            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="DIF3D-Nodal",
            label="Neutronics Kernel",
            description=
            "The neutronics / depletion solver for global flux solve.",
            options=[
                "DIF3D-Nodal",
                "DIF3D-FD",
                "VARIANT",
                "DIFNT",
            ],  # lol
            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.",
        ),
    ]

    return settings