Tubes Contact Tutorial Using Gmsh

Introduction

This tutorial for a model with 2 tubes in contact is a simple example of how to utilise ‘Physical Groups’ in the open source meshing tool Gmsh [1] to create node and element groups for OpenRadioss that may be used to define e.g. boundary conditions or initial conditions, at the time of writing (June 2023) the functionality is available only in the ‘development build’ of Gmsh

The tutorial also shows how to create part based groups in text editor. The contact defined in the primary version of the example is in the form of a ‘general contact’ using /INTER/TYPE25 where everything in the model is in contact by means of including all parts in a single contact surface. (an optional version shows surf-surf contact using groups defined in Gmsh).

The model geometry is provided as a Gmsh ‘.geo’ file

Result of model in Altair HyperView

 

Model Files

The model files include the OpenRadioss Engine file (Tube_Impact_0001.rad), and a Gmsh .geo geometry file (Tube_Impact.geo) for the tubes.

Model Files (1Kb)

Step 1: Define ‘Physical Groups’ in Gmsh

The files for this example include an example Gmsh .geo geometry file,

To use Gmsh to set the model up, you may follow the steps below

1.1: Download the ‘development’ release of Gmsh binary and extract

1.2: Open gmsh.exe (windows) or run gmsh executable in Linux

1.3: From File Menu, open the Tube_Impact.geo file

 

1.4: Create Physical Curve Groups

From the side bar select Physical groups → Add → Curve

You will be presented with a pop up where you may define a name for your group

call it ‘Top_Tube_Ends’

In the graphics area, select the 2 circles defining the ends of the top tube and press 'e' to end selection

The name of the group will go blue to indicate the group has content defined

Repeat this process to create a second physical group named ‘Bottom_Tube_Ends’, this time selecting the circles defining the ends of the bottom tube

After the 2 groups have been created, you may press 'q' to exit the group creation tool

1.5: (Optional) Create Physical Surface Groups

From the side bar select Physical groups → Add → Surface

This step is optional for completion of the exercise, as these groups are not used in the primary example, they are used only for the optional step of defining a surf-surf contact.

Similar to the creation of the curve groups, this time create a group named ‘Top_Tube_Elements’ and select the surface of the top tube, then a group named ‘Bottom_Tube_Elements’ and select the surface of the bottom tube

 

1.6: expand the Mesh option in the menu, then click ‘2D

These options should result in a mesh similar to below: (with default settings, the mesh will be trias, but you may experiment with other mesh sizes and types, e.g. quadrilaterals)

 

The mesh can now be exported,

1.7: go to File → Export, save as type ‘RADIOSS BLOCK’ into the folder where your model files are saved and use the filename Tube_Impact_0000.rad matching the naming of the supplied engine file (0001.rad)

When Prompted for further options, these should be set as below

 

NB: Physical Groups:

When ‘Physical Groups’ have been defined in Gmsh, the export panel uses them in the following ways:

If ‘Physical Groups’ are chosen in the Line, Surface, Volume option boxes then only entities (nodes/elements) associated with those groups will be exported in their part groups (it acts as on a filter on what is to be exported)

If the Options ‘Save groups of elements’, ‘Save groups of nodes’ are checked, then the element and/or node groups defined will be exported. (The group exporting works independently of the actual node and element export, so you could export the group alone if you wished)

 

Step 2: Adding Part, Property, Material and Interfaces to the Deck

The file exported from Gmsh contains file header, elements, nodes and element and node groups, but needs to be edited to add Material, Property, Boundary Condition and Contact Information

2.1: Open the _0000.rad file in a text editor:

Edit the name of the model (line after /BEGIN) if necessary, (windows Gmsh may write whole file path here depending on where the file was written) it should read Tube_Impact

2.2: Create Material, Property and Part Cards

The card block below defines a simple Steel Material (ID 1) and can be cut/paste from here into the deck

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| /MAT/PLAS_JOHNS/1 Steel # RHO_I 7.85E-9 0 # E Nu Iflag 210000 .3 0 # a b n EPS_p_max SIG_max0 200 150 .3 0 0 # c EPS_DOT_0 ICC Fsmooth F_cut Chard 0 0 0 0 0 0 # m T_melt rhoC_p T_r 0 0 0 0 #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

