# PILEDYN - User documentation - Mesh generation

Introduction

A mesh is required in order to discretize the soil free-surface and interfaces between layers according to the defined stratigraphy, and the piles according to the pile group configuration. The solver takes advantage of the symmetry properties of the problem at hand, thus only one quarter of the model needs to be discretized.

We offer two alternatives to generate the soil free-surface and interfaces mesh: a built-in interface to external meshing tools (MESH2D and Gmsh) with some pre-defined parameters (automatic mesh), or loading an external mesh generated by the user (user mesh). The mesh for piles is always generated internally as an automatic mesh.

Automatic mesh

You can choose from the two available meshing tools in order to mesh the free-surface and interfaces: MESH2D (Matlab/Octave package), or Gmsh (external application). Both generate valid meshes with only some differences regarding the mesh truncation shape, and the type of quadratic elements used.

MESH2D

The mesh tool MESH2D has been included in the package (MESH2D release 3.0.0). You can select the path to alternative versions of the same tool, but there is no guarantee that this is going to work for other versions other than the included one.

Figura 1: Mesh for a 2x2 pile group in a homogeneous soil (generated by MESH2D).

Figura 2: Mesh for a 3x3 pile group in a two-strata soil (generated by MESH2D).

Gmsh

The mesh tool Gmsh has to be previously installed, and the path to the executable has to be defined. Unlike MESH2D, Gmsh is not a MATLAB/Octave package, and thus it runs outside MATLAB/Octave. The interface with Gmsh is performed via input (*.geo) and output (*.msh) files, which are stored in the current path and hence they are transparent to the user. Despite being a completely external tool, the interaction is similar to the MESH2D from the user point of view. The present PILEDYN version has been tested using Gmsh versions 2.10.1 and 2.13.0. Other versions may not work properly.

Figura 3: Mesh for a 2x2 pile group in a homogeneous soil (generated by Gmsh).

Figura 4: Mesh for a 3x3 pile group in a two-strata soil (generated by Gmsh).

Meshing options

Some pre-defined parameters have been established as meshing options in order to tune the automatic mesh generation. If they are not defined by the user, appropriate default values are considered. In the following, the available meshing options are described.

Figura 5: GUI for defining the meshing options.

Mesh generator

In the top of the window, you can choose the mesh generator for the automatic meshing procedure. If the default path to the selected tool needs to be changed, you can do so by pressing the "Path" button.

Free-surface and interfaces mesh parameters

The set of parameters are arranged according to their role in the mesh. It is necessary to define the dimensions of the near and far field areas, as well as mesh sizes. These parameters together with some characteristic lengths of the foundation (foundation bounding box dimensions, pile coordinates, pile diameter), shear wave velocities of each layer, and the maximum frequency, allow to define an appropriate mesh. Please note that the generated mesh is used for all frequencies of analysis, despite it is quite conservative in terms of the size of elements for the lower range of frequencies, and also conservative in terms of mesh truncation for the higher frequencies.

Dimensions

For each surface, free-surface or interface between layers, we calculate the maximum and coordinates from the set of piles crossing the surface. The near field dimensions are and and they are calculated as shown in Figure 6. The far field dimension is simply times the maximum foundation dimension obtained from the bounding box dimensions of the pile group.

Note: For soil stratigraphies with a bedrock, it is recommended to change to at least 4.

Figura 6: Layout of near field and far field dimensions and how they are determined.

Mesh size

A mesh size for the near field area and another mesh size for the far field at the mesh truncation are defined.

Near field

The mesh size for the near field area is taken as the minimum between two mesh sizes and :

- Mesh size based on the number of elements per minimum pile diameter:

where is the minimum pile diameter, and is the number of elements per pile diameter defined.

- Mesh size based on the number of elements per minimum shear wavelength:

where is the shear wavelength, , and is the number of elements per wavelength defined.

Far field

The mesh size for the far field at the mesh truncation is taken as the minimum between two mesh sizes and :

- Mesh size based on the number of elements per mesh truncation radius R:

where is the number of elements per mesh truncation radius.

- Mesh size based on the number of elements per minimum shear wavelength:

where , and is the number of elements per wavelength defined.

Pile mesh parameters

The size of pile elements is between two limits:

- Mesh size based on the number of elements per minimum shear wavelength:

where , and is the number of elements per minimum shear wavelength.

- Mesh size based on the number of elements per pile diameter:

where is the number of elements per pile diameter. The parameter must be less than 1, i.e. pile elements must be always of greater or equal lengths than the corresponding pile diameter.

User mesh

The user may define a customized mesh, which can be loaded in the main GUI. The mesh file must have a given format and it must meet some requirements.

Format
The mesh file should look like this:

where is the total number of nodes in mesh, is the total number of element in mesh, is the number of nodes of the element and is the reference number of each node, element or surface. Only quadratic elements of 9 (quadrilateral) and 6 (triangular) nodes are allowed, and the assumed node ordering is the standard convention shown in Figure 7.

Figura 7: Node ordering for 9-node quadratic quadrilateral and 6-node triangular elements.

Mesh requirements

- All nodes must be in , , .
- The free-surface and the soil layers interfaces must be at the corresponding z coordinates. Note that the free-surface must be at .
- Each free-surface and interface must have two surfaces. The first surface is the proper discretization, while the second surface encloses the first with a single layer of elements (closing elements) which are only required in order to consider unbounded nature of the soil. Each free-surface and interface must have surface numbering in ascending order. For example, a soil stratigraphy composed of three layers have: free-surface (), interface between stratum 1 and 2 (), and interface between stratum 2 and 3 ().
  The free-surface must contain surfaces 1 and 2, the interface between stratum 1 and 2 must contain surfaces 3 and 4, and the interface between stratum 2 and 3 must contain surfaces 5 and 6.
- There must be nodes at the points where piles and soil free-surface/interfaces intersect. These are provided by a plain text file "project_path"/"project_name"_ip.txt by pressing the button "Int. points" from the main GUI.
- All elements must have orientation positive with respect to the z-axis.