I have to find reaction force at the fixed end of cantilever beam.
The geometry and xdmf files are attached here
The MWE is attached here-
from dolfin import *
mesh = Mesh()
with XDMFFile("mesh/tetra.xdmf") as infile:
infile.read(mesh)
def eps(v):
return sym(grad(v))
E, nu = 200e9, 0.3
rho = 7850
mu = E/2/(1+nu)
lmbda = E*nu/(1+nu)/(1-2*nu)
def sigma(v):
return lmbda*tr(eps(v))*Identity(3) + 2.0*mu*eps(v)
rho_g=7850*9.8066
f = Constant((0, -rho_g, 0))
V = VectorFunctionSpace(mesh, 'Lagrange', degree=2)
du = TrialFunction(V)
u_ = TestFunction(V)
a = inner(sigma(du), eps(u_))*dx
l = inner(f, u_)*dx
support = CompiledSubDomain("near(x[0], 0, tol) && on_boundary", tol=1e-14)
bc = DirichletBC(V, Constant((0.,0.,0.)), support)
u = Function(V, name="Displacement")
solve(a == l, u, bc)
file_results = XDMFFile("elasticity_results.xdmf")
file_results.write(u)
Can you please help.