Meshing Utilities

Mesh Generation and Conversion

class HexBlockBase

Base class representation of a structured hex mesh.

Subclassed by sierra::nalu::HexBlockMesh, sierra::nalu::Plot3DMesh

Public Types

enum SideIDType

Sideset definition type.

Values:

XMIN = 0
YMIN
ZMIN
XMAX
YMAX
ZMAX

Public Functions

void initialize()

Registers the element block and the sidesets to the STK MetaData instance.

void run()

Creates the nodes and elements within the mesh block, processes sidesets, and initializes the coordinates of the mesh structure.

Public Static Functions

HexBlockBase *create(CFDMesh &mesh, const YAML::Node &node, std::string lookup)

Runtime creation of mesh generator instance.

class HexBlockMesh : public sierra::nalu::HexBlockBase

Create a structured block mesh with HEX-8 elements.

Public Types

enum DomainExtentsType

Computational domain definition type.

Values:

BOUND_BOX = 0

Use bounding box to define mesh extents.

VERTICES

Provide vertices for the cuboidal domain.

Public Functions

HexBlockMesh(CFDMesh &mesh, const YAML::Node &node)

Parameters

class Plot3DMesh : public sierra::nalu::HexBlockBase

Mesh Spacing Options

class MeshSpacing

Abstract base class that defines the notion of mesh spacing.

This class provides an interface where mesh spacing for a structured mesh can be represented as a 1-D array of values (0.0 <= ratio[i] <= 1.0) in a particular direction, that represents the location of the i-th node on the mesh on a unit cube.

See

sierra::nalu::HexBlockMesh

Subclassed by sierra::nalu::ConstantSpacing, sierra::nalu::GeometricStretching

Public Functions

virtual void init_spacings() = 0

Initialize spacings based on user inputs.

const std::vector<double> &ratios() const

A 1-D array of fractions that represents the distance from the origin for a unit cube.

Public Static Functions

MeshSpacing *create(int npts, const YAML::Node &node, std::string lookup)

Runtime creation of the concrete spacing instance.

class ConstantSpacing : public sierra::nalu::MeshSpacing

Constant mesh spacing distribution.

Specialization of MeshSpacing to allow for constant mesh spacing which is the default implementation if no user option is specified in the input file. This class requires no additional input arguments in the YAML file.

Public Functions

void init_spacings()

Initialize a constant spacing 1-D mesh.

class GeometricStretching : public sierra::nalu::MeshSpacing

Create a mesh spacing distribution with a constant stretching factor.

Requires user to specify a constant stretching factor that is used, along with the number of elements, to determine the first cell height and the resulting spacing distribution on a one-dimensional mesh of unit length. Given a stretching factor \(s\), the first cell height is calculated as

\[ h_0 = L \left(\frac{s - 1}{s^n - 1}\right) \]

By default, the stretching factor is applied in one direction. The user can set the bidirectional flag to true to apply the stretching factors and spacings at both ends.

Public Functions

void init_spacings()

Initialize spacings based on user inputs.