Tutorial Mesh Generation

Tools

 

Meshing panel.

toolbar_meshgeometry.png 

Mesh-Geometry toolbar.

Some mesh-editing options also require the tools of the  Selection tool­bar.

toolbar_selection.png 

Selection toolbar.

The first drop-down list in the toolbar gives access to the available selection tools. The third drop-down list allows to switch between different target geom­etries (nodes, elements, edges, faces) for selections.

Mesh Generation

Triangulation

To get some hands-on experience in how the available mesh-generator algo­rithms work we apply the three different mesh generators on the same super­mesh and study the resulting finite-element meshes.

First, click on mesh_open.png Open to load the supermesh file mesh.smh from the supermsh folder. This supermesh consists of two polygons, one line and three point features.

mesh_supermesh.png 

Supermesh.

Start with the Advancing Front algorithm which can be selected from the generator list of the Meshing panel.

In order to prescribe the number of elements for the mesh generation, you can double click on Supermesh into the section From Supermesh Elements in the Meshing panel. This activates the properties of the entire supermesh. Enter a Proposed elements of  2000 elements in the input field and click on mesh_generatemesh.png Generate Mesh to start the mesh-generation process. A new window, the Slice view, opens with the resulting finite-element mesh.

As shown in figure below, Advancing Front ignores the line and point features which are included in the supermesh.

Now, use the same supermesh to generate a finite-element mesh with the GridBuilder algorithm. Select GridBuilder in the Meshing panel and without any further changes simply click on mesh_generatemesh.png Generate Mesh.

The resulting finite-element mesh looks similar to the one created with the Advancing Front algorithm, except that polygon edges, lines and points are now honoured by the mesh.

As a next step, we will refine the mesh around the point and line features. Go back to the Meshing panel, we will adjust the refinement settings are available with the mesh_generatorproperties.png Generator Properties.

In the generator properties, we choose Polygon Refinement of 5, Line Refinement of 8 and a Point Refinement of 10. Make sure that the option Edge Refine Mode is set to SELECTED.

To select the elements to be refined go back to the Supermesh view and click on mesh_refinementselection.png Refinement Selection. Click on all segments of the line and of the edge that separates the two polygons. The selected edges are shown in green. Then click on mesh_generatemesh.png Generate Mesh again.

Advancing Front, GridBuilder (without refinement) and GridBuilder (with refinement)

Next, we will apply the Triangle algorithm to generate a finite-element mesh.

Choose Triangle from the generator list in the Meshing panel. Generator Properties options are still active from the previous operation. This time the options are related to Triangle. You can activate Refine Polygons, Refine Lines and Refine Points with the following settings:

The Edge Refine Mode is SELECTED.

  • Polygons: gradation: 5, target element size: 1.0 m
  • Lines:       gradation: 3, target element size: 0.5 m
  • Points:      gradation: 3, target element size: 0.5 m

Use the mesh_refinementselection.png Refinement Selection tool to select the edge between the two polygons in the Supermesh view. Clicking on mesh_generatemesh.png Generate Mesh should now produce a finite-element mesh that looks similar to the one with Gridbuilder.

Separate Editing of Polygons

For every supermesh polygon the mesh density can be defined separately while the total number of proposed elements remains constant. Go to the Supermesh view and activate Polygon 1 in the list of Supermesh items in the  Meshing panel as shown below. This will activate the list of properties for this specific supermesh element.

Setting supermesh properties for a specific polygon.

FEFLOW now automatically selects a polygon as soon as the selection mode is active, for example by clicking on Select in Rectangular Region. In the  Meshing panel, we change the Meshing density to a value of  10. We proceed with the second polygon by selecting it with a single click on the items list in the  Meshing panel. This time we enter a density factor of  2 in the input field. Finally we generate the mesh with click on mesh_generatemesh.png Generate Mesh.

 

To reset the meshing density factors to the default value of 1, you can invoke the context menu of the property and choose Reset to Default.

 Meshes generated with the Triangle algorithm.

Quad Meshing

A finite-element mesh with quadrilateral elements can be generated using the Transport Mapping algorithm.

We load a new file which is similar to the one used for the triangulation exer­cises, except this supermesh consists of only one polygon that has exactly four nodes. Click on mesh_open00035.png Open and load the file quadmesh.smh. Transport Mapping requires supermesh polygons with exactly four nodes. Lines and points are ignored in the mesh-generation process.

To enable the quad meshing option go to the  Meshing panel and click on mesh_quadrilateral.png Quadrilateral Mode. Now a new generator is available in the list. Select Transport Mapping, enter a Proposed elements of  2000 elements and click on mesh_generatemesh.png Generate Mesh to start the meshing process.

Transport mapping

Editing the Mesh Geometry

Triangular Meshes

