Mesh Generation Tips

From TUFLOW FV Wiki
Revision as of 12:16, 5 May 2014 by Admin (Talk | contribs) (Nodes and Element Numbering)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
LINKS: Main page
Modelling Advice Tutorial Models Tips and Tricks
Mesh Generation Tips Tutorial Module 1 SMS
A Model Won't Start Tutorial Module 2 UltraEdit
A Model Crashes Tutorial Module 3 Notepad++
A Model Runs Slow Tutorial Module 4 Excel
TUFLOW Products Support / Contact TUFLOW FV Utilities
Requesting a Licence Running TUFLOW FV
Mesh Generation Tips



Primary Goal

The primary goal when designing a flexible mesh is to describe the key bathymetric and hydrodynamic features using the least, largest element sizes possible. This is why flexible meshes are used; to optimise computational efficiency whilst achieving desired modelling accuracy.


Manual or Automated Mesh Generation?

As shown in tutorial models, creating a mesh is a combination of manual and automated steps. Keep it this way; maintaining a reasonable amount of manual intervention into the design of the mesh will ultimately produce a far more efficient mesh which will be more accurate and computationally efficient.


Mesh Orientation

Water typically flows along contour lines. Ensuring that elements also follow the contours (for example, by using contours as arcs that define polygons and mesh regions) will in general produce the most efficient meshes. Remember to also include top-of-bank lines, thalwegs of channels, etc.


Mesh Development Process

The map module of SMS allows you to construct pieces of your model, each defined as a polygon which in turn is defined by a series of arcs. Then, each polygon can contain specific mesh properties. Developing a mesh framework in this stepwise manner is recommended; the approach allows the flexibility to adjust components of the mesh design relatively easily and provides the balance of manual and automated.


Courant Limits (Model Efficiency)

TUFLOW FV is an explicit model. This means that the timestep of the model is dependent upon the element which has the highest Courant number. The Courant number (or CFL condition) limits each timestep in a model simulation as follows:

Δt < Δx / (√(gd) + v)

Where Δt = timestep, Δx is a nominal cell length, g is gravity, d is water depth and v is velocity.

This means that a small element in deep water and/or with a high velocity will likely become the limit for the timestep and hence the overall simulation time. It is important to make sure that the element responsible for limiting the CFL condition has to be the size and shape it is.

Mesh Type: Pave or Patch?

Pave is a series of triangles, Patch is a more uniform patch of quadrilaterals.

When considering mesh types it is important to reflect upon TUFLOW FV and how its computational scheme performs. A model geometry is best when it describes the physical features in the most computationally efficient manner. Generally speaking a patch mesh type is the most efficient mesh type and should be applied where possible. Also, a patch is easier to control (i.e. it is easier to keep element size and shapes regular and according to what you intend).

A patch of elements can only be done if there are 4 arcs defining the patch. In many instances this is not possible; natural features are often more irregular. Under such circumstances a pave mesh area should be used. Often, a mesh consists of a series of patches with paving connecting them together.

DEM and Generation Interaction

As a general rule a flexible mesh design aligns with bathymetric / topographic contours and features. The mesh design is therefore intrinsically linked to the bathymetry and the data used to define it. It is important to be aware of this and interlink the processes of DEM generation and mesh generation.

The table below describes the process typically followed to create a DEM using GIS techniques. Also shown are the corresponding interactions with the mesh generation that can occur at each step.


STEP DEM Generation in GIS Interaction with Mesh Generation
1 Data is imported and quality checked. Elevations in the mesh can be exactly those elevations measured if the mesh is snapped directly onto a data point.
2 Breaklines are defined to ensure consistency of levels between data points. Breaklines specified in a GIS can be applied as arcs in the mesh generator, ensuring that the mesh alignment lies precisely along each breakline.
3 A TIN is generated. Extracting elevations for a mesh using a TIN is more accurate than a DEM, especially if the mesh alignment follows breaklines and is snapped to data points.
4 From the TIN, or via an alternative interpolation technique, a DEM is generated with a given resolution. To avoid smoothing errors created by interpolating DEM elevations onto the mesh, a DEM resolution that is finer than the smallest element size is recommended.


Bathymetric data often requires some interpretation and adjustments when creating a DEM or model geometry. In particular, it is important that key topographic / bathymetric features are consistent and persist along their length. Examples include:

  • A raised levee (or elevated road) is a key hydraulic feature for a flood simulation; it is important therefore to ensure that elevations between successive points along the levee are preserved.
  • Similarly, if the thalweg of a natural flow channel is not preserved then a blockage to flows can occur.
  • If cross-section surveys of river channels are conducted there is often some interpretation required to define the bathymetry between each cross-section. This is particularly the case around river bends and if linear interpolation between successive cross-sections is performed.

GIS breaklines should be used to address the above listed issues.

Nodes and Element Numbering

TUFLOW FV requires that there is consecutive numbering for nodes and elements in the input mesh file (the *.2dm file). In other words, if you have 100 nodes in your mesh then the highest node ID will be 100. Mesh generation tools may allow you to have gaps in the ID lists of both nodes and elements, and this situation often occurs when you are adding or removing elements, etc during the mesh design process. As a final step in the mesh generation process it is recommended that you renumber the mesh. To do this in SMS, follow the steps:

  • Select a nodestring (any will do, however a boundary nodestring is preferred).
  • Click on the menu command “Nodestrings -> Renumber” (or right click, and press “renumber”).

This will renumber all the elements and nodes.

Does node and element numbering influence computational performance?

No, not really.

Renumbering a mesh does have a small influence on the computational performance of TUFLOW FV; a “better numbered” mesh will have smaller memory allocation. This is different to other flexible mesh models (implicit finite element models such as RMA for example), where mesh design and numbering have significant impacts upon computational performance.