The card block below defines a shell property (ID 1) with thickness 1mm and can be cut/paste into the deck

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| /PROP/SHELL/1 Tubes # Ishell Ismstr Ish3n Idrill P_thick_fail 0 0 0 0 0 # hm hf hr dm dn 0 0 0 0 0 # N Istrain Thick Ashear Ithick Iplas 5 0 1 0 0 0 #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

The cards below relate the mesh from Gmsh (defined in part IDs 2000001 and 20000002) to the property and material defined here (1 and 1 for PID and MID), these may be cut/paste into the input deck

#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| /PART/2000001 Bottom_Tube 1 1 0 #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----| /PART/2000002 Top_Tube 1 1 0 #---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|

2.3: Define /BCS boundary conditions using the groups exported by Gmsh

The export from Gmsh will already contain /GRNOD/NODE/ID for the Curve Physical Groups defined earlier (Top_Tube_Ends and Bottom_Tube_Ends), The IDs shown here for those groups are 1 and 2 IMPORTANT note the actual IDs of these groups in your deck as you will need to use them in the next step

we can use those 2 Node Groups to define our boundary conditions

SUBSTITUTE numbers 1,2 Here for your actual TOP and BOTTOM /GRNOD/NODE group IDs

Here:

/BCS/1 constrains nodes of GRNOD ID 1 in X and Y (Z will be given an initial velocity in a following step)

/BCS/2 constrains nodes of GRNOD ID 2 in X, Y and Z

 

2.4: Define a Part based node group for use in initial velocity definition and an INIVEL card

if you followed the optional step to create surf physical groups, you will already have in your model, a /GRNOD/NODE/ID with name Top_Tube_Elements, you could use that node group ID here instead if you wished, and skip the /GRNOD/PART/ID creation

Here we define another GRNOD, this time based on /PART

using the card /GRNOD/PART/ID (ID shown here is 100, it cannot clash with any existing group in your model)

Then an /INIVEL/TRA card is defined, with an initial z velocity of -20000 (mm/s), that reference the group ID 100

 

2.5: Define a surface for contact based on parts and a contact

Here a surface is defined for both parts using

/SURF/PART/1000 (1000 is the SURF ID)

The subsequent /INTER/TYPE25 references this surface as its ‘Surf_ID1’ only, in this way the contact acts as a general contact, where the tubes will contact each other, and themselves

ALTERNATIVE OPTIONAL: 2.5:

If you want instead to use the element sets created in Gmsh to define a symmetric SURF-SURF contact (where the tubes contact each other, but not themselves)

The model will already contain two /GRSH3N/SH3N/ID groups for your elements: e.g.

NOTE IDS of these 2 SH3N groups (here 1 and 2)

We then need to create /SURF/GRSH3N groups from those groups: here /SURF/GRSH3N/1001 references GRSH3N number 1 and /SURF/GRSH3N/1002 references GRSH3N number 2 (Substitute actual IDs of your Tube Element groups)

The contact may then be created, referencing the two /SURF/GRSH3N (1001 and 1002 here) as the Surf_ID1 and Surf_ID2 to create a symmetric surf-surf contact

If you experiment with different meshing in Gmsh, resulting in quadrilateral shell elements instead of trias, then the steps above remain the same but the groups will be of type /GRSHEL/SHEL and /SURF/GRSHEL

Step 3: Running Model in OpenRadioss

The model file Tube_Impact_0000.rad can be run in OpenRadioss, the Tube_Impact_0001.rad engine file contains output requests for displacement, velocity and von mises stress

See also: Running OpenRadioss

Viewing Results

The engine file _0001.rad as contained in the zip requests animation files (Annn) these are convertable to vtk for reading in ParaView. Check the Pre and Post Processing for OpenRadioss page for information.

References

1: Gmsh (C. Geuzaine and J.-F. Remacle. Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. International Journal for Numerical Methods in Engineering 79(11), pp. 1309-1331, 2009)