HelloWorld#

A cantilever beam undergoing bending deformation.

  • QUAD9: Ne = 81, Nn = 385
  • Boundary conditions
  • $uy$
  • $\sigma_{vm}$
12 import matplotlib.pyplot as plt
13
14 from EasyFEA import Display, ElemType, Models, Simulations
15 from EasyFEA.Geoms import Domain
16
17 # ----------------------------------------------
18 # Mesh
19 # ----------------------------------------------
20 L = 120  # mm
21 h = 13
22
23 domain = Domain((0, 0), (L, h), h / 3)
24 mesh = domain.Mesh_2D([], ElemType.QUAD9, isOrganised=True)
25
26 # ----------------------------------------------
27 # Simulation
28 # ----------------------------------------------
29 E = 210000  # MPa
30 v = 0.3
31 F = -800  # N
32
33 mat = Models.Elastic.Isotropic(2, E, v, planeStress=True, thickness=h)
34
35 simu = Simulations.Elastic(mesh, mat)
36
37 nodesX0 = mesh.Nodes_Conditions(lambda x, y, z: x == 0)
38 nodesXL = mesh.Nodes_Conditions(lambda x, y, z: x == L)
39
40 simu.add_dirichlet(nodesX0, [0, 0], ["x", "y"])
41 simu.add_surfLoad(nodesXL, [F / h / h], ["y"])
42
43 simu.Solve()
44
45 # ----------------------------------------------
46 # Results
47 # ----------------------------------------------
48 Display.Plot_Mesh(simu, deformFactor=10)
49 Display.Plot_BoundaryConditions(simu)
50 Display.Plot_Result(simu, "uy", plotMesh=True)
51 Display.Plot_Result(simu, "Svm", plotMesh=True, ncolors=11)
52
53 plt.show()

Total running time of the script: (0 minutes 0.755 seconds)

Gallery generated by Sphinx-Gallery