Note
Go to the end to download the full example code.
Hyperelas1#
A cantilever beam undergoing bending deformation.


===== hyperelastic problem at iteration 0 =====
At Newton iteration 1 norm is 2.411781112751e+02
At Newton iteration 2 norm is 4.820799085387e+03
At Newton iteration 3 norm is 3.705632240162e-01
At Newton iteration 4 norm is 1.403280055455e-08
13 from EasyFEA import Display, ElemType, Models, Simulations, PyVista
14 from EasyFEA.Geoms import Domain
15
16 if __name__ == "__main__":
17 Display.Clear()
18
19 # ----------------------------------------------
20 # Configuration
21 # ----------------------------------------------
22
23 # geom
24 L = 120
25 h = 13
26
27 # model
28 lmbda = 121153.84615384616 # Mpa
29 mu = 80769.23076923077
30 rho = 7850 * 1e-9 # kg/mm3
31
32 # ----------------------------------------------
33 # Mesh
34 # ----------------------------------------------
35 meshSize = h / 3
36
37 contour = Domain((0, 0), (L, h), meshSize)
38
39 mesh = contour.Mesh_Extrude(
40 [], [0, 0, h], [h / meshSize], ElemType.HEXA20, isOrganised=True
41 )
42 nodesX0 = mesh.Nodes_Conditions(lambda x, y, z: x == 0)
43 nodesXL = mesh.Nodes_Conditions(lambda x, y, z: x == L)
44
45 # ----------------------------------------------
46 # Simulation
47 # ----------------------------------------------
48
49 mat = Models.HyperElastic.SaintVenantKirchhoff(3, lmbda, mu)
50
51 simu = Simulations.HyperElastic(mesh, mat)
52
53 simu.add_dirichlet(nodesX0, [0, 0, 0], simu.Get_unknowns())
54 simu.add_volumeLoad(mesh.nodes, [-rho * 9.81], ["y"])
55 simu.add_surfLoad(nodesXL, [-800 / h / h], ["y"])
56
57 simu.Solve()
58
59 # ----------------------------------------------
60 # Results
61 # ----------------------------------------------
62
63 PyVista.Plot_BoundaryConditions(simu).show()
64 PyVista.Plot(simu, "uy", 1, plotMesh=True).show()
Total running time of the script: (0 minutes 1.895 seconds)