BSplineCurveGenerator

This BSplineMeshGenerator object is designed to generate a mesh of a curve that consists of EDGE2, EDGE3, or EDGE4 elements drawn using an open uniform B-Spline.

(Clamped) B-Splines are notably desirable because they can respect the incoming and outgoing direction of the curve, avoiding a discontinuity in the slope when connected to another line mesh at either end.

Note that the end direction is considered from the point of view of the incoming end-point connecting line, not from the point of view of the curve. If considering the point of the view of the generated curve, use the opposite value of the end direction.

The spline shape parameters should be adapted to obtain the desired shape for the curve. The sharpness is notably defined here as a measure of the proximity of the spline to a curve consisting of three line segments, each orthogonal to its neighbor(s), two continuing from the start and end direction, and one joining the two at the location where that last segment would be of minimal length.

The control points are generated at both ends of the spline with:

with:

  • the total number of control points

  • the sharpness

  • the start / end point

  • the starting / ending direction

  • the distance from the start/end point to the closest point, e.g. the point on the start/end line (formed by the start / end point and the starting/ending direction) that is closest to the end/start line

commentnote

If the start and end direction are parallel, the generator will fall back to producing a circle if the vector from the start to the end point is orthogonal to the shared direction and the two direction vectors are also equal. All other cases with parallel directions will error.

Setting start and end points / directions from mesh boundaries

As an alternative to specifying start/end points and directions manually, the user may specify another mesh generator and a boundary (sideset) on the mesh created by that mesh generator for the start / end point and direction.

In that case, the starting point is computed from the centroid of the boundary (as a sideset). The starting direction can still be specified with the "start_direction", or if it is not specified, using the side-area-weighted sum of the side-vertex-average-normal of the side elements on the boundary, which is essentially one way to compute the average boundary normal.

The behavior is similar for the ending point/direction.

Input Parameters

  • new_subdomain_id1Subdomain ID to assign to the curve elements

    Default:1

    C++ Type:unsigned short

    Controllable:No

    Description:Subdomain ID to assign to the curve elements

  • new_subdomain_nameSubdomain name to assign to the curve elements

    C++ Type:SubdomainName

    Controllable:No

    Description:Subdomain name to assign to the curve elements

Optional Parameters

  • boundary_providing_end_pointBoundary at whose centroid the spline should end. If the end_direction is not set, the ending direction is computed from a side-volume average of the side-vertex-average normals of the boundary sides

    C++ Type:BoundaryName

    Controllable:No

    Description:Boundary at whose centroid the spline should end. If the end_direction is not set, the ending direction is computed from a side-volume average of the side-vertex-average normals of the boundary sides

  • boundary_providing_start_pointBoundary at whose centroid the spline should start. If the start_direction is not set, the starting direction is computed from a side-volume average of the side-vertex-average normals of the boundary sides

    C++ Type:BoundaryName

    Controllable:No

    Description:Boundary at whose centroid the spline should start. If the start_direction is not set, the starting direction is computed from a side-volume average of the side-vertex-average normals of the boundary sides

  • end_directionDirection vector of curve at end point.

    C++ Type:libMesh::VectorValue<double>

    Unit:(no unit assumed)

    Controllable:No

    Description:Direction vector of curve at end point.

  • end_meshMeshgenerator providing the mesh to end splne on.

    C++ Type:MeshGeneratorName

    Controllable:No

    Description:Meshgenerator providing the mesh to end splne on.

  • end_pointEnding (x,y,z) point for curve.

    C++ Type:libMesh::Point

    Controllable:No

    Description:Ending (x,y,z) point for curve.

  • start_directionDirection vector of curve at start point.

    C++ Type:libMesh::VectorValue<double>

    Unit:(no unit assumed)

    Controllable:No

    Description:Direction vector of curve at start point.

  • start_meshMeshgenerator providing the mesh to start spline from.

    C++ Type:MeshGeneratorName

    Controllable:No

    Description:Meshgenerator providing the mesh to start spline from.

  • start_pointStarting (x,y,z) point for curve.

    C++ Type:libMesh::Point

    Controllable:No

    Description:Starting (x,y,z) point for curve.

Curve Extremities Input Parameters

  • degree3Degree of interpolating polynomial.

    Default:3

    C++ Type:unsigned int

    Controllable:No

    Description:Degree of interpolating polynomial.

  • num_cps6Number of control points used to draw the curve. Minimum of degree+1 points are required.

    Default:6

    C++ Type:unsigned int

    Controllable:No

    Description:Number of control points used to draw the curve. Minimum of degree+1 points are required.

  • sharpness0.6Sharpness of curve bend.

    Default:0.6

    C++ Type:double

    Unit:(no unit assumed)

    Range:sharpness>0 & sharpness<=1

    Controllable:No

    Description:Sharpness of curve bend.

Spline Parameters

  • edge_element_typeEDGE2Type of the EDGE elements to be generated.

    Default:EDGE2

    C++ Type:MooseEnum

    Options:EDGE2, EDGE3, EDGE4

    Controllable:No

    Description:Type of the EDGE elements to be generated.

  • num_elementsNumer of elements to be drawn. Must be at least 1.

    C++ Type:unsigned int

    Range:num_elements>=1

    Controllable:No

    Description:Numer of elements to be drawn. Must be at least 1.

Discretization 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