Note
Go to the end to download the full example code.
Mesh6_3D#
Refined 3D mesh in zones.


/home/docs/checkouts/readthedocs.org/user_builds/easyfea/envs/v1.6.0/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:973: PyVistaDeprecationWarning:
../../../../envs/v1.6.0/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:973: 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.6.0/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:974: PyVistaDeprecationWarning:
../../../../envs/v1.6.0/lib/python3.11/site-packages/EasyFEA/utilities/PyVista.py:974: 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 Circle, Domain
14
15 if __name__ == "__main__":
16 Display.Clear()
17
18 L = 1
19 meshSize = L / 4
20
21 contour = Domain((0, 0), (L, L), meshSize)
22 circle = Circle((L / 2, L / 2), L / 3, meshSize)
23 inclusions = [circle]
24
25 refine1 = Domain((0, L), (L, L * 0.8), meshSize / 8)
26 refine2 = Circle(circle.center, L / 2, meshSize / 8)
27 refine3 = Circle((0, 0), L / 2, meshSize / 8)
28 refineGeoms = [refine1, refine2, refine3]
29
30 PyVista.Plot_Geoms([contour, circle, *refineGeoms]).show()
31
32 mesh = contour.Mesh_Extrude(
33 inclusions, [0, 0, -L], [5], ElemType.PRISM15, refineGeoms=refineGeoms
34 )
35 PyVista.Plot_Mesh(mesh).show()
Total running time of the script: (0 minutes 1.144 seconds)