KKSPhaseConcentrationMultiPhaseMaterial

Kim-Kim-Suzuki (KKS) nested solve material for multiphase models (part 1 of 2). KKSPhaseConcentrationMultiPhaseMaterial implements a nested Newton iteration to solve the KKS constraint equations for the phase concentrations as material properties (instead of non-linear variables as in the traditional solve in MOOSE), where is the component species and is the phase. For a model with N phases, the constraint equations are the mass conservation equation for each global concentration ():

and the pointwise equality of the phase chemical potentials:

The free energies in Fj_materials must have "compute" set to false. This material also passes the phase free energies and their partial derivatives w.r.t phase concentrations to the KKS kernels (NestKKSMultiACBulkC, NestKKSMultiACBulkF, NestKKSSplitCHCRes).

Example input:

Without damping

Parabolic free energies have valid values for any real number, and therefore don't require damping to ensure the solution is inside a trust region.

[Materials]
  # simple toy free energies
  [F1]
    type = DerivativeParsedMaterial
    property_name = F1
    expression = '20*(c1-0.2)^2'
    material_property_names = 'c1'
    additional_derivative_symbols = 'c1'
    compute = false
  []
  [F2]
    type = DerivativeParsedMaterial
    property_name = F2
    expression = '20*(c2-0.5)^2'
    material_property_names = 'c2'
    additional_derivative_symbols = 'c2'
    compute = false
  []
  [F3]
    type = DerivativeParsedMaterial
    property_name = F3
    expression = '20*(c3-0.8)^2'
    material_property_names = 'c3'
    additional_derivative_symbols = 'c3'
    compute = false
  []
  [KKSPhaseConcentrationMultiPhaseMaterial]
    type = KKSPhaseConcentrationMultiPhaseMaterial
    global_cs = 'c'
    all_etas = 'eta1 eta2 eta3'
    hj_names = 'h1 h2 h3'
    ci_names = 'c1 c2 c3'
    ci_IC = '0.2 0.5 0.8'
    Fj_names = 'F1 F2 F3'
    min_iterations = 1
    max_iterations = 1000
    absolute_tolerance = 1e-11
    relative_tolerance = 1e-10
  []
  [KKSPhaseConcentrationMultiPhaseDerivatives]
    type = KKSPhaseConcentrationMultiPhaseDerivatives
    global_cs = 'c'
    all_etas = 'eta1 eta2 eta3'
    Fj_names = 'F1 F2 F3'
    hj_names = 'h1 h2 h3'
    ci_names = 'c1 c2 c3'
  []

  # 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
  []

  # 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  M'
    prop_values = '0.7 1.0    0.025'
  []
[]
(moose/modules/phase_field/test/tests/KKS_system/kks_example_multiphase_nested.i)

With damping

Log free energies are only valid when the component phase mole fractions are within 0 to 1. We add a material C that checks if the nested solve guess is within this trust region. Similar to the free energy, C must have "compute" set to false. The nested solve then requires damping to ensure the solution is inside the trust region.

[Materials]
  # simple toy free energies
  [F1]
    type = DerivativeParsedMaterial
    property_name = F1
    expression = 'c1*log(c1/1e-4) + (1-c1)*log((1-c1)/(1-1e-4))'
    material_property_names = 'c1'
    additional_derivative_symbols = 'c1'
    compute = false
  []
  [F2]
    type = DerivativeParsedMaterial
    property_name = F2
    expression = 'c2*log(c2/0.5) + (1-c2)*log((1-c2)/(1-0.5))'
    material_property_names = 'c2'
    additional_derivative_symbols = 'c2'
    compute = false
  []
  [F3]
    type = DerivativeParsedMaterial
    property_name = F3
    expression = 'c3*log(c3/0.9999) + (1-c3)*log((1-c3)/(1-0.9999))'
    material_property_names = 'c3'
    additional_derivative_symbols = 'c3'
    compute = false
  []
  [C]
    type = DerivativeParsedMaterial
    property_name = 'C'
    material_property_names = 'c1 c2 c3'
    expression = '(c1>0)&(c1<1)&(c2>0)&(c2<1)&(c3>0)&(c3<1)'
    compute = false
  []
  [KKSPhaseConcentrationMultiPhaseMaterial]
    type = KKSPhaseConcentrationMultiPhaseMaterial
    global_cs = 'c'
    all_etas = 'eta1 eta2 eta3'
    hj_names = 'h1 h2 h3'
    ci_names = 'c1 c2 c3'
    ci_IC = '0.2 0.5 0.8'
    Fj_names = 'F1 F2 F3'
    min_iterations = 1
    max_iterations = 1000
    absolute_tolerance = 1e-15
    relative_tolerance = 1e-8
    step_size_tolerance = 1e-05
    damped_Newton = true
    conditions = C
    damping_factor = 0.8
  []
  [KKSPhaseConcentrationMultiPhaseDerivatives]
    type = KKSPhaseConcentrationMultiPhaseDerivatives
    global_cs = 'c'
    all_etas = 'eta1 eta2 eta3'
    Fj_names = 'F1 F2 F3'
    hj_names = 'h1 h2 h3'
    ci_names = 'c1 c2 c3'
  []

  # 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
  []

  # 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  M'
    prop_values = '0.7 1.0    0.025'
  []
