CoupledVarThresholdElementSubdomainModifier

Modify element subdomain ID. This userobject only runs on the undisplaced mesh, and it will modify both the undisplaced and the displaced mesh.

Overview

The CoupledVarThresholdElementSubdomainModifier can model

  • Element death (with applications in ablation, fracture, etc.);

  • Element activation (with applications in additive manufacturing, sintering, solidification, etc.);

  • Moving interface (with applications in metal oxidation, phase transformation, melt pool, etc.).

The CoupledVarThresholdElementSubdomainModifier changes the element subdomain based on the given criterion. It also handles the corresponding

  • Moving boundary/interface nodeset/sideset modification,

  • Solution initialization, and

  • Stateful material property initialization,

all of which are demonstrated using the following example.

Consider a unit square domain, and an auxiliary variable defined by the function . The function represents a signed-distance function of a circle of radius whose center is moving along the x-axis towards right.

Initially, the domain is decomposed by a vertical line . The elements on the left side of the vertical line have subdomain ID of 1, and the elements on the right side have subdomain ID of 2. The CoupledVarThresholdElementSubdomainModifier is used to change the subdomain ID from 2 to 1 for elements within the circle.

Reversible vs. irreversible modification

If the CoupledVarThresholdElementSubdomainModifier is applied onto the entire domain, and the parameter complement_subdomain_id is set to 2, then the subdomain ID of all elements outside the circle will be set to 2:

  [moving_circle]
    type = CoupledVarThresholdElementSubdomainModifier
    coupled_var = 'phi'
    criterion_type = BELOW
    threshold = 0
    subdomain_id = 1
    complement_subdomain_id = 2
    moving_boundary_name = moving_boundary
    execute_on = 'INITIAL TIMESTEP_BEGIN'
  []
(test/tests/userobjects/element_subdomain_modifier/reversible.i)

The result of a reversible element subdomain modifier at three different time steps

However, in many applications, e.g. element death and activation, the equivalent movement of element subdomains is not reversible. In this case, omitting the parameter complement_subdomain_id will make the subdomain modification irreversible:

  [moving_circle]
    type = CoupledVarThresholdElementSubdomainModifier
    coupled_var = 'phi'
    block = 2
    criterion_type = BELOW
    threshold = 0
    subdomain_id = 1
    moving_boundary_name = moving_boundary
    execute_on = 'INITIAL TIMESTEP_BEGIN'
  []
(test/tests/userobjects/element_subdomain_modifier/block_restricted.i)

The result of an irreversible element subdomain modifier at three different time steps

Moving boundary/interface nodeset/sideset modification

The change of element subdomains will alter the definition of certain sidesets and nodesets. The CoupledVarThresholdElementSubdomainModifier optionally takes the parameter moving_boundary_name to help modify the corresponding sideset/nodeset. If the boundary provided through the moving_boundary_name parameter already exists, the modifier will attempt to modify the provided sideset/nodeset whenever an element changes subdomain. If the boundary does not exist, the modifier will create a sideset and a nodeset with the provided name.

The evolving sideset (green) at three different time steps

The evolving nodeset (green) at three different time steps

Nodal and integrated BCs can be applied on the moving boundary.

Solution initialization

Depending on the physics, one may or may not want to initialize the solution when an element and its related nodes change subdomain. The parameter apply_initial_conditions defaults to true and determines whether the initial conditions should be re-evaluated.

Suppose initially there is an auxiliary variable everywhere inside the domain, and the variable value in subdomain 1 (blue) doubles at each time step:

[AuxVariables]
  [u]
    [InitialCondition]
      type = ConstantIC
      value = 1
    []
  []
  [phi]
  []
[]

[AuxKernels]
  [phi]
    type = FunctionAux
    variable = phi
    function = moving_circle
    execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END'
  []
  [double_u]
    type = StatefulAux
    variable = u
    coupled = u
    block = 1
  []
[]
(test/tests/userobjects/element_subdomain_modifier/initial_condition.i)

The auxiliary variable at three different time steps

Stateful material property initialization

Similarly, all stateful material properties will be re-initialized when an element changes subdomain. Suppose initially the diffusivity is everywhere, and the diffusivity doubles at each time step:

[Materials]
  [stateful]
    type = StatefulMaterial
    initial_diffusivity = 0.5
    multiplier = 2
    block = 1
    outputs = exodus
  []
  [non_stateful]
    type = GenericConstantMaterial
    prop_names = 'diffusivity'
    prop_values = '0.5'
    block = 2
    outputs = exodus
  []
[]
(test/tests/userobjects/element_subdomain_modifier/stateful_property.i)

The diffusivity at three different time steps

Input Parameters

  • coupled_varCoupled variable whose value is used in the criterion

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

    Options:

    Description:Coupled variable whose value is used in the criterion

  • subdomain_idThe subdomain ID of the element when the criterion is met

    C++ Type:unsigned short

    Options:

    Description:The subdomain ID of the element when the criterion is met

  • thresholdThe value above (or below) which to change the element subdomain

    C++ Type:double

    Options:

    Description:The value above (or below) which to change the element subdomain

Required Parameters

  • apply_initial_conditionsTrueWhether to apply initial conditions on the moved nodes and elements

    Default:True

    C++ Type:bool

    Options:

    Description:Whether to apply initial conditions on the moved nodes and elements

  • blockThe list of block ids (SubdomainID) that this object will be applied

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

    Options:

    Description:The list of block ids (SubdomainID) that this object will be applied

  • complement_subdomain_idThe subdomain ID of the element when the criterion is not met. If not provided, the element subdomain ID will not be modified if the criterion is not met.

    C++ Type:unsigned short

    Options:

    Description:The subdomain ID of the element when the criterion is not met. If not provided, the element subdomain ID will not be modified if the criterion is not met.

  • criterion_typeABOVECriterion to use for the threshold

    Default:ABOVE

    C++ Type:MooseEnum

    Options:BELOW, EQUAL, ABOVE

    Description:Criterion to use for the threshold

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM

    Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.

  • moving_boundary_nameBoundary to modify when an element is moved. A boundary with the provided name will be created if not already exists on the mesh.

    C++ Type:BoundaryName

    Options:

    Description:Boundary to modify when an element is moved. A boundary with the provided name will be created if not already exists on the mesh.

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Options:

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

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

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

    Options:

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

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Options:

    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

    Options:

    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

    Options:

    Description:The seed for the master random number generator

Advanced Parameters

Input Files