Note
Go to the end to download the full example code.
Mesh4_2D#
Meshing a 2D bracket.


/home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.6.2/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:950: PyVistaDeprecationWarning:
../../../../envs/v1.6.2/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:950: Arguments 'pointa', 'pointb', 'center' must be passed as keyword arguments to function 'CircularArc'.
From version 0.50, passing these as positional arguments will result in a TypeError.
return pv.CircularArc(
12 from EasyFEA import Display, ElemType, PyVista
13 from EasyFEA.Geoms import Point, Points
14
15 if __name__ == "__main__":
16 Display.Clear()
17
18 L = 120
19 h = L * 0.3
20 N = 8
21
22 pt1 = Point(isOpen=True, r=-10)
23 pt2 = Point(x=L)
24 pt3 = Point(x=L, y=h)
25 pt4 = Point(x=h, y=h, r=10)
26 pt5 = Point(x=h, y=L)
27 pt6 = Point(y=L)
28 pt7 = Point(x=h, y=h)
29
30 contour = Points([pt1, pt2, pt3, pt4, pt5, pt6], h / N)
31 PyVista.Plot_Geoms(contour).show()
32
33 # "TRI3", "TRI6", "TRI10", "TRI15", "QUAD4", "QUAD8", "QUAD9"
34 elemType = ElemType.TRI10
35 mesh = contour.Mesh_2D([], elemType)
36 PyVista.Plot_Mesh(mesh).show()
Total running time of the script: (0 minutes 0.681 seconds)