- GBenergyGrain boundary energy in J/m^2
C++ Type:double
Controllable:No
Description:Grain boundary energy in J/m^2
- TTemperature in Kelvin
C++ Type:std::vector<VariableName>
Controllable:No
Description:Temperature in Kelvin
- wGBDiffuse GB width in the length scale of the model
C++ Type:double
Controllable:No
Description:Diffuse GB width in the length scale of the model
GBEvolution
Computes necessary material properties for the isotropic grain growth model
Overview
This material calculates the order parameter mobility , the free energy prefactor , and the gradient multiplier for the grain growth model from Moelans et al. (2008), assuming isotropic grain boundary (GB) properties and a symmetric interfacial profile (). The parameters are calculated based on the GB energy , the GB mobility , and the phase field interfacial width according to
The GB mobility can be defined in terms of the temperature using an Arrhenius expression
where is the mobility prefactor, is the activation energy, and is the Boltzmann constant.
Example Input File Syntax
[./Moly_GB]
type = GBEvolution
time_scale = 1.0
GBmob0 = 3.986e-6
T = 500 # K
wGB = 60 # nm
Q = 1.0307
GBenergy = 2.4
[../]
(modules/phase_field/test/tests/grain_growth/evolution.i)Input Parameters
- GBMobility-1GB mobility input in m^4/(J*s), that overrides the temperature dependent calculation
Default:-1
C++ Type:double
Controllable:No
Description:GB mobility input in m^4/(J*s), that overrides the temperature dependent calculation
- GBmob00Grain boundary mobility prefactor in m^4/(J*s)
Default:0
C++ Type:double
Controllable:No
Description:Grain boundary mobility prefactor in m^4/(J*s)
- Q0Grain boundary migration activation energy in eV
Default:0
C++ Type:double
Controllable:No
Description:Grain boundary migration activation energy in eV
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- 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
- computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
Default:True
C++ Type:bool
Controllable:No
Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
- constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
Default:NONE
C++ Type:MooseEnum
Options:NONE, ELEMENT, SUBDOMAIN
Controllable:No
Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
- declare_suffixAn optional suffix parameter that can be appended to any declared 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 declared properties. The suffix will be prepended with a '_' character.
- f0s0.125The GB energy constant
Default:0.125
C++ Type:double
Controllable:No
Description:The GB energy constant
- length_scale1e-09Length scale in m, where default is nm
Default:1e-09
C++ Type:double
Controllable:No
Description:Length scale in m, where default is nm
- molar_volume2.462e-05Molar volume in m^3/mol, needed for temperature gradient driving force
Default:2.462e-05
C++ Type:double
Controllable:No
Description:Molar volume in m^3/mol, needed for temperature gradient driving force
- 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.
- time_scale1e-09Time scale in s, where default is ns
Default:1e-09
C++ Type:double
Controllable:No
Description:Time scale in s, where default is ns
- 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.
Optional Parameters
- 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.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- 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.
Advanced Parameters
- output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)
C++ Type:std::vector<std::string>
Controllable:No
Description:List of material properties, from this material, to output (outputs must also be defined to an output type)
- 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
Outputs Parameters
Input Files
- (modules/phase_field/test/tests/grain_growth/temperature_gradient.i)
- (modules/phase_field/test/tests/actions/grain_growth_with_T_grad.i)
- (modules/phase_field/test/tests/grain_growth/voronoi_adaptivity_ghost.i)
- (modules/phase_field/test/tests/grain_growth/boundingbox.i)
- (modules/phase_field/test/tests/grain_growth/voronoi_adaptivity.i)
- (modules/phase_field/test/tests/grain_tracker_test/distributed_poly_ic.i)
- (modules/phase_field/test/tests/grain_tracker_test/split_grain.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_syntax.i)
- (modules/phase_field/test/tests/grain_growth/off-diagonal.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_2D_random.i)
- (modules/combined/examples/phase_field-mechanics/hex_grain_growth_2D_eldrforce.i)
- (modules/phase_field/test/tests/reconstruction/euler2rgb_no_grain_region.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/test.i)
- (modules/combined/test/tests/grain_texture/EulerAngleProvider2RGBAux_bicrystal.i)
- (modules/phase_field/test/tests/grain_growth/particle.i)
- (modules/phase_field/test/tests/grain_growth/evolution.i)
- (modules/phase_field/examples/grain_growth/3D_6000_gr.i)
- (modules/combined/test/tests/grain_texture/EulerAngle2RGBAction.i)
- (modules/phase_field/test/tests/grain_growth/thumb.i)
- (modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_2var_test.i)
- (modules/phase_field/test/tests/GBType/GB_Type_Phase1.i)
- (modules/phase_field/examples/ebsd_reconstruction/IN100-111grn.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_ebsd.i)
- (modules/phase_field/test/tests/grain_growth_w_linearized_interface/linearized_interface_action.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_remapping_linearized_interface_test.i)
- (modules/phase_field/test/tests/grain_growth_w_linearized_interface/voronoi_linearized_interface.i)
- (modules/phase_field/examples/grain_growth/grain_growth_2D_voronoi_newadapt.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_nodal.i)
- (modules/combined/examples/phase_field-mechanics/EBSD_reconstruction_grain_growth_mech.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/free_energy_material/CoupledValueFunctionFreeEnergy.i)
- (modules/phase_field/test/tests/reconstruction/euler2rgb_non_uniform_orientation.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/test/tests/initial_conditions/TricrystalTripleJunctionIC.i)
- (modules/phase_field/test/tests/reconstruction/1phase_evolution.i)
- (modules/phase_field/examples/grain_growth/grain_growth_2D_graintracker.i)
- (modules/combined/test/tests/grain_texture/random_grain_orientation.i)
- (modules/combined/test/tests/ACGrGrElasticDrivingForce/bicrystal.i)
- (modules/combined/examples/phase_field-mechanics/grain_texture.i)
- (modules/phase_field/test/tests/grain_growth/explicit.i)
- (modules/combined/test/tests/grain_texture/grain_texture_test_1.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/actions/grain_growth_with_c.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_growth_w_linearized_interface/grain_growth_linearized_interface.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/actions/grain_growth.i)
- (modules/phase_field/test/tests/grain_growth/hex.i)
- (modules/phase_field/test/tests/initial_conditions/polycrystal_BndsCalcIC.i)
References
- N. Moelans, B. Blanpain, and P. Wollants.
Quantitative analysis of grain boundary properties in a generalized phase field model for grain growth in anisotropic systems.
Physical Review B, 78(2):024113, Jul 2008.
URL: http://link.aps.org/doi/10.1103/PhysRevB.78.024113 (visited on 2016-06-02), doi:10.1103/PhysRevB.78.024113.[BibTeX]
@article{moelans_quantitative_2008, author = "Moelans, N. and Blanpain, B. and Wollants, P.", title = "Quantitative analysis of grain boundary properties in a generalized phase field model for grain growth in anisotropic systems", volume = "78", url = "http://link.aps.org/doi/10.1103/PhysRevB.78.024113", doi = "10.1103/PhysRevB.78.024113", number = "2", urldate = "2016-06-02", journal = "Physical Review B", month = "Jul", year = "2008", pages = "024113", file = "APS Snapshot:/Users/i.greenquist/Zotero/storage/Q8854BXX/PhysRevB.78.html:text/html;PhysRevB.78.024113.pdf:/Users/i.greenquist/Zotero/storage/VSMEC28A/PhysRevB.78.024113.pdf:application/pdf;PhysRevB.78.pdf:/Users/i.greenquist/Zotero/storage/VEU7AATJ/PhysRevB.78.pdf:application/pdf" }
(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/test/tests/grain_growth/temperature_gradient.i)
#
# This test ensures that a flat grain boundary does not move
# under a temperature gradient using the normal grain growth model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
xmax = 1000
ymax = 500
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Functions]
[./TGradient]
type = ParsedFunction
expression = '450 + 0.1*x'
[../]
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0.0
x2 = 500.0
y1 = 0.0
y2 = 500.0
[../]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
[../]
[]
[Kernels]
[./PolycrystalKernel]
variable_mobility = true
coupled_variables = 'T'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./Tgrad]
type = FunctionAux
variable = T
function = TGradient
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = T # 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]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
execute_on = 'initial TIMESTEP_END'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/actions/grain_growth_with_T_grad.i)
#
# This test ensures that a flat grain boundary does not move
# under a temperature gradient using the normal grain growth model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
xmax = 1000
ymax = 500
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
coupled_variables = T
variable_mobility = true
[../]
[../]
[]
[Functions]
[./TGradient]
type = ParsedFunction
expression = '450 + 0.1*x'
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0.0
x2 = 500.0
y1 = 0.0
y2 = 500.0
[../]
[../]
[]
[AuxVariables]
[./T]
[../]
[]
[AuxKernels]
[./Tgrad]
type = FunctionAux
variable = T
function = TGradient
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = T # 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]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
execute_on = 'initial TIMESTEP_END'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 100.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_growth/boundingbox.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[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]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[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 = 10
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/voronoi_adaptivity.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
[]
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = FauxPolycrystalVoronoi
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-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/grain_tracker_test/split_grain.i)
[Mesh]
[ebsd_mesh]
type = EBSDMeshGenerator
filename = EBSD_split_grain.txt
[]
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[UserObjects]
[ebsd_reader]
type = EBSDReader
[]
[ebsd]
type = PolycrystalEBSD
coloring_algorithm = bt
ebsd_reader = ebsd_reader
enable_var_coloring = true
output_adjacency_matrix = true
[]
[grain_tracker]
type = GrainTracker
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
polycrystal_ic_uo = ebsd
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = ebsd
[]
[]
[]
[Variables]
[PolycrystalVariables]
[]
[]
[AuxVariables]
[bnds]
[]
[unique_grains]
order = CONSTANT
family = MONOMIAL
[]
[ghost_elements]
order = CONSTANT
family = MONOMIAL
[]
[halos]
order = CONSTANT
family = MONOMIAL
[]
[var_indices]
order = CONSTANT
family = MONOMIAL
[]
[ebsd_grains]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[PolycrystalKernel]
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[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
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[]
[grain_aux]
type = EBSDReaderPointDataAux
variable = ebsd_grains
ebsd_reader = ebsd_reader
data_name = 'feature_id'
execute_on = 'initial timestep_end'
[]
[]
[Modules]
[PhaseField]
[EulerAngles2RGB]
crystal_structure = cubic
euler_angle_provider = ebsd_reader
grain_tracker = grain_tracker
[]
[]
[]
[Materials]
[Copper]
# T = 500 # K
type = GBEvolution
T = 500
wGB = 0.6 # 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.0e-6
[]
[]
[Postprocessors]
[n_elements]
type = NumElems
execute_on = 'initial timestep_end'
[]
[n_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[]
[DOFs]
type = NumDOFs
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 0.7'
l_tol = 1.0e-4
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 2
[TimeStepper]
type = IterationAdaptiveDT
cutback_factor = 0.9
dt = 10.0
growth_factor = 1.1
optimal_iterations = 7
[]
[]
[Outputs]
exodus = true
csv = true
perf_graph = true
[]
(modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_syntax.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
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]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'lu'
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 = 1
dt = 80.0
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Problem]
register_objects_from = 'PhaseFieldApp'
library_path = '../../../../../phase_field/lib'
[]
(modules/phase_field/test/tests/grain_growth/off-diagonal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
int_width = 80
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[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]
[./gr_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
nl_max_its = 20
start_time = 0.0
num_steps = 7
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.3
coarsen_fraction = 0.2
max_h_level = 2
[../]
[]
[Outputs]
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_2D_random.i)
# This initializes a polycrystal from random seeds at each node
# Mesh adaptivity and time step adaptivity are used
# Grain tracker is started once the grain structure is established
[Mesh]
# Mesh block. Meshes can be read in or automatically generated
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 40 # Number of elements in the x-direction
ny = 40 # 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
parallel_type = replicated # Periodic BCs
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 10 # Number of grains
var_name_base = gr # Base name of grains
[]
[Modules]
[PhaseField]
[GrainGrowth]
[]
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalRandomIC]
random_type = discrete
[]
[]
[]
[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
[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]
[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
[]
[]
[UserObjects]
[grain_tracker]
type = GrainTracker
tracking_step = 20 #Tracking is delayed until the polycrystalline structure is established
[]
[]
[Postprocessors]
# Scalar postprocessors
[dt]
# Outputs the current time step
type = TimestepSize
[]
[num_nodes]
type = NumNodes
[]
[]
[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
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 20 # Max number of linear iterations
l_tol = 1e-4 # Relative tolerance for linear solves
start_time = 0.0
end_time = 4000
[TimeStepper]
type = IterationAdaptiveDT
dt = 1 # 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)
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
csv = true
[]
(modules/combined/examples/phase_field-mechanics/hex_grain_growth_2D_eldrforce.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 17
nz = 0
xmax = 1000
ymax = 866
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 3
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./hex_ic]
type = PolycrystalHex
coloring_algorithm = bt
grain_num = 36
x_offset = 0.0
output_adjacency_matrix = true
[../]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_36_test2_2D.tex
[../]
[./grain_tracker]
type = GrainTrackerElasticity
threshold = 0.2
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
flood_entity_type = ELEMENTAL
fill_method = symmetric9
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
euler_angle_provider = euler_angle_file
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = hex_ic
[../]
[../]
[]
[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
[../]
[./C1111]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises_stress]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalElasticDrivingForce]
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial 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
[../]
[./euler_angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
variable = 'gr0 gr1 gr2'
[../]
[../]
[./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
block = 0
grain_tracker = grain_tracker
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./dt]
type = TimestepSize
[../]
[./run_time]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[./bnd_length]
type = GrainBoundaryArea
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'disp_x disp_y'
off_diag_column = 'disp_y disp_x'
[../]
[]
[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 = 40
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]
exodus = true
[]
(modules/phase_field/test/tests/reconstruction/euler2rgb_no_grain_region.i)
[Mesh]
[ebsd_mesh]
type = EBSDMeshGenerator
filename = ebsd_small.txt
[]
[]
[GlobalParams]
op_num = 8
var_name_base = gr
[]
[UserObjects]
[ebsd_reader]
type = EBSDReader
execute_on = initial
[]
[ebsd]
type = PolycrystalEBSD
coloring_algorithm = bt
ebsd_reader = ebsd_reader
phase = 2
output_adjacency_matrix = true
[]
[grain_tracker]
type = GrainTracker
polycrystal_ic_uo = ebsd
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = ebsd
[]
[]
[void_phase]
type = ReconPhaseVarIC
variable = c
ebsd_reader = ebsd_reader
phase = 1
[]
[]
[Variables]
[PolycrystalVariables]
[]
[]
[AuxVariables]
# active = 'c bnds'
[c]
[]
[bnds]
[]
[ebsd_numbers]
family = MONOMIAL
order = CONSTANT
[]
# Note: Not active
[unique_grains]
family = MONOMIAL
order = CONSTANT
[]
[var_indices]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[PolycrystalKernel]
c = c
[]
[]
[AuxKernels]
# active = 'BndsCalc'
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[ebsd_numbers]
type = EBSDReaderAvgDataAux
data_name = feature_id
ebsd_reader = ebsd_reader
grain_tracker = grain_tracker
variable = ebsd_numbers
phase = 2
execute_on = 'initial timestep_end'
[]
# Note: Not active
[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'
[]
[]
[Modules]
[PhaseField]
[EulerAngles2RGB]
crystal_structure = cubic
grain_tracker = grain_tracker
euler_angle_provider = ebsd_reader
no_grain_color = '.1 .1 .1'
phase = 2
[]
[]
[]
[Materials]
[bulk]
type = GBEvolution
block = 0
T = 2273
wGB = 10.0
GBenergy = 1.58
GBmob0 = 9.2124e-9
Q = 2.77
length_scale = 1.0e-6
time_scale = 60.0
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_grmres_restart '
petsc_options_value = ' asm lu 1 21'
start_time = 0.0
dt = 0.2
num_steps = 1
[]
[Outputs]
csv = true
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
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/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 400
ymin = 0
ymax = 400
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[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]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[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 = 5
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/test/tests/grain_texture/EulerAngleProvider2RGBAux_bicrystal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 12
xmax = 1000
ymax = 300
elem_type = QUAD4
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./active_bounds_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[./rgb]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = VARIABLE_COLORING
[../]
[./active_bounds_elemental]
type = FeatureFloodCountAux
variable = active_bounds_elemental
field_display = ACTIVE_BOUNDS
execute_on = 'initial timestep_begin'
flood_counter = grain_tracker
[../]
[./rgb]
type = EulerAngleProvider2RGBAux
variable = rgb
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
crystal_structure = cubic
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 75 # 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
time_scale = 1.0e-6
[../]
[]
[UserObjects]
[./grain_tracker]
type = FauxGrainTracker
connecting_threshold = 0.05
compute_var_to_feature_map = true
flood_entity_type = elemental
execute_on = 'initial timestep_begin'
outputs = none
[../]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = test.tex
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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_max_its = 30
l_tol = 1e-4
nl_max_its = 30
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 3
dt = 0.2
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/grain_growth/particle.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./c]
[./InitialCondition]
int_width = 60
x1 = 167
y1 = 500
radius = 50
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[../]
[]
[Kernels]
[./PolycrystalKernel]
c = c
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[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]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[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 = 10
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(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/combined/test/tests/grain_texture/EulerAngle2RGBAction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 12
xmax = 1000
ymax = 300
elem_type = QUAD4
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./active_bounds_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = VARIABLE_COLORING
[../]
[./active_bounds_elemental]
type = FeatureFloodCountAux
variable = active_bounds_elemental
field_display = ACTIVE_BOUNDS
execute_on = 'initial timestep_begin'
flood_counter = grain_tracker
[../]
[]
[Modules]
[./PhaseField]
[./EulerAngles2RGB]
crystal_structure = cubic
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 75 # 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
time_scale = 1.0e-6
[../]
[]
[UserObjects]
[./grain_tracker]
type = FauxGrainTracker
connecting_threshold = 0.05
compute_var_to_feature_map = true
flood_entity_type = elemental
execute_on = 'initial timestep_begin'
outputs = none
[../]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = test.tex
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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_max_its = 30
l_tol = 1e-4
nl_max_its = 30
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 3
dt = 0.2
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/grain_growth/thumb.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
v = 'gr0 gr1'
[]
[Variables]
[./gr0]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ThumbIC
xcoord = 500.0
height = 600.0
width = 400.0
invalue = 0.0
outvalue = 1.0
[../]
[../]
[./gr1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ThumbIC
xcoord = 500.0
height = 600.0
width = 400.0
invalue = 1.0
outvalue = 0.0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
active = ' '
[./Periodic]
[./left_right]
primary = 0
secondary = 2
translation = '0 1000 0'
[../]
[./top_bottom]
primary = 1
secondary = 3
translation = '-1000 0 0'
[../]
[../]
[]
[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]
[./gr_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[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 = 10
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_2var_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
int_width = 60
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./gr0dot]
type = TimeDerivative
variable = gr0
[../]
[./gr0bulk]
type = AllenCahn
variable = gr0
f_name = F
coupled_variables = gr1
[../]
[./gr0int]
type = ACInterface
variable = gr0
kappa_name = kappa_op
[../]
[./gr1dot]
type = TimeDerivative
variable = gr1
[../]
[./gr1bulk]
type = AllenCahn
variable = gr1
f_name = F
coupled_variables = gr0
[../]
[./gr1int]
type = ACInterface
variable = gr1
kappa_name = kappa_op
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = 'kappa_op kappa_op'
interfacial_vars = 'gr0 gr1'
[../]
[]
[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
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'gr0 gr1'
material_property_names = 'mu gamma_asymm'
expression = 'mu*( gr0^4/4.0 - gr0^2/2.0 + gr1^4/4.0 - gr1^2/2.0 + gamma_asymm*gr0^2*gr1^2) + 1.0/4.0'
derivative_order = 2
enable_jit = true
[../]
[]
[Postprocessors]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[]
[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 = 30
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 7
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/GBType/GB_Type_Phase1.i)
# MOOSE input file
# Written by Pierre-Clement Simon - Idaho National Laboratory
#
# Project:
# TRISO fuel fission gas transport: Silver diffusion in silicon carbide
#
# Published with:
# ---
#
# Phase Field Model: Isotropic diffusion equation
# type: Transient
# Grain structure: Single grain
# BCs: Fixed value on the right, flux on the left
#
#
# Info:
# - Input file used to generate polycrystals for SiC
#
# Updates from previous file:
# -
#
# Units
# length: --
# time: --
# energy: --
# quantity: --
# 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]
[ebsd_mesh]
type = EBSDMeshGenerator
# Two Parallel Grains
filename = 'EBSD_ThreeGrains.txt'
[]
[]
[GlobalParams]
# Parameters used by several kernels that are defined globally to simplify input file
op_num = 6 # Number of grains
var_name_base = gr # Base name of grains
[]
[UserObjects]
[ebsd_reader]
type = EBSDReader
[]
[ebsd]
type = PolycrystalEBSD
coloring_algorithm = bt
ebsd_reader = ebsd_reader
enable_var_coloring = true
# output_adjacency_matrix = true
[]
[grain_tracker]
type = GrainTracker
threshold = 0.001
connecting_threshold = 0.008
compute_var_to_feature_map = true
compute_halo_maps = true # For displaying HALO fields
remap_grains = true
polycrystal_ic_uo = ebsd
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = ebsd
[]
[]
[]
[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
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./aphi1]
order = CONSTANT
family = MONOMIAL
[../]
[./bPhi]
order = CONSTANT
family = MONOMIAL
[../]
[./cphi2]
order = CONSTANT
family = MONOMIAL
[../]
[./ebsd_numbers]
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'
[../]
# generate the unique ID from grain_tracker
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
# The phi will output the Euler angle from EBSD data, and the data structure
# will change with the guide from grain_tracker
[./aphi1]
type = OutputEulerAngles
variable = aphi1
euler_angle_provider = ebsd_reader
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./bPhi]
type = OutputEulerAngles
variable = bPhi
euler_angle_provider = ebsd_reader
grain_tracker = grain_tracker
output_euler_angle = 'Phi'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./cphi2]
type = OutputEulerAngles
variable = cphi2
euler_angle_provider = ebsd_reader
grain_tracker = grain_tracker
output_euler_angle = 'phi2'
execute_on = 'INITIAL TIMESTEP_END'
[../]
# Import the unique grain ID from ebsd data, and the data structure
# will change with the guide from grain_tracker
[ebsd_numbers]
type = EBSDReaderAvgDataAux
data_name = feature_id
ebsd_reader = ebsd_reader
grain_tracker = grain_tracker
variable = ebsd_numbers
execute_on = 'initial 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 = 6 # Width of the diffuse GB
[../]
[./GB_type]
# The new developed Miso Bnds Aux Kernel
type = ComputeGBMisorientationType
ebsd_reader = ebsd_reader
grain_tracker = grain_tracker
output_properties = 'gb_type'
outputs = exodus
[../]
[]
[Postprocessors]
# Scalar postprocessors
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[n_elements]
type = NumElems
execute_on = 'initial timestep_end'
[]
[n_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[]
[DOFs]
type = NumDOFs
[]
[]
[Adaptivity]
initial_steps = 1
max_h_level = 1
marker = combined
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[./Markers]
[./bound_adapt]
type = ValueThresholdMarker
third_state = DO_NOTHING
coarsen = 0.999 #1.0
refine = 0.95 #0.95
variable = bnds
invert = true
[../]
[./errorfrac]
type = ErrorFractionMarker
coarsen = 0.1
indicator = error
refine = 0.7
[../]
[./combined]
type = ComboMarker
markers = 'bound_adapt errorfrac'
[../]
[../]
[]
[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 -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = ' hypre boomeramg 0.7'
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 = IterationAdaptiveDT
cutback_factor = 0.9
dt = 1
growth_factor = 1.1
optimal_iterations = 7
[]
start_time = 0.0
num_steps = 2
[]
[Outputs]
perf_graph = true
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/phase_field/examples/ebsd_reconstruction/IN100-111grn.i)
[Mesh]
[ebsd_mesh]
type = EBSDMeshGenerator
filename = IN100_120x120.txt
pre_refine = 2
[]
[]
[GlobalParams]
op_num = 8
var_name_base = gr
[]
[UserObjects]
[ebsd_reader]
type = EBSDReader
[]
[ebsd]
type = PolycrystalEBSD
coloring_algorithm = bt
ebsd_reader = ebsd_reader
enable_var_coloring = true
[]
[grain_tracker]
type = GrainTracker
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
polycrystal_ic_uo = ebsd
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = ebsd
[]
[]
[]
[Variables]
[PolycrystalVariables]
[]
[]
[AuxVariables]
[bnds]
[]
[unique_grains_ic]
order = CONSTANT
family = MONOMIAL
[]
[unique_grains]
order = CONSTANT
family = MONOMIAL
[]
[ghost_elements]
order = CONSTANT
family = MONOMIAL
[]
[halos]
order = CONSTANT
family = MONOMIAL
[]
[var_indices_ic]
order = CONSTANT
family = MONOMIAL
[]
[var_indices]
order = CONSTANT
family = MONOMIAL
[]
[ebsd_grains]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[PolycrystalKernel]
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[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_ic]
type = FeatureFloodCountAux
variable = var_indices_ic
execute_on = 'initial'
flood_counter = ebsd
field_display = VARIABLE_COLORING
[]
[unique_grains_ic]
type = FeatureFloodCountAux
variable = unique_grains_ic
execute_on = 'initial'
flood_counter = ebsd
field_display = UNIQUE_REGION
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[]
[grain_aux]
type = EBSDReaderPointDataAux
variable = ebsd_grains
ebsd_reader = ebsd_reader
data_name = 'feature_id'
execute_on = 'initial timestep_end'
[]
[]
[Modules]
[PhaseField]
[EulerAngles2RGB]
crystal_structure = cubic
euler_angle_provider = ebsd_reader
grain_tracker = grain_tracker
[]
[]
[]
[Materials]
[Copper]
# T = 500 # K
type = GBEvolution
T = 500
wGB = 0.6 # 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.0e-6
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
[]
[n_elements]
type = NumElems
execute_on = 'initial timestep_end'
[]
[n_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[]
[DOFs]
type = NumDOFs
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 0.7'
l_tol = 1.0e-4
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 30
[TimeStepper]
type = IterationAdaptiveDT
cutback_factor = 0.9
dt = 10.0
growth_factor = 1.1
optimal_iterations = 7
[]
[Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 2
[]
[]
[Outputs]
exodus = true
checkpoint = true
perf_graph = true
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_ebsd.i)
[Mesh]
[ebsd_mesh]
type = EBSDMeshGenerator
filename = 'ebsd_9.txt'
[]
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[UserObjects]
[ebsd_reader]
type = EBSDReader
[]
[ebsd]
type = PolycrystalEBSD
coloring_algorithm = bt
ebsd_reader = ebsd_reader
output_adjacency_matrix = true
[]
[grain_tracker]
type = GrainTracker
threshold = 0.2
connecting_threshold = 0.08
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
polycrystal_ic_uo = ebsd
execute_on = 'initial timestep_end'
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = ebsd
[]
[]
[]
[Variables]
[PolycrystalVariables]
[]
[]
[AuxVariables]
[bnds]
[]
[unique_grains]
family = MONOMIAL
order = CONSTANT
[]
[var_indices]
family = MONOMIAL
order = CONSTANT
[]
[ebsd_grains]
family = MONOMIAL
order = CONSTANT
[]
[phi1]
family = MONOMIAL
order = CONSTANT
[]
[halo0]
order = CONSTANT
family = MONOMIAL
[]
[halo1]
order = CONSTANT
family = MONOMIAL
[]
[halo2]
order = CONSTANT
family = MONOMIAL
[]
[halo3]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[PolycrystalKernel]
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[]
[grain_aux]
type = EBSDReaderPointDataAux
variable = ebsd_grains
ebsd_reader = ebsd_reader
data_name = 'feature_id'
execute_on = 'initial timestep_end'
[]
[phi1]
type = OutputEulerAngles
euler_angle_provider = ebsd_reader
output_euler_angle = phi1
grain_tracker = grain_tracker
variable = phi1
[]
[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
[]
[]
[Materials]
[CuGrGr]
type = GBEvolution
T = 500 #K
wGB = 0.75 #micron
length_scale = 1.0e-6
time_scale = 1.0e-4
GBmob0 = 2.5e-6
Q = 0.23
GBenergy = 0.708
molar_volume = 7.11e-6
[]
[]
[Postprocessors]
[n_nodes]
type = NumNodes
execute_on = timestep_end
[]
[DOFs]
type = NumDOFs
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
#Preconditioned JFNK (default)
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 = 20
nl_rel_tol = 1.0e-9
nl_max_its = 20
start_time = 0.0
num_steps = 1
dt = 0.05
[]
[Outputs]
execute_on = 'initial'
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/grain_growth_w_linearized_interface/linearized_interface_action.i)
[GlobalParams]
bound_value = 5.0
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 50
ymax = 50
nx = 10
ny = 10
[]
[Modules]
[PhaseField]
[GrainGrowthLinearizedInterface]
op_num = 2
var_name_base = phi
op_name_base = gr
mobility = L
kappa = kappa_op
[]
[]
[]
[ICs]
[phi0_IC]
type = SmoothCircleICLinearizedInterface
variable = phi0
invalue = 1.0
outvalue = 0.0
radius = 30
int_width = 10
x1 = 0.0
y1 = 0.0
profile = TANH
[]
[phi1_IC]
type = SmoothCircleICLinearizedInterface
variable = phi1
invalue = 0.0
outvalue = 1.0
radius = 30
int_width = 10
x1 = 0.0
y1 = 0.0
profile = TANH
[]
[]
[Materials]
[GBEovlution]
type = GBEvolution
GBenergy = 0.97
GBMobility = 0.6e-6
T = 300
wGB = 10
[]
[]
[Postprocessors]
[grain_area_mat]
type = ElementIntegralMaterialProperty
mat_prop = gr0
execute_on = 'initial TIMESTEP_END'
[]
[]
[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.1
end_time = 0.6
[]
[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/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/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/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/combined/examples/phase_field-mechanics/EBSD_reconstruction_grain_growth_mech.i)
# This example reconstructs the grain structure from an EBSD data file
# Then, an isotropic grain model is run with linear elasticity and an anisotropic
# elasticity tensor that uses the measured EBSD angles.
[Mesh]
[ebsd_mesh]
type = EBSDMeshGenerator
uniform_refine = 2 #Mesh can go two levels coarser than the EBSD grid
filename = IN100_128x128.txt
[]
[]
[GlobalParams]
op_num = 8
var_name_base = gr
displacements = 'disp_x disp_y'
[]
[Variables]
[PolycrystalVariables] #Polycrystal variable generation (30 order parameters)
[]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[bnds]
[]
[gt_indices]
order = CONSTANT
family = MONOMIAL
[]
[unique_grains]
order = CONSTANT
family = MONOMIAL
[]
[vonmises_stress]
order = CONSTANT
family = MONOMIAL
[]
[C1111]
order = CONSTANT
family = MONOMIAL
[]
[phi1]
order = CONSTANT
family = MONOMIAL
[]
[Phi]
order = CONSTANT
family = MONOMIAL
[]
[phi2]
order = CONSTANT
family = MONOMIAL
[]
[EBSD_grain]
family = MONOMIAL
order = CONSTANT
[]
[]
[ICs]
[PolycrystalICs]
[ReconVarIC]
ebsd_reader = ebsd
coloring_algorithm = bt
[]
[]
[]
[Kernels]
[PolycrystalKernel]
[]
[PolycrystalElasticDrivingForce]
[]
[TensorMechanics]
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[gt_indices]
type = FeatureFloodCountAux
variable = gt_indices
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[]
[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
[]
[phi1]
type = OutputEulerAngles
variable = phi1
euler_angle_provider = ebsd
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
execute_on = 'initial'
[]
[Phi]
type = OutputEulerAngles
variable = Phi
euler_angle_provider = ebsd
grain_tracker = grain_tracker
output_euler_angle = 'Phi'
execute_on = 'initial'
[]
[phi2]
type = OutputEulerAngles
variable = phi2
euler_angle_provider = ebsd
grain_tracker = grain_tracker
output_euler_angle = 'phi2'
execute_on = 'initial'
[]
[grain_aux]
type = EBSDReaderPointDataAux
variable = EBSD_grain
ebsd_reader = ebsd
data_name = 'feature_id'
execute_on = 'initial'
[]
[]
[BCs]
[top_displacement]
type = DirichletBC
variable = disp_y
boundary = top
value = -2.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
[]
[]
[Modules]
[PhaseField]
[EulerAngles2RGB]
crystal_structure = cubic
euler_angle_provider = ebsd
grain_tracker = grain_tracker
[]
[]
[]
[Materials]
[Copper]
# T = 500 # K
type = GBEvolution
block = 0
T = 500
wGB = 0.6 # 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.0e-6
[]
[ElasticityTensor]
type = ComputePolycrystalElasticityTensor
grain_tracker = grain_tracker
[]
[strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[]
[stress]
type = ComputeLinearElasticStress
block = 0
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
[]
[n_elements]
type = NumElems
execute_on = 'initial timestep_end'
[]
[n_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[]
[DOFs]
type = NumDOFs
[]
[]
[UserObjects]
[ebsd]
type = EBSDReader
[]
[grain_tracker]
type = GrainTrackerElasticity
compute_var_to_feature_map = true
ebsd_reader = ebsd
fill_method = symmetric9
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
euler_angle_provider = ebsd
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = ' hypre boomeramg 0.7'
l_tol = 1.0e-4
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 30
dt = 10
[Adaptivity]
initial_adaptivity = 0
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 2
[]
[TimeStepper]
type = IterationAdaptiveDT
cutback_factor = 0.9
dt = 10.0
growth_factor = 1.1
optimal_iterations = 7
[]
[]
[Outputs]
csv = true
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/free_energy_material/CoupledValueFunctionFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 500
ymin = 0
ymax = 500
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[PolycrystalVariables]
[]
[]
[Functions]
[grain_growth_energy]
type = PiecewiseMultilinear
data_file = grain_growth_energy.data
[]
[grain_growth_mu0]
type = PiecewiseMultilinear
data_file = grain_growth_mu0.data
[]
[grain_growth_mu1]
type = PiecewiseMultilinear
data_file = grain_growth_mu1.data
[]
[grain_growth_mu2]
type = PiecewiseMultilinear
data_file = grain_growth_mu2.data
[]
[grain_growth_mu3]
type = PiecewiseMultilinear
data_file = grain_growth_mu3.data
[]
[matrix]
type = ParsedFunction
expression = '1-x-y-z'
[]
[]
[ICs]
[gr1]
type = SmoothCircleIC
variable = gr1
x1 = 0
y1 = 0
radius = 150
int_width = 90
invalue = 1
outvalue = 0
[]
[gr2]
type = SmoothCircleIC
variable = gr2
x1 = 500
y1 = 0
radius = 120
int_width = 90
invalue = 1
outvalue = 0
[]
[gr3]
type = SmoothCircleIC
variable = gr3
x1 = 250
y1 = 500
radius = 300
int_width = 90
invalue = 1
outvalue = 0
[]
[gr0]
type = CoupledValueFunctionIC
variable = gr0
v = 'gr1 gr2 gr3'
function = matrix
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[local_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[gr0dot]
type = TimeDerivative
variable = gr0
[]
[gr0bulk]
type = AllenCahn
variable = gr0
f_name = F
coupled_variables = 'gr1 gr2 gr3'
[]
[gr0int]
type = ACInterface
variable = gr0
kappa_name = kappa_op
[]
[gr1dot]
type = TimeDerivative
variable = gr1
[]
[gr1bulk]
type = AllenCahn
variable = gr1
f_name = F
coupled_variables = 'gr0 gr2 gr3'
[]
[gr1int]
type = ACInterface
variable = gr1
kappa_name = kappa_op
[]
[gr2dot]
type = TimeDerivative
variable = gr2
[]
[gr2bulk]
type = AllenCahn
variable = gr2
f_name = F
coupled_variables = 'gr0 gr1 gr3'
[]
[gr2int]
type = ACInterface
variable = gr2
kappa_name = kappa_op
[]
[gr3dot]
type = TimeDerivative
variable = gr3
[]
[gr3bulk]
type = AllenCahn
variable = gr3
f_name = F
coupled_variables = 'gr0 gr1 gr2'
[]
[gr3int]
type = ACInterface
variable = gr3
kappa_name = kappa_op
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
[]
[local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = 'kappa_op kappa_op kappa_op kappa_op'
interfacial_vars = 'gr0 gr1 gr2 gr3'
[]
[]
[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
[]
[Tabulated]
type = CoupledValueFunctionFreeEnergy
free_energy_function = grain_growth_energy
chemical_potential_functions = 'grain_growth_mu0 grain_growth_mu1 grain_growth_mu2 '
'grain_growth_mu3'
v = 'gr0 gr1 gr2 gr3'
[]
[]
[Postprocessors]
[total_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[]
[]
[Preconditioning]
[SMP]
type = SMP
coupled_groups = 'gr0,gr1 gr0,gr2 gr0,gr3'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 30
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 3
dt = 100.0
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/phase_field/test/tests/reconstruction/euler2rgb_non_uniform_orientation.i)
[Mesh]
[ebsd_mesh]
type = EBSDMeshGenerator
filename = ebsd_scan.txt
[]
[]
[GlobalParams]
op_num = 10
var_name_base = gr
[]
[UserObjects]
[ebsd_reader]
type = EBSDReader
bins = 40
[]
[ebsd]
type = PolycrystalEBSD
coloring_algorithm = jp
ebsd_reader = ebsd_reader
enable_var_coloring = true
[]
[grain_tracker]
type = GrainTracker
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
polycrystal_ic_uo = ebsd
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = ebsd
[]
[]
[]
[Variables]
[PolycrystalVariables]
[]
[]
[AuxVariables]
[bnds]
[]
[]
[Kernels]
[PolycrystalKernel]
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[]
[Modules]
[PhaseField]
[EulerAngles2RGB]
crystal_structure = cubic
euler_angle_provider = ebsd_reader
grain_tracker = grain_tracker
[]
[]
[]
[Materials]
[Copper]
# T = 500 # K
type = GBEvolution
T = 500
wGB = 0.6 # 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.0e-6
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
[]
[n_elements]
type = NumElems
execute_on = 'initial timestep_end'
[]
[n_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[]
[DOFs]
type = NumDOFs
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = Newton
petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 0.7'
l_tol = 1.0e-6
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 0
[]
[Outputs]
exodus = true
perf_graph = 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/test/tests/initial_conditions/TricrystalTripleJunctionIC.i)
# This simulation tests the TricrystalTripleJunctionIC
[Mesh]
# Mesh block. Meshes can be read in or automatically generated.
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 11 # Number of elements in the x direction
ny = 11 # Number of elements in the y direction
xmax = 1001 # Maximum x-coordinate of mesh
xmin = 0 # Minimum x-coordinate of mesh
ymax = 1001 # Maximum y-coordinate of mesh
ymin = 0 # Minimum y-coordinate of mesh
elem_type = QUAD4 # Type of elements used in the mesh
uniform_refine = 3
[]
[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
v = 'gr0 gr1 gr2' # Names of the grains
theta1 = 135 # Angle the first grain makes at the triple junction
theta2 = 100 # Angle the second grain makes at the triple junction
length_scale = 1.0e-9 # Length scale in nm
time_scale = 1.0e-9 # Time scale in ns
[]
[Variables]
[gr0]
[]
[gr1]
[]
[gr2]
[]
[]
[ICs]
[gr0_IC]
type = TricrystalTripleJunctionIC
variable = gr0
op_index = 1
[]
[gr1_IC]
type = TricrystalTripleJunctionIC
variable = gr1
op_index = 2
[]
[gr2_IC]
type = TricrystalTripleJunctionIC
variable = gr2
op_index = 3
[]
[]
[AuxVariables]
[bnds]
# Variable used to visualize the grain boundaries in the simulation
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
# Kernels 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'
[]
[]
[Materials]
[material]
# 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
[grain_tracker]
type = FauxGrainTracker
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true # Outputs to the Exodus file format
execute_on = 'final'
[]
[Problem]
solve = false
[]
(modules/phase_field/test/tests/reconstruction/1phase_evolution.i)
#
# In this test we set the initial condition of a set of order parameters
# by pulling out the grain data from given EBSD data file ignoring the phase completely.
#
[Mesh]
[ebsd_mesh]
type = EBSDMeshGenerator
filename = IN100_001_28x28_Marmot.txt
[]
[]
[GlobalParams]
op_num = 5
var_name_base = gr
[]
[UserObjects]
[ebsd_reader]
type = EBSDReader
[]
[ebsd]
type = PolycrystalEBSD
coloring_algorithm = bt
ebsd_reader = ebsd_reader
output_adjacency_matrix = true
[]
[grain_tracker]
type = GrainTracker
polycrystal_ic_uo = ebsd
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = ebsd
[]
[]
[]
[Variables]
[PolycrystalVariables]
[]
[]
[Kernels]
[PolycrystalKernel]
[]
[]
[AuxVariables]
[feature]
family = MONOMIAL
order = CONSTANT
[]
[bnds]
[]
[]
[AuxKernels]
[feature]
type = EBSDReaderAvgDataAux
variable = feature
ebsd_reader = ebsd_reader
grain_tracker = grain_tracker
data_name = feature_id
execute_on = 'initial timestep_end'
[]
[bnds]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[]
[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 schonfelder1997molecular bibtex entry
GBenergy = 0.708 # GB energy in J/m^2
Q = 0.23 #Activation energy for grain growth from Schonfelder 1997
T = 500 # K #Constant temperature of the simulation (for mobility calculation)
wGB = 1 # nm #Width of the diffuse GB
#outputs = exodus
length_scale = 1e-06
time_scale = 1e-6
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 10
[]
[Outputs]
exodus = 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/random_grain_orientation.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 12
xmax = 1000
ymax = 300
elem_type = QUAD4
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./active_bounds_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = VARIABLE_COLORING
[../]
[./active_bounds_elemental]
type = FeatureFloodCountAux
variable = active_bounds_elemental
field_display = ACTIVE_BOUNDS
execute_on = 'initial timestep_begin'
flood_counter = grain_tracker
[../]
[]
[Modules]
[./PhaseField]
[./EulerAngles2RGB]
crystal_structure = cubic
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 75 # 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
time_scale = 1.0e-6
[../]
[]
[UserObjects]
[./grain_tracker]
type = GrainTracker
flood_entity_type = elemental
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./euler_angle_file]
type = RandomEulerAngleProvider
grain_tracker_object = grain_tracker
execute_on = 'initial timestep_begin'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.2
num_steps = 3
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/combined/test/tests/ACGrGrElasticDrivingForce/bicrystal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 3
xmax = 1000
ymax = 1000
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[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
[../]
[./C1111]
order = CONSTANT
family = MONOMIAL
[../]
[./active_bounds_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalElasticDrivingForce]
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./bnds_aux]
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
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
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
[../]
[./active_bounds_elemental]
type = FeatureFloodCountAux
variable = active_bounds_elemental
field_display = ACTIVE_BOUNDS
execute_on = 'initial timestep_begin'
flood_counter = grain_tracker
[../]
[./euler_angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
[../]
[]
[BCs]
[./top_displacement]
type = DirichletBC
variable = disp_y
boundary = top
value = -10.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 = 75 # 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
time_scale = 1.0e-6
[../]
[./ElasticityTensor]
type = ComputePolycrystalElasticityTensor
grain_tracker = grain_tracker
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[UserObjects]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = test.tex
[../]
[./grain_tracker]
type = GrainTrackerElasticity
connecting_threshold = 0.05
compute_var_to_feature_map = true
flood_entity_type = elemental
execute_on = 'initial timestep_begin'
euler_angle_provider = euler_angle_file
fill_method = symmetric9
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
outputs = none
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
coupled_groups = 'gr0,gr1 disp_x,disp_y'
[../]
[]
[Executioner]
type = Transient
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_max_its = 30
l_tol = 1e-4
nl_max_its = 30
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 3
dt = 0.2
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = 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/phase_field/test/tests/grain_growth/explicit.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 400
ymin = 0
ymax = 400
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[GlobalParams]
op_num = 2
var_name_base = gr
implicit = false
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[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]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = explicit-euler
solve_type = NEWTON
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'bjacobi'
#
l_tol = 1.0e-6
nl_rel_tol = 1.0e-10
num_steps = 61
dt = 0.08
[]
[Outputs]
execute_on = 'initial timestep_end final'
time_step_interval = 20
exodus = 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/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/actions/grain_growth_with_c.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 400
ymax = 400
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
c = c
[../]
[../]
[]
[AuxVariables]
[./c]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
int_width = 60
[../]
[../]
[./c_IC]
type = SmoothCircleIC
variable = c
x1 = 100
y1 = 0.0
radius = 50
int_width = 40
invalue = 1.0
outvalue = 0.0
[../]
[]
[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]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
num_steps = 5
dt = 80.0
[]
[Outputs]
exodus = true
[]
(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_growth_w_linearized_interface/grain_growth_linearized_interface.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 50
ymax = 50
nx = 10
ny = 10
[]
[Variables]
[phi0]
[]
[phi1]
[]
[]
[AuxVariables]
[gr0_aux]
[]
[gr1_aux]
[]
[bounds_dummy]
[]
[]
[AuxKernels]
[gr0]
type = LinearizedInterfaceAux
variable = gr0_aux
nonlinear_variable = phi0
execute_on = 'INITIAL TIMESTEP_END'
[]
[gr1]
type = LinearizedInterfaceAux
variable = gr1_aux
nonlinear_variable = phi1
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[ICs]
[phi0_IC]
type = SmoothCircleICLinearizedInterface
variable = phi0
invalue = 1.0
outvalue = 0.0
bound_value = 5.0
radius = 30
int_width = 10
x1 = 0.0
y1 = 0.0
profile = TANH
[]
[phi1_IC]
type = SmoothCircleICLinearizedInterface
variable = phi1
invalue = 0.0
outvalue = 1.0
bound_value = 5.0
radius = 30
int_width = 10
x1 = 0.0
y1 = 0.0
profile = TANH
[]
[]
[Kernels]
#phi0 Kernels
[phi0_dot]
type = ChangedVariableTimeDerivative
variable = phi0
order_parameter = gr0
[]
[phi0_ACInt]
type = ACInterfaceChangedVariable
variable = phi0
kappa_name = kappa_op
mob_name = L
order_parameter = gr0
[]
[gr0_AC]
type = ACGrGrPolyLinearizedInterface
variable = phi0
mob_name = L
this_op = gr0
other_ops = gr1
v = phi1
[]
#phi1 Kernels
[phi1_dot]
type = ChangedVariableTimeDerivative
variable = phi1
order_parameter = gr1
[]
[phi1_ACInt]
type = ACInterfaceChangedVariable
variable = phi1
kappa_name = kappa_op
mob_name = L
order_parameter = gr1
[]
[gr1_AC]
type = ACGrGrPolyLinearizedInterface
variable = phi1
mob_name = L
this_op = gr1
other_ops = gr0
v = phi0
[]
[]
[Materials]
[gr0]
type = LinearizedInterfaceFunction
f_name = gr0
phi = phi0
[]
[gr1]
type = LinearizedInterfaceFunction
f_name = gr1
phi = phi1
[]
[GBEovlution]
type = GBEvolution
GBenergy = 0.97
GBMobility = 0.6e-6
T = 300
wGB = 10
[]
[]
[Bounds]
[phi0_upper_bound]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = phi0
bound_type = upper
bound_value = 5.0
[]
[phi0_lower_bound]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = phi0
bound_type = lower
bound_value = -5.0
[]
[phi1_upper_bound]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = phi1
bound_type = upper
bound_value = 5.0
[]
[phi1_lower_bound]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = phi1
bound_type = lower
bound_value = -5.0
[]
[]
[Postprocessors]
[grain_area_mat]
type = ElementIntegralMaterialProperty
mat_prop = gr0
execute_on = 'initial TIMESTEP_END'
[]
[]
[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.1
end_time = 0.6
[]
[Outputs]
exodus = true
[]
(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/actions/grain_growth.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 400
ymax = 400
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
variable_mobility = false
[../]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
int_width = 60
[../]
[../]
[]
[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]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = 'NEWTON'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
num_steps = 5
dt = 80.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/hex.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]
[./hex_ic]
type = PolycrystalHex
coloring_algorithm = bt
x_offset = .5
grain_num = 4
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = hex_ic
[../]
[../]
[]
[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
[../]
[]
[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/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
[]