idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.77k stars 1.05k forks source link

Allow extrusion of higher order 2D meshes to 3D #20268

Closed gambka closed 3 months ago

gambka commented 2 years ago

Reason

For many geometries (e.g., circles, cylinders) higher order quad or hex elements are better suited for capturing the curved geometry than first order elements. Currently the MeshExtruderGenerator cannot be used on a 2D mesh of second order elements (e.g., QUAD8) as an error Error: not implemented! is reported.

Design

I'm not sure if this is a change that goes into the MeshExtruderGenerator itself or into libMesh as the Error: not implemented! is coming from libMesh from what I can tell. You can arrive at this by adding the following to an input file and running with --mesh-only. If elem_type = QUAD4 the mesh creates successfully. For this example, yes GeneratedMeshGenerator can create a 3D mesh on its own, but I'm trying to apply MeshExtruderGenerator to a specialized MeshGenerator and this was the easiest MOOSE only example to replicate the issue.

[Mesh]
  [square]
    type = GeneratedMeshGenerator
    dim = 2
    elem_type = QUAD8
  []
  [brick]
    type = MeshExtruderGenerator
    input = square
    bottom_sideset = bottom
    top_sideset = top
    extrusion_vector = '0 0.1 0'
    num_layers = 10
  []
[]

Impact

Additional flexibility with the internal mesh generators.

GiudGiud commented 3 months ago

Closing as addressed by #27662

Note that picking QUAD9 instead of QUAD8 would have worked before my PR