Skip to content

Three Dimensional Hexahedral Meshes

HOHQMesh can also generate 3D hexahedral meshes by extruding or sweeping a two dimensional mesh. Topography can also be added to the bottom of the domain either through a functional form or from data supplied through a file. Finally, when bottom topography is present, the mesh along the bottom can be sized according to the bottom curvature for either 2D or 3D meshes.

To tell the mesher that you want a hex mesh, you add an algorithm block to the CONTROL_INPUT block for how the 3D extrusion will be done. Currently there are three:

When sweeping is used, the profile can be scaled along the sweep.

One unique feature of HOHQMesh is that bottom topography can be added when simple extrusion is used to generate the 3D mesh. Furthermore, the mesh can be sized according to the curvature of the bottom topography.

Simple Extrusion

HalfCircleExtruded

Fig. 20. Simple Extrusion of a semi-circular quadrilateral mesh

The first hex-meshing algorithm is the SIMPLE_EXTRUSION algorithm.

\begin{SIMPLE_EXTRUSION}
     direction          = 3
     height             = 8.0
     subdivisions       = 8
     start surface name = bottom
     end surface name   = top
 \end{SIMPLE_EXTRUSION}

The direction (where x = 1, y = 2, z = 3) says which direction the extrusion is done. Note that even though the initial 2D mesh is in the x-y plane, the quad mesh is rotated to give a hex mesh extruded in the requested direction. The height tells how far to extrude. A name is given to the bottom and top faces created by the extrusion so that boundary conditions can be attached. Otherwise, the names of the faces are given by the 2D curve names.

Simple Rotation

IglooAlt

Fig. 21. Simple rotation of the mesh in Fig. 3

The second algorithm is the SIMPLE_ROTATION, which rotates the two dimensional mesh about an axis

\begin{SIMPLE_ROTATION}
   direction             = 1
   rotation angle factor = 1.0
   subdivisions          = 8
   start surface name    = bottom
   end surface name      = top
\end{SIMPLE_ROTATION}

The rotation angle factor is the fraction of pi over which the quad mesh is rotated. An example is shown above in Fig. 21 of an original two dimensional mesh and its rotation about the x axis (direction = 1).

Sweeping

Snake

Fig. 22. Hex mesh generated by sweeping a circular mesh along a curve

The most general algorithm for generating hex meshes in HOHQMesh is to sweep a two-dimensional mesh along a prescribed curve, SWEEP_ALONG_CURVE. To sweep along a curve, one does two things:

  1. Add a SWEEP_ALONG_CURVE block to the CONTROL_INPUT block and
  2. Add the curve along which the sweeping is to be done to the MODEL block.

There are currently two sweeping algorithms available. The default is a simple rotation algorithm that has no method to counteract twisting of the mesh as it follows the curve. (Think of a roller-coaster that can turn upside down as it follows a curved track.) The default algorithm is exact so will sweep the curve to high order, but will only produce an untwisted mesh if the curve is planar.

The second is a parallel transport algorithm due to Hanson and Ma that keeps arbitrary vector in a particular orientation with respect to its initial direction. The parallel transport approach minimizes the twisting of the hex mesh, but is only second order accurate. [A fourth order algorithm exists and may be implemented in the future.]

To implement sweeping, include a SWEEP_ALONG_CURVE block in the CONTROL_INPUT block:

\begin{SWEEP_ALONG_CURVE}
   algorithm                = Hanson (optional)
   subdivisions per segment = 8
   start surface name       = bottom
   end surface name         = top
\end{SWEEP_ALONG_CURVE}

The algorithm keyword is optional. If not present, the sweeping will not include the parallel transport correction. Since the sweep curve can be a chain with slope or curvature singularities, the number of subdivisions per segment is defined. This ensures that a singularity occurs along element boundaries so that accuracy is not lost.

The curve itself is defined in the MODEL block.

\begin{SWEEP_CURVE}
    ...
\end{SWEEP_CURVE}

The SWEEP_CURVE block implicitly defines a CHAIN, like the OUTER_BOUNDARY block, and so only needs a list of curves to define the sweep.

Scaling

ScaledSigmoid

Fig. 23. Hex mesh generated by sweeping and scaling along a curve

The mesh can also be scaled in the direction normal to the sweep curve when sweeping is used. To scale the mesh, add a

\begin{SWEEP_SCALE_FACTOR}
    ...
\end{SWEEP_SCALE_FACTOR}

block to the MODEL. Like the SWEEP_CURVE and OUTER_BOUNDARY blocks, the SWEEP_SCALE_FACTOR block implicitly defines a CHAIN. You do not need to have the number chain segments match the number in the SWEEP_ALONG_CURVE block, but it is probably best to not introduce slope or curvature singularities except at element interfaces.

The equation for the scaling is scalar PARAMETRIC_EQUATION (as opposed to a PARAMETRIC_EQUATION_CURVE). It is defined, for example like this:

    \begin{PARAMETRIC_EQUATION}
       eqn = r(t) = 1.0 + 2.5*t*(1-t)
    \end{PARAMETRIC_EQUATION}

Bottom Topography

Pond

Fig. 24. Simple Extrusion of a semi-circular mesh with bottom topography

The bottom of a three dimensional mesh can vary in height according to a bottom topography. One defines the topography in the MODEL block in one of two ways:

  • By supplying a functional form, f(x,y)
  • By supplying gridded data in a file

See the MODEL section for details. Fig. 24 above shows an example of a bottom topography set with a bottom function, while Figs. 25 and 26 use data to describe Mt. St. Helens.

MtStHelens

Fig. 25. Simple Extrusion of a rectangular mesh with a mountain bottom topography read in from a file

Sizing the Mesh along Bottom Topography

SeaMountWithSizing

Fig. 26. Simple Extrusion of a semi-circular mesh with a bottom topography and local refinement depending on its curvature

When

    sizing = ON

in a TOPOGRAPHY block, e.g.

    \begin{TOPOGRAPHY}
       eqn    = h(x,y) = x^2 + y^2
       sizing = ON
    \end{TOPOGRAPHY}

the sizer will size the grid along the bottom according to the curvature of the topography for a 3D mesh. An example is shown in Fig. 26. If only a two dimensional mesh is requested, then it is sized according to the curvature, but the z-values of the 2D mesh are not changed, the result looking like the top of Fig. 26.