1. How to use#

There are four steps to follow to create a mesh with Supervisor GMSH:

  1. Definition of geometry;

  2. Definition of discretizations;

  3. Creation of the GMSH mesh and the GROUP_MA and associated « Physical » objects;

  4. Importing mesh GMSH into Aster.

Easy to use example:

In the following example, we use the functionalities of the supervisor to generate the mesh of a rectangular plate:

Geometry

from Utilitai.sup_gmsh import*

width = 5.

H_concrete = 3.

H_S1 = 4.

t_concrete = 25.

Prog_s1 = 1.1

We import the module and define some parameters.

# Geometry

O = Point (0, 0)

A = Point (wide, 0)

B = Point (wide, H_concrete)

C = Point (0, H_beton)

D = Point (0, -H_S1)

E = Point (wide, -H_S1)

OA = Line (O, A)

AB = Line (A, B)

BC = Line (B, C)

OC = Line (O, C)

OD = Line (O, D)

DE = Line (D, E)

AE = Line (A, E)

S2 = Surface (OA, AB, BC, OC)

S1 = Surface (OD, DE, AE, OA)

You create points, lines between points, and surfaces from lines.

# Discretization

OA.transfinite (1)

BC.Transfinite (1)

Of. transfinite (1)

N_concrete = int (H_beton/T_concrete + 0.5)

AB.transfinite (N_concrete)

OC.transfinite (N_beton)

N_S1 = Progress (H_S1, R=prog_s1, h=t_beton)

OD.Transfinite (N_S1, Prog_s1)

AE.transfinite (N_S1, Prog_s1)

S2.Transfinite ()

S1.Transfinite ()

We define the discretization of lines and surfaces.

# Mesh

mesh = mesh ()

Mesh.physical (“FOND”, DE)

Mesh.physical (“LAT_G”, OC, OD)

Mesh.physical (“LAT_D”, AB, AE)

Mesh.physical (“INTERFAC”, OA)

Mesh.physical (“HAUT”, BC)

Mesh.physical (“S2”, S2)

Mesh.physical (“S1”, S1)

We create the mesh object and define the mesh groups that will be GROUP_MA in the Aster mesh SD and « Physical » in GMSH (the latter will be named \(\mathit{GM1}\), \(\mathit{GM2}\), etc…).

MA = mesh. LIRE_GMSH (

MODI_QUAD = “OUI”

)

Importing the mesh into Aster: \(\mathit{MA}\) is an Aster mesh.