.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/Hyperelasticity/Hyperelas4.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_Hyperelasticity_Hyperelas4.py: Hyperelas4 ========== A cantilever beam undergoing bending deformation in dynamic. .. GENERATED FROM PYTHON SOURCE LINES 12-87 .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Hyperelasticity/images/sphx_glr_Hyperelas4_001.png :alt: Hyperelas4 :srcset: /examples/Hyperelasticity/images/sphx_glr_Hyperelas4_001.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v3.1.0/docs/examples/Hyperelasticity/images/sphx_glr_Hyperelas4_001.vtksz .. image-sg:: /examples/Hyperelasticity/images/sphx_glr_Hyperelas4_002.gif :alt: Hyperelas4 :srcset: /examples/Hyperelasticity/images/sphx_glr_Hyperelas4_002.gif :class: sphx-glr-single-img .. tab-set:: .. tab-item:: Static Scene .. image-sg:: /examples/Hyperelasticity/images/sphx_glr_Hyperelas4_003.png :alt: Hyperelas4 :srcset: /examples/Hyperelasticity/images/sphx_glr_Hyperelas4_003.png :class: sphx-glr-single-img .. tab-item:: Interactive Scene .. offlineviewer:: /home/docs/checkouts/readthedocs.org/user_builds/easyfea/checkouts/v3.1.0/docs/examples/Hyperelasticity/images/sphx_glr_Hyperelas4_003.vtksz .. rst-class:: sphx-glr-script-out .. code-block:: none ===== hyperelastic problem at iteration 0 ===== At Newton iteration 1 norm is 1.356606783020e+07 At Newton iteration 2 norm is 8.948257279341e+05 At Newton iteration 3 norm is 1.407693457908e+04 At Newton iteration 4 norm is 1.478558937274e+02 At Newton iteration 5 norm is 1.269510032835e-01 At Newton iteration 6 norm is 1.979168689955e-08 ===== hyperelastic problem at iteration 1 ===== At Newton iteration 1 norm is 4.990598608386e+04 At Newton iteration 2 norm is 5.914349401053e+03 At Newton iteration 3 norm is 1.785050985512e+01 At Newton iteration 4 norm is 3.982566134905e-03 At Newton iteration 5 norm is 1.309176479979e-08 ===== hyperelastic problem at iteration 2 ===== At Newton iteration 1 norm is 4.880150591255e+03 At Newton iteration 2 norm is 3.617888922672e+04 At Newton iteration 3 norm is 2.402653919204e+01 At Newton iteration 4 norm is 8.577990689806e-05 At Newton iteration 5 norm is 1.281955262370e-08 ===== hyperelastic problem at iteration 3 ===== At Newton iteration 1 norm is 8.757766699363e+03 At Newton iteration 2 norm is 6.853710531265e+04 At Newton iteration 3 norm is 7.071966685157e+01 At Newton iteration 4 norm is 1.164578294936e-03 At Newton iteration 5 norm is 1.077751593398e-08 ===== hyperelastic problem at iteration 4 ===== At Newton iteration 1 norm is 1.114866961567e+04 At Newton iteration 2 norm is 1.094117410401e+05 At Newton iteration 3 norm is 1.802443784399e+02 At Newton iteration 4 norm is 2.611953537989e-02 At Newton iteration 5 norm is 1.325490296439e-08 ===== hyperelastic problem at iteration 5 ===== At Newton iteration 1 norm is 1.150207613286e+04 At Newton iteration 2 norm is 1.565449382839e+05 At Newton iteration 3 norm is 4.079575010993e+02 At Newton iteration 4 norm is 1.065486415489e-02 At Newton iteration 5 norm is 1.323487867599e-08 ===== hyperelastic problem at iteration 6 ===== At Newton iteration 1 norm is 9.850216205020e+03 At Newton iteration 2 norm is 1.056572558409e+05 At Newton iteration 3 norm is 1.831136646683e+02 At Newton iteration 4 norm is 5.726681423849e-02 At Newton iteration 5 norm is 2.584015871309e-08 ===== hyperelastic problem at iteration 7 ===== At Newton iteration 1 norm is 6.622311650215e+03 At Newton iteration 2 norm is 3.177721060201e+04 At Newton iteration 3 norm is 1.440548018725e+01 At Newton iteration 4 norm is 1.096748749916e-04 At Newton iteration 5 norm is 1.311524173363e-08 Generate movie 1/8 (12.50 %) 898.68 ms Generate movie 2/8 (25.00 %) 678.67 ms Generate movie 3/8 (37.50 %) 543.04 ms Generate movie 4/8 (50.00 %) 433.42 ms Generate movie 5/8 (62.50 %) 326.99 ms Generate movie 6/8 (75.00 %) 224.64 ms Generate movie 7/8 (87.50 %) 110.51 ms Generate movie 8/8 (100.00 %) 0.00 µs | .. code-block:: Python :lineno-start: 13 from EasyFEA import Terminal, Folder, ElemType, Models, Simulations, PyVista from EasyFEA.Geoms import Domain if __name__ == "__main__": Terminal.Clear() # ---------------------------------------------- # Configuration # ---------------------------------------------- # outputs folder = Folder.Results_Dir() makeMovie = True result = "uy" # geom L = 120 h = 13 # model lmbda = 121153.84615384616 # Mpa mu = 80769.23076923077 # ---------------------------------------------- # Mesh # ---------------------------------------------- meshSize = h / 3 contour = Domain((0, 0), (L, h), meshSize) mesh = contour.Mesh_Extrude( [], [0, 0, h], [h / meshSize], ElemType.HEXA8, isOrganised=True ) nodesX0 = mesh.Nodes_Conditions(lambda x, y, z: x == 0) nodesXL = mesh.Nodes_Conditions(lambda x, y, z: x == L) # ---------------------------------------------- # Simulation # ---------------------------------------------- mat = Models.HyperElastic.SaintVenantKirchhoff(3, lmbda, mu) simu = Simulations.HyperElastic(mesh, mat) simu.add_dirichlet(nodesX0, [0, 0, 0], simu.Get_unknowns()) simu.add_dirichlet(nodesXL, [-h], ["y"]) # static simu.Solve() simu.Save_Iter() # dynamic T = 7 dt = T / 7 simu.Bc_Init() simu.Solver_Set_Hyperbolic_Algorithm(dt) simu.add_dirichlet(nodesX0, [0, 0, 0], simu.Get_unknowns()) for _ in range(int(T / dt)): simu.Solve() simu.Save_Iter() # ---------------------------------------------- # Results # ---------------------------------------------- PyVista.Plot_BoundaryConditions(simu).show() if makeMovie: PyVista.Movie_simu( simu, "uy", folder, "Hyperelas4.gif", deformFactor=1, plotMesh=True ) PyVista.Plot(simu, "uy", 1, plotMesh=True).show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.059 seconds) .. _sphx_glr_download_examples_Hyperelasticity_Hyperelas4.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: Hyperelas4.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: Hyperelas4.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: Hyperelas4.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_