Read a GMSH model by physical groups¤
This example demonstrates how to read a GMSH model by physical groups and convert it to an OpenSeesPy model using the Gmsh2OPS class.
This example is based on GMSH Example t15.
1 | |
1 2 3 4 5 6 7 8 | |
Output
Info:: 5 Physical Names.
Info:: 166 Nodes; MaxNodeTag 166; MinNodeTag 1.
Info:: 571 Elements; MaxEleTag 571; MinEleTag 1.
Info:: Geometry Information >>>
43 Entities: 17 Point; 18 Curves; 7 Surfaces; 1 Volumes.
Info:: Physical Groups Information >>>
3 Physical Groups.
Physical Group names: Boundary, Load, Volume
Info:: Mesh Information >>>
166 Nodes; MaxNodeTag 166; MinNodeTag 1.
567 Elements; MaxEleTag 571; MinEleTag 5.
In the example above, we defined the following physical groups for converting OpenSees elements. Volume 1 is used to generate elements, while the boundary consists of the bottom 1 surface, 4 lines, and 4 points!
- gmsh.model.addPhysicalGroup(dim=0, tags=[1, 2, 9, 13], tag=1, name=”Boundary”) # points
- gmsh.model.addPhysicalGroup(dim=1, tags=[1, 8, 13, 17], tag=2, name=”Boundary”) # lines
- gmsh.model.addPhysicalGroup(dim=2, tags=[18], tag=3, name=”Boundary”) # surface
- gmsh.model.addPhysicalGroup(dim=2, tags=[27], tag=4, name=”Load”) # surface load
- gmsh.model.addPhysicalGroup(dim=3, tags=[1], tag=4, name=”Volume”) # volume
1 2 | |
Output
{'Boundary'} {'Load'} {'Volume'}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
Output
0 1
0 2
0 9
0 13
1 1
1 8
1 13
1 17
2 18
1 | |
Output
0 1
0 2
0 9
0 13
1 1
1 8
1 13
1 17
2 18
1 | |
Output
[OpenSeesMatlab] Model summary
Nodes: 166
Solid elements: 473
Eigen analysis:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
We can apply the load by extracting the elements belonging to surface with tag 27: First, we convert the element to which the surface load is applied to SurfaceLoad Element, and then we can apply the surface load to it:
1 2 3 4 5 | |
Output
[OpenSees] TriSurfaceLoad element - Written: J. A. Abell (UANDES). Inspired by the makers of SurfaceLoad
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | |