Note
Go to the end to download the full example code.
Mesh4_3D#
Meshing a 3D bracket.


/home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:909: PyVistaDeprecationWarning:
../../../../envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:909: 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 # "TETRA4", "TETRA10", "HEXA8", "HEXA20", "HEXA27", "PRISM6", "PRISM15", "PRISM18"
34 elemType = ElemType.PRISM15
35 mesh = contour.Mesh_Extrude([], [0, 0, -h], [3], elemType)
36 PyVista.Plot_Mesh(mesh).show()
Total running time of the script: (0 minutes 0.678 seconds)