[]
(moose/modules/phase_field/test/tests/KKS_system/kks_example_multiphase_nested_damped.i)

Class Description

Computes the KKS phase concentrations by using a nested Newton iteration to solve the equal chemical potential and concentration conservation equations for multiphase systems. This class is intented to be used with KKSPhaseConcentrationMultiPhaseDerivatives.

Input Parameters

  • Fj_namesFree energy material objects in the same order as all_etas.

    C++ Type:std::vector<MaterialName>

    Controllable:No

    Description:Free energy material objects in the same order as all_etas.

  • all_etasOrder parameters.

    C++ Type:std::vector<VariableName>

    Controllable:No

    Description:Order parameters.

  • ci_ICInitial values of ci in the same order of ci_names

    C++ Type:std::vector<double>

    Controllable:No

    Description:Initial values of ci in the same order of ci_names

  • ci_namesPhase concentrations. They must have the same order as Fj_names and global_cs, for example, c1, c2, b1, b2.

    C++ Type:std::vector<MaterialPropertyName>

    Controllable:No

    Description:Phase concentrations. They must have the same order as Fj_names and global_cs, for example, c1, c2, b1, b2.

  • global_csThe interpolated concentrations c, b, etc.

    C++ Type:std::vector<VariableName>

    Controllable:No

    Description:The interpolated concentrations c, b, etc.

  • hj_namesSwitching functions in the same order as all_etas.

    C++ Type:std::vector<MaterialPropertyName>

    Controllable:No

    Description:Switching functions in the same order as all_etas.

Required Parameters

  • absolute_tolerance1e-13Absolute convergence tolerance for Newton iteration

    Default:1e-13

    C++ Type:double

    Controllable:No

    Description:Absolute convergence tolerance for Newton iteration

  • acceptable_multiplier10Factor applied to relative and absolute tolerance for acceptable nonlinear convergence if iterations are no longer making progress

    Default:10

    C++ Type:double

    Controllable:No

    Description:Factor applied to relative and absolute tolerance for acceptable nonlinear convergence if iterations are no longer making progress

  • argsThe coupled variables of free energies.

    C++ Type:std::vector<VariableName>

    Controllable:No

    Description:The coupled variables of free energies.

  • blockThe list of blocks (ids or names) that this object will be applied

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:The list of blocks (ids or names) that this object will be applied

  • boundaryThe list of boundaries (ids or names) from the mesh where this object applies

    C++ Type:std::vector<BoundaryName>

    Controllable:No

    Description:The list of boundaries (ids or names) from the mesh where this object applies

  • computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.

  • conditionsCMaterial property that checks bounds and conditions on the material properties being solved for.

    Default:C

    C++ Type:MaterialName

    Controllable:No

    Description:Material property that checks bounds and conditions on the material properties being solved for.

  • constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped

    Default:NONE

    C++ Type:MooseEnum

    Options:NONE, ELEMENT, SUBDOMAIN

    Controllable:No

    Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped

  • damped_NewtonFalseWhether or not to use the damped Newton's method.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not to use the damped Newton's method.

  • damping_factor0.8Factor applied to step size if guess does not satisfy damping criteria

    Default:0.8

    C++ Type:double

    Controllable:No

    Description:Factor applied to step size if guess does not satisfy damping criteria

  • declare_suffixAn optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Controllable:No

    Description:An optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.

  • max_damping_iterations100Maximum number of damping steps per linear iteration of nested solve

    Default:100

    C++ Type:unsigned int

    Controllable:No

    Description:Maximum number of damping steps per linear iteration of nested solve

  • max_iterations1000Maximum number of nonlinear iterations

    Default:1000

    C++ Type:unsigned int

    Controllable:No

    Description:Maximum number of nonlinear iterations

  • min_iterations3Minimum number of nonlinear iterations to execute before accepting convergence

    Default:3

    C++ Type:unsigned int

    Controllable:No

    Description:Minimum number of nonlinear iterations to execute before accepting convergence

  • nested_iterationsThe output number of nested Newton iterations at each quadrature point.

    C++ Type:MaterialPropertyName

    Controllable:No

    Description:The output number of nested Newton iterations at each quadrature point.

  • 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.

  • relative_tolerance1e-08Relative convergence tolerance for Newton iteration

    Default:1e-08

    C++ Type:double

    Controllable:No

    Description:Relative convergence tolerance for Newton iteration

  • step_size_tolerance1e-15Minimum step size of linear iterations relative to value of the solution

    Default:1e-15

    C++ Type:double

    Controllable:No

    Description:Minimum step size of linear iterations relative to value of the solution

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • implicitTrueDetermines whether this object is calculated using an implicit or explicit form

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Determines whether this object is calculated using an implicit or explicit form

  • seed0The seed for the master random number generator

    Default:0

    C++ Type:unsigned int

    Controllable:No

    Description:The seed for the master random number generator

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

  • output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:List of material properties, from this material, to output (outputs must also be defined to an output type)

  • outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this object

    Default:none

    C++ Type:std::vector<OutputName>

    Controllable:No

    Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object

Outputs Parameters