- 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
- radiusThe radius of a circle
C++ Type:double
Controllable:No
Description:The radius of a 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.
- x1The x coordinate of the circle center
C++ Type:double
Controllable:No
Description:The x coordinate of the circle center
- y1The y coordinate of the circle center
C++ Type:double
Controllable:No
Description:The y coordinate of the circle center
SmoothCircleIC
Circle with a smooth interface
Insert a single disk or sphere with radius (radius
) and a smooth interface of width (int_width
) with a user specified value range and functional dependence of the interface (profile
). (outvalue
) is the variable value outside of the disk/sphere and (invalue
) is the value on the interior.
Cosine profile (COS
)
Hyperbolic tangent profile (TANH
)
(1)
In both cases is the initial condition value at , where is the center point (x1
, y1
, z1
) of the circle (making a radius vector).
For the COS
interface, which is strictly zero outside the particle and strictly inside the particle the interface width int_width
denotes exactly the width of the transition region where the order parameter values are in the open interval . The TANH
interface function is asymptotic and requires a different definition for the interface width. Here we chose to have the slope at the midpoint match up with the midpoint slope of the COS
interface (giving rise to the factor of in eq. Eq. (1)).
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.
- z10The z coordinate of the circle center
Default:0
C++ Type:double
Controllable:No
Description:The z coordinate of the circle center
- 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/phase_field/test/tests/phase_field_kernels/ACInterfaceStress_jacobian.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropy.i)
- (modules/phase_field/test/tests/anisotropic_interfaces/kobayashi.i)
- (modules/phase_field/test/tests/PolynomialFreeEnergy/direct_order6_test.i)
- (modules/phase_field/test/tests/phase_field_kernels/AllenCahnVariableL.i)
- (modules/combined/examples/phase_field-mechanics/Nonconserved.i)
- (modules/combined/test/tests/eigenstrain/variable_cahnhilliard.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothCircleIC.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_maskedforce.i)
- (modules/combined/test/tests/feature_volume_fraction/feature_volume_fraction.i)
- (modules/phase_field/test/tests/MultiPhase/lagrangemult.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropyAntitrap.i)
- (modules/phase_field/test/tests/MultiPhase/multibarrierfunction.i)
- (modules/combined/examples/publications/rapid_dev/fig7b.i)
- (modules/combined/examples/publications/rapid_dev/fig7a.i)
- (modules/phase_field/test/tests/anisotropic_interfaces/adkobayashi.i)
- (modules/phase_field/test/tests/KKS_system/kks_example.i)
- (modules/combined/examples/phase_field-mechanics/SimplePhaseTrans.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_volume.i)
- (modules/combined/test/tests/eigenstrain/inclusion.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_reserve.i)
- (modules/combined/test/tests/eigenstrain/variable_finite.i)
- (modules/phase_field/test/tests/actions/grain_growth_with_c.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
- (modules/phase_field/test/tests/misc/variablegradientmaterial.i)
- (modules/phase_field/test/tests/PolynomialFreeEnergy/direct_order8_test.i)
- (modules/phase_field/test/tests/MultiPhase/penalty.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADAllenCahn.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialTwophaseAnisotropy.i)
- (modules/phase_field/test/tests/actions/Nonconserved_2vars.i)
- (modules/phase_field/test/tests/solution_rasterizer/diffuse.i)
- (modules/phase_field/test/tests/phase_field_kernels/AllenCahn.i)
- (modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy.i)
- (modules/phase_field/test/tests/phase_field_kernels/CoupledAllenCahn.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADAllenCahnVariableL.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_motion_fauxGT.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_test.i)
- (modules/phase_field/test/tests/MaskedBodyForce/MaskedBodyForce_test.i)
- (modules/phase_field/test/tests/SimpleACInterface/SimpleCoupledACInterface.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_forcedensity.i)
- (modules/phase_field/test/tests/PolynomialFreeEnergy/direct_order4_test.i)
- (modules/phase_field/test/tests/mobility_derivative/coupledmatdiffusion.i)
- (modules/phase_field/test/tests/KKS_system/kks_example_nested.i)
- (modules/phase_field/test/tests/SimpleACInterface/SimpleACInterface.i)
- (modules/phase_field/test/tests/MultiPhase/acmultiinterface_aux.i)
- (modules/phase_field/test/tests/GBAnisotropy/test2.i)
- (modules/phase_field/test/tests/new_initial_conditions/SmoothCircleIC_tanh.i)
- (modules/combined/test/tests/multiphase_mechanics/elasticenergymaterial.i)
- (modules/phase_field/test/tests/phase_field_kernels/ACInterfaceStress.i)
- (modules/phase_field/examples/multiphase/DerivativeMultiPhaseMaterial.i)
- (modules/combined/examples/publications/rapid_dev/fig8.i)
- (modules/phase_field/test/tests/actions/Nonconserved_variableL.i)
- (modules/phase_field/test/tests/KKS_system/kks_example_offset.i)
- (modules/phase_field/examples/anisotropic_interfaces/snow.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialSintering_test.i)
- (modules/phase_field/test/tests/actions/Nonconserved_highorder.i)
- (modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_test.i)
- (modules/phase_field/test/tests/rigidbodymotion/polycrystal_action.i)
- (modules/phase_field/test/tests/actions/Nonconserved_1var.i)
- (modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
- (modules/phase_field/test/tests/MultiPhase/crosstermfreeenergy.i)
- (modules/phase_field/test/tests/phase_field_kernels/CoupledCoefAllenCahn.i)
- (modules/phase_field/test/tests/free_energy_material/MathFreeEnergy.i)
- (modules/phase_field/test/tests/phase_field_kernels/SplitCahnHilliard.i)
- (modules/phase_field/test/tests/MultiPhase/barrierfunctionmaterial.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
- (modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_test.i)
- (modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
- (modules/phase_field/test/tests/SoretDiffusion/split.i)
- (modules/phase_field/test/tests/MultiPhase/derivativetwophasematerial.i)
- (modules/phase_field/test/tests/grain_growth/particle.i)
- (modules/phase_field/test/tests/MultiPhase/mixedswitchingfunctionmaterial.i)
- (modules/phase_field/test/tests/PolynomialFreeEnergy/split_order4_test.i)
- (modules/phase_field/test/tests/KKS_system/kks_xevac.i)
- (modules/phase_field/test/tests/phase_field_kernels/MatGradSquareCoupled.i)
- (modules/phase_field/test/tests/MultiPhase/acmultiinterface.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialPFM.i)
- (modules/phase_field/test/tests/mobility_derivative/matdiffusion.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringBase.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
- (modules/phase_field/test/tests/grain_boundary_area/disc.i)
- (modules/phase_field/examples/anisotropic_transport/diffusion.i)
- (modules/phase_field/test/tests/SoretDiffusion/direct.i)
- (modules/combined/test/tests/concentration_dependent_elasticity_tensor/concentration_dependent_elasticity_tensor.i)
- (modules/phase_field/test/tests/PolynomialFreeEnergy/split_order6_test.i)
- (modules/phase_field/test/tests/SoretDiffusion/split_temp.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialSolidification.i)
- (modules/phase_field/test/tests/SoretDiffusion/direct_temp.i)
- (modules/phase_field/test/tests/MultiPhase/switchingfunctionmultiphasematerial.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_appliedforcedensity.i)
- (modules/combined/test/tests/multiphase_mechanics/gradientcomponent.i)
- (modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_coupled_test.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_forcesum.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADSplitCahnHilliard.i)
- (modules/combined/test/tests/eigenstrain/variable.i)
- (modules/combined/test/tests/feature_volume_fraction/Avrami.i)
- (modules/combined/examples/phase_field-mechanics/Conserved.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
- (modules/phase_field/examples/rigidbodymotion/grain_forcedensity_ext.i)
- (modules/phase_field/test/tests/free_energy_material/CoupledValueFunctionFreeEnergy.i)
- (modules/phase_field/test/tests/KKS_system/kks_example_split.i)
- (modules/phase_field/test/tests/grain_tracker_test/grain_tracker_volume_single.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialStrictMassConservation.i)
- (modules/phase_field/examples/anisotropic_interfaces/ad_snow.i)
- (modules/phase_field/test/tests/phase_field_kernels/SimpleSplitCHWRes.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothCircleIC_3D.i)
- (modules/phase_field/test/tests/PolynomialFreeEnergy/split_order8_test.i)
Child Objects
References
No citations exist within this document.(modules/phase_field/test/tests/phase_field_kernels/ACInterfaceStress_jacobian.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 3
nx = 8
ny = 8
nz = 8
xmax = 20
ymax = 20
zmax = 20
[]
[Variables]
[./eta]
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 12.0
invalue = 1.0
outvalue = 0.0
int_width = 16.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACInterfaceStress]
type = ACInterfaceStress
variable = eta
mob_name = 1
stress = 2.7
[../]
[]
[Materials]
[./strain]
type = GenericConstantRankTwoTensor
tensor_name = elastic_strain
tensor_values = '0.11 0.12 0.13 0.21 0.22 0.23 0.31 0.32 0.33'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 1000
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -2
xmax = 2
ymin = -2
ymax = 2
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[GlobalParams]
radius = 1.0
int_width = 0.8
x1 = 0
y1 = 0
derivative_order = 2
enable_jit = false
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[BCs]
[./Periodic]
[./w]
variable = w
auto_direction = 'x y'
[../]
[./etaa0]
variable = etaa0
auto_direction = 'x y'
[../]
[./etab0]
variable = etab0
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa dkappadgrad_etaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab dkappadgrad_etab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1.0e-5
nl_rel_tol = 1.0e-10
nl_abs_tol = 1e-12
num_steps = 2
dt = 0.001
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/anisotropic_interfaces/kobayashi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 32
ny = 32
xmax = 0.7
ymax = 0.7
[]
[Variables]
[./w]
[../]
[./T]
[../]
[]
[ICs]
[./wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 0.35
y1 = 0.35
radius = 0.08
outvalue = 0
invalue = 1
[../]
[]
[Kernels]
[./w_dot]
type = TimeDerivative
variable = w
[../]
[./anisoACinterface1]
type = ACInterfaceKobayashi1
variable = w
mob_name = M
[../]
[./anisoACinterface2]
type = ACInterfaceKobayashi2
variable = w
mob_name = M
[../]
[./AllenCahn]
type = AllenCahn
variable = w
mob_name = M
f_name = fbulk
coupled_variables = 'T'
[../]
[./T_dot]
type = TimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = Diffusion
variable = T
[../]
[./w_dot_T]
type = CoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8 #This is -K from kobayashi's paper
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = 'alpha gamma T_e pi'
constant_expressions = '0.9 10 1 4*atan(1)'
expression = 'm:=alpha/pi * atan(gamma * (T_e - T)); 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * w^2'
derivative_order = 2
outputs = exodus
[../]
[./material]
type = InterfaceOrientationMaterial
op = w
[../]
[./consts]
type = GenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
scheme = bdf2
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-08
l_tol = 1e-4
l_max_its = 30
dt = 0.001
num_steps = 6
[]
[Outputs]
exodus = true
perf_graph = true
execute_on = 'INITIAL FINAL'
[]
(modules/phase_field/test/tests/PolynomialFreeEnergy/direct_order6_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 125
[]
[GlobalParams]
polynomial_order = 6
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 60.0
variable = c
[../]
[]
[Kernels]
[./local_energy]
type = CahnHilliard
variable = c
f_name = F
[../]
[./gradient_energy]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa
[../]
[./cdot]
type = TimeDerivative
variable = c
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = 1000 # K
int_width = 30.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.7 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 100
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/AllenCahnVariableL.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[AuxVariables]
[./chi]
[./InitialCondition]
type = FunctionIC
function = 'x/24+0.5'
[../]
[../]
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
variable_L = true
coupled_variables = chi
[../]
[]
[Materials]
[./L]
type = DerivativeParsedMaterial
property_name = L
coupled_variables = 'eta chi'
expression = '0.1 * eta^2 + chi^2'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/Nonconserved.i)
#
# Example 2
# Phase change driven by a mechanical (elastic) driving force.
# An oversized phase inclusion grows under a uniaxial tensile stress.
# Check the file below for comments and suggestions for parameter modifications.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 30.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = 1
[../]
[./time]
type = TimeDerivative
variable = eta
[../]
[]
#
# Try visualizing the stress tensor components as done in Conserved.i
#
[Materials]
[./consts]
type = GenericConstantMaterial
block = 0
prop_names = 'L'
prop_values = '1'
[../]
# matrix phase
[./stiffness_a]
type = ComputeElasticityTensor
base_name = phasea
block = 0
# lambda, mu values
C_ijkl = '7 7'
# Stiffness tensor is created from lambda=7, mu=7 for symmetric_isotropic fill method
fill_method = symmetric_isotropic
# See RankFourTensor.h for details on fill methods
[../]
[./strain_a]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
base_name = phasea
[../]
[./stress_a]
type = ComputeLinearElasticStress
block = 0
base_name = phasea
[../]
[./elastic_free_energy_a]
type = ElasticEnergyMaterial
base_name = phasea
f_name = Fea
block = 0
args = ''
[../]
# oversized precipitate phase (simulated using thermal expansion)
[./stiffness_b]
type = ComputeElasticityTensor
base_name = phaseb
block = 0
# Stiffness tensor lambda, mu values
# Note that the two phases could have different stiffnesses.
# Try reducing the precipitate stiffness (to '1 1') rather than making it oversized
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./strain_b]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
base_name = phaseb
eigenstrain_names = eigenstrain
[../]
[./eigenstrain_b]
type = ComputeEigenstrain
base_name = phaseb
eigen_base = '0.1 0.1 0.1'
eigenstrain_name = eigenstrain
[../]
[./stress_b]
type = ComputeLinearElasticStress
block = 0
base_name = phaseb
[../]
[./elastic_free_energy_b]
type = ElasticEnergyMaterial
base_name = phaseb
f_name = Feb
block = 0
args = ''
[../]
# Generate the global free energy from the phase free energies
[./switching]
type = SwitchingFunctionMaterial
block = 0
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
block = 0
eta = eta
g_order = SIMPLE
[../]
[./free_energy]
type = DerivativeTwoPhaseMaterial
block = 0
f_name = F
fa_name = Fea
fb_name = Feb
eta = eta
args = ''
W = 0.1
derivative_order = 2
[../]
# Generate the global stress from the phase stresses
[./global_stress]
type = TwoPhaseStressMaterial
block = 0
base_A = phasea
base_B = phaseb
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
value = 5
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
# this gives best performance on 4 cores
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
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/test/tests/eigenstrain/variable_cahnhilliard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 25.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./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
[../]
[]
[AuxVariables]
[./sigma11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11_aux
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22_aux
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 5'
block = 0
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
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
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.1*c
coupled_variables = c
property_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
args = 'c'
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
value = -5
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/SmoothCircleIC.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 = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[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.0'
[../]
[]
[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-4
nl_max_its = 40
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = false
[./out]
type = Exodus
refinements = 2
[../]
[]
(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/combined/test/tests/feature_volume_fraction/feature_volume_fraction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 20
y1 = 20
radius = 10
int_width = 1
invalue = 1
outvalue = 0
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[VectorPostprocessors]
[./feature_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = feature_counter
execute_on = 'initial timestep_end'
outputs = none
[../]
[]
[Postprocessors]
[./feature_counter]
type = FeatureFloodCount
variable = u
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[../]
[./Volume]
type = VolumePostprocessor
execute_on = 'initial'
[../]
[./volume_fraction]
type = FeatureVolumeFraction
mesh_volume = Volume
feature_volumes = feature_volumes
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/MultiPhase/lagrangemult.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 10
nz = 0
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 30.0
y1 = 25.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = 'c eta2'
f_name = F
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa_eta
[../]
[./lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'c eta1'
f_name = F
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa_eta
[../]
[./lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
[../]
[./lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2'
h_names = 'h1 h2'
epsilon = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta1 eta2'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time1]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1 '
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 1'
[../]
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
outputs = exodus
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
outputs = exodus
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2'
[../]
[./free_energy_A]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = '(c-0.1)^2'
derivative_order = 2
enable_jit = true
[../]
[./free_energy_B]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = '(c-0.9)^2'
derivative_order = 2
enable_jit = true
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
fi_names = 'Fa Fb'
hi_names = 'h1 h2'
etas = 'eta1 eta2'
coupled_variables = 'c'
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 = 1
dt = 0.01
dtmin = 0.01
[]
[Debug]
# show_var_residual_norms = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropyAntitrap.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -2
xmax = 2
ymin = -2
ymax = 2
[]
[GlobalParams]
radius = 1.0
int_width = 0.8
x1 = 0
y1 = 0
enable_jit = true
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etaa0dot_int]
type = AntitrappingCurrent
variable = w
v = etaa0
f_name = rhodiff
[../]
[./coupled_etab0dot_int]
type = AntitrappingCurrent
variable = w
v = etab0
f_name = rhodiff
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./int]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhodiff
material_property_names = 'rhoa rhob'
constant_names = 'int_width'
constant_expressions = '0.8'
expression = 'int_width*(rhob-rhoa)'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 3
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.001
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/multibarrierfunction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
nz = 0
xmin = 0
xmax = 20
ymin = 0
ymax = 20
elem_type = QUAD4
[]
[AuxVariables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 7.0
y1 = 10.0
radius = 5.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 13.0
y1 = 10.0
radius = 5.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./multibarrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2'
function_name = g
outputs = exodus
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/publications/rapid_dev/fig7b.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Dashed black curve (2)
# Eigenstrain is globally applied. Single global elastic free energies.
# Supply the RADIUS parameter (10-35) on the command line to generate data
# for all curves in the plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 32
xmin = 0
xmax = 100
second_order = true
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Functions]
[./diff]
type = ParsedFunction
expression = '${RADIUS}-pos_c'
symbol_names = pos_c
symbol_values = pos_c
[../]
[]
# 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'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./w]
[../]
# Phase order parameter
[./eta]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Modules/TensorMechanics/Master/all]
add_variables = true
eigenstrain_names = eigenstrain
[]
[Kernels]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta'
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
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk1]
type = AllenCahn
variable = eta
args = 'c'
mob_name = L
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
mob_name = L
kappa_name = kappa_eta
[../]
[./Fe]
type = MaterialPropertyValue
prop_name = Fe
variable = Fe_fit
[../]
[./autoadjust]
type = MaskedBodyForce
variable = w
function = diff
mask = mask
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '1.0 1.0 0.5 1'
[../]
# forcing function mask
[./mask]
type = ParsedMaterial
property_name = mask
expression = grad/dt
material_property_names = 'grad dt'
[../]
[./grad]
type = VariableGradientMaterial
variable = c
prop = grad
[../]
[./time]
type = TimeStepMaterial
[../]
# global mechanical properties
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# eigenstrain as a function of phase
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
prefactor = h
args = eta
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching]
type = SwitchingFunctionMaterial
function_name = h
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = 'c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(1-c)^2'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./chemical_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fc
fa_name = Fc1
fb_name = Fc2
eta = eta
args = 'c'
W = 4
[../]
# global elastic free energy
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta'
output_properties = Fe
derivative_order = 2
[../]
# free energy
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c eta'
derivative_order = 2
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_r
boundary = 'left'
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'
outputs = 'table console'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_c]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = c
target = 0.582
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_eta]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = eta
target = 0.5
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./c_min]
type = ElementExtremeValue
value_type = min
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
variable = 'Fe_fit c w'
start_point = '0 0 0'
end_point = '100 0 0'
num_points = 5000
sort_by = x
outputs = vpp
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 = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 2.0e-9
start_time = 0.0
end_time = 100000.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
iteration_window = 1
dt = 1
[../]
[./Adaptivity]
initial_adaptivity = 5
interval = 10
max_h_level = 5
refine_fraction = 0.9
coarsen_fraction = 0.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
execute_on = 'INITIAL TIMESTEP_END'
[./table]
type = CSV
delimiter = ' '
file_base = radius_${RADIUS}/eigenstrain_pp
[../]
[./vpp]
type = CSV
delimiter = ' '
sync_times = '10 50 100 500 1000 5000 10000 50000 100000'
sync_only = true
time_data = true
file_base = radius_${RADIUS}/eigenstrain_vpp
[../]
[]
(modules/combined/examples/publications/rapid_dev/fig7a.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Solid gray curve (1)
# Eigenstrain and elastic energies ar computed per phase and then interpolated.
# Supply the RADIUS parameter (10-35) on the command line to generate data
# for all curves in the plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 32
xmin = 0
xmax = 100
second_order = true
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Functions]
[./diff]
type = ParsedFunction
expression = '${RADIUS}-pos_c'
symbol_names = pos_c
symbol_values = pos_c
[../]
[]
# 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'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./w]
[../]
# Phase order parameter
[./eta]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
# Mesh displacement
[./disp_r]
order = SECOND
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta'
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
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk1]
type = AllenCahn
variable = eta
args = 'c'
mob_name = L
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
mob_name = L
kappa_name = kappa_eta
[../]
[./Fe]
type = MaterialPropertyValue
prop_name = Fe
variable = Fe_fit
[../]
[./autoadjust]
type = MaskedBodyForce
variable = w
function = diff
mask = mask
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '1.0 1.0 0.5 1'
[../]
# forcing function mask
[./mask]
type = ParsedMaterial
property_name = mask
expression = grad/dt
material_property_names = 'grad dt'
[../]
[./grad]
type = VariableGradientMaterial
variable = c
prop = grad
[../]
[./time]
type = TimeStepMaterial
[../]
# global mechanical properties
[./elasticity_tensor_1]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase1
fill_method = symmetric_isotropic
[../]
[./elasticity_tensor_2]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase2
fill_method = symmetric_isotropic
[../]
[./strain_1]
type = ComputeRSphericalSmallStrain
base_name = phase1
[../]
[./strain_2]
type = ComputeRSphericalSmallStrain
base_name = phase2
eigenstrain_names = eigenstrain
[../]
[./stress_1]
type = ComputeLinearElasticStress
base_name = phase1
[../]
[./stress_2]
type = ComputeLinearElasticStress
base_name = phase2
[../]
# eigenstrain per phase
[./eigenstrain2]
type = ComputeEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
base_name = phase2
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching]
type = SwitchingFunctionMaterial
function_name = h
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = 'c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(1-c)^2'
coupled_variables = 'c'
derivative_order = 2
[../]
# elastic free energies
[./elastic_free_energy_1]
type = ElasticEnergyMaterial
f_name = Fe1
args = ''
base_name = phase1
derivative_order = 2
[../]
[./elastic_free_energy_2]
type = ElasticEnergyMaterial
f_name = Fe2
args = ''
base_name = phase2
derivative_order = 2
[../]
# per phase free energies
[./free_energy_1]
type = DerivativeSumMaterial
property_name = F1
sum_materials = 'Fc1 Fe1'
coupled_variables = 'c'
derivative_order = 2
[../]
[./free_energy_2]
type = DerivativeSumMaterial
property_name = F2
sum_materials = 'Fc2 Fe2'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./global_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = F
fa_name = F1
fb_name = F2
eta = eta
args = 'c'
W = 4
[../]
# global stress
[./global_stress]
type = TwoPhaseStressMaterial
base_A = phase1
base_B = phase2
[../]
[./elastic_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fe
fa_name = Fe1
fb_name = Fe2
eta = eta
args = 'c'
W = 0
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_r
boundary = 'left'
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'
outputs = 'table console'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_c]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = c
target = 0.582
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_eta]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = eta
target = 0.5
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./c_min]
type = ElementExtremeValue
value_type = min
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
variable = 'Fe_fit c w'
start_point = '0 0 0'
end_point = '100 0 0'
num_points = 5000
sort_by = x
outputs = vpp
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 = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 2.0e-9
start_time = 0.0
end_time = 100000.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
iteration_window = 1
dt = 1
[../]
[./Adaptivity]
initial_adaptivity = 5
interval = 10
max_h_level = 5
refine_fraction = 0.9
coarsen_fraction = 0.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
execute_on = 'INITIAL TIMESTEP_END'
[./table]
type = CSV
delimiter = ' '
file_base = radius_${RADIUS}/energy_pp
[../]
[./vpp]
type = CSV
delimiter = ' '
sync_times = '10 50 100 500 1000 5000 10000 50000 100000'
sync_only = true
time_data = true
file_base = radius_${RADIUS}/energy_vpp
[../]
[]
(modules/phase_field/test/tests/anisotropic_interfaces/adkobayashi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 32
ny = 32
xmax = 0.7
ymax = 0.7
[]
[Variables]
[w]
[]
[T]
[]
[]
[ICs]
[wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 0.35
y1 = 0.35
radius = 0.08
outvalue = 0
invalue = 1
[]
[]
[Kernels]
[w_dot]
type = TimeDerivative
variable = w
[]
[anisoACinterface1]
type = ADACInterfaceKobayashi1
variable = w
mob_name = M
[]
[anisoACinterface2]
type = ADACInterfaceKobayashi2
variable = w
mob_name = M
[]
[AllenCahn]
type = ADAllenCahn
variable = w
mob_name = M
f_name = fbulk
[]
[T_dot]
type = ADTimeDerivative
variable = T
[]
[CoefDiffusion]
type = ADDiffusion
variable = T
[]
[w_dot_T]
type = ADCoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8 #This is -K from kobayashi's paper
[]
[]
[Materials]
[free_energy]
type = ADDerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = 'alpha gamma T_e pi'
constant_expressions = '0.9 10 1 4*atan(1)'
expression = 'm:=alpha/pi * atan(gamma * (T_e - T)); 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * '
'w^2'
derivative_order = 1
outputs = exodus
[]
[material]
type = ADInterfaceOrientationMaterial
op = w
[]
[consts]
type = ADGenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
scheme = bdf2
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
nl_rel_tol = 1e-08
l_tol = 1e-4
l_max_its = 30
dt = 0.001
num_steps = 6
[]
[Outputs]
exodus = true
perf_graph = true
execute_on = 'INITIAL FINAL'
[]
(modules/phase_field/test/tests/KKS_system/kks_example.i)
#
# KKS toy problem in the non-split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
nz = 0
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
# order parameter
[./eta]
order = THIRD
family = HERMITE
[../]
# hydrogen concentration
[./c]
order = THIRD
family = HERMITE
[../]
# hydrogen phase concentration (matrix)
[./cm]
order = THIRD
family = HERMITE
initial_condition = 0.0
[../]
# hydrogen phase concentration (delta phase)
[./cd]
order = THIRD
family = HERMITE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 0.2
invalue = 0.2
outvalue = 0.1
int_width = 0.05
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 0.2
invalue = 0.6
outvalue = 0.4
int_width = 0.05
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta c cm cd'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
outputs = oversampling
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^2'
outputs = oversampling
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
outputs = oversampling
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
outputs = oversampling
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L '
prop_values = '0.7 '
[../]
[]
[Kernels]
# enforce c = (1-h(eta))*cm + h(eta)*cd
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSCHBulk
variable = c
ca = cm
cb = cd
fa_name = fm
fb_name = fd
mob_name = 0.7
[../]
[./dcdt]
type = TimeDerivative
variable = c
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fd
coupled_variables = 'cm cd'
w = 0.4
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 0.4
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-4
num_steps = 1
dt = 0.01
dtmin = 0.01
[]
[Preconditioning]
[./mydebug]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example
[./oversampling]
type = Exodus
refinements = 3
[../]
[]
(modules/combined/examples/phase_field-mechanics/SimplePhaseTrans.i)
#
# Martensitic transformation
# One structural order parameter (SOP) governed by AllenCahn Eqn.
# Chemical driving force described by Landau Polynomial
# Coupled with elasticity (Mechanics)
# Eigenstrain as a function of SOP
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 50
y1 = 50
radius = 10.0
invalue = 1.0
outvalue = 0.0
int_width = 5.0
[../]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'stress_xx stress_yy'
eigenstrain_names = 'eigenstrain'
[../]
[]
[Kernels]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = kappa_eta
[../]
[./time]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1'
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'eta'
constant_names = 'A2 A3 A4'
constant_expressions = '0.2 -12.6 12.4'
expression = A2/2*eta^2+A3/3*eta^3+A4/4*eta^4
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '70 30 30 70 30 70 30 30 30'
fill_method = symmetric9
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./var_dependence]
type = DerivativeParsedMaterial
expression = eta
coupled_variables = 'eta'
property_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '0.1 0.1 0 0 0 0'
prefactor = var_dep
#outputs = exodus
args = 'eta'
eigenstrain_name = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'eta'
derivative_order = 2
[../]
[]
[BCs]
[./all_y]
type = DirichletBC
variable = disp_y
boundary = 'top bottom left right'
value = 0
[../]
[./all_x]
type = DirichletBC
variable = disp_x
boundary = 'top bottom left right'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
# this gives best performance on 4 cores
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
num_steps = 10
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 9
iteration_window = 2
growth_factor = 1.1
cutback_factor = 0.75
dt = 0.3
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_volume.i)
# This test calculates the volume of a few simple shapes
# Using the FeatureVolumeVectorPostprocessor
[Mesh]
# Required for use with distributed mesh
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = -2
xmax = 2
ymin = -2
ymax = 2
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./gr0]
[../]
[./gr1]
[../]
[]
[ICs]
[./circle]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 1
int_width = 0.01
invalue = 1
outvalue = 0
variable = gr0
[../]
[./boxes]
type = MultiBoundingBoxIC
corners = '-1 -1 0
0 0 0'
opposite_corners = '-0.5 -0.5 0
1 1 0'
inside = 1
outside = 0
variable = gr1
[../]
[]
[Postprocessors]
[./grain_tracker]
type = GrainTracker
variable = 'gr0 gr1'
threshold = 0.1
compute_var_to_feature_map = true
execute_on = 'initial'
[../]
[./avg_feature_vol]
type = AverageGrainVolume
feature_counter = grain_tracker
execute_on = 'initial'
[../]
[]
[VectorPostprocessors]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_tracker
execute_on = 'initial'
[../]
[]
[Executioner]
type = Steady
[./Adaptivity]
initial_adaptivity = 3
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 3
[../]
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/test/tests/eigenstrain/inclusion.i)
# This test allows comparison of simulation and analytical solution for a misfitting precipitate
# using ComputeVariableEigenstrain for the simulation and the InclusionProperties material
# for the analytical solution. Increasing mesh resolution will improve agreement.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
xmax = 1.5
ymax = 1.5
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxVariables]
[./s11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./s12_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./s22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./s11_an]
order = CONSTANT
family = MONOMIAL
[../]
[./s12_an]
order = CONSTANT
family = MONOMIAL
[../]
[./s22_an]
order = CONSTANT
family = MONOMIAL
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e12_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e11_an]
order = CONSTANT
family = MONOMIAL
[../]
[./e12_an]
order = CONSTANT
family = MONOMIAL
[../]
[./e22_an]
order = CONSTANT
family = MONOMIAL
[../]
[./fel_an]
order = CONSTANT
family = MONOMIAL
[../]
[./c]
[../]
[]
[AuxKernels]
[./matl_s11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = s11_aux
[../]
[./matl_s12]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = s12_aux
[../]
[./matl_s22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = s22_aux
[../]
[./matl_s11_an]
type = RankTwoAux
rank_two_tensor = stress_an
index_i = 0
index_j = 0
variable = s11_an
[../]
[./matl_s12_an]
type = RankTwoAux
rank_two_tensor = stress_an
index_i = 0
index_j = 1
variable = s12_an
[../]
[./matl_s22_an]
type = RankTwoAux
rank_two_tensor = stress_an
index_i = 1
index_j = 1
variable = s22_an
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11_aux
[../]
[./matl_e12]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 1
variable = e12_aux
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 1
index_j = 1
variable = e22_aux
[../]
[./matl_e11_an]
type = RankTwoAux
rank_two_tensor = strain_an
index_i = 0
index_j = 0
variable = e11_an
[../]
[./matl_e12_an]
type = RankTwoAux
rank_two_tensor = strain_an
index_i = 0
index_j = 1
variable = e12_an
[../]
[./matl_e22_an]
type = RankTwoAux
rank_two_tensor = strain_an
index_i = 1
index_j = 1
variable = e22_an
[../]
[./matl_fel_an]
type = MaterialRealAux
variable = fel_an
property = fel_an_mat
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.005*c^2
coupled_variables = c
outputs = exodus
output_properties = 'var_dep'
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 0 0 0 0'
prefactor = var_dep
args = c
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./analytical]
type = InclusionProperties
a = 0.1
b = 0.1
lambda = 1
mu = 1
misfit_strains = '0.005 0.005'
strain_name = strain_an
stress_name = stress_an
energy_name = fel_an_mat
[../]
[]
[BCs]
active = 'left_x bottom_y'
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 30
nl_max_its = 10
nl_rel_tol = 1.0e-10
[]
[Outputs]
exodus = true
[]
[ICs]
[./c_IC]
int_width = 0.075
x1 = 0
y1 = 0
radius = 0.1
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_reserve.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
[]
[AuxVariables]
[./c]
[../]
[]
[Variables]
[./gr0]
[../]
[./gr1]
[../]
[]
[ICs]
[./gr0]
type = MultiSmoothCircleIC
variable = gr0
invalue = 1.0
outvalue = 0.0001
bubspac = 20.0
numbub = 2
radius = 10.0
int_width = 12.0
radius_variation = 0.2
radius_variation_type = uniform
[../]
[./c_IC]
type = SmoothCircleIC
int_width = 12.0
x1 = 50
y1 = 50
radius = 10.0
outvalue = 0
variable = c
invalue = 1
[../]
[]
[Kernels]
[./ie_gr0]
type = TimeDerivative
variable = gr0
[../]
[./diff_gr0]
type = Diffusion
variable = gr0
[../]
[./ie_gr1]
type = TimeDerivative
variable = gr1
[../]
[./diff_gr1]
type = Diffusion
variable = gr1
[../]
[./source]
type = MaskedBodyForce
variable = gr1
function = t
mask = mask
[../]
[]
[Materials]
[./mask]
type = ParsedMaterial
expression = 'c'
property_name = mask
coupled_variables = 'c'
[../]
[]
[Postprocessors]
[./grain_tracker]
type = GrainTracker
# Reserve the first "op" variable
reserve_op = 1
threshold = 0.1
connecting_threshold = 0.001
variable = 'gr0 gr1'
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
num_steps = 6
dt = 0.25
[]
[Outputs]
exodus = true
[]
[Problem]
kernel_coverage_check = false
[]
(modules/combined/test/tests/eigenstrain/variable_finite.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.5
ymax = 0.5
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./strain11]
order = CONSTANT
family = MONOMIAL
[../]
[./stress11]
order = CONSTANT
family = MONOMIAL
[../]
[./c]
[../]
[./eigenstrain00]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./c_IC]
int_width = 0.15
x1 = 0
y1 = 0
radius = 0.25
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxKernels]
[./strain11]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
variable = strain11
[../]
[./stress11]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
variable = stress11
[../]
[./eigenstrain00]
type = RankTwoAux
variable = eigenstrain00
rank_two_tensor = eigenstrain
index_j = 0
index_i = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.01*c^2
coupled_variables = c
outputs = exodus
output_properties = 'var_dep'
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
args = c
prefactor = var_dep
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./top_y]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 0.0005*t
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 3
solve_type = PJFNK
petsc_options_iname = '-pc_type '
petsc_options_value = lu
l_max_its = 20
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-9
reset_dt = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/actions/grain_growth_with_c.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 400
ymax = 400
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
c = c
[../]
[../]
[]
[AuxVariables]
[./c]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
int_width = 60
[../]
[../]
[./c_IC]
type = SmoothCircleIC
variable = c
x1 = 100
y1 = 0.0
radius = 50
int_width = 40
invalue = 1.0
outvalue = 0.0
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
num_steps = 5
dt = 80.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/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/misc/variablegradientmaterial.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
[]
[AuxVariables]
[./c]
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
z1 = 0
invalue = 1
outvalue = 0
radius = 0.7
int_width = 0.5
[../]
[../]
[]
[Materials]
[./var_grad]
type = VariableGradientMaterial
prop = grad_c
variable = c
outputs = exodus
[../]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
execute_on = final
[]
(modules/phase_field/test/tests/PolynomialFreeEnergy/direct_order8_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 125
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 60.0
variable = c
[../]
[]
[Kernels]
[./local_energy]
type = CahnHilliard
variable = c
f_name = F
[../]
[./gradient_energy]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa
[../]
[./cdot]
type = TimeDerivative
variable = c
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = 1000 # K
int_width = 30.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.7 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 100
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/penalty.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 10
nz = 0
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD4
[]
[GlobalParams]
penalty = 5
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 30.0
y1 = 25.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
[]
[Kernels]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = 'c eta2'
f_name = F
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa_eta
[../]
[./penalty1]
type = SwitchingFunctionPenalty
variable = eta1
etas = 'eta1 eta2'
h_names = 'h1 h2'
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'c eta1'
f_name = F
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa_eta
[../]
[./penalty2]
type = SwitchingFunctionPenalty
variable = eta2
etas = 'eta1 eta2'
h_names = 'h1 h2'
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta1 eta2'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time1]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1 '
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 1'
[../]
[./hsum]
type = ParsedMaterial
expression = h1+h2
property_name = hsum
material_property_names = 'h1 h2'
coupled_variables = 'c'
outputs = exodus
[../]
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2'
[../]
[./free_energy_A]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = '(c-0.1)^2'
derivative_order = 2
[../]
[./free_energy_B]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = '(c-0.9)^2'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
fi_names = 'Fa Fb'
hi_names = 'h1 h2'
etas = 'eta1 eta2'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-7
nl_abs_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 0.05
dtmin = 0.01
[]
[Debug]
# show_var_residual_norms = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/ADAllenCahn.i)
#
# Test the forward automatic differentiation Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = ADTimeDerivative
variable = eta
[../]
[./ACBulk]
type = ADAllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ADACInterface
variable = eta
kappa_name = 1
variable_L = false
[../]
[]
[Materials]
[./consts]
type = ADGenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = ADTestDerivativeFunction
function = F1
f_name = F
op = 'eta'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialTwophaseAnisotropy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -4
xmax = 4
ymin = -4
ymax = 4
uniform_refine = 2
[]
[GlobalParams]
radius = 0.5
int_width = 0.3
x1 = 0
y1 = 0
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[BCs]
[./Periodic]
[./w]
variable = w
auto_direction = 'x y'
[../]
[./etaa0]
variable = etaa0
auto_direction = 'x y'
[../]
[./etab0]
variable = etab0
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
end_time = 10.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 5
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 10
exodus = true
[]
(modules/phase_field/test/tests/actions/Nonconserved_2vars.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
xmax = 40
ymax = 40
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./eta1]
free_energy = F
kappa = 2.0
mobility = 1.0
variable_mobility = false
coupled_variables = 'eta2'
[../]
[./eta2]
free_energy = F
kappa = 2.0
mobility = 1.0
variable_mobility = false
coupled_variables = 'eta1'
[../]
[../]
[../]
[]
[ICs]
[./eta1_IC]
type = SmoothCircleIC
variable = eta1
x1 = 20.0
y1 = 20.0
radius = 12.0
invalue = 1.0
outvalue = 0.0
int_width = 3.0
[../]
[./eta2_IC]
type = SmoothCircleIC
variable = eta2
x1 = 20.0
y1 = 20.0
radius = 12.0
invalue = 0.0
outvalue = 1.0
int_width = 3.0
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta1 eta2'
expression = '2.5 * (eta1^4/4 - eta1^2/2 + eta2^4/4 - eta2^2/2 + 3/2 * eta1^2 * eta2^2) + 1/4'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
num_steps = 8
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/solution_rasterizer/diffuse.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
xmin = 0.0
xmax = 10.0
ymin = 0.0
ymax = 10.0
zmin = 0.0
zmax = 10.0
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
variable = c
type = SmoothCircleIC
x1 = 5.0
y1 = 5.0
z1 = 5.0
radius = 4.0
invalue = 1.0
outvalue = 0.0
int_width = 1.0
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/AllenCahn.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
variable_L = false
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy.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 = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./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.0'
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[]
[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 = 2.0
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
type = Exodus
refinements = 2
[../]
[]
(modules/phase_field/test/tests/phase_field_kernels/CoupledAllenCahn.i)
#
# Test the coupled Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[Variables]
[./w]
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = CoupledAllenCahn
variable = w
v = eta
f_name = F
[../]
[./W]
type = Reaction
variable = w
[../]
[./CoupledBulk]
type = MatReaction
variable = eta
v = w
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.5
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
hide = w
file_base = AllenCahn_out
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/ADAllenCahnVariableL.i)
#
# Test the forward automatic differentiation Allen-Cahn Bulk kernel with a
# spatially varying mobility
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[AuxVariables]
[./chi]
[./InitialCondition]
type = FunctionIC
function = 'x/24+0.5'
[../]
[../]
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = ADTimeDerivative
variable = eta
[../]
[./ACBulk]
type = ADAllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ADACInterface
variable = eta
kappa_name = 1
variable_L = true
coupled_variables = chi
[../]
[]
[Materials]
[./L]
type = ADTestDerivativeFunction
function = F2
f_name = L
op = 'eta chi'
[../]
[./free_energy]
type = ADTestDerivativeFunction
function = F1
f_name = F
op = 'eta'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(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/mobility_derivative/mobility_derivative_direct_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 12
ny = 12
xmax = 30
ymax = 30
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 10
variable = c
int_width = 3
invalue = 1
outvalue = -1
[../]
[]
[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]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
expression = 'if(c<-1,0.1,if(c>1,0.1,1-.9*c^2))'
outputs = exodus
derivative_order = 2
[../]
[]
[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 = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 2
dt = 0.9
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MaskedBodyForce/MaskedBodyForce_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
elem_type = QUAD
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./c]
[../]
[]
[ICs]
[./initial]
value = 1.0
variable = u
type = ConstantIC
[../]
[./c_IC]
int_width = 0.1
x1 = 0.5
y1 = 0.5
radius = 0.25
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[./source]
type = MaskedBodyForce
variable = u
value = 1
mask = mask
[../]
[]
[Materials]
[./mask]
type = ParsedMaterial
expression = if(c>0.5,0,1)
property_name = mask
coupled_variables = c
[../]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/SimpleACInterface/SimpleCoupledACInterface.i)
#
# Test the coupled Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 50
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./w]
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = 0.0
int_width = 5.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./CoupledBulk]
type = MatReaction
variable = eta
v = w
[../]
[./W]
type = Reaction
variable = w
[../]
[./CoupledACInterface]
type = SimpleCoupledACInterface
variable = w
v = eta
kappa_name = 1
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = 'eta^2 * (1-eta)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 2
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
hide = w
exodus = 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/PolynomialFreeEnergy/direct_order4_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 125
[]
[GlobalParams]
polynomial_order = 4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 60.0
variable = c
[../]
[]
[Kernels]
[./local_energy]
type = CahnHilliard
variable = c
f_name = F
[../]
[./gradient_energy]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa
[../]
[./cdot]
type = TimeDerivative
variable = c
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = 1000 # K
int_width = 30.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.7 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 100
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/mobility_derivative/coupledmatdiffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmax = 15.0
ymax = 15.0
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[./d]
[./InitialCondition]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 8
int_width = 3
invalue = 2
outvalue = 0
[../]
[../]
[./u]
[../]
[./w]
[../]
[]
[Kernels]
[./ctime]
type = TimeDerivative
variable = c
[../]
[./umat]
type = MatReaction
variable = c
v = u
mob_name = 1
[../]
[./urxn]
type = Reaction
variable = u
[../]
[./cres]
type = MatDiffusion
variable = u
diffusivity = Dc
args = d
v = c
[../]
[./dtime]
type = TimeDerivative
variable = d
[../]
[./wmat]
type = MatReaction
variable = d
v = w
mob_name = 1
[../]
[./wrxn]
type = Reaction
variable = w
[../]
[./dres]
type = MatDiffusion
variable = w
diffusivity = Dd
args = c
v = d
[../]
[]
[Materials]
[./Dc]
type = DerivativeParsedMaterial
property_name = Dc
expression = '0.01+c^2+d'
coupled_variables = 'c d'
derivative_order = 1
[../]
[./Dd]
type = DerivativeParsedMaterial
property_name = Dd
expression = 'd^2+c+1.5'
coupled_variables = 'c d'
derivative_order = 1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
dt = 1
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_example_nested.i)
#
# KKS toy problem in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = -2.5
xmax = 2.5
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.2
outvalue = 0.1
int_width = 0.75
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.6
outvalue = 0.4
int_width = 0.75
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta w c'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
f_name = fm
function = '(0.1-cm)^2'
material_property_names = 'cm'
additional_derivative_symbols = 'cm'
compute = false
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
f_name = fd
function = '(0.9-cd)^2'
material_property_names = 'cd'
additional_derivative_symbols = 'cd'
compute = false
[../]
# Compute phase concentrations
[./PhaseConcentrationMaterial]
type = KKSPhaseConcentrationMaterial
global_cs = 'c'
ci_names = 'cm cd'
ci_IC = '0 0'
fa_name = fm
fb_name = fd
h_name = h
min_iterations = 1
max_iterations = 100
absolute_tolerance = 1e-9
relative_tolerance = 1e-9
nested_iterations = iter
outputs = exodus
[../]
# Compute chain rule terms
[./PhaseConcentrationDerivatives]
type = KKSPhaseConcentrationDerivatives
global_cs = 'c'
eta = eta
ci_names = 'cm cd'
fa_name = fm
fb_name = fd
h_name = h
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.4 '
[../]
[]
[Kernels]
# full transient
active = 'CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = NestedKKSSplitCHCRes
variable = c
global_cs = 'c'
w = w
all_etas = eta
ca_names = 'cm cd'
fa_name = fm
args = 'eta w'
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = NestedKKSACBulkF
variable = eta
global_cs = 'c'
ci_names = 'cm cd'
fa_name = fm
fb_name = fd
g_name = g
h_name = h
mob_name = L
w = 0.4
args = 'c'
[../]
[./ACBulkC]
type = NestedKKSACBulkC
variable = eta
global_cs = 'c'
ci_names = 'cm cd'
fa_name = fm
h_name = h
mob_name = L
args = 'c'
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 3
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example_nested
exodus = true
[]
(modules/phase_field/test/tests/SimpleACInterface/SimpleACInterface.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 50
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = SimpleACInterface
variable = eta
kappa_name = 1
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
block = 0
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(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/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/new_initial_conditions/SmoothCircleIC_tanh.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 30
ymax = 30
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SmoothCircleIC
variable = c
x1 = 15.0
y1 = 15.0
radius = 8.0
invalue = 1.0
outvalue = -0.8
int_width = 8.0
profile = TANH
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Outputs]
exodus = false
[./out]
type = Exodus
refinements = 1
[../]
[]
(modules/combined/test/tests/multiphase_mechanics/elasticenergymaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./c]
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.0
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[./dummy]
type = MatDiffusion
variable = c
diffusivity = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[./elasticenergy]
type = ElasticEnergyMaterial
args = 'c'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/ACInterfaceStress.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 3
nx = 8
ny = 8
nz = 8
xmax = 20
ymax = 20
zmax = 20
[]
[Variables]
[./eta]
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 12.0
invalue = 1.0
outvalue = 0.0
int_width = 16.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACInterfaceStress]
type = ACInterfaceStress
variable = eta
mob_name = 1
stress = 2.7
[../]
[]
[Materials]
[./strain]
type = GenericConstantRankTwoTensor
tensor_name = elastic_strain
tensor_values = '0.11 0.12 0.13 0.21 0.22 0.23 0.31 0.32 0.33'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 1000
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/multiphase/DerivativeMultiPhaseMaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = -12
xmax = 12
ymin = -12
ymax = 12
elem_type = QUAD4
[]
[GlobalParams]
# let's output all material properties for demonstration purposes
outputs = exodus
# prefactor on the penalty function kernels. The higher this value is, the
# more rigorously the constraint is enforced
penalty = 1e3
[]
#
# These AuxVariables hold the directly calculated free energy density in the
# simulation cell. They are provided for visualization purposes.
#
[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
[../]
#
# Helper kernel to cpompute the gradient contribution from interfaces of order
# parameters evolved using the ACMultiInterface kernel
#
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
#
# The interface coefficient matrix. This should be symmetrical!
#
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
#
# We set up a smooth cradial concentrtaion gradient
# The concentration will quickly change to adapt to the preset order
# parameters eta1, eta2, and eta3
#
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 5.0
invalue = 1.0
outvalue = 0.01
int_width = 10.0
[../]
[../]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
#
# Note: this initial conditions sets up a _sharp_ interface. Ideally
# we should start with a smooth interface with a width consistent
# with the kappa parameter supplied for the given interface.
#
function = 'r:=sqrt(x^2+y^2);if(r<=4,1,0)'
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt(x^2+y^2);if(r>4&r<=7,1,0)'
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt(x^2+y^2);if(r>7,1,0)'
[../]
[../]
[]
[Kernels]
#
# Cahn-Hilliard kernel for the concentration variable.
# Note that we are not using an interfcae kernel on this variable, but rather
# rely on the interface width enforced on the order parameters. This allows us
# to use a direct solve using the CahnHilliard kernel _despite_ only using first
# order elements.
#
[./c_res]
type = CahnHilliard
variable = c
f_name = F
coupled_variables = 'eta1 eta2 eta3'
[../]
[./time]
type = TimeDerivative
variable = c
[../]
#
# Order parameter eta1
# Each order parameter is acted on by 4 kernels:
# 1. The stock time derivative deta_i/dt kernel
# 2. The Allen-Cahn kernel that takes a Dervative Material for the free energy
# 3. A gradient interface kernel that includes cross terms
# see http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/MultiPhaseModels/ACMultiInterface/
# 4. A penalty contribution that forces the interface contributions h(eta)
# to sum up to unity
#
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = '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'
[../]
[./penalty1]
type = SwitchingFunctionPenalty
variable = eta1
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
#
# Order parameter eta2
#
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = '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'
[../]
[./penalty2]
type = SwitchingFunctionPenalty
variable = eta2
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
#
# Order parameter eta3
#
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
coupled_variables = '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'
[../]
[./penalty3]
type = SwitchingFunctionPenalty
variable = eta3
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# here we declare some of the model parameters: the mobilities and interface
# gradient prefactors. For this example we use arbitrary numbers. In an actual simulation
# physical mobilities would be used, and the interface gradient prefactors would
# be readjusted to the free energy magnitudes.
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0.2 0.75 1 1 1 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 '
[../]
# This material sums up the individual phase contributions. It is written to the output file
# (see GlobalParams section above) and can be used to check the constraint enforcement.
[./etasummat]
type = ParsedMaterial
property_name = etasum
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3'
[../]
# The phase contribution factors for each material point are computed using the
# SwitchingFunctionMaterials. Each phase with an order parameter eta contributes h(eta)
# to the global free energy density. h is a function that switches smoothly from 0 to 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
[../]
# The barrier function adds a phase transformation energy barrier. It also
# Drives order parameters toward the [0:1] interval to avoid negative or larger than 1
# order parameters (these are set to 0 and 1 contribution by the switching functions
# above)
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
# We use DerivativeParsedMaterials to specify three (very) simple free energy
# expressions for the three phases. All necessary derivatives are built automatically.
# In a real problem these expressions can be arbitrarily complex (or even provided
# by custom kernels).
[./phase_free_energy_1]
type = DerivativeParsedMaterial
property_name = F1
expression = '(c-1)^2'
coupled_variables = 'c'
[../]
[./phase_free_energy_2]
type = DerivativeParsedMaterial
property_name = F2
expression = '(c-0.5)^2'
coupled_variables = 'c'
[../]
[./phase_free_energy_3]
type = DerivativeParsedMaterial
property_name = F3
expression = 'c^2'
coupled_variables = 'c'
[../]
# The DerivativeMultiPhaseMaterial ties the phase free energies together into a global free energy.
# http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/MultiPhaseModels/
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
# we use a constant free energy (GeneriConstantmaterial property Fx)
fi_names = 'F1 F2 F3'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
coupled_variables = 'c'
W = 1
[../]
[]
[Postprocessors]
# The total free energy of the simulation cell to observe the energy reduction.
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
# for testing we also monitor the total solute amount, which should be conserved.
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
[]
[Preconditioning]
# This preconditioner makes sure the Jacobian Matrix is fully populated. Our
# kernels compute all Jacobian matrix entries.
# This allows us to use the Newton solver below.
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
# Automatic differentiation provedes a _full_ Jacobian in this example
# so we can safely use NEWTON for a fast solve
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-6
nl_abs_tol = 1.0e-6
start_time = 0.0
end_time = 150.0
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Debug]
# show_var_residual_norms = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(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/test/tests/actions/Nonconserved_variableL.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
xmax = 40
ymax = 40
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./eta]
free_energy = F
kappa = 2.0
mobility = variable_L
[../]
[../]
[../]
[]
[ICs]
[./InitialCondition]
type = SmoothCircleIC
variable = eta
x1 = 20.0
y1 = 20.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[]
[Materials]
[./mobility]
type = DerivativeParsedMaterial
property_name = variable_L
coupled_variables = 'eta'
expression = '0.5 * eta + 1.5 * (1 - eta)'
derivative_order = 1
outputs = exodus
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
num_steps = 10
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_example_offset.i)
#
# KKS toy problem in the split form
# This has an offset in the minima of the free energies so there will be a shift
# in equilibrium composition
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = -2.5
xmax = 2.5
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# hydrogen phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# hydrogen phase concentration (delta phase)
[./cd]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.2
outvalue = 0.1
int_width = 0.75
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.6
outvalue = 0.4
int_width = 0.75
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta w c cm cd'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^2+0.5'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.4 '
[../]
[]
[Kernels]
# full transient
active = 'PhaseConc ChemPotVacancies CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cm + h(eta)*cd
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fd
coupled_variables = 'cm cd'
w = 0.4
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 3
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example_offset
exodus = true
[]
(modules/phase_field/examples/anisotropic_interfaces/snow.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 14
xmax = 9
ymax = 9
uniform_refine = 3
[]
[Variables]
[./w]
[../]
[./T]
[../]
[]
[ICs]
[./wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 4.5
y1 = 4.5
radius = 0.07
outvalue = 0
invalue = 1
[../]
[]
[Kernels]
[./w_dot]
type = TimeDerivative
variable = w
[../]
[./anisoACinterface1]
type = ACInterfaceKobayashi1
variable = w
mob_name = M
[../]
[./anisoACinterface2]
type = ACInterfaceKobayashi2
variable = w
mob_name = M
[../]
[./AllenCahn]
type = AllenCahn
variable = w
mob_name = M
f_name = fbulk
coupled_variables = T
[../]
[./T_dot]
type = TimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = Diffusion
variable = T
[../]
[./w_dot_T]
type = CoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = pi
constant_expressions = 4*atan(1)
expression = 'm:=0.9 * atan(10 * (1 - T)) / pi; 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * w^2'
derivative_order = 2
outputs = exodus
[../]
[./material]
type = InterfaceOrientationMaterial
op = w
[../]
[./consts]
type = GenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-08
l_max_its = 30
end_time = 1
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
iteration_window = 2
dt = 0.0005
growth_factor = 1.1
cutback_factor = 0.75
[../]
[./Adaptivity]
initial_adaptivity = 3 # Number of times mesh is adapted to initial condition
refine_fraction = 0.7 # Fraction of high error that will be refined
coarsen_fraction = 0.1 # Fraction of low error that will coarsened
max_h_level = 5 # Max number of refinements used, starting from initial mesh (before uniform refinement)
weight_names = 'w T'
weight_values = '1 0.5'
[../]
[]
[Outputs]
time_step_interval = 5
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/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/actions/Nonconserved_highorder.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmax = 40
ymax = 40
elem_type = QUAD
second_order = true
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./eta]
family = LAGRANGE
order = SECOND
free_energy = F
kappa = 2.0
mobility = 1.0
variable_mobility = false
[../]
[../]
[../]
[]
[ICs]
[./InitialCondition]
type = SmoothCircleIC
variable = eta
x1 = 20.0
y1 = 20.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
num_steps = 10
dt = 1.0
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 40
xmax = 25
[]
[Variables]
[./op]
[../]
[]
[ICs]
[./op_IC]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 1
outvalue = 0
int_width = 3.0
variable = op
[../]
[]
[Kernels]
[./op_dot]
type = TimeDerivative
variable = op
[../]
[./op_bulk]
type = AllenCahn
variable = op
f_name = F
mob_name = L
[../]
[./op_interface]
type = ACInterface
variable = op
kappa_name = 1
mob_name = L
[../]
[]
[Materials]
[./consts]
type = DerivativeParsedMaterial
property_name = L
expression = 'if(op<0, 0.01, if(op>1, 0.01, 1*op^2*(1-op)^2+0.01))'
coupled_variables = 'op'
outputs = exodus
output_properties = 'L dL/dop dL/dv'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'op'
expression = '2*op^2*(1-op)^2 - 0.2*op'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 15
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 20
dt = 2.0
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(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/actions/Nonconserved_1var.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
xmax = 40
ymax = 40
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./eta]
free_energy = F
kappa = 2.0
mobility = 1.0
variable_mobility = false
[../]
[../]
[../]
[]
[ICs]
[./InitialCondition]
type = SmoothCircleIC
variable = eta
x1 = 20.0
y1 = 20.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
num_steps = 10
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 250
ymax = 250
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
# This deprecated material is replaced by the materials below
#
#[./eigenstrain]
# type = SimpleEigenStrainMaterial
# block = 0
# epsilon0 = 0.05
# c = c
# disp_y = disp_y
# disp_x = disp_x
# C_ijkl = '3 1 1 3 1 3 1 1 1 '
# fill_method = symmetric9
#[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/crosstermfreeenergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = -8
xmax = 8
ymin = -8
ymax = 8
elem_type = QUAD4
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
f_name = F0
variable = local_energy
additional_free_energy = cross_energy
[../]
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
[../]
[]
[Variables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 5.0
radius = 5.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = -4.0
y1 = -2.0
radius = 5.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 4.0
y1 = -2.0
radius = 5.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[]
[Kernels]
[./dummy_diff1]
type = Diffusion
variable = eta1
[../]
[./dummy_time1]
type = TimeDerivative
variable = eta1
[../]
[./dummy_diff2]
type = Diffusion
variable = eta2
[../]
[./dummy_time2]
type = TimeDerivative
variable = eta2
[../]
[./dummy_diff3]
type = Diffusion
variable = eta3
[../]
[./dummy_tim3]
type = TimeDerivative
variable = eta3
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'F0 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0 11 12 13 12 22 23 13 23 33 '
[../]
[]
[Executioner]
type = Transient
dt = 0.001
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
hide = 'eta1 eta2 eta3 local_energy'
[../]
[]
(modules/phase_field/test/tests/phase_field_kernels/CoupledCoefAllenCahn.i)
#
# Test the CoefReaction kernel (which adds -L*v to the residual) for the case
# where v is a coupled variable
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 50
elem_type = QUAD4
[]
[Variables]
[./w]
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = 0.0
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = CoupledAllenCahn
variable = w
v = eta
f_name = F
mob_name = 1
[../]
[./W]
type = MatReaction
variable = w
mob_name = -1
[../]
[./CoupledBulk]
type = MatReaction
variable = eta
v = w
mob_name = L
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
mob_name = L
coupled_variables = w
[../]
[]
[Materials]
[./mobility]
type = DerivativeParsedMaterial
property_name = L
coupled_variables = 'eta w'
expression = '(1.5-eta)^2+(1.5-w)^2'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = 'eta^2 * (1-eta)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.5
[]
[Outputs]
hide = w
exodus = true
[]
(modules/phase_field/test/tests/free_energy_material/MathFreeEnergy.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 = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./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.0'
[../]
[./free_energy]
type = MathFreeEnergy
property_name = F
c = c
[../]
[]
[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 = 2.0
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
type = Exodus
refinements = 2
[../]
[]
(modules/phase_field/test/tests/phase_field_kernels/SplitCahnHilliard.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# The free energy used here has the same functional form as the SplitCHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_Cu_Split_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 60
ymin = 0
ymax = 60
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 30.0
invalue = 1.0
outvalue = -0.5
int_width = 30.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
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '100 40'
[../]
[./free_energy]
# equivalent to `MathFreeEnergy`
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c'
expression = '0.25*(1+c)^2*(1-c)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/barrierfunctionmaterial.i)
# This is a test of the BarrierFunctionMaterial option = HIGH
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 20
ymin = 0
ymax = 20
elem_type = QUAD4
[]
[Variables]
[./eta]
[../]
[]
[ICs]
[./IC_eta]
type = SmoothCircleIC
variable = eta
x1 = 10
y1 = 10
radius = 5
invalue = 1
outvalue = 0
int_width = 1
[../]
[]
[Kernels]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = 0
mob_name = 1
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = 1
mob_name = 1
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
g_order = HIGH
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 2
[]
[Problem]
solve = false
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(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/TotalFreeEnergy/TotalFreeEnergy_test.i)
#
# Test the TotalFreeEnergy auxkernel, which outputs both the sum of the bulk and interfacial free energies. This test has only one variable.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
nz = 0
xmin = 0
xmax = 250
ymin = 0
ymax = 250
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[AuxVariables]
[./local_free_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = SmoothCircleIC
variable = c
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 30.0
[../]
[]
[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
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_free_energy
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1e-3 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
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
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_free_energy
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 6
dt = 200
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
#
# This test is for the 3-phase KKS model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[AuxVariables]
[./Energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# order parameter 1
[./eta1]
order = FIRST
family = LAGRANGE
[../]
# order parameter 2
[./eta2]
order = FIRST
family = LAGRANGE
[../]
# order parameter 3
[./eta3]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# phase concentration 1
[./c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[../]
# phase concentration 2
[./c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
order = FIRST
family = LAGRANGE
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.9
outvalue = 0.1
int_width = 4
[../]
[./eta2]
variable = eta2
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.1
outvalue = 0.9
int_width = 4
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.2
outvalue = 0.5
int_width = 2
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.2)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '20*(c2-0.5)^2'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
property_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
property_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
property_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '0.7 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
coupled_variables = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[AuxKernels]
[./Energy_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gj_names = 'g1 g2 g3'
variable = Energy
w = 1
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa kappa kappa'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 2
dt = 0.5
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/SoretDiffusion/split.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1000
nx = 50
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
[../]
[./w]
scaling = 1.0e3
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 175.0
y1 = 0.0
radius = 100
invalue = 1.0
outvalue = 0.01
int_width = 100.0
variable = c
[../]
[]
[AuxVariables]
[./T]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
kappa_name = kappa
w = w
f_name = F
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./w_res_soret]
type = SoretDiffusion
variable = w
c = c
T = T
diff_name = D
Q_name = Qstar
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[AuxKernels]
[./Temp]
type = FunctionAux
variable = T
function = 1000.0+0.025*x
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = T # K
int_width = 80.0
length_scale = 1.0e-9
time_scale = 1.0e-6
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.708 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
outputs = exodus
derivative_order = 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 = 10
l_tol = 1.0e-4
nl_max_its = 25
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 20
dt = 3
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/derivativetwophasematerial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 10
nz = 0
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 30.0
y1 = 25.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
coupled_variables = c
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa_eta
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1 '
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 1'
[../]
[./switching]
type = SwitchingFunctionMaterial
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
g_order = SIMPLE
[../]
[./free_energy_A]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = '(c-0.1)^2*(c-1)^2 + c*0.01'
derivative_order = 2
enable_jit = true
[../]
[./free_energy_B]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = 'c^2*(c-0.9)^2 + (1-c)*0.01'
derivative_order = 2
enable_jit = true
[../]
[./free_energy]
type = DerivativeTwoPhaseMaterial
property_name = F
fa_name = Fa
fb_name = Fb
coupled_variables = 'c'
eta = eta
derivative_order = 2
outputs = exodus
output_properties = 'F dF/dc dF/deta d^2F/dc^2 d^2F/dcdeta d^2F/deta^2'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/particle.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./c]
[./InitialCondition]
int_width = 60
x1 = 167
y1 = 500
radius = 50
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[../]
[]
[Kernels]
[./PolycrystalKernel]
c = c
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/mixedswitchingfunctionmaterial.i)
# This is a test of the MixedSwitchingfunctionmaterial
# Several mixed type of switching function with ajustable weight parameter
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 20
ymin = 0
ymax = 20
elem_type = QUAD4
[]
[Variables]
[./eta]
[../]
[]
[ICs]
[./IC_eta]
type = SmoothCircleIC
variable = eta
x1 = 10
y1 = 10
radius = 5
invalue = 1
outvalue = 0
int_width = 1
[../]
[]
[Kernels]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = kappa_eta
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1.0 1.0'
[../]
[./switching]
type = MixedSwitchingFunctionMaterial
function_name = h
eta = eta
h_order = MIX234
weight = 1.0
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
g_order = SIMPLE
[../]
# Total free energy: F = Fa*(1-h) + Fb*h
[./free_energy]
type = DerivativeTwoPhaseMaterial
property_name = F
fa_name = '0'
fb_name = '-1'
eta = eta
W = 3.1
derivative_order = 2
outputs = exodus
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-12
start_time = 0.0
num_steps = 2
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 9
iteration_window = 2
growth_factor = 1.1
cutback_factor = 0.75
dt = 0.3
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/PolynomialFreeEnergy/split_order4_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmin = 0
xmax = 125
[]
[GlobalParams]
polynomial_order = 4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 60.0
variable = c
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
kappa_name = kappa
w = w
f_name = F
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = 1000 # K
int_width = 30.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.7 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 50
dt = 15
petsc_options_iname = -pc_type
petsc_options_value = lu
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_xevac.i)
#
# KKS toy problem in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = -2.5
xmax = 2.5
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# gas concentration
[./cg]
order = FIRST
family = LAGRANGE
[../]
# vac concentration
[./cv]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./cv]
variable = cv
type = SmoothCircleIC
x1 = -0.5
y1 = 0.0
radius = 1.5
invalue = 0.9
outvalue = 0.1
int_width = 0.75
[../]
[./cg]
variable = cg
type = SmoothCircleIC
x1 = 0.5
y1 = 0.0
radius = 1.5
invalue = 0.7
outvalue = 0.0
int_width = 0.75
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'cg cv'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = KKSXeVacSolidMaterial
property_name = fm
cmg = cg
cmv = cv
T = 300
outputs = exodus
derivative_order = 2
[../]
[]
[Kernels]
[./diff_g]
type = Diffusion
variable = cg
[../]
[./time_g]
type = TimeDerivative
variable = cg
[../]
[./diff_v]
type = Diffusion
variable = cv
[../]
[./time_v]
type = TimeDerivative
variable = cv
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 3
dt = 0.1
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero'
[]
[Outputs]
file_base = kks_xevac
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/MatGradSquareCoupled.i)
#
# Test the MatGradSquareCoupled kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 50
elem_type = QUAD4
[]
[Variables]
[./w]
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = 0.0
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = CoupledAllenCahn
variable = w
v = eta
f_name = F
mob_name = 1
[../]
[./W]
type = MatReaction
variable = w
mob_name = -1
[../]
[./CoupledBulk]
type = MatReaction
variable = eta
v = w
mob_name = L
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
mob_name = L
coupled_variables = w
[../]
# MatGradSquareCoupled kernel
[./nabla_eta]
type = MatGradSquareCoupled
variable = w
elec_potential = eta
prefactor = 0.5
[../]
[]
[Materials]
[./mobility]
type = DerivativeParsedMaterial
property_name = L
coupled_variables = 'eta w'
expression = '(1.5-eta)^2+(1.5-w)^2'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = 'eta^2 * (1-eta)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.5
[]
[Outputs]
hide = w
exodus = true
console = 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/GrandPotentialPFM/GrandPotentialPFM.i)
# this input file test the implementation of the grand-potential phase-field model based on M.Plapp PRE 84,031601(2011)
# in this simple example, the liquid and solid free energies are parabola with the same curvature and the material properties are constant
# Note that this example also test The SusceptibilityTimeDerivative kernels
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmax = 32
ymax = 32
[]
[GlobalParams]
radius = 20.0
int_width = 4.0
x1 = 0
y1 = 0
[]
[Variables]
[./w]
[../]
[./eta]
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -0.2
invalue = 0.2
[../]
[./eta]
type = SmoothCircleIC
variable = eta
outvalue = 0.0
invalue = 1.0
[../]
[]
[Kernels]
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = D
args = ''
[../]
[./coupled_etadot]
type = CoupledSusceptibilityTimeDerivative
variable = w
v = eta
f_name = ft
coupled_variables = 'eta'
[../]
[./AC_bulk]
type = AllenCahn
variable = eta
f_name = F
coupled_variables = 'w'
[../]
[./AC_int]
type = ACInterface
variable = eta
[../]
[./e_dot]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'kappa_op D L chi cseq cleq A'
prop_values = '4.0 1.0 1.0 1.0 0.0 1.0 1.0'
[../]
[./liquid_GrandPotential]
type = DerivativeParsedMaterial
expression = '-0.5 * w^2/A - cleq * w'
coupled_variables = 'w'
property_name = f1
material_property_names = 'cleq A'
[../]
[./solid_GrandPotential]
type = DerivativeParsedMaterial
expression = '-0.5 * w^2/A - cseq * w'
coupled_variables = 'w'
property_name = f2
material_property_names = 'cseq A'
[../]
[./switching_function]
type = SwitchingFunctionMaterial
eta = eta
h_order = HIGH
[../]
[./barrier_function]
type = BarrierFunctionMaterial
eta = eta
[../]
[./cs]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = cs
material_property_names = 'A cseq'
expression = 'w/A + cseq' # since w = A*(c-cseq)
derivative_order = 2
[../]
[./cl]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = cl
material_property_names = 'A cleq'
expression = 'w/A + cleq' # since w = A*(c-cleq)
derivative_order = 2
[../]
[./total_GrandPotential]
type = DerivativeTwoPhaseMaterial
coupled_variables = 'w'
eta = eta
fa_name = f1
fb_name = f2
derivative_order = 2
W = 1.0
[../]
[./coupled_eta_function]
type = DerivativeParsedMaterial
expression = '(cs - cl) * dh'
coupled_variables = 'eta w'
property_name = ft
material_property_names = 'cs cl dh:=D[h,eta]'
derivative_order = 1
outputs = exodus
[../]
[./concentration]
type = ParsedMaterial
property_name = c
material_property_names = 'dF:=D[F,w]'
expression = '-dF'
outputs = exodus
[../]
[]
[Postprocessors]
[./C]
type = ElementIntegralMaterialProperty
mat_prop = c
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 15
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
num_steps = 5
dt = 10.0
[]
[Outputs]
exodus = true
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/phase_field/test/tests/mobility_derivative/matdiffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmax = 15.0
ymax = 15.0
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[./d]
[./InitialCondition]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 8
int_width = 3
invalue = 2
outvalue = 0
[../]
[../]
[]
[Kernels]
[./cres]
type = MatDiffusion
variable = c
diffusivity = Dc
args = d
[../]
[./ctime]
type = TimeDerivative
variable = c
[../]
[./dres]
type = MatDiffusion
variable = d
diffusivity = Dd
args = c
[../]
[./dtime]
type = TimeDerivative
variable = d
[../]
[]
[Materials]
[./Dc]
type = DerivativeParsedMaterial
property_name = Dc
expression = '0.01+c^2+d'
coupled_variables = 'c d'
derivative_order = 1
[../]
[./Dd]
type = DerivativeParsedMaterial
property_name = Dd
expression = 'd^2+c+1.5'
coupled_variables = 'c d'
derivative_order = 1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
dt = 1
num_steps = 2
[]
[Outputs]
exodus = 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
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 30
ymax = 30
elem_type = QUAD4
[]
[Variables]
[./c]
family = HERMITE
order = THIRD
[../]
[./d]
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 12
variable = c
int_width = 3
invalue = 1
outvalue = 0
[../]
[./d_IC]
type = BoundingBoxIC
x1 = 0
x2 = 15
y1 = 0
y2 = 30
inside = 1.0
outside = 0.0
variable = d
[../]
[]
[Kernels]
[./c_bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
coupled_variables = d
[../]
[./c_int]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
coupled_variables = d
[../]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./d_dot]
type = TimeDerivative
variable = d
[../]
[./d_diff]
type = MatDiffusion
variable = d
diffusivity = diffusivity
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = kappa_c
prop_values = 2.0
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = 'c d'
expression = if(d>0.001,d,0.001)*if(c<0,0.5,if(c>1,0.5,1-0.5*c^2))
derivative_order = 2
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[./d_diff]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 1.0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = BDF2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 0.25
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
refinements = 2
type = Exodus
[../]
[]
(modules/phase_field/test/tests/grain_boundary_area/disc.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = -1.5
xmax = 1.5
ymin = -1.5
ymax = 1.5
[]
[GlobalParams]
op_num = 1
var_name_base = gr
[]
[Variables]
[./gr0]
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
z1 = 0
radius = 1.0
int_width = 0.15
invalue = 1
outvalue = 0
[../]
[../]
[]
[Postprocessors]
[./area]
type = GrainBoundaryArea
grains_per_side = 1
[../]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/phase_field/examples/anisotropic_transport/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
xmin = -15.0
ymin = -15.0
xmax = 15.0
ymax = 15.0
[]
[Variables]
[./c]
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 3
int_width = 1
invalue = 1
outvalue = 0
[../]
[../]
[]
[Kernels]
[./cres]
type = MatAnisoDiffusion
diffusivity = D
variable = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[Materials]
[./D]
type = ConstantAnisotropicMobility
tensor = '.505 .495 .0
.495 .505 .0
.0 .0 .0'
M_name = D
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
scheme = bdf2
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 1.0
num_steps = 20
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/SoretDiffusion/direct.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1000
nx = 25
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 175.0
y1 = 0.0
radius = 100
invalue = 1.0
outvalue = 0.01
int_width = 100.0
variable = c
[../]
[]
[AuxVariables]
[./T]
[../]
[]
[Kernels]
[./c_int]
type = CHInterface
variable = c
kappa_name = kappa
mob_name = M
[../]
[./c_bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./c_soret]
type = SoretDiffusion
variable = c
T = T
diff_name = D
Q_name = Qstar
[../]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[]
[AuxKernels]
[./Temp]
type = FunctionAux
variable = T
function = 1000.0+0.025*x
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
block = 0
c = c
T = T # K
int_width = 80.0
length_scale = 1.0e-9
time_scale = 1.0e-6
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.708 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
block = 0
c = c
outputs = exodus
derivative_order = 3
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 10
l_tol = 1.0e-4
nl_max_its = 25
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 60
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/concentration_dependent_elasticity_tensor/concentration_dependent_elasticity_tensor.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -0.5
ymin = -0.5
xmax = 0.5
ymax = 0.5
elem_type = QUAD4
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
disp_x = disp_x
disp_y = disp_y
[../]
[]
[AuxVariables]
[./c]
[../]
[./C11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./s11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_s11]
type = RankTwoAux
variable = s11_aux
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./matl_C11]
type = RankFourAux
variable = C11_aux
rank_four_tensor = elasticity_tensor
index_l = 0
index_j = 0
index_k = 0
index_i = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeConcentrationDependentElasticityTensor
block = 0
c = c
C1_ijkl = '6 6'
C0_ijkl = '1 1'
fill_method1 = symmetric_isotropic
fill_method0 = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./strain]
type = ComputeSmallStrain
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.5
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-6
nl_abs_tol = 1.0e-8
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[ICs]
[./c_IC]
int_width = 0.2
x1 = 0
y1 = 0
radius = 0.25
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
(modules/phase_field/test/tests/PolynomialFreeEnergy/split_order6_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmin = 0
xmax = 125
[]
[GlobalParams]
polynomial_order = 6
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 60.0
variable = c
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
kappa_name = kappa
w = w
f_name = F
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = 1000 # K
int_width = 30.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.7 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 50
dt = 15
petsc_options_iname = -pc_type
petsc_options_value = lu
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/SoretDiffusion/split_temp.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmax = 500
elem_type = EDGE
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
[../]
[./w]
scaling = 1.0e2
[../]
[./T]
initial_condition = 1000.0
scaling = 1.0e5
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 125.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 100.0
variable = c
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
kappa_name = kappa
w = w
f_name = F
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./w_res_soret]
type = SoretDiffusion
variable = w
c = c
T = T
diff_name = D
Q_name = Qstar
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./HtCond]
type = MatDiffusion
variable = T
diffusivity = thermal_conductivity
[../]
[]
[BCs]
[./Left_T]
type = DirichletBC
variable = T
boundary = left
value = 1000.0
[../]
[./Right_T]
type = DirichletBC
variable = T
boundary = right
value = 1015.0
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
block = 0
c = c
T = T # K
int_width = 60.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.708 # Total guess
[../]
[./thcond]
type = ParsedMaterial
block = 0
coupled_variables = 'c'
expression = 'if(c>0.7,1e-8,4e-8)'
property_name = thermal_conductivity
outputs = exodus
[../]
[./free_energy]
type = PolynomialFreeEnergy
block = 0
c = c
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 25
nl_rel_tol = 1.0e-9
num_steps = 60
dt = 20.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialSolidification.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 28
ny = 28
xmin = -7
xmax = 7
ymin = -7
ymax = 7
uniform_refine = 2
[]
[GlobalParams]
radius = 0.2
int_width = 0.1
x1 = 0.0
y1 = 0.0
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./T]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w T'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w T'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./T_dot]
type = TimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = Diffusion
variable = T
[../]
[./etaa0_dot_T]
type = CoefCoupledTimeDerivative
variable = T
v = etaa0
coef = -5.0
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w T'
property_name = omegab
material_property_names = 'Vm kb cbeq S Tm'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq-S*(T-Tm)'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
anisotropy_strength = 0.05
kappa_bar = 0.05
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
anisotropy_strength = 0.05
kappa_bar = 0.05
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '33.33 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 5.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-10
end_time = 2.0
dtmax = 0.05
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 5
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 5
exodus = true
[]
(modules/phase_field/test/tests/SoretDiffusion/direct_temp.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 30
xmax = 500
elem_type = EDGE
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
family = HERMITE
order = THIRD
[../]
[./T]
initial_condition = 1000.0
scaling = 1.0e5
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 125.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 100.0
variable = c
[../]
[]
[Kernels]
[./c_int]
type = CHInterface
variable = c
kappa_name = kappa
mob_name = M
[../]
[./c_bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./c_soret]
type = SoretDiffusion
variable = c
T = T
diff_name = D
Q_name = Qstar
[../]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./HtCond]
type = MatDiffusion
variable = T
diffusivity = thermal_conductivity
[../]
[]
[BCs]
[./Left_T]
type = DirichletBC
variable = T
boundary = left
value = 1000.0
[../]
[./Right_T]
type = DirichletBC
variable = T
boundary = right
value = 1015.0
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = T # K
int_width = 60.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.708 # Total guess
[../]
[./thcond]
type = ParsedMaterial
coupled_variables = 'c'
expression = 'if(c>0.7,1e-8,4e-8)'
property_name = thermal_conductivity
outputs = exodus
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 3
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 25
nl_rel_tol = 1.0e-9
num_steps = 60
dt = 8.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/switchingfunctionmultiphasematerial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0
xmax = 30
ymin = 0
ymax = 30
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./eta1]
[../]
[./eta2]
[../]
[./eta3]
[../]
[./eta0]
[../]
[]
[ICs]
[./IC_eta2]
x1 = 0
y1 = 15
x2 = 30
y2 = 30
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta2
int_width = 0
[../]
[./IC_eta3]
x1 = 15
y1 = 0
x2 = 30
y2 = 15
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta3
int_width = 0
[../]
[./IC_eta4]
x1 = 0
y1 = 0
x2 = 15
y2 = 15
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta0
int_width = 0
[../]
[./IC_c]
x1 = 15
y1 = 15
radius = 8.0
outvalue = 0.05
variable = c
invalue = 1.0
type = SmoothCircleIC
int_width = 3.0
[../]
[./IC_eta1]
x1 = 15
y1 = 15
radius = 8.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
int_width = 3.0
[../]
[]
# Not evalulating time evolution to improve test performance, since we are only testing
# the material property. However, the kernel and free energy are left in place to allow
# this test to be easily turned in to a working example
#[Kernels]
# [./c_dot]
# type = CoupledTimeDerivative
# variable = w
# v = c
# [../]
# [./c_res]
# type = SplitCHParsed
# variable = c
# f_name = F
# kappa_name = kappa_c
# w = w
# coupled_variables = 'eta1 eta2 eta3 eta0'
# [../]
# [./w_res]
# # coupled_variables = 'c'
# type = SplitCHWRes
# variable = w
# mob_name = M
# [../]
# [./AC1_bulk]
# type = AllenCahn
# variable = eta1
# f_name = F
# coupled_variables = 'c eta2 eta3 eta0'
# [../]
# [./AC1_int]
# type = ACInterface
# variable = eta1
# kappa_name = kappa_s
# [../]
# [./e1_dot]
# type = TimeDerivative
# variable = eta1
# [../]
# [./AC2_bulk]
# type = AllenCahn
# variable = eta2
# f_name = F
# coupled_variables = 'c eta1 eta3 eta0'
# [../]
# [./AC2_int]
# type = ACInterface
# variable = eta2
# [../]
# [./e2_dot]
# type = TimeDerivative
# variable = eta2
# [../]
# [./AC3_bulk]
# type = AllenCahn
# variable = eta3
# f_name = F
# coupled_variables = 'c eta2 eta1 eta0'
# [../]
# [./AC3_int]
# type = ACInterface
# variable = eta3
# [../]
# [./e3_dot]
# type = TimeDerivative
# variable = eta3
# [../]
# [./AC4_bulk]
# type = AllenCahn
# variable = eta0
# f_name = F
# coupled_variables = 'c eta2 eta3 eta1'
# [../]
# [./AC4_int]
# type = ACInterface
# variable = eta0
# [../]
# [./e4_dot]
# type = TimeDerivative
# variable = eta0
# [../]
#[]
[Materials]
[./ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'eta0 eta1 eta2 eta3'
phase_etas = 'eta1'
outputs = exodus
[../]
[./hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'eta0 eta1 eta2 eta3'
phase_etas = 'eta0 eta2 eta3'
outputs = exodus
[../]
#[./ha]
# type = DerivativeParsedMaterial
# coupled_variables = 'eta1 eta2 eta3 eta0'
# property_name = ha_parsed
# expression = 'eta1^2/(eta1^2+eta2^2+eta3^2+eta0^2)'
# derivative_order = 2
# outputs = exodus
#[../]
#[./hb]
# type = DerivativeParsedMaterial
# coupled_variables = 'eta1 eta2 eta3 eta0'
# property_name = hb_parsed
# expression = '(eta2^2+eta3^2+eta0^2)/(eta1^2+eta2^2+eta3^2+eta0^2)'
# derivative_order = 2
# outputs = exodus
#[../]
#[./FreeEng]
# type = DerivativeParsedMaterial
# coupled_variables = 'c eta1 eta2 eta3 eta0'
# property_name = F
# constant_names = 'c1 c2 s g d e h z'
# constant_expressions = '1.0 0.0 1.5 1.5 1.0 1.0 1 1.0'
# material_property_names = 'ha(eta1,eta2,eta3,eta0) hb(eta1,eta2,eta3,eta0)'
# expression = 'a:=eta1^2/(eta1^2+eta2^2+eta3^2+eta0^2);f1:=ha*(c-c1)^2;b:=(eta2^2+eta3^2+eta0^2)/(eta1^2+eta2^2+eta3^2+eta0^2);f2:=hb*(c-c2)^2
# ;f3:=1/4*eta1^4-1/2*eta1^2+1/4*eta2^4-1/2*eta2^2+1/4*eta3^4-1/2*eta3^2+1/4*eta0^4-1/2*eta0^2
# ;f4:=z*s*(eta1^2*eta2^2+eta1^2*eta3^2+eta1^2*eta0^2)+g*(eta2^2*eta3^2+eta2^2*eta0^2+eta3^2*eta0^2);f:=1/4+e*f1+d*f2+h*(f3+f4);f'
# derivative_order = 2
#[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa_s kappa_op L M'
prop_values = '0 3 3 1.0 1.0'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Outputs]
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/combined/test/tests/multiphase_mechanics/gradientcomponent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[./v]
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.5
y1 = 0.5
radius = 0.2
invalue = 1
outvalue = 0
int_width = 0.2
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = v
[../]
[./dt]
type = TimeDerivative
variable = v
[../]
[./gradientcomponent]
type = GradientComponent
variable = u
v = v
component = 0
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
solve_type = 'NEWTON'
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
xmax = 50
ymin = 25
ymax = 50
[]
[Variables]
[./op]
[../]
[./v]
[../]
[]
[ICs]
[./op_IC]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 15.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
variable = op
[../]
[./v_IC]
type = BoundingBoxIC
x1 = 0.0
x2 = 25.0
y1 = 0.0
y2 = 50.0
inside = 1.0
outside = 0.0
variable = v
[../]
[]
[Kernels]
[./op_dot]
type = TimeDerivative
variable = op
[../]
[./op_bulk]
type = AllenCahn
variable = op
f_name = F
mob_name = L
coupled_variables = v
[../]
[./op_interface]
type = ACInterface
variable = op
kappa_name = 1
mob_name = L
coupled_variables = v
[../]
[./v_dot]
type = TimeDerivative
variable = v
[../]
[./v_diff]
type = MatDiffusion
variable = v
diffusivity = 50.0
[../]
[]
[Materials]
[./consts]
type = DerivativeParsedMaterial
property_name = L
expression = 'l:=0.1+1*(v+op)^2; if(l<0.01, 0.01, l)'
coupled_variables = 'op v'
outputs = exodus
output_properties = 'L dL/dop dL/dv'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'op'
expression = '2*op^2*(1-op)^2 - 0.2*op'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 15
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 0.2
[]
[Outputs]
time_step_interval = 5
print_linear_residuals = false
exodus = 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/phase_field_kernels/ADSplitCahnHilliard.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# The free energy used here has the same functional form as the SplitCHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_Cu_Split_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 60
ymin = 0
ymax = 60
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 30.0
invalue = 1.0
outvalue = -0.5
int_width = 30.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = ADSplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = ADSplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = ADCoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./pfmobility]
type = ADGenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '100 40'
[../]
[./free_energy]
type = ADMathFreeEnergy
f_name = F
c = 'c'
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
file_base = SplitCahnHilliard_out
[]
(modules/combined/test/tests/eigenstrain/variable.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmax = 0.5
ymax = 0.5
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxVariables]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./c]
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = e22_aux
[../]
[./eigen_strain00]
type = RankTwoAux
variable = eigen_strain00
rank_two_tensor = eigenstrain
index_j = 0
index_i = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.5*c^2
coupled_variables = c
outputs = exodus
output_properties = 'var_dep'
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
args = c
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[]
[BCs]
active = 'left_x bottom_y'
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.01
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-50
[]
[Outputs]
exodus = true
[]
[ICs]
[./c_IC]
int_width = 0.075
x1 = 0
y1 = 0
radius = 0.25
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
(modules/combined/test/tests/feature_volume_fraction/Avrami.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmax = 40
ymax = 40
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 20
y1 = 20
radius = 10
int_width = 1
invalue = 1
outvalue = 0
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[VectorPostprocessors]
[./feature_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = feature_counter
execute_on = 'initial timestep_end'
outputs = none
[../]
[]
[Postprocessors]
[./feature_counter]
type = FeatureFloodCount
variable = u
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[../]
[./Volume]
type = VolumePostprocessor
execute_on = 'initial'
[../]
[./Avrami]
type = FeatureVolumeFraction
execute_on = 'initial timestep_end'
mesh_volume = Volume
feature_volumes = feature_volumes
equil_fraction = 0.5
value_type = AVRAMI
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
[]
[Outputs]
csv = true
[]
(modules/combined/examples/phase_field-mechanics/Conserved.i)
#
# Example 1
# Illustrating the coupling between chemical and mechanical (elastic) driving forces.
# An oversized precipitate deforms under a uniaxial compressive stress
# Check the file below for comments and suggestions for parameter modifications.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 25.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./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
[../]
[]
#
# The AuxVariables and AuxKernels below are added to visualize the xx and yy stress tensor components
#
[AuxVariables]
[./sigma11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11_aux
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22_aux
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 5'
block = 0
#kappa = 0.1
#mob = 1e-3
[../]
# simple chemical free energy with a miscibility gap
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
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
enable_jit = true
derivative_order = 2
[../]
# undersized solute (voidlike)
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
# lambda, mu values
C_ijkl = '7 7'
# Stiffness tensor is created from lambda=7, mu=7 using symmetric_isotropic fill method
fill_method = symmetric_isotropic
# See RankFourTensor.h for details on fill methods
# '15 15' results in a high stiffness (the elastic free energy will dominate)
# '7 7' results in a low stiffness (the chemical free energy will dominate)
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
# eigenstrain coefficient
# -0.1 will result in an undersized precipitate
# 0.1 will result in an oversized precipitate
expression = 0.1*c
coupled_variables = c
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
#outputs = exodus
args = 'c'
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
derivative_order = 2
[../]
# Sum up chemical and elastic contributions
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
# prescribed displacement
# -5 will result in a compressive stress
# 5 will result in a tensile stress
value = -5
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[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
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 1
[../]
[]
[Outputs]
exodus = true
[]
(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/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/free_energy_material/CoupledValueFunctionFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 500
ymin = 0
ymax = 500
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[PolycrystalVariables]
[]
[]
[Functions]
[grain_growth_energy]
type = PiecewiseMultilinear
data_file = grain_growth_energy.data
[]
[grain_growth_mu0]
type = PiecewiseMultilinear
data_file = grain_growth_mu0.data
[]
[grain_growth_mu1]
type = PiecewiseMultilinear
data_file = grain_growth_mu1.data
[]
[grain_growth_mu2]
type = PiecewiseMultilinear
data_file = grain_growth_mu2.data
[]
[grain_growth_mu3]
type = PiecewiseMultilinear
data_file = grain_growth_mu3.data
[]
[matrix]
type = ParsedFunction
expression = '1-x-y-z'
[]
[]
[ICs]
[gr1]
type = SmoothCircleIC
variable = gr1
x1 = 0
y1 = 0
radius = 150
int_width = 90
invalue = 1
outvalue = 0
[]
[gr2]
type = SmoothCircleIC
variable = gr2
x1 = 500
y1 = 0
radius = 120
int_width = 90
invalue = 1
outvalue = 0
[]
[gr3]
type = SmoothCircleIC
variable = gr3
x1 = 250
y1 = 500
radius = 300
int_width = 90
invalue = 1
outvalue = 0
[]
[gr0]
type = CoupledValueFunctionIC
variable = gr0
v = 'gr1 gr2 gr3'
function = matrix
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[local_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[gr0dot]
type = TimeDerivative
variable = gr0
[]
[gr0bulk]
type = AllenCahn
variable = gr0
f_name = F
coupled_variables = 'gr1 gr2 gr3'
[]
[gr0int]
type = ACInterface
variable = gr0
kappa_name = kappa_op
[]
[gr1dot]
type = TimeDerivative
variable = gr1
[]
[gr1bulk]
type = AllenCahn
variable = gr1
f_name = F
coupled_variables = 'gr0 gr2 gr3'
[]
[gr1int]
type = ACInterface
variable = gr1
kappa_name = kappa_op
[]
[gr2dot]
type = TimeDerivative
variable = gr2
[]
[gr2bulk]
type = AllenCahn
variable = gr2
f_name = F
coupled_variables = 'gr0 gr1 gr3'
[]
[gr2int]
type = ACInterface
variable = gr2
kappa_name = kappa_op
[]
[gr3dot]
type = TimeDerivative
variable = gr3
[]
[gr3bulk]
type = AllenCahn
variable = gr3
f_name = F
coupled_variables = 'gr0 gr1 gr2'
[]
[gr3int]
type = ACInterface
variable = gr3
kappa_name = kappa_op
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
[]
[local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = 'kappa_op kappa_op kappa_op kappa_op'
interfacial_vars = 'gr0 gr1 gr2 gr3'
[]
[]
[Materials]
[Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[]
[Tabulated]
type = CoupledValueFunctionFreeEnergy
free_energy_function = grain_growth_energy
chemical_potential_functions = 'grain_growth_mu0 grain_growth_mu1 grain_growth_mu2 '
'grain_growth_mu3'
v = 'gr0 gr1 gr2 gr3'
[]
[]
[Postprocessors]
[total_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[]
[]
[Preconditioning]
[SMP]
type = SMP
coupled_groups = 'gr0,gr1 gr0,gr2 gr0,gr3'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 30
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 3
dt = 100.0
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/phase_field/test/tests/KKS_system/kks_example_split.i)
#
# KKS toy problem in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = -2.5
xmax = 2.5
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# hydrogen phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# hydrogen phase concentration (delta phase)
[./cd]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.2
outvalue = 0.1
int_width = 0.75
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.6
outvalue = 0.4
int_width = 0.75
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta w c cm cd'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^2'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.4 '
[../]
[]
[Kernels]
# full transient
active = 'PhaseConc ChemPotVacancies CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cm + h(eta)*cd
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fd
coupled_variables = 'cm cd'
w = 0.4
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 3
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example_split
exodus = true
[]
(modules/phase_field/test/tests/grain_tracker_test/grain_tracker_volume_single.i)
# This test calculates the volume of a few simple shapes
# Using the FeatureVolumeVectorPostprocessor
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = -2
xmax = 2
ymin = -2
ymax = 2
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./gr0]
[../]
[./gr1]
[../]
[]
[ICs]
[./circle]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 1
int_width = 0.01
invalue = 1
outvalue = 0
variable = gr0
[../]
[./boxes]
type = MultiBoundingBoxIC
corners = '-1.5 -0.25 0
1 -0.5 0'
opposite_corners = '-1 0.25 0
2 0.5 0'
inside = 1
outside = 0
variable = gr1
[../]
[]
[Postprocessors]
[./grain_tracker]
type = GrainTracker
variable = 'gr0 gr1'
threshold = 0.1
compute_var_to_feature_map = true
execute_on = 'initial'
[../]
[]
[VectorPostprocessors]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_tracker
single_feature_per_element = true
execute_on = 'initial'
[../]
[]
[Executioner]
type = Steady
[./Adaptivity]
initial_adaptivity = 3
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 3
[../]
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
csv = 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/examples/anisotropic_interfaces/ad_snow.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 14
xmax = 9
ymax = 9
uniform_refine = 3
[]
[Variables]
[./w]
[../]
[./T]
[../]
[]
[ICs]
[./wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 4.5
y1 = 4.5
radius = 0.07
outvalue = 0
invalue = 1
[../]
[]
[Kernels]
[./w_dot]
type = ADTimeDerivative
variable = w
[../]
[./anisoACinterface1]
type = ADACInterfaceKobayashi1
variable = w
mob_name = adM
[../]
[./anisoACinterface2]
type = ADACInterfaceKobayashi2
variable = w
mob_name = adM
[../]
[./AllenCahn]
type = AllenCahn
variable = w
mob_name = M
f_name = fbulk
coupled_variables = T
[../]
[./T_dot]
type = ADTimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = ADDiffusion
variable = T
[../]
[./w_dot_T]
type = ADCoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = pi
constant_expressions = 4*atan(1)
expression = 'm:=0.9 * atan(10 * (1 - T)) / pi; 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * w^2'
derivative_order = 2
outputs = exodus
[../]
[./material]
type = ADInterfaceOrientationMaterial
op = w
[../]
[./consts1]
type = ADGenericConstantMaterial
prop_names = 'adM'
prop_values = '3333.333'
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
nl_abs_tol = 1e-10
nl_rel_tol = 1e-08
l_max_its = 30
end_time = 1
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
iteration_window = 2
dt = 0.0005
growth_factor = 1.1
cutback_factor = 0.75
[../]
[./Adaptivity]
initial_adaptivity = 3 # Number of times mesh is adapted to initial condition
refine_fraction = 0.7 # Fraction of high error that will be refined
coarsen_fraction = 0.1 # Fraction of low error that will coarsened
max_h_level = 5 # Max number of refinements used, starting from initial mesh (before uniform refinement)
weight_names = 'w T'
weight_values = '1 0.5'
[../]
[]
[Outputs]
time_step_interval = 5
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/SimpleSplitCHWRes.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# The free energy used here has the same functional form as the SplitCHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_Cu_Split_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = 0
xmax = 250
ymin = 0
ymax = 250
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 30.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 = SimpleSplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1e-3 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
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 6
dt = 10
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/SmoothCircleIC_3D.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmax = 50
ymax = 50
zmax = 50
elem_type = HEX8
[]
[Variables]
[./c]
[../]
[]
[ICs]
[./c]
type = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 12
invalue = 1.0
outvalue = 0
int_width = 12
3D_spheres = false
z1 = 25
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./Diffusion]
type = MatDiffusion
variable = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 1.0
[../]
[]
[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 = 2.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/PolynomialFreeEnergy/split_order8_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmin = 0
xmax = 125
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 60.0
variable = c
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
kappa_name = kappa
w = w
f_name = F
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = 1000 # K
int_width = 30.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.7 # Total guess
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 50
dt = 15
petsc_options_iname = -pc_type
petsc_options_value = lu
[]
[Outputs]
exodus = true
[]
(modules/phase_field/include/ics/RndSmoothCircleIC.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SmoothCircleIC.h"
/**
* RndSmoothcircleIC creates a smooth circle with a random distribution
* of values inside and outside of the circle.
*/
class RndSmoothCircleIC : public SmoothCircleIC
{
public:
static InputParameters validParams();
RndSmoothCircleIC(const InputParameters & parameters);
private:
virtual Real computeCircleValue(const Point & p, const Point & center, const Real & radius);
const Real _variation_invalue;
const Real _variation_outvalue;
};
(modules/phase_field/include/ics/SmoothCircleICLinearizedInterface.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SmoothCircleIC.h"
/**
* SmoothCircleICLinearizedInterface creates a circle of a given radius centered at a given point in
* the domain. If int_width > zero, the border of the circle with smoothly transition from the
* invalue to the outvalue. It then transforms it with the linearized interface function.
*/
class SmoothCircleICLinearizedInterface : public SmoothCircleIC
{
public:
static InputParameters validParams();
SmoothCircleICLinearizedInterface(const InputParameters & parameters);
protected:
virtual Real value(const Point & p);
const Real _bound;
};