- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- 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.
- 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.
NumNodes
The NumNodes Postprocessor returns the total number of nodes in the simulation. Returns the total number of nodes when using DistributedMesh.
Syntax and Description
Returns the total number of nodes in a simulation (works with DistributedMesh)
Input Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
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
- 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
Input Files
- (modules/phase_field/tutorials/spinodal_decomposition/s3_decomp.i)
- (test/tests/postprocessors/linear_combination/linear_combination.i)
- (modules/phase_field/examples/ebsd_reconstruction/IN100-111grn.i)
- (modules/phase_field/examples/grain_growth/3D_6000_gr.i)
- (modules/phase_field/test/tests/GBType/GB_Type_Phase1.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s4_mobility.i)
- (test/tests/postprocessors/num_nodes/num_nodes.i)
- (test/tests/postprocessors/relative_difference/relative_difference.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_ebsd.i)
- (test/tests/postprocessors/difference_pps/difference_depend_check.i)
- (modules/phase_field/examples/grain_growth/grain_growth_2D_random.i)
- (modules/phase_field/test/tests/grain_tracker_test/split_grain.i)
- (modules/phase_field/test/tests/reconstruction/euler2rgb_non_uniform_orientation.i)
- (test/tests/postprocessors/num_residual_eval/num_residual_eval.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
- (modules/combined/examples/phase_field-mechanics/EBSD_reconstruction_grain_growth_mech.i)
References
No citations exist within this document.(modules/phase_field/tutorials/spinodal_decomposition/s3_decomp.i)
#
# Simulation of iron-chromium alloy decomposition using simplified conditions.
#
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the materials and
# must have the same value in each one.
[./constants]
# Define constant values kappa_c and M. Eventually M will be replaced with
# an equation rather than a constant.
type = GenericFunctionMaterial
prop_names = 'kappa_c M'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27
2.2841e-26*1e+09^2/6.24150934e+18/1e-27'
# kappa_c*eV_J*nm_m^2*d
# M*nm_m^2/eV_J/d
[../]
[./local_energy]
# Defines the function for the local free energy density as given in the
# problem, then converts units and adds scaling factor.
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/postprocessors/linear_combination/linear_combination.i)
# Tests the LinearCombinationPostprocessor post-processor, which computes
# a linear combination of an arbitrary number of post-processor values.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./pp1]
# number of elements, equal to 2
type = NumElems
[../]
[./pp2]
# number of nodes, equal to 3
type = NumNodes
[../]
# post-processor value being tested; value should be the following:
# value = c1 * pp1 + c2 * pp2 + b
# = 2 * 2 + -1 * 3 + 5 = 6
[./linear_combination]
type = LinearCombinationPostprocessor
pp_names = 'pp1 pp2'
pp_coefs = '2 -1'
b = 5
[../]
[]
[Outputs]
show = linear_combination
csv = true
[]
(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/examples/grain_growth/3D_6000_gr.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 180
ny = 180
nz = 180
xmin = 0
xmax = 180
ymin = 0
ymax = 180
zmin = 0
zmax = 180
elem_type = HEX8
[]
[GlobalParams]
op_num = 28
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
grain_num = 6000 # Number of grains
rand_seed = 8675 # 301
coloring_algorithm = jp
[../]
[./term]
type = Terminator
expression = 'grain_tracker < 218'
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./ghost_elements]
order = CONSTANT
family = MONOMIAL
[../]
[./halos]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[./ghost_elements]
type = FeatureFloodCountAux
variable = ghost_elements
field_display = GHOSTED_ENTITIES
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[./halos]
type = FeatureFloodCountAux
variable = halos
field_display = HALOS
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
flood_counter = grain_tracker
[../]
[]
#[BCs]
# [./Periodic]
# [./All]
# auto_direction = 'x y'
# [../]
# [../]
#[]
[Materials]
[./Copper]
type = GBEvolution
T = 500
wGB = 3 # um
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
molar_volume = 7.11e-6 #Molar volume in m^3/mol
length_scale = 1.0e-6
time_scale = 1.0
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./n_elements]
type = NumElems
execute_on = timestep_end
[../]
[./n_nodes]
type = NumNodes
execute_on = timestep_end
[../]
[./DOFs]
type = NumDOFs
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.1
compute_halo_maps = true
[../]
[]
#[Preconditioning]
# [./SMP]
# type = SMP
# full = true
# [../]
#[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK #Preconditioned JFNK (default)
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 500
dt = 0.0002
[./TimeStepper]
type = IterationAdaptiveDT
cutback_factor = 0.9
dt = 0.0002
growth_factor = 1.1
optimal_iterations = 8
[../]
#[./Adaptivity]
# initial_adaptivity = 4
# refine_fraction = 0.6
# coarsen_fraction = 0.1
# max_h_level = 4
# print_changed_info = true
#[../]
[]
[Outputs]
nemesis = true
checkpoint = true
csv = true
[./console]
type = Console
[../]
[]
(modules/phase_field/test/tests/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/tutorials/spinodal_decomposition/s4_mobility.i)
#
# Example simulation of an iron-chromium alloy at 500 C. Equilibrium
# concentrations are at 23.6 and 82.3 mol% Cr. Kappa value, free energy equation,
# and mobility equation were provided by Lars Hoglund. Solved using the split
# form of the Cahn-Hilliard equation.
#
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the first three
# materials and must have the same value in each one.
[./kappa] # Gradient energy coefficient (eV nm^2/mol)
type = GenericFunctionMaterial
prop_names = 'kappa_c'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27'
# kappa_c *eV_J*nm_m^2* d
[../]
[./mobility] # Mobility (nm^2 mol/eV/s)
# NOTE: This is a fitted equation, so only 'Conv' has units
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
constant_names = 'Acr Bcr Ccr Dcr
Ecr Fcr Gcr
Afe Bfe Cfe Dfe
Efe Ffe Gfe
nm_m eV_J d'
constant_expressions = '-32.770969 -25.8186669 -3.29612744 17.669757
37.6197853 20.6941796 10.8095813
-31.687117 -26.0291774 0.2286581 24.3633544
44.3334237 8.72990497 20.956768
1e+09 6.24150934e+18 1e-27'
expression = 'nm_m^2/eV_J/d*((1-c)^2*c*10^
(Acr*c+Bcr*(1-c)+Ccr*c*log(c)+Dcr*(1-c)*log(1-c)+
Ecr*c*(1-c)+Fcr*c*(1-c)*(2*c-1)+Gcr*c*(1-c)*(2*c-1)^2)
+c^2*(1-c)*10^
(Afe*c+Bfe*(1-c)+Cfe*c*log(c)+Dfe*(1-c)*log(1-c)+
Efe*c*(1-c)+Ffe*c*(1-c)*(2*c-1)+Gfe*c*(1-c)*(2*c-1)^2))'
derivative_order = 1
outputs = exodus
[../]
[./local_energy] # Local free energy function (eV/mol)
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[./precipitate_indicator] # Returns 1/625 if precipitate
type = ParsedMaterial
property_name = prec_indic
coupled_variables = c
expression = if(c>0.6,0.0016,0)
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./precipitate_area] # Fraction of surface devoted to precipitates
type = ElementIntegralMaterialProperty
mat_prop = prec_indic
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/postprocessors/num_nodes/num_nodes.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 3
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/relative_difference/relative_difference.i)
# Tests the RelativeDifferencePostprocessor post-processor, which computes
# the relative difference between 2 post-processor values.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./num_elems]
# number of elements, equal to 2
type = NumElems
[../]
[./num_nodes]
# number of nodes, equal to 3
type = NumNodes
[../]
[./zero]
# zero post-processor value
type = EmptyPostprocessor
[../]
# For the case in this input file, this will be computed as
# y = abs((num_nodes - num_elems) / num_elems)
# y = abs((3 - 2 ) / 2 ) = 0.5
# When the command-line modification "Postprocessors/relative_difference/value2=zero" is used,
# y = abs(num_nodes - zero)
# y = abs(3 - 0 ) = 3
[./relative_difference]
type = RelativeDifferencePostprocessor
value1 = num_nodes
value2 = num_elems
[../]
[]
[Outputs]
[./out]
type = CSV
show = relative_difference
[../]
[]
(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
[]
(test/tests/postprocessors/difference_pps/difference_depend_check.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[AuxKernels]
[./one]
type = ConstantAux
variable = v
value = 1
[../]
[]
[Postprocessors]
# This postprocessor is listed first on purpose to give the resolver something to do
[./diff]
type = DifferencePostprocessor
value1 = nodes
value2 = elems
execute_on = 'initial timestep_end'
[../]
[./nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[../]
[./elems]
type = NumElems
execute_on = 'initial timestep_end'
[../]
[]
[Problem]
type = FEProblem
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = 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/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/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
[]
(test/tests/postprocessors/num_residual_eval/num_residual_eval.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0
xmax = 2
ymin = 0
ymax = 2
# Since this test prints the number of residual evaluations, its
# output strongly depends on the number of processors you run it on,
# and, apparently, the type of Mesh. To reduce this variability, we
# limit it to run with ReplicatedMesh only.
parallel_type = replicated
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Postprocessors]
[./nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[../]
[./elements]
type = NumElems
execute_on = 'initial timestep_end'
[../]
[./dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[../]
[./residuals]
type = NumResidualEvaluations
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
#
# Example simulation of an iron-chromium alloy at 500 C. Equilibrium
# concentrations are at 23.6 and 82.3 mol% Cr. Kappa value, free energy equation,
# and mobility equation were provided by Lars Hoglund. Solved using the split
# form of the Cahn-Hilliard equation.
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
scaling = 1e+04
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./f_density] # Local energy density (eV/mol)
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[AuxKernels]
# Calculates the energy density by combining the local and gradient energies
[./f_density] # (eV/mol/nm^2)
type = TotalFreeEnergy
variable = f_density
f_name = 'f_loc'
kappa_names = 'kappa_c'
interfacial_vars = c
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the first three
# materials and must have the same value in each one.
[./kappa] # Gradient energy coefficient (eV nm^2/mol)
type = GenericFunctionMaterial
prop_names = 'kappa_c'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27'
# kappa_c *eV_J*nm_m^2* d
[../]
[./mobility] # Mobility (nm^2 mol/eV/s)
# NOTE: This is a fitted equation, so only 'Conv' has units
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
constant_names = 'Acr Bcr Ccr Dcr
Ecr Fcr Gcr
Afe Bfe Cfe Dfe
Efe Ffe Gfe
nm_m eV_J d'
constant_expressions = '-32.770969 -25.8186669 -3.29612744 17.669757
37.6197853 20.6941796 10.8095813
-31.687117 -26.0291774 0.2286581 24.3633544
44.3334237 8.72990497 20.956768
1e+09 6.24150934e+18 1e-27'
expression = 'nm_m^2/eV_J/d*((1-c)^2*c*10^
(Acr*c+Bcr*(1-c)+Ccr*c*log(c)+Dcr*(1-c)*log(1-c)+
Ecr*c*(1-c)+Fcr*c*(1-c)*(2*c-1)+Gcr*c*(1-c)*(2*c-1)^2)
+c^2*(1-c)*10^
(Afe*c+Bfe*(1-c)+Cfe*c*log(c)+Dfe*(1-c)*log(1-c)+
Efe*c*(1-c)+Ffe*c*(1-c)*(2*c-1)+Gfe*c*(1-c)*(2*c-1)^2))'
derivative_order = 1
outputs = exodus
[../]
[./local_energy] # Local free energy function (eV/mol)
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[./precipitate_indicator] # Returns 1/625 if precipitate
type = ParsedMaterial
property_name = prec_indic
coupled_variables = c
expression = if(c>0.6,0.0016,0)
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./total_energy] # Total free energy at each timestep
type = ElementIntegralVariablePostprocessor
variable = f_density
execute_on = 'initial timestep_end'
[../]
[./num_features] # Number of precipitates formed
type = FeatureFloodCount
variable = c
threshold = 0.6
[../]
[./precipitate_area] # Fraction of surface devoted to precipitates
type = ElementIntegralMaterialProperty
mat_prop = prec_indic
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(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
[]