-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28314 from kyleeswanson/MeshModifiers
Add MeshModifiers syntax
- Loading branch information
Showing
133 changed files
with
236 additions
and
146 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 8 additions & 0 deletions
8
framework/doc/content/source/actions/AddMeshModifiersAction.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# AddMeshModifiersAction | ||
|
||
Adds `MeshModifier` objects into the system that are listed under `MeshModifiers/` in the input file. | ||
This action adds them to the [application](MooseApp.md). | ||
|
||
The preferred syntax for adding `MeshModifiers` is to add them in the `[Mesh]` block. | ||
|
||
<!-- !syntax parameters /Mesh/AddMeshModifiersAction --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
framework/doc/content/source/meshmodifiers/ActivateElementsByPath.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# ActivateElementsByPath | ||
|
||
This MeshModifier uses the +function path+ as the metric to activate (add) an element by moving the element from an "inactive" subdomain to the "active" subdomain. It uses the user provided points $(x(t), y(t), z(t))$ with components defined by the functions specified by the parameters `function_x`, `function_y`, and `function_z` in the input. An element is activated at time $t_0$ if this element is close (distance < `activate_distance`) to the point $(x(t_0), y(t_0), z(t_0))$. | ||
|
||
!syntax parameters /MeshModifiers/ActivateElementsByPath | ||
|
||
!syntax inputs /MeshModifiers/ActivateElementsByPath | ||
|
||
!syntax children /MeshModifiers/ActivateElementsByPath |
9 changes: 9 additions & 0 deletions
9
framework/doc/content/source/meshmodifiers/ActivateElementsCoupled.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# ActivateElementsCoupled | ||
|
||
This MeshModifier uses the +coupled variable value+ as the metric to activate (add) an element by moving the element from an "inactive" subdomain to the "active" subdomain. It uses a coupled variable to decide whether to activate an element. The `coupled_var`, `activate_value` and the `activate_type` needs to be provided in the input to form the activation criterion. By default, the element is activated if the averaged value of the coupled variable in the element is `above` the `activate_value`. User can set `activate_type = 'below'` or `'equal'` to activate element when the averaged coupled variable value is below or equal to the `activate_value`. | ||
|
||
!syntax parameters /MeshModifiers/ActivateElementsCoupled | ||
|
||
!syntax inputs /MeshModifiers/ActivateElementsCoupled | ||
|
||
!syntax children /MeshModifiers/ActivateElementsCoupled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
framework/doc/content/source/meshmodifiers/SidesetAroundSubdomainUpdater.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# SidesetAroundSubdomainUpdater | ||
|
||
## Description | ||
|
||
The `SidesetAroundSubdomainUpdater` mesh modifier updates a sideset during a simulation by reassigning it based on a pair of subdomain sets, the [!param](/MeshModifiers/SidesetAroundSubdomainUpdater/inner_subdomains) and [!param](/MeshModifiers/SidesetAroundSubdomainUpdater/outer_subdomains). The sideset will be updated to comprise all sides along `inner_subdomains` that are neighboring `outer_subdomains` or that have no neighbor. This dynamic update can be useful in conjunction with subdomain update user objects such as [CoupledVarThresholdElementSubdomainModifier](CoupledVarThresholdElementSubdomainModifier.md). | ||
|
||
!alert note | ||
Use the [!param](/MeshModifiers/SidesetAroundSubdomainUpdater/execution_order_group) parameter to ensure that this user object is run after any subdomain changing user object has fully traversed the mesh. | ||
|
||
## Example Input Syntax | ||
|
||
!listing test/tests/meshmodifiers/sideset_around_subdomain_updater/test.i block=MeshModifiers | ||
|
||
!syntax parameters /MeshModifiers/SidesetAroundSubdomainUpdater | ||
|
||
!syntax inputs /MeshModifiers/SidesetAroundSubdomainUpdater | ||
|
||
!syntax children /MeshModifiers/SidesetAroundSubdomainUpdater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
framework/doc/content/source/meshmodifiers/TimedSubdomainModifier.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# TimedSubdomainModifier | ||
|
||
!syntax description /MeshModifiers/TimedSubdomainModifier | ||
|
||
## Overview | ||
|
||
For geometrically complex models, an efficient option is to define the volumes to be excavated/backfilled by means of subdomains (aka 'blocks'). This leads to the task of moving all elements from one subdomain to another at pre-known points in time. Furthermore, in some engineering applications | ||
(e.g. geotechnics or mining) it might be necessary to reassign several subdomains during one simulation. | ||
Addressing this task, the `TimedSubdomainModifier` eases re-assignment of all elements of a subdomain, makes Moose input files shorter, and reduces | ||
potential sources of error compared to the usage of [CoupledVarThresholdElementSubdomainModifier.md] (which in turn has its advantages if the geometry is not organized into subdomains). | ||
|
||
The `TimedSubdomainModifier` inherits from the [CoupledVarThresholdElementSubdomainModifier.md]. Details on solution initialization, stateful material property initialization and moving boundary/interface nodeset/sideset modification can be found in the description of the [CoupledVarThresholdElementSubdomainModifier.md]. | ||
|
||
The subdomains and times to be used by the `TimedSubdomainModifier` can be specified using one of the following options: | ||
|
||
- 3 vectors containing the times, source and destination subdomains/blocks, or | ||
- path to an CSV file | ||
|
||
## Example Input File Syntax | ||
|
||
### Vectors of data in the input file | ||
|
||
If the data on the subdomains and times should be provided directly in the input file, the following 3 parameters must be used. The vector of data in each parameter must have the same number of items: | ||
|
||
- [!param](/MeshModifiers/TimedSubdomainModifier/times): Vector of times at which the elements are to be moved. | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/blocks_from): Vector of subdomain/blocks to move from. The subdomains/blocks may be given as ID or name. | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/blocks_to): Vector of subdomain/blocks to move to. The subdomains/blocks may be given as ID or name. | ||
|
||
!listing test/tests/meshmodifiers/element_subdomain_modifier/tsm_direct.i block=MeshModifiers | ||
|
||
### Reading data from CSV file | ||
|
||
To read the data on the subdomains and times from an CSV file, the following parameters are to be used: | ||
|
||
- [!param](/MeshModifiers/TimedSubdomainModifier/data_file): Name of the file in which the data is read. | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/delimiter): Optional CSV delimiter character. Defaults to comma (`,`). | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/comment): Optional CSV comment character. Defaults to hash character (`;`). | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/header): This parameter must be set to True, if the columns are to be found via header ([!param](/MeshModifiers/TimedSubdomainModifier/time_column_text), [!param](/MeshModifiers/TimedSubdomainModifier/blocks_from_column_text), and [!param](/MeshModifiers/TimedSubdomainModifier/blocks_to_column_text)). See following parameters. | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/time_column_index) -or- [!param](/MeshModifiers/TimedSubdomainModifier/time_column_text): Zero-based index or name of the column defining the times. | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/blocks_from_column_index) -or- [!param](/MeshModifiers/TimedSubdomainModifier/blocks_from_column_text): Zero-based index or name of the column defining the subdomains/blocks to move all elements from. | ||
- [!param](/MeshModifiers/TimedSubdomainModifier/blocks_to_column_index) -or- [!param](/MeshModifiers/TimedSubdomainModifier/blocks_to_column_text): Zero-based index or name of the column defining the subdomains/blocks to move all elements to. | ||
|
||
!listing test/tests/meshmodifiers/element_subdomain_modifier/tsm_csv.i block=MeshModifiers | ||
|
||
With the corresponding CSV-file: | ||
|
||
!listing test/tests/meshmodifiers/element_subdomain_modifier/tsm.csv | ||
|
||
!syntax parameters /MeshModifiers/TimedSubdomainModifier | ||
|
||
!syntax inputs /MeshModifiers/TimedSubdomainModifier | ||
|
||
!syntax children /MeshModifiers/TimedSubdomainModifier |
12 changes: 12 additions & 0 deletions
12
...ework/doc/content/source/meshmodifiers/VariableValueElementSubdomainModifier.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# VariableValueElementSubdomainModifier | ||
|
||
The `VariableValueElementSubdomainModifier` MeshModifier adjusts the element's subdomain according to a provided variable value. Subdomain IDs can be assigned based on the average variable value within the element, rounded to the nearest existing subdomain ID in the mesh. | ||
|
||
**Note:** If the target value is not found in the subdomain ID list, a warning will be triggered. The system will then assign the smallest subdomain ID in the mesh that matches or exceeds the target subdomain ID to the element. Alternatively, if all subdomain IDs are smaller than the target, the system will assign the largest subdomain ID available in the mesh to the element. | ||
|
||
|
||
!syntax parameters /MeshModifiers/VariableValueElementSubdomainModifier | ||
|
||
!syntax inputs /MeshModifiers/VariableValueElementSubdomainModifier | ||
|
||
!syntax children /MeshModifiers/VariableValueElementSubdomainModifier |
9 changes: 0 additions & 9 deletions
9
framework/doc/content/source/userobjects/ActivateElementsByPath.md
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
framework/doc/content/source/userobjects/ActivateElementsCoupled.md
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
framework/doc/content/source/userobjects/SidesetAroundSubdomainUpdater.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.