SubdomainElementModifier

SubdomainElementModifier is a MeshModifier that assigns each element of a background mesh a subdomain ID based on geometric inclusion in one or more closed surfaces. The per-subdomain in-out tests are provided by a PointInSubdomainCheckUO, which in turn is populated from a SurfaceMeshBySubdomainBuilder that groups a surface (boundary) mesh into one closed loop per subdomain.

For each element the modifier:

  • assigns the element to a subdomain if all of the element's nodes lie inside that subdomain's surface (the lowest such subdomain ID wins when an element is fully inside more than one);

  • otherwise estimates, via quadrature, the active-area fraction inside each surface the element intercepts and assigns the element to the surface with the largest fraction (ties broken by lowest subdomain ID);

  • leaves the element's current subdomain unchanged when it is outside every surface, or when the largest active-area fraction is below the lambda threshold.

Usage

Set subdomain_id_tester to a PointInSubdomainCheckUO. Use lambda to control how much of an intercepted element must fall inside a surface before it is reassigned, and set mark_intercepted together with subdomain_id_intercepted to place every intercepted element into a single dedicated subdomain instead. Because the underlying in-out test requires a replicated surface mesh, run these tests with mesh_mode = REPLICATED.

Assign subdomain ID based on geometric inclusion using per-subdomain in-out checks provided by a subdomain_id_tester.

Input Parameters

  • subdomain_id_testerThe UserObject (PointInSubdomainCheckUO) for subdomain in/out tests.

    C++ Type:UserObjectName

    Controllable:No

    Description:The UserObject (PointInSubdomainCheckUO) for subdomain in/out tests.