For this exercise load the file triangle.fem.

The geometry of the finite-element mesh can be edited after the mesh-gener­ation process has been finished. All the necessary tools are located in the  Mesh-Geometry toolbar.

It is possible to refine the mesh globally (entire mesh) or locally (only selected parts). A derefinement option for previously refined parts of the mesh is also available.

If we want to apply local mesh refinement we have to select a target area first. Make sure that the Slice view is the active view. All necessary selection tools can be found in the  Selection toolbar. To create an element-based selection choose  Select Elements from the drop-down list of target geometries. Then, activate the  Select in Rectangular Region tool from the drop-down list of selection tools to draw a rectangle around the line fea­ture.

Now click on  Refine Elements in the  Mesh-Geometry toolbar. Each selected element is subdivided into four elements.

The derefinement tool is used similarly; however, only those parts that were previously refined can be derefined.

Elements can also be deleted from the finite-element mesh. Select a couple of elements and click on  Delete Elements to cut out these elements. On the right hand side of figure a (purely illustrative) example for a mesh with deleted elements is shown below.

 

 Refinement and deleted elements.

To deactivate elements during the simulation we use the parameter In-/active Elements in the Geometry section of the  Data panel. Double click on In-/active Elements to set this parameter active and use the tool  Select in Rectangular Region to create an element selection. Make sure that the input field of the  Editor toolbar shows the setting inactive and click on  Assign to set the selected elements to inactive. The result is shown in fig­ure below.

 

Active and inactive mesh elements.

 

If elements are set to active or inactive via map assignment, the active or inactive status needs to be expressed by numeric values: 1 for active and 0 for inactive.

 

Mesh smoothing can produce more regularly shaped elements and reduce the number of obtuse-angled triangles. To use the  2D Mesh Smoothing tool in the  Mesh-Geometry toolbar, the nodes which are allowed to be moved during the smoothing process have to be selected first. Activate  Select Nodes in the  Selection toolbar and draw again a rectangle around the line feature. Click on the  2D Mesh Smoothing tool that is now active and clear the selection with a click on  Clear Selection. Figure below shows the selected mesh location before and after the smoothing.

 

 

Mesh before and after smoothing.

To check for obtuse angles and triangles violating the Delaunay criterion, we use the tools provided in Auxiliary Data in the  Data panel. First, double-click on Max. interior angle of triangles to show obtuse-angled triangles in the active view. Pay attention to how the angle distribution changes when we click on  Undo in the  Standard toolbar to return to the mesh without smoothing. Next, double-click on Delaunay criterion violations and then click on  Redo in the  Standard toolbar to return to the smoothed mesh again. Both distributions indicate that the mesh smoothing has significantly improved the mesh quality.

Use the  Move Node tool in the  Mesh-Geometry toolbar and drag a mesh node to change its position within the mesh. Also, use  Flip Edge and click on an element edge to change the subdivision of two adjacent trian­gles. Edge flipping will freeze the mesh so that derefinement of previously refined areas will no longer be possible.

Quad Meshes

Click on mesh_open00035.png Open to load the file quadmesh.fem for this exercise.

Except for the derefinement and the flip edge tool all editing options are also available for quad meshes.

As an additional option, quad meshes can be transformed into triangular meshes. Four different triangularization methods are available of which we will use one. Select the method  Four Triangles around Center from the drop-down list in the  Mesh-Geometry toolbar to subdivide every quad element into four triangular elements. The resulting finite-element mesh is shown in figure below.

 

Triangulated quad mesh.

Extending a Model to 3D

After the model has been discretized in 2D we now extend it to a 3D model. Click on mesh_open00035.png Open and load the file triangle.fem for this exercise.

To perform the extension to a 3D model, go to the  Edit menu and open the 3D Layer Configuration dialog. The table on the left displays the number of slices and layers, and also the elevation of each slice.

The 3D model shall consist of 3 slices and 2 layers and the top slice shall be located at an elevation of 5 m.

To set the elevation of the top slice, enter  5 in the Elevation input field and hit <Enter>. Add one slice in between existing Slice 1 and Slice 2. Select both slices with click and holding <CTRL>. Then click on Insert Slice (s) between and set the number of slices to  3 and hit <Enter>. Now you can change the elevation of Slice 2 and Slice 3 with double-click on their corresponding Elevation field. The values are 4 m and 3 m, respectively.

 

3D Layer Configurator.

Click on  OK to apply the settings and to leave the dialog.

A new view window, the 3D view, now automatically opens, displaying the model in 3D. The in-slice spatial discretization in plan view remains the same but the previously 2D finite elements have now been extended to 3D pris­matic elements.

mesh_3dview.png 

The model in 3D view

Table of Contents

Index

Glossary

-Search-

Back