- f_nameSusceptibility function F defined in a FunctionMaterialC++ Type:MaterialPropertyName Unit:(no unit assumed) Controllable:No Description:Susceptibility function F defined in a FunctionMaterial 
- variableThe name of the variable that this residual object operates onC++ Type:NonlinearVariableName Unit:(no unit assumed) Controllable:No Description:The name of the variable that this residual object operates on 
SusceptibilityTimeDerivative / ADSusceptibilityTimeDerivative
A modified time derivative Kernel that multiplies the time derivative of a variable by a generalized susceptibility
SusceptibilityTimeDerivative (and its automatic differentiation version, ADSusceptibilityTimeDerivative) implements
where  (f_name) is a FunctionMaterial providing derivatives (for example defined using the DerivativeParsedMaterial),  is the kernel variable the time derivative is taken of, and  (args) are further arguments of the susceptibility function  which should contribute to off-diagonal Jacobian entries.
See also TimeDerivative.
Input Parameters
- blockThe list of blocks (ids or names) that this object will be appliedC++ Type:std::vector<SubdomainName> Controllable:No Description:The list of blocks (ids or names) that this object will be applied 
- coupled_variablesVector of variable arguments of the susceptibilityC++ Type:std::vector<VariableName> Unit:(no unit assumed) Controllable:No Description:Vector of variable arguments of the susceptibility 
- displacementsThe displacementsC++ Type:std::vector<VariableName> Unit:(no unit assumed) Controllable:No Description:The displacements 
- lumpingFalseTrue for mass matrix lumping, false otherwiseDefault:False C++ Type:bool Controllable:No Description:True for mass matrix lumping, false otherwise 
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)Default:False C++ Type:bool Controllable:No Description:Whether this object is only doing assembly to matrices (no vectors) 
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contributionC++ Type:std::vector<TagName> Controllable:No Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution 
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fillC++ Type:std::vector<TagName> Controllable:No Description:The extra tags for the matrices this Kernel should fill 
- extra_vector_tagsThe extra tags for the vectors this Kernel should fillC++ Type:std::vector<TagName> Controllable:No Description:The extra tags for the vectors this Kernel should fill 
- matrix_tagssystem timeThe tag for the matrices this Kernel should fillDefault:system time C++ Type:MultiMooseEnum Options:nontime, system, time Controllable:No Description:The tag for the matrices this Kernel should fill 
- vector_tagstimeThe tag for the vectors this Kernel should fillDefault:time C++ Type:MultiMooseEnum Options:nontime, time Controllable:No Description:The tag for the vectors this Kernel should fill 
Contribution To Tagged Field Data 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. 
- diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)C++ Type:std::vector<AuxVariableName> Unit:(no unit assumed) Controllable:No Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.) 
- enableTrueSet the enabled status of the MooseObject.Default:True C++ Type:bool Controllable:Yes Description:Set the enabled status of the MooseObject. 
- implicitTrueDetermines whether this object is calculated using an implicit or explicit formDefault:True C++ Type:bool Controllable:No Description:Determines whether this object is calculated using an implicit or explicit form 
- save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)C++ Type:std::vector<AuxVariableName> Unit:(no unit assumed) Controllable:No Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.) 
- search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).Default:nearest_node_connected_sides C++ Type:MooseEnum Options:nearest_node_connected_sides, all_proximate_sides Controllable:No Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes). 
- seed0The seed for the master random number generatorDefault:0 C++ Type:unsigned int Controllable:No Description:The seed for the master random number generator 
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.Default:False C++ Type:bool Controllable:No Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used. 
Advanced Parameters
- 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 Unit:(no unit assumed) Controllable:No Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character. 
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.Default:False C++ Type:bool Controllable:No Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction. 
Material Property Retrieval Parameters
Input Files
- (modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropy.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialPFM.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialSolidification.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialTwophaseAnisotropy.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropyAntitrap.i)
- (modules/phase_field/examples/anisotropic_interfaces/echebarria_iso.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
(modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 60
  xmin = -15
  xmax = 15
[]
[Variables]
  [./w]
  [../]
  [./etaa0]
  [../]
  [./etab0]
  [../]
  [./etad0]
  [../]
[]
[ICs]
  [./IC_etaa0]
    type = FunctionIC
    variable = etaa0
    function = ic_func_etaa0
  [../]
  [./IC_etab0]
    type = FunctionIC
    variable = etab0
    function = ic_func_etab0
  [../]
  [./IC_etad0]
    type = ConstantIC
    variable = etad0
    value = 0.1
  [../]
  [./IC_w]
    type = FunctionIC
    variable = w
    function = ic_func_w
  [../]
[]
[Functions]
  [./ic_func_etaa0]
    type = ParsedFunction
    expression = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
  [../]
  [./ic_func_etab0]
    type = ParsedFunction
    expression = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
  [../]
  [./ic_func_w]
    type = ParsedFunction
    expression = 0
  [../]
[]
[Kernels]
# Order parameter eta_alpha0
  [./ACa0_bulk]
    type = ACGrGrMulti
    variable = etaa0
    v =           'etab0 etad0'
    gamma_names = 'gab   gad'
  [../]
  [./ACa0_sw]
    type = ACSwitching
    variable = etaa0
    Fj_names  = 'omegaa omegab omegad'
    hj_names  = 'ha     hb     hd'
    coupled_variables = 'etab0 etad0 w'
  [../]
  [./ACa0_int]
    type = ACInterface
    variable = etaa0
    kappa_name = kappa
  [../]
  [./ea0_dot]
    type = TimeDerivative
    variable = etaa0
  [../]
# Order parameter eta_beta0
  [./ACb0_bulk]
    type = ACGrGrMulti
    variable = etab0
    v =           'etaa0 etad0'
    gamma_names = 'gab   gbd'
  [../]
  [./ACb0_sw]
    type = ACSwitching
    variable = etab0
    Fj_names  = 'omegaa omegab omegad'
    hj_names  = 'ha     hb     hd'
    coupled_variables = 'etaa0 etad0 w'
  [../]
  [./ACb0_int]
    type = ACInterface
    variable = etab0
    kappa_name = kappa
  [../]
  [./eb0_dot]
    type = TimeDerivative
    variable = etab0
  [../]
# Order parameter eta_delta0
  [./ACd0_bulk]
    type = ACGrGrMulti
    variable = etad0
    v =           'etaa0 etab0'
    gamma_names = 'gad   gbd'
  [../]
  [./ACd0_sw]
    type = ACSwitching
    variable = etad0
    Fj_names  = 'omegaa omegab omegad'
    hj_names  = 'ha     hb     hd'
    coupled_variables = 'etaa0 etab0 w'
  [../]
  [./ACd0_int]
    type = ACInterface
    variable = etad0
    kappa_name = kappa
  [../]
  [./ed0_dot]
    type = TimeDerivative
    variable = etad0
  [../]
#Chemical potential
  [./w_dot]
    type = SusceptibilityTimeDerivative
    variable = w
    f_name = chi
    coupled_variables = 'etaa0 etab0 etad0'
  [../]
  [./Diffusion]
    type = MatDiffusion
    variable = w
    diffusivity = Dchi
    args = ''
  [../]
  [./coupled_etaa0dot]
    type = CoupledSwitchingTimeDerivative
    variable = w
    v = etaa0
    Fj_names = 'rhoa rhob rhod'
    hj_names = 'ha   hb   hd'
    coupled_variables = 'etaa0 etab0 etad0'
  [../]
  [./coupled_etab0dot]
    type = CoupledSwitchingTimeDerivative
    variable = w
    v = etab0
    Fj_names = 'rhoa rhob rhod'
    hj_names = 'ha   hb   hd'
    coupled_variables = 'etaa0 etab0 etad0'
  [../]
  [./coupled_etad0dot]
    type = CoupledSwitchingTimeDerivative
    variable = w
    v = etad0
    Fj_names = 'rhoa rhob rhod'
    hj_names = 'ha   hb   hd'
    coupled_variables = 'etaa0 etab0 etad0'
  [../]
[]
[Materials]
  [./ha_test]
    type = SwitchingFunctionMultiPhaseMaterial
    h_name = ha
    all_etas = 'etaa0 etab0 etad0'
    phase_etas = 'etaa0'
  [../]
  [./hb_test]
    type = SwitchingFunctionMultiPhaseMaterial
    h_name = hb
    all_etas = 'etaa0 etab0 etad0'
    phase_etas = 'etab0'
  [../]
  [./hd_test]
    type = SwitchingFunctionMultiPhaseMaterial
    h_name = hd
    all_etas = 'etaa0 etab0 etad0'
    phase_etas = 'etad0'
  [../]
  [./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'
    derivative_order = 2
  [../]
  [./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'
    derivative_order = 2
  [../]
  [./omegad]
    type = DerivativeParsedMaterial
    coupled_variables = 'w'
    property_name = omegad
    material_property_names = 'Vm kd cdeq'
    expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
    derivative_order = 2
  [../]
  [./rhoa]
    type = DerivativeParsedMaterial
    coupled_variables = 'w'
    property_name = rhoa
    material_property_names = 'Vm ka caeq'
    expression = 'w/Vm^2/ka + caeq/Vm'
    derivative_order = 2
  [../]
  [./rhob]
    type = DerivativeParsedMaterial
    coupled_variables = 'w'
    property_name = rhob
    material_property_names = 'Vm kb cbeq'
    expression = 'w/Vm^2/kb + cbeq/Vm'
    derivative_order = 2
  [../]
  [./rhod]
    type = DerivativeParsedMaterial
    coupled_variables = 'w'
    property_name = rhod
    material_property_names = 'Vm kd cdeq'
    expression = 'w/Vm^2/kd + cdeq/Vm'
    derivative_order = 2
  [../]
  [./c]
    type = ParsedMaterial
    material_property_names = 'Vm rhoa rhob rhod ha hb hd'
    expression = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
    property_name = c
  [../]
  [./const]
    type = GenericConstantMaterial
    prop_names =  'kappa_c  kappa   L   D    Vm   ka    caeq kb    cbeq  kd    cdeq  gab gad gbd  mu  tgrad_corr_mult'
    prop_values = '0        1       1.0 1.0  1.0  10.0  0.1  10.0  0.9   10.0  0.5   1.5 1.5 1.5  1.0 0.0'
  [../]
  [./Mobility]
    type = DerivativeParsedMaterial
    property_name = Dchi
    material_property_names = 'D chi'
    expression = 'D*chi'
    derivative_order = 2
  [../]
  [./chi]
    type = DerivativeParsedMaterial
    property_name = chi
    material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
    expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
    coupled_variables = 'etaa0 etab0 etad0'
    derivative_order = 2
  [../]
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
  [../]
[]
[VectorPostprocessors]
  [./etaa0]
    type = LineValueSampler
    variable = etaa0
    start_point = '-15 0 0'
    end_point = '15 0 0'
    num_points = 61
    sort_by = x
    execute_on = 'initial timestep_end final'
  [../]
  [./etab0]
    type = LineValueSampler
    variable = etab0
    start_point = '-15 0 0'
    end_point = '15 0 0'
    num_points = 61
    sort_by = x
    execute_on = 'initial timestep_end final'
  [../]
  [./etad0]
    type = LineValueSampler
    variable = etad0
    start_point = '-15 0 0'
    end_point = '15 0 0'
    num_points = 61
    sort_by = x
    execute_on = 'initial timestep_end final'
  [../]
[]
[Executioner]
  type = Transient
  nl_max_its = 15
  scheme = bdf2
  solve_type = PJFNK
  petsc_options_iname = -pc_type
  petsc_options_value = asm
  l_max_its = 15
  l_tol = 1.0e-3
  nl_rel_tol = 1.0e-8
  start_time = 0.0
  num_steps = 20
  nl_abs_tol = 1e-10
  dt = 1.0
[]
[Outputs]
  [./exodus]
    type = Exodus
    execute_on = 'initial timestep_end final'
    time_step_interval = 1
  [../]
  [./csv]
    type = CSV
    execute_on = 'initial timestep_end final'
    time_step_interval = 1
  [../]
[]
(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/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 20
  ny = 20
  xmin = -20
  xmax = 20
  ymin = -20
  ymax = 20
[]
[GlobalParams]
  op_num = 2
  var_name_base = etab
[]
[Variables]
  [w]
  []
  [etaa0]
  []
  [etab0]
  []
  [etab1]
  []
[]
[AuxVariables]
  [bnds]
    order = FIRST
    family = LAGRANGE
  []
[]
[ICs]
  [IC_etaa0]
    type = FunctionIC
    variable = etaa0
    function = ic_func_etaa0
  []
  [IC_etab0]
    type = FunctionIC
    variable = etab0
    function = ic_func_etab0
  []
  [IC_etab1]
    type = FunctionIC
    variable = etab1
    function = ic_func_etab1
  []
  [IC_w]
    type = ConstantIC
    value = -0.05
    variable = w
  []
[]
[Functions]
  [ic_func_etaa0]
    type = ADParsedFunction
    value = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
  []
  [ic_func_etab0]
    type = ADParsedFunction
    value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
  []
  [ic_func_etab1]
    type = ADParsedFunction
    value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
  []
[]
[BCs]
[]
[Kernels]
  # Order parameter eta_alpha0
  [ACa0_bulk]
    type = ADACGrGrMulti
    variable = etaa0
    v = 'etab0 etab1'
    gamma_names = 'gab   gab'
  []
  [ACa0_sw]
    type = ADACSwitching
    variable = etaa0
    Fj_names = 'omegaa omegab'
    hj_names = 'ha     hb'
  []
  [ACa0_int]
    type = ADACInterface
    variable = etaa0
    kappa_name = kappa
    variable_L = false
  []
  [ea0_dot]
    type = ADTimeDerivative
    variable = etaa0
  []
  # Order parameter eta_beta0
  [ACb0_bulk]
    type = ADACGrGrMulti
    variable = etab0
    v = 'etaa0 etab1'
    gamma_names = 'gab   gbb'
  []
  [ACb0_sw]
    type = ADACSwitching
    variable = etab0
    Fj_names = 'omegaa omegab'
    hj_names = 'ha     hb'
  []
  [ACb0_int]
    type = ADACInterface
    variable = etab0
    kappa_name = kappa
    variable_L = false
  []
  [eb0_dot]
    type = ADTimeDerivative
    variable = etab0
  []
  # Order parameter eta_beta1
  [ACb1_bulk]
    type = ADACGrGrMulti
    variable = etab1
    v = 'etaa0 etab0'
    gamma_names = 'gab   gbb'
  []
  [ACb1_sw]
    type = ADACSwitching
    variable = etab1
    Fj_names = 'omegaa omegab'
    hj_names = 'ha     hb'
  []
  [ACb1_int]
    type = ADACInterface
    variable = etab1
    kappa_name = kappa
    variable_L = false
  []
  [eb1_dot]
    type = ADTimeDerivative
    variable = etab1
  []
  #Chemical potential
  [w_dot]
    type = ADSusceptibilityTimeDerivative
    variable = w
    f_name = chi
  []
  [Diffusion]
    type = ADMatDiffusion
    variable = w
    diffusivity = Dchi
  []
  [coupled_etaa0dot]
    type = ADCoupledSwitchingTimeDerivative
    variable = w
    v = etaa0
    Fj_names = 'rhoa rhob'
    hj_names = 'ha   hb'
    coupled_variables = 'etaa0 etab0 etab1'
  []
  [coupled_etab0dot]
    type = ADCoupledSwitchingTimeDerivative
    variable = w
    v = etab0
    Fj_names = 'rhoa rhob'
    hj_names = 'ha   hb'
    coupled_variables = 'etaa0 etab0 etab1'
  []
  [coupled_etab1dot]
    type = ADCoupledSwitchingTimeDerivative
    variable = w
    v = etab1
    Fj_names = 'rhoa rhob'
    hj_names = 'ha   hb'
    coupled_variables = 'etaa0 etab0 etab1'
  []
[]
[AuxKernels]
  [BndsCalc]
    type = BndsCalcAux
    variable = bnds
    execute_on = timestep_end
  []
[]
# 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
[Materials]
  [ha]
    type = ADSwitchingFunctionMultiPhaseMaterial
    h_name = ha
    all_etas = 'etaa0 etab0 etab1'
    phase_etas = 'etaa0'
  []
  [hb]
    type = ADSwitchingFunctionMultiPhaseMaterial
    h_name = hb
    all_etas = 'etaa0 etab0 etab1'
    phase_etas = 'etab0 etab1'
  []
  [omegaa]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = omegaa
    material_property_names = 'Vm ka caeq'
    expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
    derivative_order = 2
  []
  [omegab]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = omegab
    material_property_names = 'Vm kb cbeq'
    expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
    derivative_order = 2
  []
  [rhoa]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = rhoa
    material_property_names = 'Vm ka caeq'
    expression = 'w/Vm^2/ka + caeq/Vm'
    derivative_order = 2
  []
  [rhob]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = rhob
    material_property_names = 'Vm kb cbeq'
    expression = 'w/Vm^2/kb + cbeq/Vm'
    derivative_order = 2
  []
  [const]
    type = ADGenericConstantMaterial
    prop_names = 'kappa_c  kappa   L   D    chi  Vm   ka    caeq kb    cbeq  gab gbb mu'
    prop_values = '0        1       1.0 1.0  1.0  1.0  10.0  0.1  10.0  0.9   4.5 1.5 1.0'
  []
  [Mobility]
    type = ADDerivativeParsedMaterial
    f_name = Dchi
    material_property_names = 'D chi'
    expression = 'D*chi'
    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_tol = 1.0e-3
  nl_rel_tol = 1.0e-8
  nl_abs_tol = 1e-8
  num_steps = 2
  [TimeStepper]
    type = TimeSequenceStepper
    time_sequence = '0.1 0.21'
  []
[]
[Outputs]
  exodus = true
  file_base = GrandPotentialMultiphase_out
[]
(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/examples/multiphase/GrandPotential3Phase_AD.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 60
  xmin = -15
  xmax = 15
[]
[Variables]
  [w]
  []
  [etaa0]
  []
  [etab0]
  []
  [etad0]
  []
[]
[ICs]
  [IC_etaa0]
    type = FunctionIC
    variable = etaa0
    function = ic_func_etaa0
  []
  [IC_etab0]
    type = FunctionIC
    variable = etab0
    function = ic_func_etab0
  []
  [IC_etad0]
    type = ConstantIC
    variable = etad0
    value = 0.1
  []
  [IC_w]
    type = FunctionIC
    variable = w
    function = ic_func_w
  []
[]
[Functions]
  [ic_func_etaa0]
    type = ADParsedFunction
    value = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
  []
  [ic_func_etab0]
    type = ADParsedFunction
    value = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
  []
  [ic_func_w]
    type = ADParsedFunction
    value = 0
  []
[]
[Kernels]
# Order parameter eta_alpha0
  [ACa0_bulk]
    type = ADACGrGrMulti
    variable = etaa0
    v =           'etab0 etad0'
    gamma_names = 'gab   gad'
  []
  [ACa0_sw]
    type = ADACSwitching
    variable = etaa0
    Fj_names  = 'omegaa omegab omegad'
    hj_names  = 'ha     hb     hd'
  []
  [ACa0_int]
    type = ADACInterface
    variable = etaa0
    kappa_name = kappa
    variable_L = false
  []
  [ea0_dot]
    type = ADTimeDerivative
    variable = etaa0
  []
# Order parameter eta_beta0
  [ACb0_bulk]
    type = ADACGrGrMulti
    variable = etab0
    v =           'etaa0 etad0'
    gamma_names = 'gab   gbd'
  []
  [ACb0_sw]
    type = ADACSwitching
    variable = etab0
    Fj_names  = 'omegaa omegab omegad'
    hj_names  = 'ha     hb     hd'
  []
  [ACb0_int]
    type = ADACInterface
    variable = etab0
    kappa_name = kappa
    variable_L = false
  []
  [eb0_dot]
    type = ADTimeDerivative
    variable = etab0
  []
# Order parameter eta_delta0
  [ACd0_bulk]
    type = ADACGrGrMulti
    variable = etad0
    v =           'etaa0 etab0'
    gamma_names = 'gad   gbd'
  []
  [ACd0_sw]
    type = ADACSwitching
    variable = etad0
    Fj_names  = 'omegaa omegab omegad'
    hj_names  = 'ha     hb     hd'
  []
  [ACd0_int]
    type = ADACInterface
    variable = etad0
    kappa_name = kappa
    variable_L = false
  []
  [ed0_dot]
    type = ADTimeDerivative
    variable = etad0
  []
#Chemical potential
  [w_dot]
    type = ADSusceptibilityTimeDerivative
    variable = w
    f_name = chi
  []
  [Diffusion]
    type = ADMatDiffusion
    variable = w
    diffusivity = Dchi
  []
  [coupled_etaa0dot]
    type = ADCoupledSwitchingTimeDerivative
    variable = w
    v = etaa0
    Fj_names = 'rhoa rhob rhod'
    hj_names = 'ha   hb   hd'
    coupled_variables = 'etaa0 etab0 etad0'
  []
  [coupled_etab0dot]
    type = ADCoupledSwitchingTimeDerivative
    variable = w
    v = etab0
    Fj_names = 'rhoa rhob rhod'
    hj_names = 'ha   hb   hd'
    coupled_variables = 'etaa0 etab0 etad0'
  []
  [coupled_etad0dot]
    type = ADCoupledSwitchingTimeDerivative
    variable = w
    v = etad0
    Fj_names = 'rhoa rhob rhod'
    hj_names = 'ha   hb   hd'
    coupled_variables = 'etaa0 etab0 etad0'
  []
[]
[Materials]
  [ha_test]
    type = ADSwitchingFunctionMultiPhaseMaterial
    h_name = ha
    all_etas = 'etaa0 etab0 etad0'
    phase_etas = 'etaa0'
  []
  [hb_test]
    type = ADSwitchingFunctionMultiPhaseMaterial
    h_name = hb
    all_etas = 'etaa0 etab0 etad0'
    phase_etas = 'etab0'
  []
  [hd_test]
    type = ADSwitchingFunctionMultiPhaseMaterial
    h_name = hd
    all_etas = 'etaa0 etab0 etad0'
    phase_etas = 'etad0'
  []
  [omegaa]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = omegaa
    material_property_names = 'Vm ka caeq'
    function = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
    derivative_order = 2
  []
  [omegab]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = omegab
    material_property_names = 'Vm kb cbeq'
    function = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
    derivative_order = 2
  []
  [omegad]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = omegad
    material_property_names = 'Vm kd cdeq'
    function = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
    derivative_order = 2
  []
  [rhoa]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = rhoa
    material_property_names = 'Vm ka caeq'
    function = 'w/Vm^2/ka + caeq/Vm'
    derivative_order = 2
  []
  [rhob]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = rhob
    material_property_names = 'Vm kb cbeq'
    function = 'w/Vm^2/kb + cbeq/Vm'
    derivative_order = 2
  []
  [rhod]
    type = ADDerivativeParsedMaterial
    coupled_variables = 'w'
    f_name = rhod
    material_property_names = 'Vm kd cdeq'
    function = 'w/Vm^2/kd + cdeq/Vm'
    derivative_order = 2
  []
  [c]
    type = ADParsedMaterial
    material_property_names = 'Vm rhoa rhob rhod ha hb hd'
    function = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
    f_name = c
  []
  [const]
    type = ADGenericConstantMaterial
    prop_names =  'kappa_c  kappa   L   D    Vm   ka    caeq kb    cbeq  kd    cdeq  gab gad gbd  mu  tgrad_corr_mult'
    prop_values = '0        1       1.0 1.0  1.0  10.0  0.1  10.0  0.9   10.0  0.5   1.5 1.5 1.5  1.0 0.0'
  []
  [Mobility]
    type = ADDerivativeParsedMaterial
    f_name = Dchi
    material_property_names = 'D chi'
    function = 'D*chi'
    derivative_order = 2
  []
  [chi]
    type = ADDerivativeParsedMaterial
    f_name = chi
    material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
    function = '(ha/ka + hb/kb + hd/kd) / Vm^2'
    coupled_variables = 'etaa0 etab0 etad0'
    derivative_order = 2
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [etaa0]
    type = LineValueSampler
    variable = etaa0
    start_point = '-15 0 0'
    end_point = '15 0 0'
    num_points = 61
    sort_by = x
    execute_on = 'initial timestep_end final'
  []
  [etab0]
    type = LineValueSampler
    variable = etab0
    start_point = '-15 0 0'
    end_point = '15 0 0'
    num_points = 61
    sort_by = x
    execute_on = 'initial timestep_end final'
  []
  [etad0]
    type = LineValueSampler
    variable = etad0
    start_point = '-15 0 0'
    end_point = '15 0 0'
    num_points = 61
    sort_by = x
    execute_on = 'initial timestep_end final'
  []
[]
[Executioner]
  type = Transient
  nl_max_its = 15
  scheme = bdf2
  solve_type = NEWTON
  petsc_options_iname = -pc_type
  petsc_options_value = lu
  l_max_its = 15
  l_tol = 1.0e-3
  nl_rel_tol = 1.0e-8
  start_time = 0.0
  num_steps = 20
  nl_abs_tol = 1e-10
  dt = 1.0
[]
[Outputs]
  [exodus]
    type = Exodus
    execute_on = 'initial timestep_end final'
    time_step_interval = 1
  []
  [csv]
    type = CSV
    execute_on = 'initial timestep_end final'
    time_step_interval = 1
  []
[]
(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/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/GrandPotentialPFM/GrandPotentialMultiphase.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 20
  ny = 20
  xmin = -20
  xmax = 20
  ymin = -20
  ymax = 20
[]
[GlobalParams]
  op_num = 2
  var_name_base = etab
[]
[Variables]
  [w]
  []
  [etaa0]
  []
  [etab0]
  []
  [etab1]
  []
[]
[AuxVariables]
  [bnds]
    order = FIRST
    family = LAGRANGE
  []
[]
[ICs]
  [IC_etaa0]
    type = FunctionIC
    variable = etaa0
    function = ic_func_etaa0
  []
  [IC_etab0]
    type = FunctionIC
    variable = etab0
    function = ic_func_etab0
  []
  [IC_etab1]
    type = FunctionIC
    variable = etab1
    function = ic_func_etab1
  []
  [IC_w]
    type = ConstantIC
    value = -0.05
    variable = w
  []
[]
[Functions]
  [ic_func_etaa0]
    type = ParsedFunction
    expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
  []
  [ic_func_etab0]
    type = ParsedFunction
    expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
  []
  [ic_func_etab1]
    type = ParsedFunction
    expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
  []
[]
[BCs]
[]
[Kernels]
  # Order parameter eta_alpha0
  [ACa0_bulk]
    type = ACGrGrMulti
    variable = etaa0
    v = 'etab0 etab1'
    gamma_names = 'gab   gab'
  []
  [ACa0_sw]
    type = ACSwitching
    variable = etaa0
    Fj_names = 'omegaa omegab'
    hj_names = 'ha     hb'
    coupled_variables = 'etab0 etab1 w'
  []
  [ACa0_int]
    type = ACInterface
    variable = etaa0
    kappa_name = kappa
  []
  [ea0_dot]
    type = TimeDerivative
    variable = etaa0
  []
  # Order parameter eta_beta0
  [ACb0_bulk]
    type = ACGrGrMulti
    variable = etab0
    v = 'etaa0 etab1'
    gamma_names = 'gab   gbb'
  []
  [ACb0_sw]
    type = ACSwitching
    variable = etab0
    Fj_names = 'omegaa omegab'
    hj_names = 'ha     hb'
    coupled_variables = 'etaa0 etab1 w'
  []
  [ACb0_int]
    type = ACInterface
    variable = etab0
    kappa_name = kappa
  []
  [eb0_dot]
    type = TimeDerivative
    variable = etab0
  []
  # Order parameter eta_beta1
  [ACb1_bulk]
    type = ACGrGrMulti
    variable = etab1
    v = 'etaa0 etab0'
    gamma_names = 'gab   gbb'
  []
  [ACb1_sw]
    type = ACSwitching
    variable = etab1
    Fj_names = 'omegaa omegab'
    hj_names = 'ha     hb'
    coupled_variables = 'etaa0 etab0 w'
  []
  [ACb1_int]
    type = ACInterface
    variable = etab1
    kappa_name = kappa
  []
  [eb1_dot]
    type = TimeDerivative
    variable = etab1
  []
  #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 etab1'
  []
  [coupled_etab0dot]
    type = CoupledSwitchingTimeDerivative
    variable = w
    v = etab0
    Fj_names = 'rhoa rhob'
    hj_names = 'ha   hb'
    coupled_variables = 'etaa0 etab0 etab1'
  []
  [coupled_etab1dot]
    type = CoupledSwitchingTimeDerivative
    variable = w
    v = etab1
    Fj_names = 'rhoa rhob'
    hj_names = 'ha   hb'
    coupled_variables = 'etaa0 etab0 etab1'
  []
[]
[AuxKernels]
  [BndsCalc]
    type = BndsCalcAux
    variable = bnds
    execute_on = timestep_end
  []
[]
# 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
[Materials]
  [ha]
    type = SwitchingFunctionMultiPhaseMaterial
    h_name = ha
    all_etas = 'etaa0 etab0 etab1'
    phase_etas = 'etaa0'
  []
  [hb]
    type = SwitchingFunctionMultiPhaseMaterial
    h_name = hb
    all_etas = 'etaa0 etab0 etab1'
    phase_etas = 'etab0 etab1'
  []
  [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'
    derivative_order = 2
    enable_jit = false
  []
  [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'
    derivative_order = 2
    enable_jit = false
  []
  [rhoa]
    type = DerivativeParsedMaterial
    coupled_variables = 'w'
    property_name = rhoa
    material_property_names = 'Vm ka caeq'
    expression = 'w/Vm^2/ka + caeq/Vm'
    derivative_order = 2
    enable_jit = false
  []
  [rhob]
    type = DerivativeParsedMaterial
    coupled_variables = 'w'
    property_name = rhob
    material_property_names = 'Vm kb cbeq'
    expression = 'w/Vm^2/kb + cbeq/Vm'
    derivative_order = 2
    enable_jit = false
  []
  [const]
    type = GenericConstantMaterial
    prop_names = 'kappa_c  kappa   L   D    chi  Vm   ka    caeq kb    cbeq  gab gbb mu'
    prop_values = '0        1       1.0 1.0  1.0  1.0  10.0  0.1  10.0  0.9   4.5 1.5 1.0'
  []
  [Mobility]
    type = DerivativeParsedMaterial
    property_name = Dchi
    material_property_names = 'D chi'
    expression = 'D*chi'
    derivative_order = 2
    enable_jit = false
  []
[]
[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 = 2
  [TimeStepper]
    type = TimeSequenceStepper
    time_sequence = '0.1 0.21'
  []
[]
[Outputs]
  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/examples/anisotropic_interfaces/echebarria_iso.i)
#This example implements an isotropic, isothermal version of the
#binary alloy solidification model of Echebarria et al.,
#Physical Review E, 70, 061604 (2004). The governing equations are (132)-(133)
#Temperature gradient, pulling velocity, and interfacial energy anisotropy
#are not included.
#The sinusoidal perturbation at the interface decays appproximately
#exponentially with approximate decay constant 1.55e-4, in agreement
#with linear stability analysis
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 120
  ny = 300
  xmin = 0
  xmax = 96
  ymin = 0
  ymax = 240
[]
[GlobalParams]
  enable_jit = true
  derivative_order = 2
[]
[Variables]
  [phi]
  []
  [U]
  []
[]
[AuxVariables]
  [c]
  []
[]
[ICs]
  [phi_IC]
    type = FunctionIC
    variable = phi
    function = ic_func_phi
  []
  [U_IC]
    type = FunctionIC
    variable = U
    function = ic_func_U
  []
[]
[Functions]
  [ic_func_phi]
    type = ParsedFunction
    symbol_names = 'midpoint lambda A'
    symbol_values = '40       96     8'
    expression = 'tanh(-(y - (midpoint + A * cos(2 * pi * x / lambda))) / sqrt(2))'
  []
  [ic_func_U]
    type = ParsedFunction
    expression = '0'
  []
[]
[Kernels]
  # Order parameter phi
  [AC_dphi_dt]
    type = SusceptibilityTimeDerivative
    variable = phi
    f_name = dphi_dt_pre
  []
  [AC_grad]
    type = MatDiffusion
    variable = phi
    diffusivity = as_sq
  []
  [AC_floc]
    type = AllenCahn
    variable = phi
    f_name = f_loc
    mob_name = L
    coupled_variables = 'U'
  []
  #dimensionless supersaturation U
  [diff_dU_dt]
    type = SusceptibilityTimeDerivative
    variable = U
    f_name = dU_dt_pre
    coupled_variables = 'phi'
  []
  [diff_grad]
    type = MatDiffusion
    variable = U
    diffusivity = D_interp
    args = 'phi'
  []
  [diff_antitrapping]
    type = AntitrappingCurrent
    variable = U
    v = phi
    f_name = antitrap_pre
  []
  [diff_dphidt]
    type = CoupledSusceptibilityTimeDerivative
    variable = U
    v = phi
    f_name = coupled_pre
  []
[]
[AuxKernels]
  [c_aux]
    type = ParsedAux
    variable = c
    constant_names = 'c_l   k'
    constant_expressions = '0.33  0.1712'
    coupled_variables = 'phi U'
    expression = '(1 + (1-k) * U) / 2 * c_l * (1+k - (1-k)*phi)'
  []
[]
[Materials]
  [dphi_dt_pre_material]
    type = DerivativeParsedMaterial
    property_name = dphi_dt_pre
    material_property_names = 'as_sq(phi) k'
    expression = '(1-(1-k)*0) * as_sq'
  []
  [as_sq_material]
    type = DerivativeParsedMaterial
    property_name = as_sq
    expression = '1'
  []
  [f_loc_material]
    type = DerivativeParsedMaterial
    property_name = f_loc
    coupled_variables = 'phi U'
    constant_names = 'a1'
    constant_expressions = '5*sqrt(2)/8'
    material_property_names = 'epsilon'
    expression = '-phi^2/2 + phi^4/4 + a1 * epsilon * (phi - 2*phi^3/3 + phi^5/5) * U'
  []
  [dU_dt_pre_material]
    type = DerivativeParsedMaterial
    property_name = dU_dt_pre
    coupled_variables = 'phi'
    material_property_names = 'k'
    expression = '(1+k)/2 - (1-k)/2 * phi'
  []
  [D_interp_material]
    type = DerivativeParsedMaterial
    property_name = D_interp
    coupled_variables = 'phi'
    material_property_names = 'epsilon'
    constant_names = '      a1           a2'
    constant_expressions = '5*sqrt(2)/8  0.6267'
    expression = 'a1 * a2 * epsilon * (1-phi)/2'
    # expression = 'a1 * a2 * epsilon'
    output_properties = 'D_interp'
    outputs = 'exodus'
  []
  [antitrap_pre_material]
    type = DerivativeParsedMaterial
    property_name = antitrap_pre
    coupled_variables = 'U'
    material_property_names = 'k'
    expression = '1/(2*sqrt(2)) * (1 + (1-k) * U)'
  []
  [coupled_pre_material]
    type = DerivativeParsedMaterial
    property_name = coupled_pre
    coupled_variables = 'U'
    material_property_names = 'k'
    expression = '- (1 + (1-k) * U) / 2'
  []
  [const]
    type = GenericConstantMaterial
    prop_names = ' L   k      epsilon'
    prop_values = '1.0 0.1712 30     '
  []
[]
[Postprocessors]
  [int_position]
    type = FindValueOnLine
    start_point = '0 0 0'
    end_point = '0 100 0'
    v = phi
    target = 0
    tol = 1e-8
  []
[]
[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-9
  end_time = 1e9
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 1
    optimal_iterations = 8
    iteration_window = 2
  []
[]
[Outputs]
  exodus = true
  csv = true
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
  xmin = -2
  xmax = 2
  ymin = -2
  ymax = 2
  uniform_refine = 2
[]
[GlobalParams]
  x1 = -2
  y1 = -2
  x2 = 2
  y2 = -1.5
  derivative_order = 2
[]
[Variables]
  [./w]
  [../]
  [./etaa0]
  [../]
  [./etab0]
  [../]
[]
[AuxVariables]
  [./bnds]
  [../]
  #Temperature
  [./T]
  [../]
[]
[AuxKernels]
  [./bnds]
    type = BndsCalcAux
    variable = bnds
    v = 'etaa0 etab0'
  [../]
  [./T]
    type = FunctionAux
    function = 95.0+2.0*(y-1.0*t)
    variable = T
    execute_on = 'initial timestep_begin'
  [../]
[]
[ICs]
  [./w]
    type = BoundingBoxIC
    variable = w
    # note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
    outside = -4.0
    inside = 0.0
  [../]
  [./etaa0]
    type = BoundingBoxIC
    variable = etaa0
    #Solid phase
    outside = 0.0
    inside = 1.0
  [../]
  [./etab0]
    type = BoundingBoxIC
    variable = etab0
    #Liquid phase
    outside = 1.0
    inside = 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
  [../]
  [./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 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
    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   S   Tm'
    prop_values = '1.0 1.0  0.1  1.0  10.0  0.1  10.0  0.9   4.5 10.0 1.0 100.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 = 2.0
  [./TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.0005
    cutback_factor = 0.7
    growth_factor = 1.2
  [../]
[]
[Adaptivity]
 initial_steps = 3
 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
[]