- inputThe input mesh that needs to be trimmed.
C++ Type:MeshGeneratorName
Unit:(no unit assumed)
Controllable:No
Description:The input mesh that needs to be trimmed.
- plane_normalThe normal vector of the plane.
C++ Type:libMesh::Point
Unit:(no unit assumed)
Controllable:No
Description:The normal vector of the plane.
- plane_pointA point on the plane.
C++ Type:libMesh::Point
Unit:(no unit assumed)
Controllable:No
Description:A point on the plane.
CutMeshByPlaneGenerator
This CutMeshByPlaneGenerator object is designed to trim the input mesh by removing all the elements on one side of a given plane with special processing on the elements crossed by the cutting line to ensure a smooth cross-section. The output mesh only consists of TET4 elements.
Overview
The CutMeshByPlaneGenerator
is basically the 3D version of XYMeshLineCutter
. It is used to slice a 3D input mesh along a given plane, and discard the portion of the mesh on one side of the plane. The input mesh, given by "input", must be 3D and contain only first-order elements. The cutting plane is specified by "plane_normal" and "plane_point", which are two libMesh::Point
type data that represent the normal vector of the cutting plane and a point on the cutting plane, respectively. This mesh generator removes the part of the mesh located on the side of the plane in the direction of the normal vector. The mesh is then smoothed to ensure a straight cut instead of a "zigzag" cut along element boundaries as generated by PlaneDeletionGenerator
.
Methods
CutMeshByPlaneGenerator
first converts all elements of the input mesh into TET4
elements. Next, the TET4
elements sliced by the cutting plane are further split into TET4
elements.
Splitting of Non-TET4 Elements
The splitting of non-TET4 elements was performed using the same algorithm as described in ElementsToTetrahedronsConverter
. Note that only those elements that will be fully or partially retained after the cutting are split.
Cutting of TET4 Elements along Plane
Once all the elements of the input mesh have been converted into TET elements, the cutting method only needs to be applied to TET elements. First, all the elements that are cut by the given cutting plane are identified. For the TET elements involved, their relationship with the cutting plane can be categorized into one of the six cases shown in Figure 1. For each of these six cases, new nodes are created at the intersection points between the cutting plane and the edges of the TET element. Then the red part of the original TET element is removed and new TET element(s) are created as shown in Figure 1. The cross-sections created by this cutting procedure are assigned a new boundary ID as defined by "cut_face_id"
Example Syntax
[Mesh]
[cut]
type = CutMeshByPlaneGenerator
input = block_1
plane_point = '0.5 0.5 0.3'
plane_normal = '1.0 0.9 0.8'
[]
[]
(moose/test/tests/meshgenerators/cut_mesh_by_plane_generator/simple_cut.i)Input Parameters
- cut_face_idThe boundary id of the face generated by the cut. An id will be automatically assigned if not provided.
C++ Type:short
Unit:(no unit assumed)
Controllable:No
Description:The boundary id of the face generated by the cut. An id will be automatically assigned if not provided.
- cut_face_nameThe boundary name of the face generated by the cut.
C++ Type:BoundaryName
Unit:(no unit assumed)
Controllable:No
Description:The boundary name of the face generated by the cut.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
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
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Unit:(no unit assumed)
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)