Failed eigenvalue analysis with imported mesh

Hello,

I am new to fenics and I am facing an unexpected problem while solving a generalized eigenvalue problem (modal analysis) on a simple beam (rectangular domain 400x10x20).

The mesh is produced from GMSH and converted to .xdmf using MESHIO. The boundary conditions are assigned using GMSH tags. The code seems to work for small eigenvalues and then it originates wrong solutions as reported here:

    • Solid FE: 0.08115 [Hz] Beam theory: 0.08118 [Hz]
    • Solid FE: 0.16210 [Hz] Beam theory: 0.16236 [Hz]
    • Solid FE: 0.50738 [Hz] Beam theory: 0.50876 [Hz]
    • Solid FE: 1.00609 [Hz] Beam theory: 1.01752 [Hz]
    • Solid FE: 1.41537 [Hz] Beam theory: 1.42455 [Hz]
    • Solid FE: 2.13105 [Hz] Beam theory: 2.84909 [Hz]
    • Solid FE: 2.13105 [Hz] Beam theory: 2.79154 [Hz]
    • Solid FE: 2.13106 [Hz] Beam theory: 5.58309 [Hz]
    • Solid FE: 2.26681 [Hz] Beam theory: 4.61462 [Hz]
    • Solid FE: 2.26681 [Hz] Beam theory: 9.22924 [Hz]

The first 5 eigenvalues are perfect. Starting from eigenvalue number 6 it looks like the Neumann and Dirichlet boundaries switch: the nodes on the Dirichlet surface oscillates while all the other nodes have a prescribed (fixed) displacement value.

Here reported you can find the picture of the sixth eigenmode. As you can see, the face with associated Dirichlet BC moves, while the rest of the domain is constrained.

I am working with Fenics 2019.1.0 and the mesh is imported using the following lines of code:

from dolfin import *

mesh = Mesh()
with XDMFFile(“beam.xdmf”) as infile:
infile.read(mesh)
mvc = MeshValueCollection(“size_t”, mesh, 1)

with XDMFFile(“beam_dirichlet.xdmf”) as infile:
infile.read(mvc, “Dirichlet”)
mf = cpp.mesh.MeshFunctionSizet(mesh, mvc)

Any help is truly appreciated.

Thank you very much for your support.