Case00 Export the mesh in a .geo file

 

It is generally recommended to split mesh generation and simulation into two workflow steps. Consequently two different data files need to be defined for each purpose. In the present case the objective is to demonstrate how to generate a mesh in ParaGeo and export it into a .geo file that later can be read by the simulation data file.

 

The two data files for the present case are provided in Mesh_002\Case00\Data. Those are:

Mesh_002_Case00a.dat : File to generate a basic mesh for the cube geometry and export it into a .geo file

Mesh_002_Case00b.dat : File to read the previously generated .geo file and simulate displacement applied to the entire cube.

 

Below a description of the data files is provided. It should be noted that only the data relative to mesh generation and export/reading of the .geo file will be described in detail while for the remaining data a brief description is provided

 

Case00a 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 ) with basic data to define an unstructured mesh with 80 m elements

6.Control_data defining the Duration of the simulation stage, the Target_number_time_steps for the stage as well as several output options.

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

 

 

Mesh Generation Data

 

The data required to generate an unstructured mesh in 3D is the same than required in 2D.

 

Data File


 

* Mesh_control_data

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

 Generation_algorithm    2          

 Mesh_generation_flag    0

 

 

* Unstructured_mesh_data

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

 Default_element_size         80.0

 Element_size_bounds IDM=2

  /Max. Element Size/        80.0

  /Min. Element Size/        80.0

 

1.Mesh_control_data defines the options for mesh generation. In this case this has been set to:

a.Generation_algorithm is set to 2 (unstructured mesh)

b.Mesh_generation_flag is set to 0 in order to perform the analysis (Compulsory). Even though in the present workflow step the interest is to generate the mesh only, because a .geo file needs to be output afterwards, the analysis must be performed (if Mesh_generation_flag is set to 1 to generate mesh only the code will stop right after mesh generation and the .geo file will not be output)

 

2.Unstructured_mesh_data defines a mesh with an element size of 80 m.

 

 

 

 

 

Output of the .geo file

 

Data File


 

* Control_data

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

Control_title       "Initial_mesh"

 

 

* Util_write_geometry

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

 File_name     "Mesh_002_Case00_geom"

 File_type                      "geo"

 

1.Util_write_geometry is used to export a .geo file with the geometry and mesh generated. It MUST be defined after Control_data.

 

2.The output file will be named Mesh_002_Case00_Geom.geo

 

 

 

 

 

Results

 

The result from executing this data file is the output of the Mesh_002_Case00_Geom.geo file, which contains the geometry, mesh and group data defined in hdf format. This file will read and used by the Mesh_002_Case00b.dat file (example of a simulation datafile). Note that the content of the .geo file may be visualized and edited in HDFView for example (see the .geo file reference page).

 

 

 

 

Case00b Description

 

This data file aims to be an example of how to read a previously generated meshed geometry to use it in a simulation. To this end the geometry and mesh stored in the .geo file are read and a displacement loading condition is applied to the whole domain. The basic data includes:

 

1.Geometry_data to read the .geo file containing the geometry and mesh

2.Group_data and Group_control_data for a single group

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.Global_loads and Load_case_control_data to prescribe a displacement of 2000 m in X and Y directions to the whole geometry from simulation time 0.0 to time 1.0 as defined by the corresponding Time_curve_data.

6.Control_data defining:

a.The Duration of the simulation stage as 1.0 time units

b.The Target_number_time_steps for the stage which has been set to 1000 mechanical steps

c.Output_time_plotfile set to 0.2 to output a plot file every 0.2 time units

d.Output_frequency_plotfile set to -1 to output a plot file at the end of the simulation

e.Screen_message_frequency set to 1000 to print information to the console screen every 1000 mesch steps

 

It is noted that no mesh data is defined in the datafile, otherwise the mesh generator will be invoked and the mesh stored in the .geo file would be overwritten. Also no geometry definition is provided after the END DATA command although if defined, it would just be ignored as mesh generation is not invoked.

 

 

Geometry_data

 

Data File


 

* Geometry_data

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

 File_name     Mesh_002_Case00_geom.geo

 File_format   hdf

 

1.Geometry_data is defined in order to read a .geo file.

2.The name of the .geo file is specified in File_name

3.The File_format is set as hdf

 

 

 

 

After reading the .geo file all remaining data in the data file may be defined as usual. Any data previously stored in the .geo file which is also re-defined in the data file (e.g. Group_data, Material_data ) will be overwritten. In the present case a displacement of 2000 m in X and Y directions is prescribed to the whole cube (not described in detail here).

 

 

 

 

Results

 

The results are provided in: Mesh_002\Case00\Results.