Required Parameters

  • 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

  • lambda0.5Threshold applied to the inactive fraction of a partially active element.

    Default:0.5

    C++ Type:Real

    Unit:(no unit assumed)

    Range:lambda >= 0 & lambda <= 1

    Controllable:No

    Description:Threshold applied to the inactive fraction of a partially active element.

  • mark_interceptedFalseWhether to assign a dedicated subdomain ID when intercepted.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether to assign a dedicated subdomain ID when intercepted.

  • moving_boundariesMoving boundaries between subdomains. These boundaries (both sidesets and nodesets) will be updated for elements that change subdomain. The subdomains that each moving boundary lies between shall be specified using the parameter 'moving_boundary_subdomain_pairs'. If one boundary and multiple subdomain pairs are specified, then it is assumed that the pairs all apply to the boundary. A boundary will be created on the mesh if it does not already exist.

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

    Controllable:No

    Description:Moving boundaries between subdomains. These boundaries (both sidesets and nodesets) will be updated for elements that change subdomain. The subdomains that each moving boundary lies between shall be specified using the parameter 'moving_boundary_subdomain_pairs'. If one boundary and multiple subdomain pairs are specified, then it is assumed that the pairs all apply to the boundary. A boundary will be created on the mesh if it does not already exist.

  • moving_boundary_subdomain_pairsThe subdomain pairs associated with each moving boundary. For each pair of subdomains, only the element side from the first subdomain will be added to the moving boundary, i.e., the side normal is pointing from the first subdomain to the second subdomain. The pairs shall be delimited by ';'. If a pair only has one subdomain, the moving boundary is associated with the subdomain's external boundary, i.e., when the elements have no neighboring elements.

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

    Controllable:No

    Description:The subdomain pairs associated with each moving boundary. For each pair of subdomains, only the element side from the first subdomain will be added to the moving boundary, i.e., the side normal is pointing from the first subdomain to the second subdomain. The pairs shall be delimited by ';'. If a pair only has one subdomain, the moving boundary is associated with the subdomain's external boundary, i.e., when the elements have no neighboring elements.

  • nearby_distance_threshold-1Threshold for considering elements as 'nearby' in the K-D tree search. Only elements within this distance will be considered for polynomial fitting.

    Default:-1

    C++ Type:Real

    Unit:(no unit assumed)

    Controllable:No

    Description:Threshold for considering elements as 'nearby' in the K-D tree search. Only elements within this distance will be considered for polynomial fitting.

  • nearby_kd_tree_leaf_max_size10Maximum number of elements in a leaf node of the K-D tree used to search for nearby elements. Only needed if 'reinitialization_strategy' is set to POLYNOMIAL_NEARBY.

    Default:10

    C++ Type:int

    Controllable:No

    Description:Maximum number of elements in a leaf node of the K-D tree used to search for nearby elements. Only needed if 'reinitialization_strategy' is set to POLYNOMIAL_NEARBY.

  • old_subdomain_reinitializedTrueThis parameter must be set with a non-empty list in 'reinitialize_subdomains'. When set to the default true, the element's old subdomain is not considered when determining if an element should be reinitialized. If set to false, only elements whose old subdomain was not in 'reinitialize_subdomains' are reinitialized.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:This parameter must be set with a non-empty list in 'reinitialize_subdomains'. When set to the default true, the element's old subdomain is not considered when determining if an element should be reinitialized. If set to false, only elements whose old subdomain was not in 'reinitialize_subdomains' are reinitialized.

  • polynomial_fittersList of NodalPatchRecovery UserObjects used for polynomial fitting during variable reinitialization. Required only if 'reinitialization_strategy' includes POLYNOMIAL_NEIGHBOR, POLYNOMIAL_WHOLE, or POLYNOMIAL_NEARBY.

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

    Controllable:No

    Description:List of NodalPatchRecovery UserObjects used for polynomial fitting during variable reinitialization. Required only if 'reinitialization_strategy' includes POLYNOMIAL_NEIGHBOR, POLYNOMIAL_WHOLE, or POLYNOMIAL_NEARBY.

  • qrule_order9Quadrature order used to estimate the active fraction.

    Default:9

    C++ Type:int

    Range:qrule_order >= 0 & qrule_order <= 10

    Controllable:No

    Description:Quadrature order used to estimate the active fraction.

  • reinitialization_strategyIC The strategy used to reinitialize the solution when elements change subdomain. If multiple strategies are provided, each strategy will be applied to the corresponding variable. If only one strategy is provided, it will be applied to all variables.

    Default:IC

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

    Options:IC, POLYNOMIAL_NEIGHBOR, POLYNOMIAL_WHOLE, POLYNOMIAL_NEARBY, NONE

    Controllable:No

    Description:The strategy used to reinitialize the solution when elements change subdomain. If multiple strategies are provided, each strategy will be applied to the corresponding variable. If only one strategy is provided, it will be applied to all variables.

  • reinitialize_subdomainsANY_BLOCK_ID By default, any element which changes subdomain is reinitialized. If a list of subdomains (IDs or names) is provided, then only elements whose new subdomain is in the list will be reinitialized. If an empty list is set, then no elements will be reinitialized.

    Default:ANY_BLOCK_ID

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

    Controllable:No

    Description:By default, any element which changes subdomain is reinitialized. If a list of subdomains (IDs or names) is provided, then only elements whose new subdomain is in the list will be reinitialized. If an empty list is set, then no elements will be reinitialized.

  • reinitialize_variablesWhich variables to reinitialize when subdomain changes.

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

    Unit:(no unit assumed)

    Controllable:No

    Description:Which variables to reinitialize when subdomain changes.

  • restore_overridden_dofsA list of boolean flags, one for each variable in 'reinitialize_variables', specifying whether overridden DOF values should be restored after reinitialization for each variable. This is useful when the solved values on these DOFs should be preserved. If the list is empty, overridden DOF values will NOT be restored for any variable by default.

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

    Controllable:No

    Description:A list of boolean flags, one for each variable in 'reinitialize_variables', specifying whether overridden DOF values should be restored after reinitialization for each variable. This is useful when the solved values on these DOFs should be preserved. If the list is empty, overridden DOF values will NOT be restored for any variable by default.

  • skip_restore_subdomain_changesFalseSkip restoring the subdomain changes if the timestep is not advanced.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Skip restoring the subdomain changes if the timestep is not advanced.

  • subdomain_id_intercepted65535Whether to assign a dedicated subdomain ID to intercepted elements.

    Default:65535

    C++ Type:unsigned short

    Controllable:No

    Description:Whether to assign a dedicated subdomain ID to intercepted elements.

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

    Controllable:No

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

  • execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

    Default:TIMESTEP_END

    C++ Type:ExecFlagEnum

    Options:XFEM_MARK, FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, MULTISYSTEM_FIXED_POINT_ITERATION_END, FINAL, CUSTOM, TRANSFER

    Controllable:No

    Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

Execution Scheduling 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

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