The tool ResetPropertiesInPolygonalRegion
changes the property values of all elements of a mesh mesh
in which at least one node of the element lies within the cylindrical volume defined through a given polygon polygon_name
within the geometry geometry
to a new value.
The new value must be of one of the data types, either integer {1, 2, 3, …} (new_int_value
), character {‘a’, ‘b’, ‘c’, …} (new_character_value
), or boolean {true,false} (new_boolean_value
). The new value must fit the chosen property type of name_of_property
.
The polygon must be located within a plane. A node is located in the cylindrical volume iff
(i.e. if and only if) the node’s orthogonal projection to the plane of the polygon lies in the polygon, i.e. the plane can be defined in any arbitrary direction in 3d space.
In combination with a threshold filter the tool can also be used to cut out some region of the mesh. The tool can be also used in combination with the tool removeMeshElements.
The tool writes a new mesh modified_mesh
.
ResetPropertiesInPolygonalRegion
-m [mesh]
-r [MaterialID]
-n [name_of_property, default MaterialIDs]
-i [new_int_value, optional]
-c [new_character_value, optional]
-b [new_boolean_value, optional]
-g [geometry]
-p [polygon_name]
--any_of
-o [modified_mesh.vtu]
By default all nodes of an element have to be inside the polygon to set the
property on the element. By specifying the boolean switch any_of
at the
command line the criterion for element selection changes to ‘at least one
node has to be inside the polygon’.
Example usage:
ResetPropertiesInPolygonalRegion
-m TestCube.vtu
-n ValidCells
-c B
-g TestPolylines.gml
-p Back
-o TestCube-BackPolylinePropertyChange.vtu
Creates a new property “ValidCells” and sets the value for the property of elements in the polygonal region “Back” to “B”.
ResetPropertiesInPolygonalRegion
-m hex_5x5x5.vtu
-g Regions.gml
-p Region1
-n MaterialIDs
-i 11
-r 2
-o hex_5x5x5_Region1-Layer1.vtu
Here the elements with the material ID of 11 are displayed non-transparent.
The final mesh containing 12 material groups is represented in the right figure and was created by the command
ResetPropertiesInPolygonalRegion
-m hex_5x5x5_Region1-Layer2.vtu
-g Regions.gml
-p Region2
-n MaterialIDs
-i 12
-r 5
-o hex_5x5x5_Region1-Layer2_Region2-Layer5.vtu
Again, the elements that are assigned to the new material group 12 are displayed non-transparent.
Download links for the files necessary to reproduce this example are at the end of this site.
This workflow was successful used in the INFLUINS project cutting out the Unstrut catchment from a 3d geological structure model:
Fischer, T. and Naumov, D. and Sattler, S. and Kolditz, O. and Walther, M. (2015): GO2OGS 1.0: a versatile workflow to integrate complex geological information with fault data into numerical simulation models. Geosci. Model Dev., vol. 8, p. 3681--3694, DOI:10.5194/gmd-8-3681-2015 https://www.geosci-model-dev.net/8/3681/2015/gmd-8-3681-2015.pdfThis article was written by Thomas Fischer. If you are missing something or you find an error please let us know.
Generated with Hugo 0.122.0
in CI job 504124
|
Last revision: November 12, 2024
Commit: [BL/MPI] Use MPI_COMM_WORLD in reduceMin 4aae83e
| Edit this page on