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 plane 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. As each element that is across the cutting plane is cut based on the interception points, this mesh generator ensures 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"

Figure 1: The six possible cases when slicing a TET element. The cutting plane intersection with the element is shown as blue faces. The red part of the original TET element is removed after cutting, while the blue part of the original TET element is kept and split into multiple TET elements if necessary.

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

  • inputThe input mesh that needs to be trimmed.

    C++ Type:MeshGeneratorName

    Controllable:No

    Description:The input mesh that needs to be trimmed.

  • plane_normalThe normal vector of the plane.

    C++ Type:libMesh::Point

    Controllable:No

    Description:The normal vector of the plane.

  • plane_pointA point on the plane.

    C++ Type:libMesh::Point

    Controllable:No

    Description:A point on the plane.

Required 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

    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

    Controllable:No

    Description:The boundary name of the face generated by the cut.

  • epsilon1e-12Fuzzy comparison tolerance

    Default:1e-12

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Fuzzy comparison tolerance

Optional Parameters

  • disable_fpoptimizerFalseDisable the function parser algebraic optimizer

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Disable the function parser algebraic optimizer

  • enable_ad_cacheTrueEnable caching of function derivatives for faster startup time

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable caching of function derivatives for faster startup time

  • enable_auto_optimizeTrueEnable automatic immediate optimization of derivatives

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable automatic immediate optimization of derivatives

  • enable_jitTrueEnable just-in-time compilation of function expressions for faster evaluation

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Enable just-in-time compilation of function expressions for faster evaluation

  • evalerror_behaviornanWhat to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

    Default:nan

    C++ Type:MooseEnum

    Options:nan, nan_warning, error, exception

    Controllable:No

    Description:What to do if evaluation error occurs. Options are to pass a nan, pass a nan with a warning, throw a error, or throw an exception

Parsed Expression Advanced Parameters

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    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

    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

    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

    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

    Controllable:No

    Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)

Debugging Parameters