# Static analysis of cantilever beam using beam element

The code for the 3d cantilever beam using solid elements is shown below.

``````from dolfin import *
L = 5000.
H = 600.
W = 300.0
mesh = BoxMesh(Point(0, 0, 0), Point(6, 2, 1), Nx, Ny, Nz)
E = Constant(1e5)
nu = Constant(0.3)
mu = E/2/(1+nu)
lmbda = E*nu/(1+nu)/(1-2*nu)
def eps(u):
d = mesh.topology().dim()
def sigma(v):
return lmbda*tr(eps(v))*Identity(d) + 2.0*mu*eps(v)
V = VectorFunctionSpace(mesh, 'Lagrange', degree=1)
u = TrialFunction(V)
v = TestFunction(V)
rho_g = 1e-3
f = Constant((0, -rho_g,0))
a = inner(sigma(u), eps(v))*dx
l = inner(f, v)*dx
def left(x, on_boundary):
return near(x[0], 0.)
bc = DirichletBC(V, Constant((0.,0.,0)), left)
u_sol = Function(V, name="Displacement")
solve(a == l, u_sol, bc)
``````

Can you pls share some references for modifying it for the beam element?

When you say `beam-element` do you mean a hexahedral cell?
This is supported in for instance DOLFINx.

A beam element has 6 DoF’s per node. 3 displacements and 3 rotations.

Could you send a formal definition, along the lines of:

as I’m not familar with how you define these degrees of freedom and corresponding functionals.

As far as I can understand from discussions with co-workers, you just want to use a first order vector Lagrange element on a hexahedral grid.

I found one old post(link) regarding beam elements. @bleyerj had suggested this tutorial . I want a similar study using 3D beam elements for a 3D cantilever beam problem.

Hi, were you able to model the beam with beam-element ?
I am trying similar problem.
I am looking for suggestions.

@mohaiminul_islam_Mis not yet.