Case03 Usage of adaptivity

 

In the present case usage of adaptivity data to remesh the geometry in order to achieve a mesh with regions with different element sizes will be demonstrated. The advantage of using adaptivity is that on every remesh, the previous mesh is used as a background mesh and the target element sizes specified in the different adaptivity regions are prescribed on the background mesh nodes. Consequently it is more easy and convenient to achieve the desired mesh using adaptivity than attempting to achieve it in the initial mesh generation using the existing functionality. It is noted that it is recommended to split the mesh generation and simulation workflow steps in two different data files as explained in Case00.

 

 

Below a description of the data files is provided. It should be noted that only the data relative to adaptivity will be described in detail while for the remaining data a brief description is provided.

 

Datafile Description

 

The basic data includes:

 

1.Geometry definition data (Nodal_data , Geometry_line , Geometry_surface and Geometry_volume ) at the end of the file after the END DATA command to define the cube geometry.

2.Group_data and Group_control_data for a single group with TET4V elements (note that the Element_type defined must be valid for the type of mesh being generated)

3.Material_data and Fluid_properties defining an elastic material

4.Support_data defining displacement fixities in the 3 directions for the whole cube volume (by assigning the corresponding Displacement_codes set to the internal Geometry_set "All_volumes" )

5.Mesh generation data (Mesh_control_data and Unstructured_mesh_data) defining the initial mesh.

6.Adaptivity data to perform several remeshes (Adaptivity_control_data and Adaptivity_set_data )

7.Control_data defining the Duration of the simulation stage, the Target_number_time_steps for the stage as well as several output options. It is noted that in the present case the initial mesh generation and and the remeshes have been separated in two stages to demonstrate the differences in the mesh (but this is not required).

8.Util_write_geometry data defined after the last Control_data to export the generated mesh into a .geo file

 

 

Mesh Data

 

Data File


 

* Mesh_control_data

! ---------------------------------

 Generation_algorithm    2          

 Mesh_generation_flag    0

 

 

* Unstructured_mesh_data

! ---------------------------------

 Default_element_size         40.0

 Element_size_bounds IDM=2

  /Max. Element Size/        40.0

  /Min. Element Size/       40.0

 

 

* Control_data

! ---------------------------

Control_title       "Initial_mesh"

 

1.Mesh_control_data and Unstructured_mesh_data are used to define an initial unstructured mesh with an element size of 40 m.

 

2.For the sake of clarity in this example the initial mesh and the remeshing are defined at different stages but this is not generally required.

 

 

 

 

 

 

Adaptivity Data

 

Remeshing requires definition of Adaptivity_control_data and a minimum of one Adaptivity_set_data. Then remesh will occur every time the criteria for remeshing is satisfied which is based on a user-defined threshold of element area (2D) / volume (3D) distortion expressed as a percentage (via Distortion_area_data keyword within Adaptivity_set_data). Consequently the code needs to check whether or not the remeshing criteria is satisfied, and such check is performed every "n" mechanical / coupling steps as defined by the user using the keyword Error_evaluation_frequency within Adaptivity_control_data. Then the keyword Maximum_remesh_frequency may be set to enforce a remesh every "m" remeshing criteria checks independently on whether or not the criteria has been satisfied. Thus in this example the data will be defined so that:

 

1.There will be 2 regions with smaller mesh sizes relative to the default element sizes outside of those regions

2.There will be 4 remeshes enforced during the simulation

 

 

Data File


 

* Adaptivity_control_data

! ---------------------------------

 Default_element_sizes IDM=2

  /Max. Element Size/        100.0

  /Min. Element Size/        10.0

 Error_evaluation_frequency     250

 Maximum_remesh_frequency         1

 Mapping_output_flag              2

 List_of_remesh_sets   IDM=3

   1    2    3

 

 

 

* Adaptivity_set_data  NUM=1

! ---------------------------------

 Group_names IDM=1

    "Sand"

 Distortion_area_data IDM=1

   15

 Element_sizes IDM=2

  /Max. Element Size/      100.0

  /Min. Element Size/      100.0

 

 

* Adaptivity_set_data  NUM=2

! ---------------------------------

 Region_type         "Rectangular"

 Region_size IDM=6

  /X-min/    -100.0

  /Y-min/    250.0

  /Z-min/    250.0

  /X-max/    500.0

  /Y-max/    750.0

  /Z-max/    750.0

 Group_names IDM=1

   "Sand"

 Distortion_area_data IDM=1

   15

 Element_sizes IDM=2

  /Max. Element Size/       40

  /Min. Element Size/       40

 

 

* Adaptivity_set_data  NUM=3

! ---------------------------------

 Region_type         "Rectangular"

 Region_size IDM=6

  /X-min/    -100.0

  /Y-min/    450.0

  /Z-min/    450.0

  /X-max/    250.0

  /Y-max/    550.0

  /Z-max/    550.0

 Group_names IDM=1

   "Sand"

 Distortion_area_data IDM=1

   15

 Element_sizes IDM=2

  /Max. Element Size/       10

  /Min. Element Size/       10

 

1.Adaptivity_control_data is used to define the global options for adaptivity including:

a.The range of element sizes via Default_element_sizes keyword

b.The frequency of remesh checks via Error_evaluation_frequency. The present example considers 1000 steps for the simulation stage so the frequency of remesh checks has been set to 250 (there will be 4 remesh checks)

c.Maximum_remesh_frequency is set to 1 to enforce a remesh at every check independently on wheter or not the remesh criteria has been satisfied.

d.Mapping_output_flag is set to 2 so that every time a new mesh is generated a plot file with the new mesh is output and added to the list of output plot files.

e.Assign the different remesh sets via List_of_remesh_sets and specification of the corresponding Adaptivity_set_data ID numbers.
 

2.Three different Adaptivity_set_data data structures are defined. Those are used to define:

a.The default element size for the group (Adaptivity_set_data NUM=1) which is set to 100 m in this case

b.Two regions with different element sizes. The location of the remesh regions is shown in the figure below. The red region is defined a target element size of 40 m. The green region, which is enclosed within the red one, is defined with an element size of 10 m.

 

Mesh_002_Fig08

Location of the two remesh regions relative to the model geometry. The spheres indicate the points defining the rectangular regions.

 

 

3.In each Adaptivity_set_data it is defined:

a.The Region_type which is set to "Rectangular"

b.The Region_size defining the coordinates of the points required to define the region. In the present case, because the regions are rectangular (a box in 3D), the coordinates for the two diagonal points with the minimum and maximum X, Y and Z coordinates are required.

c.The Group_names to which the adaptivity set is applied

d.The Distortion_area_data criteria for triggering a remesh which in this case has been set to 15 %. Definition of this parameter is compulsory.

e.The Element_sizes for the adaptivity set.

 

 

 

 

Results

 

The results are provided in Mesh_002\Case03\Results. The file Mesh_002_Case03.xmf can be loaded in ParaView in order to visualize all the plot files from the simulation. As can be observed in the figure below a progressive decrease in the element size towards the center of the western geometry boundary is achieved as defined by the adaptivity data.

 

 

Mesh_002_Fig09

Results for the two cases with the mesh region in orange and the geometry points affected by the mesh region in green. The unaffected points are shown in grey