- inputThe mesh to extrude
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh to extrude
AdvancedExtruderGenerator
Extrudes a 1D mesh into 2D, or a 2D mesh into 3D, and supports a variable height for each elevation, variable number of layers within each elevation, variable growth factors of axial element sizes within each elevation and remap subdomain_ids, boundary_ids and element extra integers within each elevation as well as interface boundaries between neighboring elevation layers, as well as following a 1D curve and modifying the radial (normal to the extrusion axis) extent of the geometry.
Overview
The AdvancedExtruderGenerator adds more customization options over the MeshExtruderGenerator. This mesh generator is also capable of fixing inverted elements on-the-fly during extrusion.
Multiple Elevations
AdvancedExtruderGenerator extrudes a lower-dimension mesh (1D or 2D) given by "input" into a higher-dimension mesh (2D or 3D) in a direction defined by "direction". The extruded mesh can have multiple elevations with variable extrusion (axial) lengths provided by "heights". Each elevation can have separate subdomains, extra element extra integers, and boundaries defined. The number of axial elements in the different elevations can be provided through "num_layers". Within each elevation, the axial element dimension can be biased using the corresponding growth factor value in "biases".
Subdomain ID Remapping
By default, the extruded higher-dimension elements retain the same subdomain ids as their original lower-dimension elements. AdvancedExtruderGenerator provides an option to remap subdomain ids for each elevation through "subdomain_swaps", which is a double indexed array input parameter. Each elemental vector of "subdomain_swaps" contains subdomain remapping information for a particular elevation, where the first elemental vector represents the first extruded elevation. The elemental vector contain pairs of subdomain ids: the first subdomain id is the input mesh subdomain id that needs to be remapped, and the second subdomain id the new subdomain id to be assigned.
Extra Element Integer ID Remapping
Extra element integer ID remapping works in a similar manner as subdomain ID remapping. The extra element integers to be remapped must already exist in the input mesh and need to be specified in "elem_integer_names_to_swap". Leveraging the recently updated MOOSE input file syntax system, the remapping information of multiple extra element integers is provided as a triple-indexed array input parameter ("elem_integers_swaps"). For each extra element integer, the syntax is similar to "subdomain_swaps". The following input example shows the remapping of two extra element integers.
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
[extrude]
type = AdvancedExtruderGenerator<<<{"description": "Extrudes a 1D mesh into 2D, or a 2D mesh into 3D, and supports a variable height for each elevation, variable number of layers within each elevation, variable growth factors of axial element sizes within each elevation and remap subdomain_ids, boundary_ids and element extra integers within each elevation as well as interface boundaries between neighboring elevation layers, as well as following a 1D curve and modifying the radial (normal to the extrusion axis) extent of the geometry.", "href": "AdvancedExtruderGenerator.html"}>>>
input<<<{"description": "The mesh to extrude"}>>> = fmg
heights<<<{"description": "The height of each elevation"}>>> = '1 2 3'
num_layers<<<{"description": "The number of layers for each elevation - must be num_elevations in length!"}>>> = '1 2 3'
direction<<<{"description": "A vector that points in the direction to extrude (note, this will be normalized internally - so don't worry about it here)"}>>> = '0 0 1'
elem_integer_names_to_swap<<<{"description": "Array of element extra integer names that need to be swapped during extrusion."}>>> = 'element_extra_integer_1 element_extra_integer_2'
elem_integers_swaps<<<{"description": "For each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the element extra integer for that elevation. If multiple element extra integers need to be swapped, the enties are stacked based on the order provided in 'elem_integer_names_to_swap' to form the third dimension."}>>> = '1 4 2 8;
2 7;
1 6 |
1 8 2 4;
2 5;
1 6'
[]
[](moose/test/tests/meshgenerators/advanced_extruder_generator/advanced_extruder_with_element_extra_integer_swap.i)Boundary ID Remapping
Boundary ID remapping also works similarly to subdomain ID remapping. During extrusion, the lower-dimension boundaries are also converted into higher-dimension boundaries. A double indexed array input parameter, "boundary_swaps", can be used to remap the boundary ids. Here, the boundary ids to be remapped must exist in the input mesh, otherwise, dedicated boundary defining mesh generators, such as SideSetsBetweenSubdomainsGenerator and SideSetsAroundSubdomainGenerator, need to be used to define new boundary ids along different axial heights.
Interface Boundaries
The other categories of the boundaries that can be defined are the interfaces between subdomains in different elevations, as well as the top/bottom surfaces of the subdomains. As each elevation interface (or top/bottom surface) is simply a duplicate of the input mesh, these interface (or top/bottom surface) boundaries correspond to the subdomains of the input mesh, which are referred to as source_blocks. Also, due to the nature of sidesets, they can be defined on either side of the elevation interface. Thus, both upward and downward boundaries can be defined. Here upward means the normal vector of the sideset has the "same-ish" direction as the "direction" vector; downward means the normal vector of the sideset has the "opposite-ish" direction as the "direction" vector.
Extrusion along a line mesh / curve
Instead of a fixed direction, the mesh can be extruded following a line mesh. The extrusion is performed following the direction of the line mesh. The direction is computed locally for every node as:
the "start_extrusion_direction" if specified at the first curve node, else the direction from the first to the second node
the direction from the previous node to the next node (ignoring the current node) for every other curve node
the "end_extrusion_direction" if specified at the last curve node, else the direction from the last but one to the last node
When extruding along an line mesh curve, specifying the biases, heights, number of layers and directions is not currently supported.
Radial growth during extrusion
By setting the "end_radial_extent", the radial extent of the extruded mesh can be expanded or diminished progressively throughout the extrusion process. The radial extent is defined as the maximum norm for all nodes of the extruded mesh of the distance the node to the extrusion axis. For example, for a circle that is being extruded along an axis passing through its center, the radial extent is equal to the radius of the circle. The "radial_growth_method" can be set to a linear or cubic radial profile. The cubic option allows for specifying the derivative of the radial growth factor at the beginning and end of the extrusion using the "start_radial_growth_rate" and "end_radial_growth_rate" parameters respectively.
Helicoidal extrusion
The user may elect to perform a helicoidal extrusion along an axis going through the (0, 0, 0) point aligned with the extrusion "direction" vector parameter. The user must then select a non-zero "twist_pitch" parameter. After an extrusion distance of a pitch, a full rotation of the 2D shape being extruded will have been performed. By default, the rotation is performed in a clockwise direction around the axis of extrusion. To change the direction of the rotation, please specify a negative "twist_pitch".
Example Syntax
[Mesh<<<{"href": "../../syntax/Mesh/index.html"}>>>]
[extrude]
type = AdvancedExtruderGenerator<<<{"description": "Extrudes a 1D mesh into 2D, or a 2D mesh into 3D, and supports a variable height for each elevation, variable number of layers within each elevation, variable growth factors of axial element sizes within each elevation and remap subdomain_ids, boundary_ids and element extra integers within each elevation as well as interface boundaries between neighboring elevation layers, as well as following a 1D curve and modifying the radial (normal to the extrusion axis) extent of the geometry.", "href": "AdvancedExtruderGenerator.html"}>>>
input<<<{"description": "The mesh to extrude"}>>> = gmg
heights<<<{"description": "The height of each elevation"}>>> = '1 2 3'
num_layers<<<{"description": "The number of layers for each elevation - must be num_elevations in length!"}>>> = '1 2 3'
direction<<<{"description": "A vector that points in the direction to extrude (note, this will be normalized internally - so don't worry about it here)"}>>> = '0 0 1'
bottom_boundary<<<{"description": "The boundary name to set on the bottom boundary. If omitted an ID will be generated."}>>> = '4'
top_boundary<<<{"description": "The boundary name to set on the top boundary. If omitted an ID will be generated."}>>> = '5'
subdomain_swaps<<<{"description": "For each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the subdomains for that elevation"}>>> = '0 1;
0 2;
0 3'
[]
[](moose/test/tests/meshgenerators/advanced_extruder_generator/gen_extrude.i)Input Parameters
- biasesThe axial growth factor used for mesh biasing for each elevation.
C++ Type:std::vector<double>
Unit:(no unit assumed)
Range:biases>0.0
Controllable:No
Description:The axial growth factor used for mesh biasing for each elevation.
- directionA vector that points in the direction to extrude (note, this will be normalized internally - so don't worry about it here)
C++ Type:libMesh::Point
Controllable:No
Description:A vector that points in the direction to extrude (note, this will be normalized internally - so don't worry about it here)
- heightsThe height of each elevation
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:The height of each elevation
- num_layersThe number of layers for each elevation - must be num_elevations in length!
C++ Type:std::vector<unsigned int>
Controllable:No
Description:The number of layers for each elevation - must be num_elevations in length!
Optional Parameters
- bottom_boundaryThe boundary name to set on the bottom boundary. If omitted an ID will be generated.
C++ Type:BoundaryName
Controllable:No
Description:The boundary name to set on the bottom boundary. If omitted an ID will be generated.
- downward_boundary_idsDownward interface boundary ids.
C++ Type:std::vector<std::vector<short>>
Controllable:No
Description:Downward interface boundary ids.
- downward_boundary_source_blocksBlock ids used to generate downward interface boundaries.
C++ Type:std::vector<std::vector<unsigned short>>
Controllable:No
Description:Block ids used to generate downward interface boundaries.
- top_boundaryThe boundary name to set on the top boundary. If omitted an ID will be generated.
C++ Type:BoundaryName
Controllable:No
Description:The boundary name to set on the top boundary. If omitted an ID will be generated.
- upward_boundary_idsUpward interface boundary ids.
C++ Type:std::vector<std::vector<short>>
Controllable:No
Description:Upward interface boundary ids.
- upward_boundary_source_blocksBlock ids used to generate upward interface boundaries.
C++ Type:std::vector<std::vector<unsigned short>>
Controllable:No
Description:Block ids used to generate upward interface boundaries.
Boundary Assignment Parameters
- boundary_swapsFor each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the boundaries for that elevation
C++ Type:std::vector<std::vector<short>>
Controllable:No
Description:For each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the boundaries for that elevation
- elem_integer_names_to_swapArray of element extra integer names that need to be swapped during extrusion.
C++ Type:std::vector<std::string>
Controllable:No
Description:Array of element extra integer names that need to be swapped during extrusion.
- elem_integers_swapsFor each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the element extra integer for that elevation. If multiple element extra integers need to be swapped, the enties are stacked based on the order provided in 'elem_integer_names_to_swap' to form the third dimension.
C++ Type:std::vector<std::vector<std::vector<unsigned long, std::allocator<unsigned long>>>>
Controllable:No
Description:For each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the element extra integer for that elevation. If multiple element extra integers need to be swapped, the enties are stacked based on the order provided in 'elem_integer_names_to_swap' to form the third dimension.
- subdomain_swapsFor each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the subdomains for that elevation
C++ Type:std::vector<std::vector<unsigned short>>
Controllable:No
Description:For each row, every two entries are interpreted as a pair of 'from' and 'to' to remap the subdomains for that elevation
Id Swap 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
- end_extrusion_directionA vector that points in the ending direction for extruding along a curve. This vector should be the tangent vector at the LAST node of the extrusion curve. Vector will be normalized in code, so don't worry about it here.
C++ Type:libMesh::VectorValue<double>
Unit:(no unit assumed)
Controllable:No
Description:A vector that points in the ending direction for extruding along a curve. This vector should be the tangent vector at the LAST node of the extrusion curve. Vector will be normalized in code, so don't worry about it here.
- extrusion_curveName of the mesh generator providing the line mesh curve to be extruded along. The extrusion path follows the node order in the line mesh
C++ Type:MeshGeneratorName
Controllable:No
Description:Name of the mesh generator providing the line mesh curve to be extruded along. The extrusion path follows the node order in the line mesh
- start_extrusion_directionA vector that points in the starting direction for extruding along a curve. This vector should be the tangent vector at the FIRST node of the extrusion curve. Vector will be normalized in code, so don't worry about it here.
C++ Type:libMesh::VectorValue<double>
Unit:(no unit assumed)
Controllable:No
Description:A vector that points in the starting direction for extruding along a curve. This vector should be the tangent vector at the FIRST node of the extrusion curve. Vector will be normalized in code, so don't worry about it here.
Extrusion Along Curve Parameters
- end_radial_extent0If modifying the radial extent of the extruded geometry, final radial extent to reach at the end of the extrusion process
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:If modifying the radial extent of the extruded geometry, final radial extent to reach at the end of the extrusion process
- end_radial_growth_rate1Ending rate of radial expansion.
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Ending rate of radial expansion.
- radial_growth_methodlinearFunctional form to change radius while extruding along curve.
Default:linear
C++ Type:MooseEnum
Controllable:No
Description:Functional form to change radius while extruding along curve.
- start_radial_growth_rate1Starting rate of radial expansion.
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Starting rate of radial expansion.
- twist_pitch0Pitch for helicoidal extrusion around an axis going through the origin following the direction vector
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Pitch for helicoidal extrusion around an axis going through the origin following the direction vector
Radial Transformation 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)