.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/01-simple/simple_cantilever_beam_3D_model_nlgeom.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_01-simple_simple_cantilever_beam_3D_model_nlgeom.py: 3D Canteleaver Beam with geometric nonlinearities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. GENERATED FROM PYTHON SOURCE LINES 5-54 .. image-sg:: /examples/01-simple/images/sphx_glr_simple_cantilever_beam_3D_model_nlgeom_001.png :alt: simple cantilever beam 3D model nlgeom :srcset: /examples/01-simple/images/sphx_glr_simple_cantilever_beam_3D_model_nlgeom_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Iter 1 - Time: 0.20000 - dt 0.20000 - NR iter: 2 - Err: 0.00004 Iter 2 - Time: 0.40000 - dt 0.20000 - NR iter: 2 - Err: 0.00004 Iter 3 - Time: 0.60000 - dt 0.20000 - NR iter: 2 - Err: 0.00003 Iter 4 - Time: 0.80000 - dt 0.20000 - NR iter: 1 - Err: 0.00089 Iter 5 - Time: 1.00000 - dt 0.20000 - NR iter: 1 - Err: 0.00079 | .. code-block:: Python import fedoo as fd import numpy as np import time # --------------- Pre-Treatment -------------------------------------------------------- fd.ModelingSpace("3D") # Units: N, mm, MPa mesh = fd.mesh.box_mesh( nx=31, ny=7, nz=7, x_min=0, x_max=1000, y_min=0, y_max=100, z_min=0, z_max=100, elm_type="hex8", name="Domain", ) # Material definition fd.constitutivelaw.ElasticIsotrop(200e3, 0.3, name="ElasticLaw") wf = fd.weakform.StressEquilibrium("ElasticLaw", nlgeom=True) # Assembly (print the time required for assembling) assemb = fd.Assembly.create(wf, mesh, "hex8", name="Assembling") # Type of problem pb = fd.problem.NonLinear("Assembling") # Boundary conditions nodes_left = mesh.find_nodes("X", mesh.bounding_box.xmin) nodes_load = mesh.find_nodes( f"X=={mesh.bounding_box.xmax} and Y=={mesh.bounding_box.ymax}" ) pb.bc.add("Dirichlet", nodes_left, "Disp", 0) pb.bc.add("Dirichlet", nodes_load, "DispY", -500) # --------------- Solve -------------------------------------------------------- pb.nlsolve(dt=0.2) # #--------------- Post-Treatment ----------------------------------------------- res = pb.get_results("Assembling", ["Stress", "Disp"]) res.plot("Stress", "XX", "Node", show_edges=False) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 2.500 seconds) .. _sphx_glr_download_examples_01-simple_simple_cantilever_beam_3D_model_nlgeom.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: simple_cantilever_beam_3D_model_nlgeom.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: simple_cantilever_beam_3D_model_nlgeom.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: simple_cantilever_beam_3D_model_nlgeom.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_