PolycrystalHex

The PolycrystalHex object generates a set of points in 2D space such that hexagonal patterns are generated from a resulting Voronoi Tesselation. The number of grains must be chosen such that the root is an even integer. Furthermore, a suitable number must be chosen that is supported by the mesh resolution and grain boundary width. At present, the object is supported for generating hexagons in 2D and hexagonal prisms in 3D with the columnar_3D option. It works with periodic boundary conditions. Once the grain structure has been generated, a coloring algorithm is used to assign order parameters to grains so that a reduced number of order parameters may be used. Typical numbers are given here:

DimensionRecommended OPs
2D8

See Polycrystal Initial Conditions for more information.

Typical usage in an input file:

[UserObjects]
  [voronoi]
    type = PolycrystalVoronoi
    grain_num = 100 # Number of grains
    rand_seed = 10
    int_width = 7
  []
  [grain_tracker]
    type = GrainTracker
  []
[]
[ICs]
  [PolycrystalICs]
    [PolycrystalColoringIC]
      polycrystal_ic_uo = voronoi
    []
  []
[]
(moose/modules/phase_field/examples/grain_growth/grain_growth_2D_graintracker.i)

Description and Syntax

PolycrystalHex

Perturbed hexagonal polycrystal

Input Parameters

  • variableArray of coupled variables

    C++ Type:std::vector<VariableName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Array of coupled variables

Required Parameters

  • boundaryThe list of boundaries (ids or names) from the mesh where this object applies

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:The list of boundaries (ids or names) from the mesh where this object applies

  • coloring_algorithmjpThe grain neighbor graph coloring algorithm to use: "jp" (DEFAULT) Jones and Plassmann, an efficient coloring algorithm, "power" an alternative stochastic algorithm, "greedy", a greedy assignment algorithm with stochastic updates to guarantee a valid coloring, "bt", a back tracking algorithm that produces good distributions but may experience exponential run time in the worst case scenario (works well on medium to large 2D problems)

    Default:jp

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:jp, power, greedy, bt

    Controllable:No

    Description:The grain neighbor graph coloring algorithm to use: "jp" (DEFAULT) Jones and Plassmann, an efficient coloring algorithm, "power" an alternative stochastic algorithm, "greedy", a greedy assignment algorithm with stochastic updates to guarantee a valid coloring, "bt", a back tracking algorithm that produces good distributions but may experience exponential run time in the worst case scenario (works well on medium to large 2D problems)

  • columnar_3DFalse3D microstructure will be columnar in the z-direction?

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:3D microstructure will be columnar in the z-direction?

  • compute_halo_mapsFalseInstruct the Postprocessor to communicate proper halo information to all ranks

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Instruct the Postprocessor to communicate proper halo information to all ranks

  • compute_var_to_feature_mapFalseInstruct the Postprocessor to compute the active vars to features map

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Instruct the Postprocessor to compute the active vars to features map

  • connecting_thresholdThe threshold for which an existing feature may be extended (defaults to "threshold")

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:The threshold for which an existing feature may be extended (defaults to "threshold")

  • enable_var_coloringFalseInstruct the Postprocessor to populate the variable index map.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Instruct the Postprocessor to populate the variable index map.

  • execute_onINITIALThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:INITIAL

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • file_nameFile containing grain centroids, if file_name is provided, the centroids from the file will be used.

    C++ Type:FileName

    Unit:(no unit assumed)

    Controllable:No

    Description:File containing grain centroids, if file_name is provided, the centroids from the file will be used.

  • flood_entity_typeELEMENTALDetermines whether the flood algorithm runs on nodes or elements

    Default:ELEMENTAL

    C++ Type:MooseEnum

    Unit:(no unit assumed)

    Options:NODAL, ELEMENTAL

    Controllable:No

    Description:Determines whether the flood algorithm runs on nodes or elements

  • grain_num0Number of grains being represented by the order parameters

    Default:0

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Number of grains being represented by the order parameters

  • grain_patch_size10How many nearest grains KDTree should return

    Default:10

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:How many nearest grains KDTree should return

  • int_width0Width of diffuse interfaces

    Default:0

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Width of diffuse interfaces

  • op_numArray of coupled variables (num_name)

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Array of coupled variables (num_name)

  • output_adjacency_matrixFalseOutput the Grain Adjacency Matrix used in the coloring algorithms. Additionally, the grain to OP assignments will be printed

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Output the Grain Adjacency Matrix used in the coloring algorithms. Additionally, the grain to OP assignments will be printed

  • perturbation_percent0The percent to randomly perturb centers of grains relative to the size of the grain

    Default:0

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:The percent to randomly perturb centers of grains relative to the size of the grain

  • point_patch_size1How many nearest points KDTree should return

    Default:1

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:How many nearest points KDTree should return

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • rand_seed0The random seed

    Default:0

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:The random seed

  • secondary_percolation_boundariesPaired boundaries with "primaryary_percolation_boundaries" parameter

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Paired boundaries with "primaryary_percolation_boundaries" parameter

  • specified_boundariesAn optional list of boundaries; if supplied, each feature is checked to determine whether it intersects any of the specified boundaries in this list.

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional list of boundaries; if supplied, each feature is checked to determine whether it intersects any of the specified boundaries in this list.

  • threshold0.5The threshold value for which a new feature may be started

    Default:0.5

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:The threshold value for which a new feature may be started

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

  • use_kdtreeFalseWhether or not to use a KD tree to speedup grain search

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not to use a KD tree to speedup grain search

  • use_less_than_threshold_comparisonTrueControls whether features are defined to be less than or greater than the threshold value.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Controls whether features are defined to be less than or greater than the threshold value.

  • var_name_baseArray of coupled variables (base_name)

    C++ Type:std::string

    Unit:(no unit assumed)

    Controllable:No

    Description:Array of coupled variables (base_name)

  • x_offset0.5Specifies offset of hexagon grid in x-direction

    Default:0.5

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Specifies offset of hexagon grid in x-direction

Optional Parameters

  • allow_duplicate_execution_on_initialTrueIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • condense_map_infoFalseDetermines whether we condense all the node values when in multimap mode (default: false)

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Determines whether we condense all the node values when in multimap mode (default: false)

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Unit:(no unit assumed)

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Unit:(no unit assumed)

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

  • outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this object

    Default:none

    C++ Type:std::vector<OutputName>

    Unit:(no unit assumed)

    Controllable:No

    Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object

  • primary_percolation_boundariesA list of boundaries used in conjunction with the corresponding "secondary_percolation_boundaries" parameter for determining if a feature creates a path connecting any pair of boundaries

    C++ Type:std::vector<BoundaryName>

    Unit:(no unit assumed)

    Controllable:No

    Description:A list of boundaries used in conjunction with the corresponding "secondary_percolation_boundaries" parameter for determining if a feature creates a path connecting any pair of boundaries

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

  • use_global_numberingTrueDetermine whether or not global numbers are used to label features on multiple maps (default: true)

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Determine whether or not global numbers are used to label features on multiple maps (default: true)

  • use_single_mapTrueDetermine whether information is tracked per coupled variable or consolidated into one (default: true)

    Default:True

    C++ Type:bool

    Unit:(no unit assumed)

    Controllable:No

    Description:Determine whether information is tracked per coupled variable or consolidated into one (default: true)

Advanced Parameters