E4D User Guide
E4D User Guide
Mesh Generation Configuration File Details
The mesh generation configuration file provides E4D with instructions for building a mesh and consists of six blocks. Syntax for this file is provided on the mesh configuration file page. This page contains additional details and rules for E4D meshes.
Control Points
Those points that are required to define mesh geometry, including surface topography, sensor locations, internal boundaries (e.g., non-point sensor locations, buried infrastructure, known geologic contacts), and mesh refinement points are specified as control points within the control points block. Each control point will become a mesh node in the final tetrahedral mesh. There are three types of control points:
- Surface points are used to specify points of known elevation and/or surface sensor locations on the mesh, and are given a boundary flag of 1. E4D, triangle, and tetgen use these points to define surface topography and add nodes at surface sensor locations. Surface points cannot be placed on or beyond the outer boundary of the mesh (Figure 1), which is specified by a set of surface boundary points, as described below.
- Surface boundary points are used to define the outer bounday of the computational mesh, and are given a boundary flag of 2 (Figure 1). E4D uses these nodes to construct the outer vertical boundaries of the computational mesh by connecting adjacent points and constructing a series of vertical planes down to the elevation m_bot, which is specified in the general block.
- Internal control points are used to define internal boundaries, buried sensor locations, and mesh refinement points, and are given a boundary flag of 0. All internal control points must be placed within the mesh boundaries formed by the surface boundary, vertical external boundaries, and bottom boundary (Figure 1).
Figure 1. Diagram of the three types of control points used to define a mesh
It is best practice to place a control point at every sensor location, although it is not explicitly required by E4D. E4D 'snaps' each sensor to the nearest node in the mesh. If the nearest node is far from the actual sensor location, modeling errors may result (E4D will print a warning message in modes 2 and higher if this occurs).
It is generally beneficial to refine the mesh near sensor locations in order to improve modeling accuracy. For buried sensor locations, this can be done by placing a second control point near each sensor location control point. By so doing, tetgen will refine around the two points, as is required, to maintain a high quality mesh. The mesh can be refined around surface sensors in the same manner. Another approach to refine around surface sensors is to place each just under the surface with a boundary flag of b_flag = 0. By doing so, tetgen will automatically refine around each surface sensor. This practice also facilitates high quality surface mesh generation by removing the requirement to have a node at every sensor location on the surface (i.e., the sensor locations are placed just beneath the surface).
Internal Boundary Configuration Block
Internal boundaries consist of one or more user-defined internal planes (called piecewise linear complexes in the tetgen documentation) that separate one region of the mesh from another. Internal boundaries that close to form a 'watertight' structure form a zone within the mesh. Boundaries are specified by describing how selected control points are connected to form planes within the internal boundary configuration block.
Critical boundary definition rules
The most common source of error in mesh generation is the improper specification of internal boundaries. If tetgen fails and the source of the error is not obvious from the mesh.log file, make sure the boundary definitions in the boundary configuration block adhere to the following requirements:
- Do not define planes on any external boundary (e.g., surface, bottom, or side boundaries). E4D will construct these automatically. It is appropriate and required to explicitly specify segments of subsurface planes that intersect the surface boundary within the boundary definition (see item 5 below).
- Ensure that boundaries do not intersect, except along common segments. Such intersections will cause tetgen to fail, and E4D does not check for this condition.
- All control points existing within a defined plane, or along any segment of of a defined plane, must be included in the definition of that plane.
- Each of the control points used a the plane definition must lie upon the same plane. This is important if four or more points are used to define a plane.
- There are several import considerations when constructing boundaries that intersect the surface.
- The segments of any plane that intersect the surface boundary must be explicitly specified in the plane definition. In other words, any plane segment that intersects the surface boundary must not be defined by the first and last points specified in the plane definition (i.e. the points defining segments on the surface must be listed sequentially in the plane definition)
- It is often useful to specify a series of planes that form a closed boundary (thereby forming a zone) whose upper margin is the surface of the mesh, which is automatically generated by E4D (see item 1 above). In this case E4D must correctly connect the segments of planes intersecting the surface such that those segments define the upper boundary of the zone. To do so, E4D takes the list of control points defining the segments that intersect the surface, and connects each point to the next nearest point. With this in mind, it is important to define the planes that intersect the surface in such a manner that E4D correctly connects the surface segments. Attention to this issue is only required for boundaries whose surface intersection forms convex angles.
It is generally helpful and highly recommend to draw a picture with relevant control points labelled to ensure that boundary definitions do not violate these conditions.
Hole Configuration Block
Any zone defined within E4D can be turned into a hole or void in the mesh. To create a hole, tetgen begins at one point within the subject zone and successively removes all of the elements enclosed within the zone boundary. The hole configuration block specifies which zones should be hollowed to form a hole by specifying a point within the zone