Mesh4_2D#

Meshing a 2D bracket.

Mesh4 2D
Mesh4 2D
13 from EasyFEA import Display, ElemType, PyVista
14 from EasyFEA.Geoms import Point, Points
15
16 if __name__ == "__main__":
17     Display.Clear()
18
19     L = 120
20     h = L * 0.3
21     N = 8
22
23     pt1 = Point(isOpen=True, r=-10)
24     pt2 = Point(x=L)
25     pt3 = Point(x=L, y=h)
26     pt4 = Point(x=h, y=h, r=10)
27     pt5 = Point(x=h, y=L)
28     pt6 = Point(y=L)
29     pt7 = Point(x=h, y=h)
30
31     contour = Points([pt1, pt2, pt3, pt4, pt5, pt6], h / N)
32     PyVista.Plot_Geoms(contour).show()
33
34     # "TRI3", "TRI6", "TRI10", "TRI15", "QUAD4", "QUAD8",  "QUAD9"
35     elemType = ElemType.TRI10
36     mesh = contour.Mesh_2D([], elemType)
37     PyVista.Plot_Mesh(mesh).show()

Total running time of the script: (0 minutes 0.426 seconds)

Gallery generated by Sphinx-Gallery