Note
Go to the end to download the full example code.
Mesh3_3D#
Meshing a 3D domain with hole.


/home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:932: PyVistaDeprecationWarning:
../../../../envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:932: 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.
arc1 = pv.CircularArc(geom.pt1.coord, geom.pt3.coord, geom.center.coord)
/home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:933: PyVistaDeprecationWarning:
../../../../envs/v1.5.4/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:933: 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.
arc2 = pv.CircularArc(
12 from EasyFEA import Display, ElemType, PyVista
13 from EasyFEA.Geoms import Domain, Circle
14
15 if __name__ == "__main__":
16 Display.Clear()
17
18 contour = Domain((0, 0), (1, 1), 1 / 10)
19 circle = Circle((1 / 2, 1 / 2), 1 / 3, 1 / 10, isHollow=True)
20 PyVista.Plot_Geoms([contour, circle]).show()
21
22 # "TETRA4", "TETRA10", "HEXA8", "HEXA20", "HEXA27", "PRISM6", "PRISM15", "PRISM18"
23 elemType = ElemType.PRISM15
24 mesh = contour.Mesh_Extrude([circle], [0, 0, 0.5], [3], elemType, isOrganised=True)
25 PyVista.Plot_Mesh(mesh).show()
Total running time of the script: (0 minutes 0.546 seconds)