Implemented by Calogero Gallo 2021
Gmsh is an open source 3D finite element mesh generator with a built-in CAD engine and post-processor. Its design goal is to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing.
Gmsh allows a particularly good link between the mesh generator and the Lagamine solver.
(gtl for Gmsh To Lagamine)
This file contains all the specific informations that are in the '.lag' file, it corresponds to point:
- 1.Title
- 2.Control data of the program
- 3.Nodes ⇒ Add nodes to the list of nodes (they have no condition or mesh), these are usefull for specific case that can't be created in Gmsh.
- 4.Fixed ⇒ possible to fix node created in gtl file
- 5.Degrees of freedom (DOF) renumbering
- ???? 6. Duplicata nodes ????
- ???? 8. ID Matrix ????
- ???? 9-bis. Incremental forming ????
- 15.Constitutive laws
- 16.Fondations and tools ⇒ contains all the segment types that can't be represented by Gmsh (ICODE = 2, 3, 6, 7, 8, 9, 10, 11, (98 and 99 can be represented in Gmsh or in the .gtl file)). These segments need nodes that can be created in the NODES section and will be add at the end of list of nodes.
- 17.Elements → This section is a bit particular compare to the .lag file, before defining any type of elements, the word “ELEM” has to be read. Moreover, each element group has to be determined with 2 digits next to their name, which correspond to the name of the physical group used in the '.geo'/'.msh' file.
It represents the geometry of the simulation, from this file it is possible to get the '.msh' file.
In Gmsh, it is possible to create entities that are called “Physical group”, each Physical group has a tag and a name. the first one is automatically given by Gmsh. The name will follow a convention to give the rest of the information that is not contained in '.gtl' file, to compute the '.lag' file.
This convention is based on the Docuwiki numerotation:
They are automatically extracted from the '.msh' file.
NODES (A5) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 for x |
2 digits | (I2)=02 for y |
2 digits | (I2)=03 for z |
Value definition (G10.0) |
Sometimes there are more than 3 DOF, using this option, it is possible to impose the value of the DOF. It can be useful for a 2D thermal analysis.
GRAVI (A5) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 for x |
2 digits | (I2)=02 for y |
2 digits | (I2)=03 for z |
Value definition (G10.0) |
For example, to apply gravity along axis x, with a value of 9.81. The name of the Physical group has to be “GRAVI019.81” or “GRAVI019.81000000”.
FIXED (A5) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 for x |
2 digits | (I2)=02 for y |
2 digits | (I2)=03 for z |
For more complex problem, it is possible to fix other DOF, it is possible to give a number between 01 and 09 which correspond to the DOF that has to be fixed.
DISPL (A5) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 for x |
2 digits | (I2)=02 for y |
2 digits | (I2)=03 for z |
Value definition (G10.0) |
VELO0 (A5) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 for x |
2 digits | (I2)=02 for y |
2 digits | (I2)=03 for z |
Value definition (G10.0) |
Not yet developped.
ACCE0 (A5) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 for x |
2 digits | (I2)=02 for y |
2 digits | (I2)=03 for z |
Value definition (G10.0) |
Not yet developped.
FORCE (A5) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 for x |
2 digits | (I2)=02 for y |
2 digits | (I2)=03 for z |
Value definition (G10.0) |
Not yet developped.
Not yet developped.
FOUND (A5) | |
---|---|
group definition (I2) |
This section is construction dependant ⇒ The sens of the curve loop which creates the surface is important, Gmsh will keep the sens of creation to define the numbering of the segments. The way of defining a surface will represent the normal of it.
List of elements developped :
-
To developped other elements, it can be done by nearly doing a copy and paste of these examples.
Elem type (A5) | |
---|---|
group definition (I2) |
For example, if a simulation needs two different type of BLZ3D. Two physical groups (which are physical volumes) have to be determined in GMSH with “BLZ3D01” and “BLZ3D54” as name.
For BLZ3D, it is possible to use initial stresses. To define them, the '.geo' file needs a physical group
BLZ3DIS (A7) | |
---|---|
Axe definition (I2) | |
2 digits | (I2)=01 |
2 digits | (I2)=02 |
2 digits | (I2)=03 |
2 digits | (I2)=04 |
2 digits | (I2)=05 |
2 digits | (I2)=06 |
Value definition (G10.0) |
For example, to get a group of BLZ3D with 2 initial stresses in direction 02 and 05, we need to define two physical group “BLZ3DIS02250” and “BLZ3DIS050000000010”
CFI3D elements keep the same principle, the only difference is that the physical group has to be a physical SURFACE named CFI3DXX (where XX represents a group of CFI3D)
These elements are specific because they are elements that can link any nodes between them. To call BINS elements, a physical group need :
BINDS (A5) | |
---|---|
group definition (I2) | |
IDOF definition (I2) | |
INDIS definition (I2) |
Two examples are availables, the first one represent an oblique rolling support applied on a edge. The second one represent a periodic condition on two surfaces.
The interface calculate the variable that are used to allocate tables in Lagamine. Which are NUMNP, NELTP, MELEM, NDISP, NFOUN, NSEGT, IPILO, NLAW; NMASC, NDAMC, NVEL0, NACC0.
To keep the same format as in the '.lag' file, these numbers have to be filled but their value will be corrected.
These macro are developed in Gmsh, the idea is to get a well-structured transition to reduce as much as possible the number of elements. To determine exactly the transition, some parameters are needed :
- the position of two points (see Figure below) - the length of the upside - the length of the downside - the number of element on the raffine side (upside) (must be a multiple of 3) - the number of transition between the down and up
It is possible to keep nodes duplicated, or avoid them by using “Coherence;” or “Coherence Mesh;”
Using “LISTE” as name of physical group, the interface will create a .txt file with a list of all the nodes which belongs to the physical group.
.geo files are commented to help the understanding of the operation to do.
Exemple of a contact that uses BLZ3D, CFI3D and Foundations:
GMSH is a powerful tool, but due to its completness it is not always easy to find some informations. There exists a where people can directly ask question to developpers https://gitlab.onelab.info/gmsh/gmsh/-/issues. There exists also a place where archives are stored https://onelab.info/pipermail/gmsh/, this place is not very friendly to find a subject (it is better to use google with a research that looks like “GMSH XXX” where XXX represents the subject, better to try all the possibilities).
Below you can find a list of all questions that were looking very interesting :