I am importing a cantilever beam bdf
file from commercial package( Ansys
) to Gmsh
and converting it to XDMF
using meshio
and importing that XDMF
file into fenics.I have to incorporate distributed point mass of 2kg at the free end of this beam.
I am unable to implement this in coding.
The geometry and xdmf file is attached here
The MWE without point mass is attached as-
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 in incorporating distributed point mass of 2kg at the free end of this beam.