16. MESH Namelist
16.1. Overview
The MESH namelist specifies the common mesh used by all physics models other than the induction heating model, which uses a separate tetrahedral mesh specified by the EM_MESH namelist. For simple demonstration problems, a rectilinear hexahedral mesh of a brick domain can be defined, but for most applications the mesh will need to be generated beforehand by some third party tool or tools and saved asa file that Truchas will read. At this time Exodus II [1] is the only supported mesh format (also sometimes known as Genesis). This well-known format is used by some mesh generation tools (Cubit, for example) and utilities exist for translating from other formats to Exodus II. The unstructured 3D mesh may be a general mixed-element mesh consisting of non-degenerate hexehedral, tetrahedral, pyramid, and wedge/prism elements. The Exodus II format supports a partitioning of the elements into element blocks. It also supports the definition of side sets, which are collections of oriented element faces that describe mesh surfaces, either internal or boundary, and node sets which are collections of mesh nodes. Extensive use is made of this additional mesh metadata in assigning materials, initial conditions, boundary conditions, etc., to the mesh.
MESH Namelist Features
16.2. Components
External Mesh file
In typical usage, the mesh will be read from a specified Exodus II mesh file. Other input variables that follow specify optional modifications that can be made to the mesh after it is read.
mesh_file
Interface_Side_Sets
gap_element_blocks (deprecated)
exodus_block_modulus
The element block IDs are modified immediately after reading the file. Any input parameters that refer to block IDs must refer to the modified IDs.
Internally Generated Mesh
A rectilinear hexahedral mesh for a brick domain \([x_{min},x_{max}] × [y_{min},y_{max}] × [z_{min},z_{max}]\) can be generated internally as part of a Truchas simulation using the following input variables. The mesh is the tensor product of 1D grids in each of the coordinate directions. Each coordinate grid is defined by a coarse grid whose intervals are subdivided into subintervals, optionally with biased sizes. The generated Exodus II mesh consists of a single element block with ID 1, and a side set is defined for each of the six sides of the domain with IDs 1 through 6 for the \(x=x_{min}, x=x_{max}, y=y_{min}, y=y_{max}, z=z_{min},\) and \(z=z_{max}\) sides, respectively. In addition, a different node set is defined for each of the 8 nodes at the corners of the domain, with IDs 1 through 8. The first node set is the \((x_{min},y_{min},z_{min})\) corner. It is followed by the remaining corners on the \(z=z_{min}\) side in a counter-clockwise order with respect to the \(z\) axis, and then the corners on the \(z=z_{max}\) side in the analogous manner. Note that while the mesh is formally structured, it is represented internally as a general unstructured mesh.
x_axis, y_axis, z_axis
Data that describes the grid in each of the coordinate directions. The tensor product of these grids define the nodes of the 3D mesh. The data for each coordinate grid consists of these three component arrays:
Option |
Description |
---|---|
%coarse_grid |
A strictly increasing list of two or more real values that define the points of the coarse grid for the coordinate direction. The first and last values define the extent of the domain in this direction. |
%intervals |
A list of postive integers defining the number of subintervals into which each corresponding coarse grid interval should be subdivided. The number of values must be one less than the number of coarse grid points. |
%ratio |
An optional list of positive real values that define the ratio of the lengths of successive subintervals for each coarse grid interval. The default is to subdivide into equal length subintervals. If specified, the number of values must be one less than the number of coarse grid points. |
See Figure 16.2.1 for an example. That is a mesh generated by the following input.
x_axis%coarse_grid = 0.0, 0.67, 1.33, 2.0
x_axis%intervals = 3, 1, 4
x_axis%ratio = 1.3, 1.0, 0.7
y_axis%coarse_grid = 0.0, 0.5, 1.0
y_axis%intervals = 1, 3
y_axis%ratio = 0.7
z_axis%coarse_grid = 0.0, 1.0
z_axis%intervals = 1

Figure 16.2.1 Top xy surface of the rectilinear mesh generated by the example input shown.
noise_factor (expert)
Common variables
The following variables apply to both types of meshes.
coordinate_scale_factor
rotation_angles
partitioner
Option |
Description |
---|---|
metis |
uses the well-known METIS library [2] to partition the dual graph of the mesh at runtime. This method has a number of options which are described below. |
file |
reads the partitioning of the mesh cells from a disk file; see partition_file. |
block |
partitions the mesh cells into nearly equal-sized blocks of consecutively numbered cells according their numbering in the mesh file. The quality of this naive decomposition entirely depends on the given ordering of mesh cells, and thus this option is not generally recommended. |
partition_file
first_partition
METIS Mesh Partitioning
When metis is specified for partitioner, a graph partitioning procedure from the METIS library isused to partition the dual graph of the mesh. This is the graph whose nodes are the mesh cells and edges are the faces shared by cells. The partitioning procedures have the following integer-valued options that may be specified, though all have reasonable defaults so that none must be specified. See the METIS documentation [2] for more details on these options.