- invalueThe variable value inside the circle
C++ Type:double
Controllable:No
Description:The variable value inside the circle
- outvalueThe variable value outside the circle
C++ Type:double
Controllable:No
Description:The variable value outside the circle
- radiiThe radius for each circle
C++ Type:std::vector<double>
Controllable:No
Description:The radius for each circle
- variableThe variable this initial condition is supposed to provide values for.
C++ Type:VariableName
Controllable:No
Description:The variable this initial condition is supposed to provide values for.
- x_positionsThe x-coordinate for each circle center
C++ Type:std::vector<double>
Controllable:No
Description:The x-coordinate for each circle center
- y_positionsThe y-coordinate for each circle center
C++ Type:std::vector<double>
Controllable:No
Description:The y-coordinate for each circle center
- z_positionsThe z-coordinate for each circle center
C++ Type:std::vector<double>
Controllable:No
Description:The z-coordinate for each circle center
SpecifiedSmoothCircleIC
The SpecifiedSmoothCircleIC has not been documented. The content listed below should be used as a starting point for documenting the class, which includes the typical automatic documentation associated with a MooseObject; however, what is contained is ultimately determined by what is necessary to make the documentation clear for users.
Multiple smooth circles with manually specified radii and center points
Overview
Example Input File Syntax
Input Parameters
- 3D_spheresTruein 3D, whether the objects are spheres or columns
Default:True
C++ Type:bool
Controllable:No
Description:in 3D, whether the objects are spheres or columns
- 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
- int_width0The interfacial width of the void surface. Defaults to sharp interface
Default:0
C++ Type:double
Controllable:No
Description:The interfacial width of the void surface. Defaults to sharp interface
- profileCOSFunctional dependence for the interface profile
Default:COS
C++ Type:MooseEnum
Options:COS, TANH
Controllable:No
Description:Functional dependence for the interface profile
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- rand_seed12345Seed value for the random number generator
Default:12345
C++ Type:unsigned int
Controllable:No
Description:Seed value for the random number generator
- 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.
- zero_gradientFalseSet the gradient DOFs to zero. This can avoid numerical problems with higher order shape functions and overlapping circles.
Default:False
C++ Type:bool
Controllable:No
Description:Set the gradient DOFs to zero. This can avoid numerical problems with higher order shape functions and overlapping circles.
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:No
Description:Set the enabled status of the MooseObject.
- ignore_uo_dependencyFalseWhen set to true, a UserObject retrieved by this IC will not be executed before the this IC
Default:False
C++ Type:bool
Controllable:No
Description:When set to true, a UserObject retrieved by this IC will not be executed before the this IC
Advanced Parameters
Input Files
- (modules/combined/examples/publications/rapid_dev/fig8.i)
- (modules/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_small_invalue_test.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialStrictMassConservation.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_maskedforce.i)
- (modules/phase_field/examples/rigidbodymotion/grain_forcedensity_ext.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_motion_fauxGT.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_forcesum.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D.i)
- (modules/phase_field/test/tests/MultiPhase/acmultiinterface_aux.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_appliedforcedensity.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D_single.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D_single.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialSintering_test.i)
- (modules/phase_field/test/tests/MultiPhase/acmultiinterface.i)
- (modules/phase_field/test/tests/GBAnisotropy/test2.i)
- (modules/phase_field/test/tests/rigidbodymotion/polycrystal_action.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_forcedensity.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringBase.i)
(modules/combined/examples/publications/rapid_dev/fig8.i)
#
# Fig. 8 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Two growing particles with differnet anisotropic Eigenstrains
#
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 2
nx = 80
ny = 40
xmin = -20
xmax = 20
ymin = 0
ymax = 20
elem_type = QUAD4
[../]
[./cnode]
type = ExtraNodesetGenerator
input = gen
coord = '0.0 0.0'
new_boundary = 100
tolerance = 0.1
[../]
[]
[GlobalParams]
# CahnHilliard needs the third derivatives
derivative_order = 3
enable_jit = true
displacements = 'disp_x disp_y'
int_width = 1
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
additional_free_energy = cross_energy
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
# particle x positions and radius
P1X=8
P2X=-4
PR=2
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '${P1X} ${P2X}'
y_positions = '0 0'
z_positions = '0 0'
radii = '${PR} ${PR}'
outvalue = 0.5
invalue = 0.9
[../]
[../]
[./w]
[../]
# Order parameter for the Matrix
[./eta1]
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '${P1X} ${P2X}'
y_positions = '0 0'
z_positions = '0 0'
radii = '${PR} ${PR}'
outvalue = 1.0
invalue = 0.0
[../]
[../]
# Order parameters for the 2 different inclusion orientations
[./eta2]
[./InitialCondition]
type = SmoothCircleIC
x1 = ${P2X}
y1 = 0
radius = ${PR}
invalue = 1.0
outvalue = 0.0
[../]
[../]
[./eta3]
[./InitialCondition]
type = SmoothCircleIC
x1 = ${P1X}
y1 = 0
radius = ${PR}
invalue = 1.0
outvalue = 0.0
[../]
[../]
# Lagrange-multiplier
[./lambda]
initial_condition = 1.0
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
add_variables = true
strain = SMALL
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[Kernels]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta1 eta2 eta3'
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
args = 'eta2 eta3 c'
mob_name = L1
f_name = F
[../]
[./ACInterface1]
type = ACMultiInterface
variable = eta1
etas = 'eta1 eta2 eta3'
mob_name = L1
kappa_names = 'kappa11 kappa12 kappa13'
[../]
[./lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
args = 'eta1 eta3 c'
mob_name = L2
f_name = F
[../]
[./ACInterface2]
type = ACMultiInterface
variable = eta2
etas = 'eta1 eta2 eta3'
mob_name = L2
kappa_names = 'kappa21 kappa22 kappa23'
[../]
[./lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 3
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
args = 'eta1 eta2 c'
mob_name = L3
f_name = F
[../]
[./ACInterface3]
type = ACMultiInterface
variable = eta3
etas = 'eta1 eta2 eta3'
mob_name = L3
kappa_names = 'kappa31 kappa32 kappa33'
[../]
[./lagrange3]
type = SwitchingFunctionConstraintEta
variable = eta3
h_name = h3
lambda = lambda
[../]
# Lagrange-multiplier constraint kernel for lambda
[./lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
epsilon = 1e-6
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
block = 0
prop_names = 'M kappa_c L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0.2 0.5 1 1 1 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 '
[../]
# We use this to output the level of constraint enforcement
# ideally it should be 0 everywhere, if the constraint is fully enforced
[./etasummat]
type = ParsedMaterial
property_name = etasum
coupled_variables = 'eta1 eta2 eta3'
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3-1'
outputs = exodus
[../]
# This parsed material creates a single property for visualization purposes.
# It will be 0 for phase 1, -1 for phase 2, and 1 for phase 3
[./phasemap]
type = ParsedMaterial
property_name = phase
coupled_variables = 'eta2 eta3'
expression = 'if(eta3>0.5,1,0)-if(eta2>0.5,1,0)'
outputs = exodus
[../]
# global mechanical properties
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '400 400'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# eigenstrain
[./eigenstrain_2]
type = GenericConstantRankTwoTensor
tensor_name = s2
tensor_values = '0 -0.05 0 0 0 0'
[../]
[./eigenstrain_3]
type = GenericConstantRankTwoTensor
tensor_name = s3
tensor_values = '-0.05 0 0 0 0 0'
[../]
[./eigenstrain]
type = CompositeEigenstrain
weights = 'h2 h3'
tensors = 's2 s3'
args = 'eta2 eta3'
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./switching3]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
h_order = SIMPLE
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = '4*c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(c-0.9)^2-0.4'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_3]
type = DerivativeParsedMaterial
property_name = Fc3
expression = '(c-0.9)^2-0.5'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./chemical_free_energy]
type = DerivativeMultiPhaseMaterial
f_name = Fc
fi_names = 'Fc1 Fc2 Fc3'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
coupled_variables = 'c'
W = 3
[../]
# global elastic free energy
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta2 eta3'
outputs = exodus
output_properties = Fe
derivative_order = 2
[../]
# Penalize phase 2 and 3 coexistence
[./multi_phase_penalty]
type = DerivativeParsedMaterial
property_name = Fp
expression = '50*(eta2*eta3)^2'
coupled_variables = 'eta2 eta3'
derivative_order = 2
outputs = exodus
output_properties = Fp
[../]
# free energy
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe Fp'
coupled_variables = 'c eta1 eta2 eta3'
derivative_order = 2
[../]
[]
[BCs]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = disp_x
value = 0
[../]
# fix side point x coordinate to inhibit rotation
[./angularfix]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
end_time = 12.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
iteration_window = 1
dt = 0.01
[../]
[]
[Outputs]
print_linear_residuals = false
execute_on = 'INITIAL TIMESTEP_END'
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
[Debug]
# show_var_residual_norms = true
[]
(modules/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
# example showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 4
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 80
ny = 40
nz = 0
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta0 eta1 eta2 eta3'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1 eta2 eta3'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = F
mob_name = L
kappa_name = kappa_eta
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '4.5 60 250 4000'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
#coupled_variables = 'c eta0 eta1 eta2 eta3'
#constant_names = 'barr_height cv_eq'
#constant_expressions = '0.1 1.0e-2'
#function = '16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
# +eta0*(1-eta0)*c+eta1*(1-eta1)*c
# +eta2*(1-eta2)*c+eta3*(1-eta3)*c'
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c eta0 eta1 eta2 eta3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(eta0^2+eta1^2+eta2^2+eta3^2)
-4*(2-c)*(eta0^3+eta1^3+eta2^3+eta3^3)
+3*(eta0^2+eta1^2+eta2^2+eta3^2)^2)'
derivative_order = 2
[../]
#[./force_density]
# type = ForceDensityMaterial
# c = c
# etas = 'eta0 eta1 eta2 eta3'
#[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
etas = 'eta0 eta1 eta2 eta3'
force_x = load_x
force_y = load_y
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
#var_name_base = eta
#op_num = 4.0
v = 'eta0 eta1 eta2 eta3'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta1]
x_positions = '32.5 24.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0
variable = eta1
invalue = 1
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./multip]
x_positions = '5.5 15.5 24.0 32.5 7.0 15.5 24.0 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0 6.0 6.0 14.5 14.5 14.0 14.5'
radii = '4.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0'
3D_spheres = false
outvalue = 0.001
variable = c
invalue = 0.999
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta0]
x_positions = '5.5 15.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta2]
x_positions = '24.0 7.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.5 '
radii = '4.0 4.0 '
3D_spheres = false
outvalue = 0.0
variable = eta2
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta3]
x_positions = '15.5 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '14.5 14.5'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta3
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
c = c
grain_data = grain_center
force_density = force_density_ext
etas = 'eta0 eta1 eta2 eta3'
execute_on = 'initial linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 20
dt = 0.01
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_small_invalue_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = -0.8
outvalue = 1
int_width = 5
x_positions = '25 32'
z_positions = '0 0'
y_positions = '25 32'
radii = '6 5'
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.5'
[../]
[]
[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_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 5
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialStrictMassConservation.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 34
ny = 34
xmin = 0
xmax = 340
ymin = 0
ymax = 340
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 20
[]
[Variables]
[w]
[]
[c]
[]
[phi]
[]
[PolycrystalVariables]
[]
[]
[AuxVariables]
[bnds]
[]
[T]
order = CONSTANT
family = MONOMIAL
initial_condition = 1600
[]
[]
[ICs]
[phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '170 170'
y_positions = ' 70 270'
z_positions = ' 0 0'
radii = '100 100'
invalue = 0
outvalue = 1
[]
[c_IC]
type = SpecifiedSmoothCircleIC
variable = c
x_positions = '170 170'
y_positions = ' 70 270'
z_positions = ' 0 0'
radii = '100 100'
invalue = 0
outvalue = 1
[]
[gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 170
y1 = 70
z1 = 0
radius = 100
invalue = 1
outvalue = 0
[]
[gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 170
y1 = 270
z1 = 0
radius = 100
invalue = 1
outvalue = 0
[]
[]
[Materials]
# Free energy coefficients for parabolic curves
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0017 140.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10*ks'
[../]
# Diffusivity and mobilities
[chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 6.24
c = phi
T = T
D0 = 0.4366e9
GBmob0 = 1.60e12
Q = 4.14
Em = 4.25
bulkindex = 1
gbindex = 1e6
surfindex = 1e9
[]
# Everything else
[cv_eq]
type = DerivativeParsedMaterial
property_name = cv_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef c_GB kB'
constant_expressions = '4.37 0.1 8.617343e-5'
derivative_order = 2
expression = 'c_B:=exp(-Ef/kB/T); bnds:=gr0^2 + gr1^2;
c_B + 4.0 * c_GB * (1.0 - bnds)^2'
[]
[sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 6.24
grainboundary_energy = 5.18
void_energy_coefficient = kv
solid_energy_coefficient = ks
solid_energy_model = PARABOLIC
equilibrium_vacancy_concentration = cv_eq
[]
[]
[Modules]
[PhaseField]
[GrandPotential]
switching_function_names = 'hv hs'
anisotropic = 'true'
chemical_potentials = 'w'
mobilities = 'chiD'
susceptibilities = 'chi'
free_energies_w = 'rhov rhos'
gamma_gr = gamma
mobility_name_gr = L
kappa_gr = kappa
free_energies_gr = 'omegav omegas'
additional_ops = 'phi'
gamma_grxop = gamma
mobility_name_op = Lv
kappa_op = kappa
free_energies_op = 'omegav omegas'
mass_conservation = 'true'
concentrations = 'c'
hj_c_min = 'hv_c_min hs_c_min'
hj_over_kVa = 'hv_over_kVa hs_over_kVa'
[]
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = 'gmres asm ilu 1 31 preonly'
nl_max_its = 30
l_max_its = 30
start_time = 0
dt = 1e-4
num_steps = 3
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_maskedforce.i)
# test file for showing pinning of grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 4.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '10.0 10.0'
3D_spheres = false
variable = c
block = 0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
c = c
variable = w
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
block = 0
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
block = 0
[../]
[]
[ICs]
[./ic_eta0]
int_width = 4.0
x1 = 20.0
y1 = 0.0
radius = 10.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 4.0
x1 = 30.0
y1 = 25.0
radius = 10.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces_cosnt]
type = GrainForcesPostprocessor
grain_force = grain_force_const
[../]
[./forces_total]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force_const]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '5.0 10.0 0.0 1.0 0.0 0.0'
torque = '0.0 0.0 50.0 0.0 0.0 5.0'
[../]
[./grain_force]
type = MaskedGrainForceAndTorque
grain_force = grain_force_const
pinned_grains = 0
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 20
nl_max_its = 20
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 1.0
[]
[Outputs]
exodus = true
csv = true
[]
(modules/phase_field/examples/rigidbodymotion/grain_forcedensity_ext.i)
# example showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
nz = 0
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.0
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./load]
type = ConstantFunction
value = -0.01
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
etas = 'eta0 eta1'
k = 1.0
force_y = load
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./df01]
type = MaterialStdVectorRealGradientAux
variable = df01
component = 1
property = force_density_ext
[../]
[./df11]
type = MaterialStdVectorRealGradientAux
variable = df11
index = 1
component = 1
property = force_density_ext
[../]
[./df00]
type = MaterialStdVectorRealGradientAux
variable = df00
property = force_density_ext
[../]
[./df10]
type = MaterialStdVectorRealGradientAux
variable = df10
index = 1
property = force_density_ext
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
c = c
etas = 'eta0 eta1'
grain_data = grain_center
force_density = force_density_ext
execute_on = 'initial linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 5
dt = 0.1
[./Adaptivity]
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 2
initial_adaptivity = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
#input file to test the GrandPotentialSinteringMaterial using the parabolic energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0025 157.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10 * ks'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 25
nz = 15
xmin = 20
xmax = 30
ymin = 0
ymax = 50
zmin = 10
zmax = 40
elem_type = HEX8
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 50'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 50'
[../]
[./iface_u]
input = right_side
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '40 25 0'
z_positions = '25 25 25'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.001
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = false
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_motion_fauxGT.i)
# test file for showing reaction forces between particles
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta0]
[../]
[./eta1]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
coupled_variables = 'eta0 eta1'
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./eta0_dot]
type = TimeDerivative
variable = eta0
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta0
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
op_index = 0
[../]
[./acint_eta0]
type = ACInterface
variable = eta0
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta0]
type = AllenCahn
variable = eta0
mob_name = M
f_name = F
coupled_variables = 'c eta1'
[../]
[./eta1_dot]
type = TimeDerivative
variable = eta1
[../]
[./vadv_eta1]
type = SingleGrainRigidBodyMotion
variable = eta1
c = c
v = 'eta0 eta1'
op_index = 1
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./acint_eta1]
type = ACInterface
variable = eta1
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta1]
type = AllenCahn
variable = eta1
mob_name = M
f_name = F
coupled_variables = 'c eta0'
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 0.5 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c eta0 eta1'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+eta0*(1-eta0)*c+eta1*(1-eta1)*c
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./df01]
type = MaterialStdVectorRealGradientAux
variable = df01
index = 0
component = 1
property = force_density
[../]
[./df11]
type = MaterialStdVectorRealGradientAux
variable = df11
index = 1
component = 1
property = force_density
[../]
[./df00]
type = MaterialStdVectorRealGradientAux
variable = df00
index = 0
component = 0
property = force_density
[../]
[./df10]
type = MaterialStdVectorRealGradientAux
variable = df10
index = 1
component = 0
property = force_density
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = 'initial timestep_end'
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta0]
int_width = 1.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 1.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[./ic_c]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 1.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = FauxGrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
variable = 'eta0 eta1'
[../]
[./grain_force]
type = ComputeGrainForceAndTorque
execute_on = 'linear nonlinear'
grain_data = grain_center
force_density = force_density
c = c
etas = 'eta0 eta1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_forcesum.i)
# test file for showing summing forces and torques obtained from other userobjects
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces_dns]
type = GrainForcesPostprocessor
grain_force = grain_force_dns
[../]
[./forces_cosnt]
type = GrainForcesPostprocessor
grain_force = grain_force_const
[../]
[./forces_total]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force_dns]
type = ComputeGrainForceAndTorque
c = c
etas = 'eta0 eta1'
execute_on = 'linear nonlinear'
grain_data = grain_center
force_density = force_density
[../]
[./grain_force_const]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '2.0 0.0 0.0 0.0 0.0 0.0'
torque = '0.0 0.0 0.0 0.0 0.0 0.0'
[../]
[./grain_force]
type = GrainForceAndTorqueSum
execute_on = 'linear nonlinear'
grain_forces = 'grain_force_dns grain_force_const'
grain_num = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 20
nl_max_its = 20
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[./left_side]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 0'
input = gen
[../]
[./right_side]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 0'
input = left_side
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./unique_regions]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '37.5 25 0'
z_positions = '0 0 0'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.001
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = false
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[./unique_regions]
type = FeatureFloodCountAux
variable = unique_regions
flood_counter = flood_count
field_display = UNIQUE_REGION
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/MultiPhase/acmultiinterface_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
nz = 0
xmin = -10
xmax = 10
ymin = -5
ymax = 5
elem_type = QUAD4
[]
[AuxVariables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = -3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[]
[Variables]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '-4.0 4.0'
y_positions = ' 0.0 0.0'
z_positions = ' 0.0 0.0'
radii = '4.0 4.0'
invalue = 0.1
outvalue = 0.9
int_width = 2.0
[../]
[../]
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'eta1 eta3'
mob_name = L2
f_name = F
[../]
[./ACInterface2]
type = ACMultiInterface
variable = eta2
etas = 'eta1 eta2 eta3'
mob_name = L2
kappa_names = 'kappa21 kappa22 kappa23'
[../]
[./lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
[../]
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
coupled_variables = 'eta1 eta2'
mob_name = L3
f_name = F
[../]
[./ACInterface3]
type = ACMultiInterface
variable = eta3
etas = 'eta1 eta2 eta3'
mob_name = L3
kappa_names = 'kappa31 kappa32 kappa33'
[../]
[./lagrange3]
type = SwitchingFunctionConstraintEta
variable = eta3
h_name = h3
lambda = lambda
[../]
[./lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
epsilon = 0
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'Fx L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0 1 1 1 1 1 1 1 1 1 1 1 1 '
[../]
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./switching3]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
h_order = SIMPLE
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
# we use a constant free energy (GeneriConstantmaterial property Fx)
fi_names = 'Fx Fx Fx'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
# the free energy is given by the MultiBarrierFunctionMaterial only
W = 1
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
#petsc_options = '-snes_ksp -snes_ksp_ew'
#petsc_options = '-ksp_monitor_snes_lg-snes_ksp_ew'
#petsc_options_iname = '-ksp_gmres_restart'
#petsc_options_value = '1000 '
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 0.2
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_appliedforcedensity.i)
# test file for showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 10
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./load]
type = ConstantFunction
value = 0.01
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density_ext]
type = ExternalForceDensityMaterial
c = c
etas = 'eta0 eta1'
k = 1.0
force_y = load
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
execute_on = 'linear nonlinear'
grain_data = grain_center
c = c
etas = 'eta0 eta1'
force_density = force_density_ext
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D_single.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 25
nz = 15
xmin = 20
xmax = 30
ymin = 0
ymax = 50
zmin = 10
zmax = 40
elem_type = HEX8
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 50'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 50'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '40 25 0'
z_positions = '25 25 25'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = true
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
#input file to test the GrandPotentialSinteringMaterial using the ideal energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./kv]
type = ParsedMaterial
property_name = kv
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.025 1571.6'
expression = 'a*T + b'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = IDEAL
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
#input file to test the GrandPotentialSinteringMaterial using the dilute energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./kv]
type = ParsedMaterial
property_name = kv
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.025 1571.6'
expression = 'a*T + b'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = DILUTE
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
x_positions = '10 50 90'
y_positions = '30 20 80'
z_positions = '30 50 75'
radii = '21 25 16'
invalue = 1.0
outvalue = 0.0001
int_width = 4
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[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 = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D_single.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 0'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 0'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./unique_regions]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '37.5 25 0'
z_positions = '0 0 0'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = true
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[./unique_regions]
type = FeatureFloodCountAux
variable = unique_regions
flood_counter = flood_count
field_display = UNIQUE_REGION
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
# Tests the rigid body motion due to applied force of multiple particles.
# ***COPY AND PASTE THESE AS NEEDED***
# 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7 gr8 gr9 gr10 gr11 gr12 gr13 gr14 gr15 gr16 gr17 gr18 gr19'
# (gr0^2+gr1^2+gr2^2+gr3^2+gr4^2+gr5^2+gr6^2+gr7^2+gr8^2+gr9^2+gr10^2+gr11^2+gr12^2+gr13^2+gr14^2+gr15^2+gr16^2+gr17^2+gr18^2+gr19^2)
# (gr0^3+gr1^3+gr2^3+gr3^3+gr4^3+gr5^3+gr6^3+gr7^3+gr8^3+gr9^3+gr10^3+gr11^3+gr12^3+gr13^3+gr14^3+gr15^3+gr16^3+gr17^3+gr18^3+gr19^3)
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = 0
xmax = 600
ymin = 0
ymax = 600
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables] # Automatically creates order parameter variables
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./force]
order = CONSTANT
family = MONOMIAL
[../]
[./free_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Kernels]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = f_loc
mob_name = L
kappa_name = kappa_gr
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
# Cahn Hilliard kernels
[./dt_w]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./CH_wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./CH_Parsed]
type = SplitCHParsed
variable = c
f_name = f_loc
w = w
kappa_name = kappa_c
coupled_variables = 'gr0 gr1 gr2 gr3' # Must be changed as op_num changes. Copy/paste from line 4
[../]
[./CH_RBM]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'gr0 gr1 gr2 gr3'
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[AuxKernels]
[./force_x]
type = FunctionAux
variable = force
function = load_x
[../]
[./force_y]
type = FunctionAux
variable = force
function = load_y
[../]
[./energy_density]
type = TotalFreeEnergy
variable = free_energy
f_name = f_loc
kappa_names = kappa_c
interfacial_vars = c
[../]
[./bnds]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./bcs]
#zero flux BC
type = NeumannBC
value = 0
variable = c
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'kappa_gr kappa_c M L'
prop_values = '250 4000 4.5 60'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = f_loc
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c gr0 gr1 gr2 gr3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(gr0^2+gr1^2+gr2^2+gr3^2)
-4*(2-c)*(gr0^3+gr1^3+gr2^3+gr3^3)
+3*(gr0^2+gr1^2+gr2^2+gr3^2)^2)'
#Copy/paste from lines 5-6
derivative_order = 2
[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
force_x = load_x
force_y = load_y
[../]
[]
[Postprocessors]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = free_energy
execute_on = 'initial timestep_end'
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
grain_data = grain_center
c = c
etas = 'gr0 gr1 gr2 gr3'
force_density = force_density_ext
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 2'
l_tol = 1e-05
nl_max_its = 30
l_max_its = 30
nl_rel_tol = 1e-07
nl_abs_tol = 1e-09
start_time = 0.0
end_time = 4
dt = 0.05
[]
[Outputs]
exodus = true
perf_graph = true
[./display]
type = Console
max_rows = 12
[../]
[]
[ICs]
[./concentration_IC]
type = SpecifiedSmoothCircleIC
x_positions = '150 450 150 450'
y_positions = '150 150 450 450'
z_positions = '0 0 0 0'
radii = '120 120 120 120'
variable = c
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 150
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 450
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 150
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 450
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialSintering_test.i)
#input file to test the materials GrandPotentialTensorMaterial
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 17
xmin = 0
xmax = 680
ymin = 0
ymax = 680
uniform_refine = 1
[]
[GlobalParams]
op_num = 4
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
order = CONSTANT
family = MONOMIAL
[../]
[./F_loc]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 490 190 490'
y_positions = '190 190 490 490'
z_positions = ' 0 0 0 0'
radii = '150 150 150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 490
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 190
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 490
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[]
[Materials]
# Free energy coefficients for parabolic curves
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0025 157.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10*ks'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
outputs = exodus
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 gr2 gr3 T'
constant_names = 'Ef c_GB kB'
constant_expressions = '2.69 0.189 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2 + gr2^2 + gr3^2; exp(-Ef/kB/T) + 4.0 * c_GB * (1 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
solid_energy_coefficient = ks
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[./f_bulk]
type = ParsedMaterial
property_name = f_bulk
coupled_variables = 'phi gr0 gr1 gr2 gr3'
material_property_names = 'mu gamma'
expression = 'mu*(phi^4/4-phi^2/2 + gr0^4/4-gr0^2/2 + gr1^4/4-gr1^2/2
+ gr2^4/4-gr2^2/2 + gr3^4/4-gr3^2/2
+ gamma*(phi^2*(gr0^2+gr1^2+gr2^2+gr3^2) + gr0^2*(gr1^2+gr2^2+gr3^2)
+ gr1^2*(gr2^2 + gr3^2) + gr2^2*gr3^2) + 0.25)'
outputs = exodus
[../]
[./f_switch]
type = ParsedMaterial
property_name = f_switch
coupled_variables = 'w'
material_property_names = 'chi'
expression = '0.5*w^2*chi'
outputs = exodus
[../]
[./f0]
type = ParsedMaterial
property_name = f0
material_property_names = 'f_bulk f_switch'
expression = 'f_bulk + f_switch'
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_gr2]
type = TimeDerivative
variable = gr2
[../]
[./dt_gr3]
type = TimeDerivative
variable = gr3
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[./F_aux]
type = TotalFreeEnergy
variable = F_loc
f_name = f0
interfacial_vars = 'phi gr0 gr1 gr2 gr3'
kappa_names = 'kappa kappa kappa kappa kappa'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/acmultiinterface.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
nz = 0
xmin = -10
xmax = 10
ymin = -5
ymax = 5
elem_type = QUAD4
[]
[Variables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = -3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '-4.0 4.0'
y_positions = ' 0.0 0.0'
z_positions = ' 0.0 0.0'
radii = '4.0 4.0'
invalue = 0.1
outvalue = 0.9
int_width = 2.0
[../]
[../]
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = 'eta2 eta3'
mob_name = L1
f_name = F
[../]
[./ACInterface1]
type = ACMultiInterface
variable = eta1
etas = 'eta1 eta2 eta3'
mob_name = L1
kappa_names = 'kappa11 kappa12 kappa13'
[../]
[./lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'eta1 eta3'
mob_name = L2
f_name = F
[../]
[./ACInterface2]
type = ACMultiInterface
variable = eta2
etas = 'eta1 eta2 eta3'
mob_name = L2
kappa_names = 'kappa21 kappa22 kappa23'
[../]
[./lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
[../]
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
coupled_variables = 'eta1 eta2'
mob_name = L3
f_name = F
[../]
[./ACInterface3]
type = ACMultiInterface
variable = eta3
etas = 'eta1 eta2 eta3'
mob_name = L3
kappa_names = 'kappa31 kappa32 kappa33'
[../]
[./lagrange3]
type = SwitchingFunctionConstraintEta
variable = eta3
h_name = h3
lambda = lambda
[../]
[./lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
epsilon = 0
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'Fx L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0 1 1 1 1 1 1 1 1 1 1 1 1 '
[../]
[./etasummat]
type = ParsedMaterial
property_name = etasum
coupled_variables = 'eta1 eta2 eta3'
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3'
[../]
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./switching3]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
h_order = SIMPLE
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
# we use a constant free energy (GeneriConstantmaterial property Fx)
fi_names = 'Fx Fx Fx'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
# the free energy is given by the MultiBarrierFunctionMaterial only
W = 1
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
#petsc_options = '-snes_ksp -snes_ksp_ew'
#petsc_options = '-ksp_monitor_snes_lg-snes_ksp_ew'
#petsc_options_iname = '-ksp_gmres_restart'
#petsc_options_value = '1000 '
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 0.2
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/GBAnisotropy/test2.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 30
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 600
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables] # produce smooth initial GB
[./gr0]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '250.0 750.0'
y_positions = '300.0 300.0'
z_positions = ' 0.0 0.0'
radii = '200.0 200.0'
invalue = 0.0
outvalue = 1.0
int_width = 50.0
[../]
[../]
[./gr1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 250.0
y1 = 300.0
radius = 200.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./gr2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 750.0
y1 = 300.0
radius = 200.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = FIRST
family = LAGRANGE
[../]
[./var_indices]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
var_name_base = gr
op_num = 3
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
var_name_base = gr
op_num = 3
[../]
[]
[BCs]
[./Periodic]
[./top_bottom]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./CuGrGranisotropic]
type = GBAnisotropy
T = 600 # K
op_num = 3
var_name_base = gr
wGB = 100
length_scale = 1.0e-9
time_scale = 1.0e-9
# molar_volume_value = 7.11e-6 #Units:m^3/mol
Anisotropic_GB_file_name = anisotropy_mobility.txt
inclination_anisotropy = false
[../]
[]
[Postprocessors]
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[./gr1_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[./gr2_area]
type = ElementIntegralVariablePostprocessor
variable = gr2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 40
nl_rel_tol = 1e-9
dt = 5.0
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/rigidbodymotion/polycrystal_action.i)
# test file for showing reaction forces between particles
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./PolycrystalVariables]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
coupled_variables = 'eta0 eta1'
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = F
mob_name = M
kappa_name = kappa_eta
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 0.5 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c eta0 eta1'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+eta0*(1-eta0)*c+eta1*(1-eta1)*c
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./MultiAuxVariables]
order = CONSTANT
family = MONOMIAL
variable_base = 'df'
data_type = 'RealGradient'
grain_num = 2
[../]
[./vadvx]
order = CONSTANT
family = MONOMIAL
[../]
[./vadvy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./MaterialVectorGradAuxKernel]
variable_base = 'df'
grain_num = 2
property = 'force_density'
[../]
[./vadv_x]
type = GrainAdvectionAux
component = x
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvx
[../]
[./vadv_y]
type = GrainAdvectionAux
component = y
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvy
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta0]
int_width = 1.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 1.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[./ic_c]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 1.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeGrainForceAndTorque
execute_on = 'initial linear nonlinear'
grain_data = grain_center
force_density = force_density
c = c
etas = 'eta0 eta1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_forcedensity.i)
# test file for showing reaction forces between particles
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta0]
[../]
[./eta1]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
coupled_variables = 'eta0 eta1'
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./eta0_dot]
type = TimeDerivative
variable = eta0
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta0
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
op_index = 0
[../]
[./acint_eta0]
type = ACInterface
variable = eta0
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta0]
type = AllenCahn
variable = eta0
mob_name = M
f_name = F
coupled_variables = 'c eta1'
[../]
[./eta1_dot]
type = TimeDerivative
variable = eta1
[../]
[./vadv_eta1]
type = SingleGrainRigidBodyMotion
variable = eta1
c = c
v = 'eta0 eta1'
op_index = 1
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./acint_eta1]
type = ACInterface
variable = eta1
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta1]
type = AllenCahn
variable = eta1
mob_name = M
f_name = F
coupled_variables = 'c eta0'
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 0.5 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c eta0 eta1'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+eta0*(1-eta0)*c+eta1*(1-eta1)*c
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./df01]
type = MaterialStdVectorRealGradientAux
variable = df01
index = 0
component = 1
property = force_density
[../]
[./df11]
type = MaterialStdVectorRealGradientAux
variable = df11
index = 1
component = 1
property = force_density
[../]
[./df00]
type = MaterialStdVectorRealGradientAux
variable = df00
index = 0
component = 0
property = force_density
[../]
[./df10]
type = MaterialStdVectorRealGradientAux
variable = df10
index = 1
component = 0
property = force_density
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta0]
int_width = 1.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 1.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[./ic_c]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 1.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeGrainForceAndTorque
execute_on = 'linear nonlinear'
grain_data = grain_center
force_density = force_density
c = c
etas = 'eta0 eta1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringBase.i)
#input file to test the materials GrandPotentialTensorMaterial and GrandPotentialSinteringMaterial
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 17
xmin = 0
xmax = 680
ymin = 0
ymax = 680
[]
[GlobalParams]
op_num = 4
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 490 190 490'
y_positions = '190 190 490 490'
z_positions = ' 0 0 0 0'
radii = '150 150 150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 490
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 190
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 490
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[]
[Materials]
# Free energy coefficients for parabolic curves
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0025 157.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10*ks'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
outputs = exodus
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 gr2 gr3 T'
constant_names = 'Ef c_GB kB'
constant_expressions = '2.69 0.189 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2 + gr2^2 + gr3^2; exp(-Ef/kB/T) + 4.0 * c_GB * (1 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
solid_energy_coefficient = ks
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_gr2]
type = TimeDerivative
variable = gr2
[../]
[./dt_gr3]
type = TimeDerivative
variable = gr3
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 1
[]
[Outputs]
exodus = true
[]