- variableArray of coupled variables
C++ Type:std::vector<VariableName>
Controllable:No
Description:Array of coupled variables
PolycrystalVoronoi
The PolycrystalVoronoi UserObject either generates a set of random points or reads a set of grain centroids from a file and performs a Voronoi tessellation to produce a grain structure. The number of grains may be set by the user but a suitable number must be chosen that is supported by the mesh resolution and grain boundary width. 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:
Dimension | Recommended OPs |
---|---|
2D | 8 |
3D | 25 |
See Polycrystal Initial Conditions for more information.
To reduce the computational cost associated with setting up a polycrystal structure with a large number of grains, an alternative option is to use the KDTree
approach. In this case, a search tree is built a-priori such that the time to search nearest points and neighboring grains is optimized. To leverage this approach for an initial condition with diffused interfaces, it is recommended that users determine what is the minimum grain_patch_size
required for their problem (the default value is grain_patch_size = 10
).
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
[]
[]
[]
(modules/phase_field/examples/grain_growth/grain_growth_2D_graintracker.i)An example of activating KDTree
is provided below:
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 10
use_kdtree = true
point_patch_size = 1
grain_patch_size = 10
[../]
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiIC_periodic.i)Description and Syntax
Random Voronoi tessellation polycrystal (used by PolycrystalVoronoiAction)
Input Parameters
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
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
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
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
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
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
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
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, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:INITIAL
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, 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, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- file_nameFile containing grain centroids, if file_name is provided, the centroids from the file will be used.
C++ Type:FileName
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
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
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
Controllable:No
Description:How many nearest grains KDTree should return
- int_width0Width of diffuse interfaces
Default:0
C++ Type:double
Controllable:No
Description:Width of diffuse interfaces
- op_numArray of coupled variables (num_name)
C++ Type:unsigned int
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
Controllable:No
Description:Output the Grain Adjacency Matrix used in the coloring algorithms. Additionally, the grain to OP assignments will be printed
- point_patch_size1How many nearest points KDTree should return
Default:1
C++ Type:unsigned int
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
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
Controllable:No
Description:The random seed
- secondary_percolation_boundariesPaired boundaries with "primaryary_percolation_boundaries" parameter
C++ Type:std::vector<BoundaryName>
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>
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
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
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
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
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
Controllable:No
Description:Array of coupled variables (base_name)
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
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
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>
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
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
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
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
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
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>
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>
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
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
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
Controllable:No
Description:Determine whether information is tracked per coupled variable or consolidated into one (default: true)
Advanced Parameters
Input Files
- (modules/phase_field/test/tests/grain_growth/voronoi_adaptivity_ghost.i)
- (modules/phase_field/test/tests/grain_tracker_test/distributed_poly_ic.i)
- (modules/phase_field/test/tests/polycrystal_diffusion/polycrystal_void_diffusion.i)
- (modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiIC_periodic.i)
- (modules/phase_field/test/tests/DeformedGrain/DeformedGrain.i)
- (modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_notperiodic.i)
- (modules/phase_field/test/tests/polycrystal_diffusion/polycrystal_void_diffusion_parsed.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_advanced_op.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_test_elemental.i)
- (modules/phase_field/examples/grain_growth/grain_growth_linearized_interface.i)
- (modules/phase_field/test/tests/grain_growth/voronoi.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_halo_over_bc.i)
- (modules/phase_field/test/tests/grain_growth/evolution.i)
- (modules/phase_field/examples/grain_growth/3D_6000_gr.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_nodal.i)
- (modules/phase_field/test/tests/grain_growth_w_linearized_interface/voronoi_linearized_interface.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_remapping_linearized_interface_test.i)
- (modules/phase_field/examples/grain_growth/grain_growth_2D_voronoi_newadapt.i)
- (modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_moregrains.i)
- (modules/phase_field/examples/grain_growth/grain_growth_2D_voronoi.i)
- (modules/phase_field/test/tests/new_initial_conditions/prepare_mesh.i)
- (modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoi_fromfile.i)
- (modules/phase_field/test/tests/initial_conditions/BlockRestriction.i)
- (modules/phase_field/test/tests/grain_growth/voronoi_columnar_3D.i)
- (modules/combined/test/tests/grain_texture/grain_texture_test_2.i)
- (modules/phase_field/examples/grain_growth/grain_growth_2D_graintracker.i)
- (modules/combined/test/tests/grain_texture/grain_texture_test_1.i)
- (modules/combined/examples/phase_field-mechanics/grain_texture.i)
- (modules/combined/examples/phase_field-mechanics/poly_grain_growth_2D_eldrforce.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_remapping_test.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_volume_changing.i)
- (modules/phase_field/examples/grain_growth/grain_growth_3D.i)
- (modules/phase_field/test/tests/Grain_Velocity_Computation/GrainBoundaryVelocityTest.i)
- (modules/phase_field/test/tests/grain_growth/constant_mobility.i)
- (modules/phase_field/test/tests/initial_conditions/polycrystal_BndsCalcIC.i)
- (modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_periodic_fromfile.i)
- (modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_periodic.i)
Child Objects
(modules/phase_field/examples/grain_growth/grain_growth_2D_graintracker.i)
# This simulation predicts GB migration of a 2D copper polycrystal with 100 grains represented with 8 order parameters
# Mesh adaptivity and time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 44 # Number of elements in the x-direction
ny = 44 # Number of elements in the y-direction
xmax = 1000 # maximum x-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
elem_type = QUAD4 # Type of elements used in the mesh
uniform_refine = 2 # Initial uniform refinement of the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 8 # Number of order parameters used
var_name_base = gr # Base name of grains
[]
[Modules]
[PhaseField]
[GrainGrowth]
[]
[]
[]
[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
[]
[]
[]
[AuxVariables]
# Dependent variables
[unique_grains]
order = CONSTANT
family = MONOMIAL
[]
[var_indices]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[]
[]
[BCs]
# Boundary Condition block
[Periodic]
[All]
auto_direction = 'x y' # Makes problem periodic in the x and y directions
[]
[]
[]
[Materials]
[CuGrGr]
# Material properties
type = GBEvolution
T = 450 # Constant temperature of the simulation (for mobility calculation)
wGB = 14 # Width of the diffuse GB
GBmob0 = 2.5e-6 #m^4(Js) for copper from schonfelder1997molecular bibtex entry
Q = 0.23 #eV for copper from schonfelder1997molecular bibtex entry
GBenergy = 0.708 #J/m^2 from schonfelder1997molecular bibtex entry
[]
[]
[Postprocessors]
# Scalar postprocessors
[dt]
# Outputs the current time step
type = TimestepSize
[]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
# Uses newton iteration to solve the problem.
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 50 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 10 # Max number of nonlinear iterations
end_time = 4000
[TimeStepper]
type = IterationAdaptiveDT
dt = 20 # Initial time step. In this simulation it changes.
optimal_iterations = 6 # Time step will adapt to maintain this number of nonlinear iterations
[]
[Adaptivity]
# Block that turns on mesh adaptivity. Note that mesh will never coarsen beyond initial mesh (before uniform refinement)
initial_adaptivity = 2 # Number of times mesh is adapted to initial condition
refine_fraction = 0.8 # Fraction of high error that will be refined
coarsen_fraction = 0.05 # Fraction of low error that will coarsened
max_h_level = 2 # Max number of refinements used, starting from initial mesh (before uniform refinement)
[]
[]
[Outputs]
exodus = true # Exodus file will be outputted
csv = true
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiIC_periodic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 85
ny = 85
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 5
grain_num = 5
var_name_base = gr
int_width = 10
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./bnds]
type = BndsCalcIC
variable = bnds
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 10
use_kdtree = true
point_patch_size = 1
grain_patch_size = 10
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi_adaptivity_ghost.i)
[Mesh]
[drmg]
type = DistributedRectilinearMeshGenerator
dim = 2
nx = 30
ny = 30
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
partition = linear
[]
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 105
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[ghosting0]
order = CONSTANT
family = MONOMIAL
[]
[ghosting1]
order = CONSTANT
family = MONOMIAL
[]
[ghosting2]
order = CONSTANT
family = MONOMIAL
[]
[evaluable0]
order = CONSTANT
family = MONOMIAL
[]
[evaluable1]
order = CONSTANT
family = MONOMIAL
[]
[evaluable2]
order = CONSTANT
family = MONOMIAL
[]
[proc]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ghosting0]
type = ElementUOAux
variable = ghosting0
element_user_object = ghosting_uo0
field_name = "ghosted"
execute_on = initial
[]
[ghosting1]
type = ElementUOAux
variable = ghosting1
element_user_object = ghosting_uo1
field_name = "ghosted"
execute_on = initial
[]
[ghosting2]
type = ElementUOAux
variable = ghosting2
element_user_object = ghosting_uo2
field_name = "ghosted"
execute_on = initial
[]
[evaluable0]
type = ElementUOAux
variable = evaluable0
element_user_object = ghosting_uo0
field_name = "evaluable"
execute_on = initial
[]
[evaluable1]
type = ElementUOAux
variable = evaluable1
element_user_object = ghosting_uo1
field_name = "evaluable"
execute_on = initial
[]
[evaluable2]
type = ElementUOAux
variable = evaluable2
element_user_object = ghosting_uo2
field_name = "evaluable"
execute_on = initial
[]
[proc]
type = ProcessorIDAux
variable = proc
execute_on = initial
[]
[]
[UserObjects]
[ghosting_uo0]
type = ElemSideNeighborLayersGeomTester
execute_on = initial
element_side_neighbor_layers = 2
rank = 0
[]
[ghosting_uo1]
type = ElemSideNeighborLayersGeomTester
execute_on = initial
element_side_neighbor_layers = 2
rank = 1
[]
[ghosting_uo2]
type = ElemSideNeighborLayersGeomTester
execute_on = initial
element_side_neighbor_layers = 2
rank = 2
[]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
active = ''
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Preconditioning]
active = ''
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-13
start_time = 0.0
num_steps = 2
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_tracker_test/distributed_poly_ic.i)
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
uniform_refine = 1 # Initial uniform refinement of the mesh
dim = 2 # Problem dimension
nx = 12 # Number of elements in the x-direction
ny = 12 # Number of elements in the y-direction
xmax = 1000 # maximum x-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
elem_type = QUAD4 # Type of elements used in the mesh
parallel_type = distributed
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = '8' # Number of order parameters used
var_name_base = 'gr' # Base name of grains
order = 'CONSTANT'
family = 'MONOMIAL'
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[PolycrystalVariables]
order = FIRST
family = LAGRANGE
[]
[]
[UserObjects]
[voronoi]
type = PolycrystalVoronoi
grain_num = 12 # Number of grains
coloring_algorithm = jp
rand_seed = 10
[]
[grain_tracker]
type = GrainTracker
threshold = 0.2
verbosity_level = 1
connecting_threshold = 0.08
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
execute_on = 'initial timestep_end'
polycrystal_ic_uo = voronoi
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[]
[]
[]
[AuxVariables]
# Dependent variables
[bnds]
# Variable used to visualize the grain boundaries in the simulation
order = FIRST
family = LAGRANGE
[]
[unique_grains]
[]
[var_indices]
[]
[ghost_regions]
[]
[halos]
[]
[halo0]
[]
[halo1]
[]
[halo2]
[]
[halo3]
[]
[halo4]
[]
[halo5]
[]
[halo6]
[]
[halo7]
[]
[centroids]
order = CONSTANT
family = MONOMIAL
[]
[proc_id]
[]
[voronoi_id]
[]
[evaluable_elems]
[]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[]
[ghosted_entities]
type = FeatureFloodCountAux
variable = ghost_regions
flood_counter = grain_tracker
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
[]
[halos]
type = FeatureFloodCountAux
variable = halos
flood_counter = grain_tracker
field_display = HALOS
execute_on = 'initial timestep_end'
[]
[halo0]
type = FeatureFloodCountAux
variable = halo0
map_index = 0
field_display = HALOS
flood_counter = grain_tracker
[]
[halo1]
type = FeatureFloodCountAux
variable = halo1
map_index = 1
field_display = HALOS
flood_counter = grain_tracker
[]
[halo2]
type = FeatureFloodCountAux
variable = halo2
map_index = 2
field_display = HALOS
flood_counter = grain_tracker
[]
[halo3]
type = FeatureFloodCountAux
variable = halo3
map_index = 3
field_display = HALOS
flood_counter = grain_tracker
[]
[halo4]
type = FeatureFloodCountAux
variable = halo4
map_index = 4
field_display = HALOS
flood_counter = grain_tracker
[]
[halo5]
type = FeatureFloodCountAux
variable = halo5
map_index = 5
field_display = HALOS
flood_counter = grain_tracker
[]
[halo6]
type = FeatureFloodCountAux
variable = halo6
map_index = 6
field_display = HALOS
flood_counter = grain_tracker
[]
[halo7]
type = FeatureFloodCountAux
variable = halo7
map_index = 7
field_display = HALOS
flood_counter = grain_tracker
[]
[centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = 'timestep_end'
field_display = CENTROID
flood_counter = grain_tracker
[]
[proc_id]
type = ProcessorIDAux
variable = proc_id
execute_on = 'initial'
[]
[voronoi_id]
type = VoronoiICAux
variable = voronoi_id
execute_on = 'initial'
polycrystal_ic_uo = voronoi
[]
[]
[Materials]
[CuGrGr]
# Material properties
type = GBEvolution
T = '450' # Constant temperature of the simulation (for mobility calculation)
wGB = 125 # Width of the diffuse GB
GBmob0 = 2.5e-6 # m^4(Js) for copper from schonfelder1997molecular bibtex entry
Q = 0.23 # eV for copper from schonfelder1997molecular bibtex entry
GBenergy = 0.708 # J/m^2 from schonfelder1997molecular bibtex entry
[]
[]
[Postprocessors]
# Scalar postprocessors
[dt]
# Outputs the current time step
type = TimestepSize
[]
[]
[Executioner]
# Uses newton iteration to solve the problem.
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_rel_tol = 1e-10 # Absolute tolerance for nonlienar solves
start_time = 0.0
num_steps = 2
dt = 300
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/polycrystal_diffusion/polycrystal_void_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
xmax = 200
ymax = 200
[]
[GlobalParams]
op_num = 4
grain_num = 4
var_name_base = gr
int_width = 8
radius = 20
bubspac = 1
numbub = 1
[]
[AuxVariables]
[bnds]
[]
[]
[AuxKernels]
[bnds]
type = BndsCalcAux
variable = bnds
v = 'gr0 gr1 gr2 gr3'
execute_on = 'INITIAL'
[]
[]
[Variables]
[PolycrystalVariables]
[]
[bubble]
[]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalVoronoiVoidIC]
invalue = 1.0
outvalue = 0.0
polycrystal_ic_uo = voronoi
rand_seed = 10
[../]
[../]
[./bubble_IC]
variable = bubble
type = PolycrystalVoronoiVoidIC
structure_type = voids
invalue = 1.0
outvalue = 0.0
polycrystal_ic_uo = voronoi
rand_seed = 10
[../]
[]
[Materials]
[Diff_v]
type = PolycrystalDiffusivity
c = bubble
v = 'gr0 gr1 gr2 gr3'
diffusivity = diffusivity
outputs = exodus
output_properties = 'diffusivity'
[]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'bubble gr0 gr1 gr2 gr3'
phase_etas = 'bubble'
[../]
[./hm]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hm
all_etas = 'bubble gr0 gr1 gr2 gr3'
phase_etas = 'gr0 gr1 gr2 gr3'
[../]
[]
[UserObjects]
[voronoi]
type = PolycrystalVoronoi
rand_seed = 1268
[]
[]
[Kernels]
[bubble]
type = TimeDerivative
variable = bubble
[]
[gr0]
type = TimeDerivative
variable = gr0
[]
[gr1]
type = TimeDerivative
variable = gr1
[]
[gr2]
type = TimeDerivative
variable = gr2
[]
[gr3]
type = TimeDerivative
variable = gr3
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
num_steps = 1
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiIC_periodic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 85
ny = 85
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 5
grain_num = 5
var_name_base = gr
int_width = 10
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./bnds]
type = BndsCalcIC
variable = bnds
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 10
use_kdtree = true
point_patch_size = 1
grain_patch_size = 10
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/DeformedGrain/DeformedGrain.i)
# This example tests the implementation of PolycrstalStoredEnergy kernels that assigns excess stored energy to grains with dislocation density
[Mesh]
type = GeneratedMesh
dim = 2
nx = 32
ny = 32
nz = 0
xmin = 0
xmax = 64
ymin = 0
ymax = 64
[]
[GlobalParams]
op_num = 8
deformed_grain_num = 16
var_name_base = gr
grain_num = 18
grain_tracker = grain_tracker
time_scale = 1e-2
length_scale = 1e-8
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 81
coloring_algorithm = bt
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.2
connecting_threshold = 0.08
compute_var_to_feature_map = true
flood_entity_type = elemental
execute_on = ' initial timestep_begin'
outputs = none
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalStoredEnergy]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[Materials]
[./deformed]
type = DeformedGrainMaterial
int_width = 4.0
outputs = exodus
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 1
nl_abs_tol = 1e-8
dt = 0.20
[]
[Outputs]
exodus = true
time_step_interval = 1
show = bnds
perf_graph = true
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_notperiodic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 85
ny = 85
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 5
grain_num = 5
var_name_base = gr
numbub = 20
bubspac = 22
radius = 8
int_width = 10
invalue = 1
outvalue = 0.1
[]
[Variables]
[./c]
[../]
[./w]
scaling = 1.0e4
[../]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalVoronoiVoidIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./c_IC]
variable = c
type = PolycrystalVoronoiVoidIC
structure_type = voids
polycrystal_ic_uo = voronoi
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 12444
int_width = 0
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/polycrystal_diffusion/polycrystal_void_diffusion_parsed.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
xmax = 200
ymax = 200
[]
[GlobalParams]
op_num = 4
grain_num = 4
var_name_base = gr
int_width = 8
radius = 20
bubspac = 1
numbub = 1
[]
[AuxVariables]
[bnds]
[]
[]
[AuxKernels]
[bnds]
type = BndsCalcAux
variable = bnds
v = 'gr0 gr1 gr2 gr3'
execute_on = 'INITIAL'
[]
[]
[Variables]
[PolycrystalVariables]
[]
[c]
[]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalVoronoiVoidIC]
invalue = 1.0
outvalue = 0.0
polycrystal_ic_uo = voronoi
rand_seed = 10
[../]
[../]
[./bubble_IC]
variable = c
type = PolycrystalVoronoiVoidIC
structure_type = voids
invalue = 1.0
outvalue = 0.0
polycrystal_ic_uo = voronoi
rand_seed = 10
[../]
[]
[Materials]
[Diff_v]
type = PolycrystalDiffusivity
c = c
v = 'gr0 gr1 gr2 gr3'
diffusivity = diffusivity
outputs = exodus
output_properties = 'diffusivity'
[]
[./hb]
type = DerivativeParsedMaterial
property_name = hb
coupled_variables = 'c'
expression = 'c * c * c * (6 * c * c - 15 * c + 10)'
[../]
[./hm]
type = DerivativeParsedMaterial
property_name = hm
coupled_variables = 'c'
material_property_names = 'hb'
expression = '(1-hb)'
[../]
[]
[UserObjects]
[voronoi]
type = PolycrystalVoronoi
rand_seed = 1268
[]
[]
[Kernels]
[bubble]
type = TimeDerivative
variable = c
[]
[gr0]
type = TimeDerivative
variable = gr0
[]
[gr1]
type = TimeDerivative
variable = gr1
[]
[gr2]
type = TimeDerivative
variable = gr2
[]
[gr3]
type = TimeDerivative
variable = gr3
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
num_steps = 1
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
exodus = true
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_advanced_op.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
parallel_type = replicated # Periodic BCs
[]
[GlobalParams]
op_num = 8
var_name_base = gr
order = CONSTANT
family = MONOMIAL
[]
[Variables]
[./PolycrystalVariables]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 1
grain_num = 35
coloring_algorithm = bt
output_adjacency_matrix = true
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.5
connecting_threshold = 0.5
compute_halo_maps = true # For displaying HALO fields
remap_grains = false
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
[../]
[./var_indices]
[../]
[./halos]
[../]
[./halo0]
[../]
[./halo1]
[../]
[./halo2]
[../]
[./halo3]
[../]
[./halo4]
[../]
[./halo5]
[../]
[./halo6]
[../]
[./halo7]
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[./halo0]
type = FeatureFloodCountAux
variable = halo0
map_index = 0
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo1]
type = FeatureFloodCountAux
variable = halo1
map_index = 1
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo2]
type = FeatureFloodCountAux
variable = halo2
map_index = 2
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo3]
type = FeatureFloodCountAux
variable = halo3
map_index = 3
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo4]
type = FeatureFloodCountAux
variable = halo4
map_index = 4
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo5]
type = FeatureFloodCountAux
variable = halo5
map_index = 5
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo6]
type = FeatureFloodCountAux
variable = halo6
map_index = 6
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo7]
type = FeatureFloodCountAux
variable = halo7
map_index = 7
field_display = HALOS
flood_counter = grain_tracker
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./CuGrGr]
type = GBEvolution
T = 500 # K
wGB = 100 # nm
GBmob0 = 2.5e-6
Q = 0.23
GBenergy = 0.708
molar_volume = 7.11e-6
[../]
[]
[Postprocessors]
[./DOFs]
type = NumDOFs
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 0
dt = 100.0
[]
[Outputs]
csv = true
perf_graph = true
[]
[Problem]
solve = false
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_test_elemental.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 12 # Should match grain_num so we can test with FauxGrainTracker too
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 12 # Number of grains
coloring_algorithm = bt # bt will assign one grain to each op if they are the same
rand_seed = 8675
[../]
[./grain_tracker]
type = GrainTracker
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./CuGrGr]
type = GBEvolution
T = 500 # K
wGB = 100 # nm
GBmob0 = 2.5e-6
Q = 0.23
GBenergy = 0.708
molar_volume = 7.11e-6
[../]
[]
[Postprocessors]
[./DOFs]
type = NumDOFs
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 100.0
[]
[Adaptivity]
marker = error_marker
max_h_level = 1
[./Markers]
active = 'error_marker'
[./bnds_marker]
type = ValueThresholdMarker
invert = true
refine = 0.85
coarsen = 0.975
third_state = DO_NOTHING
variable = bnds
[../]
[./error_marker]
type = ErrorFractionMarker
coarsen = 0.1
indicator = bnds_error
refine = 0.7
[../]
[../]
[./Indicators]
[./bnds_error]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/grain_growth/grain_growth_linearized_interface.i)
[GlobalParams]
bound_value = 5.0
op_num = 8
var_name_base = phi
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1000
ymax = 1000
nx = 100
ny = 100
uniform_refine = 1
[]
[Modules]
[PhaseField]
[GrainGrowthLinearizedInterface]
op_name_base = gr
mobility = L
kappa = kappa_op
[]
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = RandomVoronoi
nonlinear_preconditioning = true
[]
[]
[]
[UserObjects]
[RandomVoronoi]
type = PolycrystalVoronoi
grain_num = 60
int_width = 10
rand_seed = 103838
[]
[grain_tracker]
type = GrainTracker
threshold = -4.0
compute_halo_maps = true # Only necessary for displaying HALOS
[]
[]
[AuxVariables]
[unique_grains]
order = CONSTANT
family = MONOMIAL
[]
[var_indices]
order = CONSTANT
family = MONOMIAL
[]
[halos]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[]
[halos]
type = FeatureFloodCountAux
variable = halos
flood_counter = grain_tracker
field_display = HALOS
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[properties]
type = GenericConstantMaterial
prop_names = 'gbmob gbenergy gbwidth gamma_asymm'
prop_values = '100 6 10 1.5'
[]
[kappa_op]
type = ParsedMaterial
material_property_names = 'gbenergy gbwidth'
property_name = kappa_op
expression = '3/4*gbenergy*gbwidth'
[]
[L]
type = ParsedMaterial
material_property_names = 'gbmob gbwidth'
property_name = L
expression = '4/3*gbmob/gbwidth'
[]
[mu]
type = ParsedMaterial
material_property_names = 'gbenergy gbwidth'
property_name = mu
expression = '6*gbenergy/gbwidth'
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = 'initial TIMESTEP_END'
[]
[]
[BCs]
[Periodic]
[All]
auto_direction = 'x y'
[]
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -snes_type'
petsc_options_value = 'hypre boomeramg vinewtonrsls'
l_tol = 1e-4
nl_max_its = 10
l_max_its = 45
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.02
optimal_iterations = 6
[]
end_time = 30
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 105
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
active = ''
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Preconditioning]
active = ''
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 80.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_halo_over_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 35
ny = 35
xmax = 1000
ymax = 1000
elem_type = QUAD4
parallel_type = replicated # Periodic BCs
[]
[GlobalParams]
op_num = 8 # Number of order parameters used
var_name_base = 'gr' # Base name of grains
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 12
grain_num = 15 # Number of grains
coloring_algorithm = bt
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.2
connecting_threshold = 0.08
flood_entity_type = ELEMENTAL
compute_halo_maps = true # Only necessary for displaying HALOS
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./ghost_regions]
order = CONSTANT
family = MONOMIAL
[../]
[./halos]
order = CONSTANT
family = MONOMIAL
[../]
[./proc_id]
order = CONSTANT
family = MONOMIAL
[../]
[./halo0]
order = CONSTANT
family = MONOMIAL
[../]
[./halo1]
order = CONSTANT
family = MONOMIAL
[../]
[./halo2]
order = CONSTANT
family = MONOMIAL
[../]
[./halo3]
order = CONSTANT
family = MONOMIAL
[../]
[./halo4]
order = CONSTANT
family = MONOMIAL
[../]
[./halo5]
order = CONSTANT
family = MONOMIAL
[../]
[./halo6]
order = CONSTANT
family = MONOMIAL
[../]
[./halo7]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[../]
[./ghosted_entities]
type = FeatureFloodCountAux
variable = ghost_regions
flood_counter = grain_tracker
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
[../]
[./halos]
type = FeatureFloodCountAux
variable = halos
flood_counter = grain_tracker
field_display = HALOS
execute_on = 'initial timestep_end'
[../]
[./proc_id]
type = ProcessorIDAux
variable = proc_id
[../]
[./halo0]
type = FeatureFloodCountAux
variable = halo0
map_index = 0
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo1]
type = FeatureFloodCountAux
variable = halo1
map_index = 1
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo2]
type = FeatureFloodCountAux
variable = halo2
map_index = 2
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo3]
type = FeatureFloodCountAux
variable = halo3
map_index = 3
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo4]
type = FeatureFloodCountAux
variable = halo4
map_index = 4
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo5]
type = FeatureFloodCountAux
variable = halo5
map_index = 5
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo6]
type = FeatureFloodCountAux
variable = halo6
map_index = 6
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo7]
type = FeatureFloodCountAux
variable = halo7
map_index = 7
field_display = HALOS
flood_counter = grain_tracker
[../]
[]
[BCs]
[./Periodic]
[./top_bottom]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./CuGrGr]
type = GBEvolution
T = '450'
wGB = 125
GBmob0 = 2.5e-6
Q = 0.23
GBenergy = 0.708
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 40
nl_rel_tol = 1e-11
dt = 25
num_steps = 1
[]
[Outputs]
exodus = true # Exodus file will be outputted
[]
(modules/phase_field/test/tests/grain_growth/evolution.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 4
var_name_base = 'gr'
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 102
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'timestep_end'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Moly_GB]
type = GBEvolution
time_scale = 1.0
GBmob0 = 3.986e-6
T = 500 # K
wGB = 60 # nm
Q = 1.0307
GBenergy = 2.4
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
execute_on = 'initial timestep_end'
[../]
[./avg_grain_vol]
type = AverageGrainVolume
grain_num = 4
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/grain_growth/3D_6000_gr.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 180
ny = 180
nz = 180
xmin = 0
xmax = 180
ymin = 0
ymax = 180
zmin = 0
zmax = 180
elem_type = HEX8
[]
[GlobalParams]
op_num = 28
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 6000 # Number of grains
rand_seed = 8675 # 301
coloring_algorithm = jp
[../]
[./term]
type = Terminator
expression = 'grain_tracker < 218'
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./ghost_elements]
order = CONSTANT
family = MONOMIAL
[../]
[./halos]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[./ghost_elements]
type = FeatureFloodCountAux
variable = ghost_elements
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[./halos]
type = FeatureFloodCountAux
variable = halos
field_display = HALOS
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[]
#[BCs]
# [./Periodic]
# [./All]
# auto_direction = 'x y'
# [../]
# [../]
#[]
[Materials]
[./Copper]
type = GBEvolution
T = 500
wGB = 3 # um
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
molar_volume = 7.11e-6 #Molar volume in m^3/mol
length_scale = 1.0e-6
time_scale = 1.0
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./n_elements]
type = NumElems
execute_on = timestep_end
[../]
[./n_nodes]
type = NumNodes
execute_on = timestep_end
[../]
[./DOFs]
type = NumDOFs
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.1
compute_halo_maps = true
[../]
[]
#[Preconditioning]
# [./SMP]
# type = SMP
# full = true
# [../]
#[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK #Preconditioned JFNK (default)
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 500
dt = 0.0002
[./TimeStepper]
type = IterationAdaptiveDT
cutback_factor = 0.9
dt = 0.0002
growth_factor = 1.1
optimal_iterations = 8
[../]
#[./Adaptivity]
# initial_adaptivity = 4
# refine_fraction = 0.6
# coarsen_fraction = 0.1
# max_h_level = 4
# print_changed_info = true
#[../]
[]
[Outputs]
nemesis = true
checkpoint = true
csv = true
[./console]
type = Console
[../]
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_nodal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 10
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 10 # Number of grains
coloring_algorithm = bt # bt will assign one grain to each op if they are the same
rand_seed = 1
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.5
connecting_threshold = 0.2
# Note: This is here for demonstration purposes
# use elemental for most simulations
flood_entity_type = NODAL
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = FIRST
family = LAGRANGE
[../]
[./var_indices]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[]
[BCs]
[]
[Materials]
[./CuGrGr]
type = GBEvolution
T = 500 # K
wGB = 100 # nm
GBmob0 = 2.5e-6
Q = 0.23
GBenergy = 0.708
molar_volume = 7.11e-6
[../]
[]
[Postprocessors]
[./DOFs]
type = NumDOFs
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_growth_w_linearized_interface/voronoi_linearized_interface.i)
[GlobalParams]
bound_value = 5.0
op_num = 5
var_name_base = phi
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 100
ymax = 100
nx = 20
ny = 20
[]
[Modules]
[PhaseField]
[GrainGrowthLinearizedInterface]
op_name_base = gr
mobility = L
kappa = kappa_op
[]
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = RandomVoronoi
linearized_interface = true
[]
[]
[]
[UserObjects]
[RandomVoronoi]
type = PolycrystalVoronoi
grain_num = 5
int_width = 10
rand_seed = 103838
[]
[]
[Materials]
[GBEovlution]
type = GBEvolution
GBenergy = 0.97
GBMobility = 0.6e-6
T = 300
wGB = 10
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_type -snes_type'
petsc_options_value = 'bjacobi gmres vinewtonrsls'
dt = 0.05
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_remapping_linearized_interface_test.i)
# This simulation predicts GB migration of a 2D copper polycrystal with 100 grains represented with 18 order parameters
# Mesh adaptivity and time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 25 # Number of elements in the x-direction
ny = 25 # Number of elements in the y-direction
xmax = 1000 # maximum x-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 8 # Number of order parameters used
var_name_base = psi # Base name of grains
bound_value = 5 # +/- bound value
[]
[Modules]
[PhaseField]
[GrainGrowthLinearizedInterface]
op_name_base = gr
mobility = L
kappa = kappa_op
[]
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
linearized_interface = true
[]
[]
[]
[UserObjects]
[voronoi]
type = PolycrystalVoronoi
grain_num = 10 # Number of grains
rand_seed = 13405
int_width = 100
[]
[grain_tracker]
type = GrainTracker
threshold = -4
[]
[]
[Materials]
[CuGrGr]
# Material properties
type = GBEvolution
T = 450 # Constant temperature of the simulation (for mobility calculation)
wGB = 100 # Width of the diffuse GB
GBmob0 = 2.5e-6 # m^4(Js) for copper from schonfelder1997molecular bibtex entry
Q = 0.23 # eV for copper from schonfelder1997molecular bibtex entry
GBenergy = 0.708 # J/m^2 from schonfelder1997molecular bibtex entry
[]
[]
[Executioner]
# Uses newton iteration to solve the problem.
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -snes_type'
petsc_options_value = 'hypre boomeramg vinewtonrsls'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 13 # Max number of nonlinear iterations
num_steps = 7
dt = 100
[]
[Outputs]
csv = true
[]
(modules/phase_field/examples/grain_growth/grain_growth_2D_voronoi_newadapt.i)
# This simulation predicts GB migration of a 2D copper polycrystal with 15 grains
# Mesh adaptivity (new system) and time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
# We are not using the GrainTracker in this example so the number
# of order paramaters must match the number of grains.
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 12 # Number of elements in the x-direction
ny = 12 # Number of elements in the y-direction
nz = 0 # Number of elements in the z-direction
xmin = 0 # minimum x-coordinate of the mesh
xmax = 1000 # maximum x-coordinate of the mesh
ymin = 0 # minimum y-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
zmin = 0
zmax = 0
elem_type = QUAD4 # Type of elements used in the mesh
uniform_refine = 3 # Initial uniform refinement of the mesh
parallel_type = replicated # Periodic BCs
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 15 # Number of grains
var_name_base = gr # Base name of grains
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 15
rand_seed = 42
coloring_algorithm = bt # We must use bt to force the UserObject to assign one grain to each op
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[./PolycrystalVariables]
# Custom action that created all of the grain variables and sets their initial condition
[../]
[]
[AuxVariables]
# Dependent variables
[./bnds]
# Variable used to visualize the grain boundaries in the simulation
[../]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[./PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[../]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[./bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
# Boundary Condition block
[./Periodic]
[./top_bottom]
auto_direction = 'x y' # Makes problem periodic in the x and y directions
[../]
[../]
[]
[Materials]
[./CuGrGr]
# Material properties
type = GBEvolution # Quantitative material properties for copper grain growth. Dimensions are nm and ns
GBmob0 = 2.5e-6 # Mobility prefactor for Cu from schonfelder1997molecular bibtex entry
GBenergy = 0.708 # GB energy for Cu from schonfelder1997molecular bibtex entry
Q = 0.23 # Activation energy for grain growth from Schonfelder 1997
T = 450 # Constant temperature of the simulation (for mobility calculation)
wGB = 14 # Width of the diffuse GB
[../]
[]
[Postprocessors]
# Scalar postprocessors
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_abs_tol = 1e-11 # Relative tolerance for nonlienar solves
nl_rel_tol = 1e-10 # Absolute tolerance for nonlienar solves
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 25 # Initial time step. In this simulation it changes.
[../]
start_time = 0.0
end_time = 4000
num_steps = 3
[]
[Adaptivity]
marker = errorfrac
max_h_level = 4
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[./Markers]
[./bound_adapt]
type = ValueThresholdMarker
third_state = DO_NOTHING
coarsen = 1.0
refine = 0.99
variable = bnds
invert = true
[../]
[./errorfrac]
type = ErrorFractionMarker
coarsen = 0.1
indicator = error
refine = 0.7
[../]
[../]
[]
[Outputs]
exodus = true
csv = true
[./console]
type = Console
max_rows = 20
[../]
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_moregrains.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 12
grain_num = 25
var_name_base = gr
numbub = 15
bubspac = 22
radius = 8
int_width = 10
invalue = 1
outvalue = 0.1
[]
[Variables]
[./c]
[../]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalVoronoiVoidIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./c_IC]
variable = c
type = PolycrystalVoronoiVoidIC
structure_type = voids
polycrystal_ic_uo = voronoi
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
int_width = 0
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/grain_growth/grain_growth_2D_voronoi.i)
# This simulation predicts GB migration of a 2D copper polycrystal with 15 grains
# Mesh adaptivity and time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
# We are not using the GrainTracker in this example so the number
# of order paramaters must match the number of grains.
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 12 # Number of elements in the x-direction
ny = 12 # Number of elements in the y-direction
nz = 0 # Number of elements in the z-direction
xmin = 0 # minimum x-coordinate of the mesh
xmax = 1000 # maximum x-coordinate of the mesh
ymin = 0 # minimum y-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
zmin = 0
zmax = 0
elem_type = QUAD4 # Type of elements used in the mesh
uniform_refine = 3 # Initial uniform refinement of the mesh
parallel_type = replicated # Periodic BCs
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 15 # Number of grains
var_name_base = gr # Base name of grains
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 15
rand_seed = 42
coloring_algorithm = bt # We must use bt to force the UserObject to assign one grain to each op
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[./PolycrystalVariables]
# Custom action that created all of the grain variables
order = FIRST # element type used by each grain variable
family = LAGRANGE
[../]
[]
[AuxVariables]
#active = ''
# Dependent variables
[./bnds]
# Variable used to visualize the grain boundaries in the simulation
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[./PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[../]
[]
[AuxKernels]
#active = ''
# AuxKernel block, defining the equations used to calculate the auxvars
[./bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
# Boundary Condition block
[./Periodic]
[./top_bottom]
auto_direction = 'x y' # Makes problem periodic in the x and y directions
[../]
[../]
[]
[Materials]
[./CuGrGr]
# Material properties
type = GBEvolution # Quantitative material properties for copper grain growth. Dimensions are nm and ns
GBmob0 = 2.5e-6 #Mobility prefactor for Cu from schonfelder1997molecular bibtex entry
GBenergy = 0.708 #GB energy for Cu from schonfelder1997molecular bibtex entry
Q = 0.23 #Activation energy for grain growth from Schonfelder 1997
T = 450 # K #Constant temperature of the simulation (for mobility calculation)
wGB = 14 # nm #Width of the diffuse GB
[../]
[]
[Postprocessors]
active = 'dt '
# Scalar postprocessors
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_abs_tol = 1e-11 # Relative tolerance for nonlienar solves
nl_rel_tol = 1e-8 # Absolute tolerance for nonlienar solves
start_time = 0.0
end_time = 4000
[./TimeStepper]
type = IterationAdaptiveDT
dt = 25 # Initial time step. In this simulation it changes.
optimal_iterations = 6 #Time step will adapt to maintain this number of nonlinear iterations
[../]
[./Adaptivity]
# Block that turns on mesh adaptivity. Note that mesh will never coarsen beyond initial mesh (before uniform refinement)
initial_adaptivity = 2 # Number of times mesh is adapted to initial condition
refine_fraction = 0.7 # Fraction of high error that will be refined
coarsen_fraction = 0.1 # Fraction of low error that will coarsened
max_h_level = 4 # Max number of refinements used, starting from initial mesh (before uniform refinement)
[../]
[]
[Outputs]
exodus = true
csv = true
[./console]
type = Console
max_rows = 20
[../]
[]
(modules/phase_field/test/tests/new_initial_conditions/prepare_mesh.i)
#
# Prepare and relax interfaces of a polycrystalline sample for the
# PolycrystalVariables_initial_from_file test
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmax = 400
ymax = 400
elem_type = QUAD4
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 102
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Moly_GB]
type = GBEvolution
time_scale = 1.0
GBmob0 = 3.986e-6
T = 500 # K
wGB = 60 # nm
Q = 1.0307
GBenergy = 2.4
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
end_time = 3.0
dt = 1.5
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoi_fromfile.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 8
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
coloring_algorithm = jp
file_name = 'grains.txt'
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/BlockRestriction.i)
[Mesh]
[two_blocks]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4'
dy = '1.3'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[]
[Variables]
[bicrystal0_0]
[]
[bicrystal0_1]
[]
[bicrystal1_0]
[]
[bicrystal1_1]
[]
[tricrystal_0]
[]
[tricrystal_1]
[]
[tricrystal_2]
[]
[random_0]
[]
[random_1]
[]
[voronoi_0]
[]
[voronoi_1]
[]
[voronoi_2]
[]
[voronoi_3]
[]
[voronoi_4]
[]
[voronoi_5]
[]
[voronoi_6]
[]
[voronoi_7]
[]
[]
[ICs]
[PolycrystalICs]
[BicrystalBoundingBoxIC]
block = '0'
var_name_base = 'bicrystal0_'
op_num = 2
x1 = 0
x2 = 1
y1 = 0
y2 = 1
[]
[BicrystalCircleGrainIC]
block = '0'
var_name_base = 'bicrystal1_'
op_num = 2
x = 2.7
y = 0.6
radius = 2
[]
[Tricrystal2CircleGrainsIC]
block = '0'
var_name_base = 'tricrystal_'
op_num = 3
[]
[PolycrystalRandomIC]
block = '0'
var_name_base = 'random_'
op_num = 2
random_type = 'continuous'
[]
[PolycrystalVoronoiVoidIC]
polycrystal_ic_uo = voronoi
block = '0'
numbub = 3
bubspac = 0.02
radius = 0.05
invalue = 1
outvalue = 0.1
var_name_base = 'voronoi_'
op_num = 8
[]
[]
[]
[UserObjects]
[voronoi]
type = PolycrystalVoronoi
rand_seed = 10
int_width = 0
var_name_base = 'voronoi_'
op_num = 8
grain_num = 4
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi_columnar_3D.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 25
elem_type = HEX8
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 47
grain_num = 4
columnar_3D = true
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
active = ''
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-5
l_max_its = 15
nl_max_its = 20
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 40.0
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/grain_texture/grain_texture_test_2.i)
# This simulation predicts GB migration of 8 grains and outputs grain texture information
# Mesh adaptivity is not used so that the VectorPostprocessor's output will be uniform
# Time step adaptivity is used
# An AuxVariable is used to calculate the grain boundary locations
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 3 # Problem dimension
nx = 10 # Number of elements in the x-direction
ny = 10 # Number of elements in the y-direction
nz = 2 # Number of elements in the z-direction
xmin = 0 # minimum x-coordinate of the mesh
xmax = 100 # maximum x-coordinate of the mesh
ymin = 0 # minimum y-coordinate of the mesh
ymax = 100 # maximum y-coordinate of the mesh
zmin = 0 # minimum z-coordinate of the mesh
zmax = 20 # maximum z-coordinate of the mesh
elem_type = HEX8 # Type of elements used in the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 3 # Number of order parameters used
var_name_base = gr # Base name of grains
grain_num = 3 #Number of grains
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
coloring_algorithm = bt
[../]
[./grain_tracker]
type = FauxGrainTracker # Note: FauxGrainTracker only used for testing purposes. Use GrainTracker when using GrainTextureVectorPostprocessor.
flood_entity_type = ELEMENTAL
outputs = none
[../]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_3_rand_2D.tex
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
# Dependent variables
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[./PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[../]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = timestep_end
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[]
[Materials]
[./CuGrGr]
# Material properties
type = GBEvolution # Quantitative material properties for copper grain growth. Dimensions are nm and ns
block = 0 # Block ID (only one block in this problem)
GBmob0 = 2.5e-6 #Mobility prefactor for Cu from Schonfelder1997
GBenergy = 0.708 # GB energy in J/m^2
Q = 0.23 #Activation energy for grain growth from Schonfelder 1997
T = 450 # K #Constant temperature of the simulation (for mobility calculation)
wGB = 14 # nm #Width of the diffuse GB
[../]
[]
[VectorPostprocessors]
[./textureInfo]
type = GrainTextureVectorPostprocessor
unique_grains = unique_grains
euler_angle_provider = euler_angle_file
sort_by = id # sort output by elem id
[../]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_abs_tol = 1e-11 # Relative tolerance for nonlinear solves
nl_rel_tol = 1e-10 # Absolute tolerance for nonlinear solves
start_time = 0.0
num_steps = 1
[]
[Outputs]
execute_on = 'TIMESTEP_END'
csv = true
[]
(modules/phase_field/examples/grain_growth/grain_growth_2D_graintracker.i)
# This simulation predicts GB migration of a 2D copper polycrystal with 100 grains represented with 8 order parameters
# Mesh adaptivity and time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 44 # Number of elements in the x-direction
ny = 44 # Number of elements in the y-direction
xmax = 1000 # maximum x-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
elem_type = QUAD4 # Type of elements used in the mesh
uniform_refine = 2 # Initial uniform refinement of the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 8 # Number of order parameters used
var_name_base = gr # Base name of grains
[]
[Modules]
[PhaseField]
[GrainGrowth]
[]
[]
[]
[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
[]
[]
[]
[AuxVariables]
# Dependent variables
[unique_grains]
order = CONSTANT
family = MONOMIAL
[]
[var_indices]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[]
[]
[BCs]
# Boundary Condition block
[Periodic]
[All]
auto_direction = 'x y' # Makes problem periodic in the x and y directions
[]
[]
[]
[Materials]
[CuGrGr]
# Material properties
type = GBEvolution
T = 450 # Constant temperature of the simulation (for mobility calculation)
wGB = 14 # Width of the diffuse GB
GBmob0 = 2.5e-6 #m^4(Js) for copper from schonfelder1997molecular bibtex entry
Q = 0.23 #eV for copper from schonfelder1997molecular bibtex entry
GBenergy = 0.708 #J/m^2 from schonfelder1997molecular bibtex entry
[]
[]
[Postprocessors]
# Scalar postprocessors
[dt]
# Outputs the current time step
type = TimestepSize
[]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
# Uses newton iteration to solve the problem.
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 50 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 10 # Max number of nonlinear iterations
end_time = 4000
[TimeStepper]
type = IterationAdaptiveDT
dt = 20 # Initial time step. In this simulation it changes.
optimal_iterations = 6 # Time step will adapt to maintain this number of nonlinear iterations
[]
[Adaptivity]
# Block that turns on mesh adaptivity. Note that mesh will never coarsen beyond initial mesh (before uniform refinement)
initial_adaptivity = 2 # Number of times mesh is adapted to initial condition
refine_fraction = 0.8 # Fraction of high error that will be refined
coarsen_fraction = 0.05 # Fraction of low error that will coarsened
max_h_level = 2 # Max number of refinements used, starting from initial mesh (before uniform refinement)
[]
[]
[Outputs]
exodus = true # Exodus file will be outputted
csv = true
[]
(modules/combined/test/tests/grain_texture/grain_texture_test_1.i)
# This simulation predicts GB migration of 8 grains and outputs grain texture information
# Mesh adaptivity is not used so that the VectorPostprocessor's output will be uniform
# Time step adaptivity is used
# An AuxVariable is used to calculate the grain boundary locations
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 10 # Number of elements in the x-direction
ny = 10 # Number of elements in the y-direction
xmin = 0 # minimum x-coordinate of the mesh
xmax = 100 # maximum x-coordinate of the mesh
ymin = 0 # minimum y-coordinate of the mesh
ymax = 100 # maximum y-coordinate of the mesh
elem_type = QUAD4 # Type of elements used in the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 3 # Number of order parameters used
var_name_base = gr # Base name of grains
grain_num = 3 #Number of grains
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_3_rand_2D.tex
[../]
[./grain_tracker]
type = FauxGrainTracker
outputs = none
[../]
[./voronoi]
type = PolycrystalVoronoi
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
# Dependent variables
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[./PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[../]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = timestep_end
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[]
[Materials]
[./CuGrGr]
# Material properties
type = GBEvolution # Quantitative material properties for copper grain growth. Dimensions are nm and ns
block = 0 # Block ID (only one block in this problem)
GBmob0 = 2.5e-6 #Mobility prefactor for Cu from Schonfelder 1997
GBenergy = 0.708 # GB energy in J/m^2
Q = 0.23 #Activation energy for grain growth from Schonfelder 1997
T = 450 # K #Constant temperature of the simulation (for mobility calculation)
wGB = 14 # nm #Width of the diffuse GB
[../]
[]
[VectorPostprocessors]
[./textureInfo]
type = GrainTextureVectorPostprocessor
unique_grains = unique_grains
euler_angle_provider = euler_angle_file
sort_by = id # sort output by elem id
[../]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_abs_tol = 1e-11 # Relative tolerance for nonlinear solves
nl_rel_tol = 1e-10 # Absolute tolerance for nonlinear solves
start_time = 0.0
num_steps = 1
[]
[Outputs]
execute_on = 'TIMESTEP_END'
csv = true
[]
(modules/combined/examples/phase_field-mechanics/grain_texture.i)
# This simulation predicts GB migration of 8 grains and outputs grain texture information
# Mesh adaptivity is not used so that the VectorPostprocessor's output will be uniform
# Time step adaptivity is used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 100 # Number of elements in the x-direction
ny = 100 # Number of elements in the y-direction
xmin = 0 # minimum x-coordinate of the mesh
xmax = 1000 # maximum x-coordinate of the mesh
ymin = 0 # minimum y-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
elem_type = QUAD4 # Type of elements used in the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 8 # Number of order parameters used
var_name_base = gr # Base name of grains
grain_num = 8 #Number of grains
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
coloring_algorithm = bt
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.2
connecting_threshold = 0.08
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
# Dependent variables
[./bnds]
# Variable used to visualize the grain boundaries in the simulation
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[./PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[../]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[./bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = timestep_end
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
execute_on = timestep_end
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[]
[BCs]
# Boundary Condition block
[./Periodic]
[./top_bottom]
auto_direction = 'x y' # Makes problem periodic in the x and y directions
[../]
[../]
[]
[Materials]
[./CuGrGr]
# Material properties
type = GBEvolution # Quantitative material properties for copper grain growth. Dimensions are nm and ns
block = 0 # Block ID (only one block in this problem)
GBmob0 = 2.5e-6 #Mobility prefactor for Cu from Schonfelder1997
GBenergy = 0.708 # GB energy in J/m^2
Q = 0.23 #Activation energy for grain growth from Schonfelder 1997
T = 450 # K #Constant temperature of the simulation (for mobility calculation)
wGB = 14 # nm #Width of the diffuse GB
outputs = exodus
[../]
[]
[UserObjects]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_8_rand_2D.tex
[../]
[]
[VectorPostprocessors]
[./gbInfo]
type = GrainTextureVectorPostprocessor
unique_grains = unique_grains
euler_angle_provider = euler_angle_file
sort_by = id # sort output by elem id
[../]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_abs_tol = 1e-11 # Relative tolerance for nonlinear solves
nl_rel_tol = 1e-10 # Absolute tolerance for nonlinear solves
start_time = 0.0
num_steps = 50
[./TimeStepper]
type = IterationAdaptiveDT
dt = 25 # Initial time step. In this simulation it changes.
optimal_iterations = 6 # Time step will adapt to maintain this number of nonlinear iterations
[../]
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
exodus = true
csv = true
perf_graph = true
[./console]
type = Console
max_rows = 20
[../]
[]
(modules/combined/examples/phase_field-mechanics/poly_grain_growth_2D_eldrforce.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 8
var_name_base = gr
grain_num = 36
[]
[Variables]
[./PolycrystalVariables]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_36_rand_2D.tex
[../]
[./voronoi]
type = PolycrystalVoronoi
coloring_algorithm = bt
[../]
[./grain_tracker]
type = GrainTrackerElasticity
threshold = 0.2
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
flood_entity_type = ELEMENTAL
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
fill_method = symmetric9
euler_angle_provider = euler_angle_file
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./elastic_strain11]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain22]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain12]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises_stress]
order = CONSTANT
family = MONOMIAL
[../]
[./C1111]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalElasticDrivingForce]
[../]
[./TensorMechanics]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./elastic_strain11]
type = RankTwoAux
variable = elastic_strain11
rank_two_tensor = elastic_strain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./elastic_strain22]
type = RankTwoAux
variable = elastic_strain22
rank_two_tensor = elastic_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./elastic_strain12]
type = RankTwoAux
variable = elastic_strain12
rank_two_tensor = elastic_strain
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = timestep_end
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
execute_on = timestep_end
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[./C1111]
type = RankFourAux
variable = C1111
rank_four_tensor = elasticity_tensor
index_l = 0
index_j = 0
index_k = 0
index_i = 0
execute_on = timestep_end
[../]
[./vonmises_stress]
type = RankTwoScalarAux
variable = vonmises_stress
rank_two_tensor = stress
scalar_type = VonMisesStress
execute_on = timestep_end
[../]
[./euler_angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x'
variable = 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7'
[../]
[../]
[./top_displacement]
type = DirichletBC
variable = disp_y
boundary = top
value = -50.0
[../]
[./x_anchor]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[../]
[./y_anchor]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 15 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[./ElasticityTensor]
type = ComputePolycrystalElasticityTensor
grain_tracker = grain_tracker
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[Postprocessors]
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[./dofs]
type = NumDOFs
[../]
[./dt]
type = TimestepSize
[../]
[./run_time]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
coupled_groups = 'disp_x,disp_y'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 25
nl_rel_tol = 1.0e-7
start_time = 0.0
num_steps = 50
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1.5
growth_factor = 1.2
cutback_factor = 0.8
optimal_iterations = 8
[../]
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 3
[../]
[]
[Outputs]
file_base = poly36_grtracker
exodus = true
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_remapping_test.i)
# This simulation predicts GB migration of a 2D copper polycrystal with 100 grains represented with 18 order parameters
# Mesh adaptivity and time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 12 # Number of elements in the x-direction
ny = 12 # Number of elements in the y-direction
xmax = 1000 # maximum x-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
elem_type = QUAD4 # Type of elements used in the mesh
uniform_refine = 1 # Initial uniform refinement of the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 8 # Number of order parameters used
var_name_base = gr # Base name of grains
order = CONSTANT
family = MONOMIAL
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[./PolycrystalVariables]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 12 # Number of grains
coloring_algorithm = jp
rand_seed = 10
output_adjacency_matrix = true
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.2
verbosity_level = 1
connecting_threshold = 0.08
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
polycrystal_ic_uo = voronoi
error_on_grain_creation = true
execute_on = 'initial timestep_end'
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
# Dependent variables
[./bnds]
# Variable used to visualize the grain boundaries in the simulation
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
[../]
[./var_indices]
[../]
[./ghost_regions]
[../]
[./halos]
[../]
[./halo0]
[../]
[./halo1]
[../]
[./halo2]
[../]
[./halo3]
[../]
[./halo4]
[../]
[./halo5]
[../]
[./halo6]
[../]
[./halo7]
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[./proc_id]
[../]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[./PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[../]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[./bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[../]
[./ghosted_entities]
type = FeatureFloodCountAux
variable = ghost_regions
flood_counter = grain_tracker
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
[../]
[./halos]
type = FeatureFloodCountAux
variable = halos
flood_counter = grain_tracker
field_display = HALOS
execute_on = 'initial timestep_end'
[../]
[./halo0]
type = FeatureFloodCountAux
variable = halo0
map_index = 0
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo1]
type = FeatureFloodCountAux
variable = halo1
map_index = 1
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo2]
type = FeatureFloodCountAux
variable = halo2
map_index = 2
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo3]
type = FeatureFloodCountAux
variable = halo3
map_index = 3
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo4]
type = FeatureFloodCountAux
variable = halo4
map_index = 4
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo5]
type = FeatureFloodCountAux
variable = halo5
map_index = 5
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo6]
type = FeatureFloodCountAux
variable = halo6
map_index = 6
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo7]
type = FeatureFloodCountAux
variable = halo7
map_index = 7
field_display = HALOS
flood_counter = grain_tracker
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_end
field_display = CENTROID
flood_counter = grain_tracker
[../]
[./proc_id]
type = ProcessorIDAux
variable = proc_id
execute_on = initial
[../]
[]
[BCs]
# Boundary Condition block
[]
[Materials]
[./CuGrGr]
# Material properties
type = GBEvolution
T = 450 # Constant temperature of the simulation (for mobility calculation)
wGB = 125 # Width of the diffuse GB
GBmob0 = 2.5e-6 # m^4(Js) for copper from schonfelder1997molecular bibtex entry
Q = 0.23 # eV for copper from schonfelder1997molecular bibtex entry
GBenergy = 0.708 # J/m^2 from schonfelder1997molecular bibtex entry
[../]
[]
[Postprocessors]
# Scalar postprocessors
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[]
[Executioner]
# Uses newton iteration to solve the problem.
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_rel_tol = 1e-10 # Absolute tolerance for nonlienar solves
start_time = 0.0
num_steps = 15
dt = 300
[]
[Problem]
type = FEProblem
[]
[Outputs]
csv = true
exodus = true
[./pg]
type = PerfGraphOutput
level = 2 # Default is 1
[../]
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_volume_changing.i)
# This simulation predicts GB migration of a 2D copper polycrystal with 100 grains represented with 18 order parameters
# Mesh adaptivity and time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 12 # Number of elements in the x-direction
ny = 12 # Number of elements in the y-direction
xmax = 1000 # maximum x-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
elem_type = QUAD4 # Type of elements used in the mesh
uniform_refine = 1 # Initial uniform refinement of the mesh
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 8 # Number of order parameters used
var_name_base = gr # Base name of grains
order = CONSTANT
family = MONOMIAL
[]
[Variables]
# Variable block, where all variables in the simulation are declared
[./PolycrystalVariables]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 12 # Number of grains
coloring_algorithm = jp
rand_seed = 15
output_adjacency_matrix = true
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.2
verbosity_level = 1
connecting_threshold = 0.08
compute_var_to_feature_map = true
compute_halo_maps = true # For displaying HALO fields
polycrystal_ic_uo = voronoi
execute_on = 'initial timestep_end'
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
# Dependent variables
[./bnds]
# Variable used to visualize the grain boundaries in the simulation
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
[../]
[./var_indices]
[../]
[./ghost_regions]
[../]
[./halos]
[../]
[./halo0]
[../]
[./halo1]
[../]
[./halo2]
[../]
[./halo3]
[../]
[./halo4]
[../]
[./halo5]
[../]
[./halo6]
[../]
[./halo7]
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Kernel block, where the kernels defining the residual equations are set up.
[./PolycrystalKernel]
# Custom action creating all necessary kernels for grain growth. All input parameters are up in GlobalParams
[../]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[./bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[../]
[./ghosted_entities]
type = FeatureFloodCountAux
variable = ghost_regions
flood_counter = grain_tracker
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
[../]
[./halos]
type = FeatureFloodCountAux
variable = halos
flood_counter = grain_tracker
field_display = HALOS
execute_on = 'initial timestep_end'
[../]
[./halo0]
type = FeatureFloodCountAux
variable = halo0
map_index = 0
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo1]
type = FeatureFloodCountAux
variable = halo1
map_index = 1
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo2]
type = FeatureFloodCountAux
variable = halo2
map_index = 2
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo3]
type = FeatureFloodCountAux
variable = halo3
map_index = 3
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo4]
type = FeatureFloodCountAux
variable = halo4
map_index = 4
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo5]
type = FeatureFloodCountAux
variable = halo5
map_index = 5
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo6]
type = FeatureFloodCountAux
variable = halo6
map_index = 6
field_display = HALOS
flood_counter = grain_tracker
[../]
[./halo7]
type = FeatureFloodCountAux
variable = halo7
map_index = 7
field_display = HALOS
flood_counter = grain_tracker
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_end
field_display = CENTROID
flood_counter = grain_tracker
[../]
[]
[BCs]
# Boundary Condition block
[]
[Materials]
[./CuGrGr]
# Material properties
type = GBEvolution
T = 450 # Constant temperature of the simulation (for mobility calculation)
wGB = 125 # Width of the diffuse GB
GBmob0 = 2.5e-6 # m^4(Js) for copper from schonfelder1997molecular bibtex entry
Q = 0.23 # eV for copper from schonfelder1997molecular bibtex entry
GBenergy = 0.708 # J/m^2 from schonfelder1997molecular bibtex entry
[../]
[]
[Postprocessors]
# Scalar postprocessors
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[./avg_grain_volumes]
type = AverageGrainVolume
feature_counter = grain_tracker
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
# Uses newton iteration to solve the problem.
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 40 # Max number of nonlinear iterations
nl_rel_tol = 1e-10 # Absolute tolerance for nonlienar solves
start_time = 0.0
num_steps = 15
dt = 300
[]
[Problem]
type = FEProblem
[]
[Outputs]
csv = true
exodus = true
[]
(modules/phase_field/examples/grain_growth/grain_growth_3D.i)
# This simulation predicts GB migration of a 3D copper polycrystal with 25 grains represented with 15 order parameters
# Time step adaptivity are used
# An AuxVariable is used to calculate the grain boundary locations
# Postprocessors are used to record time step and the number of grains
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 3 # Problem dimension
nx = 10 # Number of elements in the x-direction
ny = 10 # Number of elements in the y-direction
nz = 10
xmax = 1000 # maximum x-coordinate of the mesh
ymax = 1000 # maximum y-coordinate of the mesh
zmax = 1000
uniform_refine = 1 # Initial uniform refinement of the mesh
parallel_type = distributed
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 15 # Number of order parameters used
var_name_base = gr # Base name of grains
order = CONSTANT
family = MONOMIAL
[]
[Modules]
[PhaseField]
[GrainGrowth]
family = LAGRANGE
order = FIRST
[]
[]
[]
[UserObjects]
[voronoi]
type = PolycrystalVoronoi
grain_num = 25 # Number of grains
rand_seed = 10
coloring_algorithm = jp
[]
[grain_tracker]
type = GrainTracker
threshold = 0.2
connecting_threshold = 0.08
compute_halo_maps = true # Only necessary for displaying HALOS
polycrystal_ic_uo = voronoi
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[]
[]
[]
[AuxVariables]
# Dependent variables
[unique_grains]
[]
[var_indices]
[]
[ghost_regions]
[]
[halos]
[]
[halo0]
[]
[halo1]
[]
[halo2]
[]
[halo3]
[]
[halo4]
[]
[halo5]
[]
[halo6]
[]
[halo7]
[]
[halo8]
[]
[halo9]
[]
[halo10]
[]
[halo11]
[]
[halo12]
[]
[halo13]
[]
[halo14]
[]
[proc]
[]
[]
[AuxKernels]
# AuxKernel block, defining the equations used to calculate the auxvars
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[]
[ghosted_entities]
type = FeatureFloodCountAux
variable = ghost_regions
flood_counter = grain_tracker
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
[]
[halos]
type = FeatureFloodCountAux
variable = halos
flood_counter = voronoi
field_display = HALOS
execute_on = 'initial timestep_end'
[]
[halo0]
type = FeatureFloodCountAux
variable = halo0
map_index = 0
field_display = HALOS
flood_counter = grain_tracker
execute_on = 'initial timestep_end'
[]
[halo1]
type = FeatureFloodCountAux
variable = halo1
map_index = 1
field_display = HALOS
flood_counter = grain_tracker
[]
[halo2]
type = FeatureFloodCountAux
variable = halo2
map_index = 2
field_display = HALOS
flood_counter = grain_tracker
[]
[halo3]
type = FeatureFloodCountAux
variable = halo3
map_index = 3
field_display = HALOS
flood_counter = grain_tracker
[]
[halo4]
type = FeatureFloodCountAux
variable = halo4
map_index = 4
field_display = HALOS
flood_counter = grain_tracker
[]
[halo5]
type = FeatureFloodCountAux
variable = halo5
map_index = 5
field_display = HALOS
flood_counter = grain_tracker
[]
[halo6]
type = FeatureFloodCountAux
variable = halo6
map_index = 6
field_display = HALOS
flood_counter = grain_tracker
[]
[halo7]
type = FeatureFloodCountAux
variable = halo7
map_index = 7
field_display = HALOS
flood_counter = grain_tracker
[]
[halo8]
type = FeatureFloodCountAux
variable = halo8
map_index = 8
field_display = HALOS
flood_counter = grain_tracker
[]
[halo9]
type = FeatureFloodCountAux
variable = halo9
map_index = 9
field_display = HALOS
flood_counter = grain_tracker
[]
[halo10]
type = FeatureFloodCountAux
variable = halo10
map_index = 10
field_display = HALOS
flood_counter = grain_tracker
[]
[halo11]
type = FeatureFloodCountAux
variable = halo11
map_index = 11
field_display = HALOS
flood_counter = grain_tracker
[]
[halo12]
type = FeatureFloodCountAux
variable = halo12
map_index = 12
field_display = HALOS
flood_counter = grain_tracker
[]
[halo13]
type = FeatureFloodCountAux
variable = halo13
map_index = 13
field_display = HALOS
flood_counter = grain_tracker
[]
[halo14]
type = FeatureFloodCountAux
variable = halo14
map_index = 14
field_display = HALOS
flood_counter = grain_tracker
[]
[proc]
type = ProcessorIDAux
variable = proc
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[CuGrGr]
# Material properties
type = GBEvolution
T = 450 # Constant temperature of the simulation (for mobility calculation)
wGB = 125 # Width of the diffuse GB
GBmob0 = 2.5e-6 #m^4(Js) for copper from schonfelder1997molecular bibtex entry
Q = 0.23 #eV for copper from schonfelder1997molecular bibtex entry
GBenergy = 0.708 #J/m^2 from schonfelder1997molecular bibtex entry
[]
[]
[Postprocessors]
# Scalar postprocessors
[dt]
# Outputs the current time step
type = TimestepSize
[]
[]
[Executioner]
type = Transient # Type of executioner, here it is transient with an adaptive time step
scheme = bdf2 # Type of time integration (2nd order backward euler), defaults to 1st order backward euler
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
# Uses newton iteration to solve the problem.
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
l_max_its = 30 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
nl_max_its = 20 # Max number of nonlinear iterations
start_time = 0.0
end_time = 4000
[TimeStepper]
type = IterationAdaptiveDT
dt = 25 # Initial time step. In this simulation it changes.
optimal_iterations = 6 # Time step will adapt to maintain this number of nonlinear iterations
[]
[]
[Outputs]
exodus = true
csv = true
[pg]
type = PerfGraphOutput
execute_on = 'initial final' # Default is "final"
level = 2 # Default is 1
[]
[]
(modules/phase_field/test/tests/Grain_Velocity_Computation/GrainBoundaryVelocityTest.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1000
ymax = 1000
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 4
var_name_base = 'gr'
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 102
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./velocity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./velocity]
type = GrainBoundaryVelocity
variable = velocity
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Moly_GB]
type = GBEvolution
time_scale = 1.0
GBmob0 = 3.986e-6
T = 500 # K
wGB = 60 # nm
Q = 1.0307
GBenergy = 2.4
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/constant_mobility.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 4
var_name_base = 'gr'
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 6
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'timestep_end'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Moly_GB]
type = GBEvolution
time_scale = 1.0e-2
GBMobility = 1.88e-14 # m^4/J*s
T = '500' # K
wGB = 60 # nm
GBenergy = 1.4
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/polycrystal_BndsCalcIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 3
var_name_base = gr
int_width = 5 # int_width > 0 is required for initial adaptivity to work based on Bnds
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 105
grain_num = 3
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./bnds]
type = BndsCalcIC # IC is created for activating the initial adaptivity
variable = bnds
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 6 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Adaptivity]
initial_steps = 1
max_h_level = 1
marker = err_bnds
[./Markers]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.9
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_periodic_fromfile.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 85
ny = 85
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 8
var_name_base = gr
numbub = 15
bubspac = 22
radius = 8
int_width = 10
invalue = 1
outvalue = 0.1
file_name = 'grains.txt'
[]
[Variables]
[./c]
[../]
[./w]
scaling = 1.0e4
[../]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalVoronoiVoidIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./c_IC]
variable = c
type = PolycrystalVoronoiVoidIC
structure_type = voids
polycrystal_ic_uo = voronoi
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 12444
int_width = 0
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/PolycrystalVoronoiVoidIC_periodic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 85
ny = 85
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 5
grain_num = 5
var_name_base = gr
numbub = 15
bubspac = 22
radius = 8
int_width = 10
invalue = 1
outvalue = 0.1
[]
[Variables]
[./c]
[../]
[./w]
scaling = 1.0e4
[../]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalVoronoiVoidIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[./c_IC]
variable = c
type = PolycrystalVoronoiVoidIC
structure_type = voids
polycrystal_ic_uo = voronoi
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 10
int_width = 0
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/include/userobjects/PolycrystalHex.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "PolycrystalVoronoi.h"
#include "MooseRandom.h"
// Forward Declarations
/**
* PolycrystalHex creates a hexagonal polycrystal initial condition.
* Only works for squared number of grains and with periodic BCs
*/
class PolycrystalHex : public PolycrystalVoronoi
{
public:
static InputParameters validParams();
PolycrystalHex(const InputParameters & parameters);
virtual void precomputeGrainStructure();
private:
const Real _x_offset;
const Real _perturbation_percent;
MooseRandom _random;
};
(modules/phase_field/include/userobjects/FauxPolycrystalVoronoi.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "PolycrystalVoronoi.h"
// Forward Declarations
class FauxPolycrystalVoronoi;
class FauxPolycrystalVoronoi : public PolycrystalVoronoi
{
public:
static InputParameters validParams();
FauxPolycrystalVoronoi(const InputParameters & parameters);
/**
* We override all these functions to avoid calling FeatureFloodCount
* We know here is a one-to-one mapping between grain and variable
*/
virtual void initialSetup() override;
virtual void initialize() override {}
virtual void execute() override;
virtual void finalize() override;
virtual void meshChanged() override {}
};