Boundary conditions for systems of equations

Dear all,

i am still quite new to FEniCS and am working on the biharmonic equation by reducing the system, so i can use H1 elements. However i want to calculate the eigenvalues of a clamped plate, my code right now produces eigenvalues for a simply supported plate, i am certain that the boundary conditions are the problem.
The boundary conditions are the dirichlet boundary 0 and the second needed boundary is that the normal derivative on the boundary is also 0. My initial thought was that the neumann boundary wasn’t neccesary to add, because it is either way 0.

Thanks in advance for every suggestion!
The code is the following:

mesh = UnitSquareMesh(10,10)
X = FiniteElement('CG', mesh.ufl_cell(), 2)
Y = FiniteElement('CG', mesh.ufl_cell(), 2)
Z = X * Y
S = FunctionSpace(mesh, Z)

u = TrialFunctions(S)
phi = TestFunctions(S)

a = inner(grad(u[1]), grad(phi[0]))*dx + inner(grad(u[0]), grad(phi[1]))*dx

def boundary(x, on_boundary):
    return on_boundary

bc = DirichletBC(S, Constant((0.0,0.0)), boundary)

g = Constant(0.0)
L_dummy = Constant(0)*phi[0]*dx
m = u[0]*phi[0]*dx + u[1]*phi[1]*dx 

A, _ = assemble_system(a,L_dummy,bc)
B = assemble(m)
eigensolver = SLEPcEigenSolver(as_backend_type(A), as_backend_type(B))
eigensolver.parameters['spectrum'] = 'target real'
eigensolver.parameters['tolerance'] = 1e-6
eigensolver.solve()
r, c, rx, cx = eigensolver.get_eigenpair(0)
print("Eigenvalue: ", r)
ef = Function(S)
ef.vector()[:] = rx
plot(ef[0])
plt.show()

You can set a DirichletBC on subspaces, e.g.

DirichletBC(S.sub(0), Constant(0.0), boundary)

Hi, thanks for the hint! I immediately treid it, however i get an error indicating that the SLEPcEigensolver is now unable to extract the eigenpair. The message being:
*** Error: Unable to extract eigenpair from SLEPc eigenvalue solver.
*** Reason: Requested eigenpair (0) has not been computed.
*** Where: This error was encountered inside SLEPcEigenSolver.cpp.
*** Process: 0


*** DOLFIN version: 2019.2.0.dev0
*** Git changeset: unknown

Minor update: i tried your solution for two subdomains and now don’t get any error message, however the same result, as to begin with. But still thanks for your hint and your time.

You could examine the output of the eigenvalue solver to see why it’s not converged with eps_view.

Are you sure it’s possible to enforce a clamped BC with the Ciarlet Raviart element?

It does converge if i use your line of code twice

bc0 = DirichletBC(S.sub(0), Constant(0.0), boundary)
bc1 = DirichletBC(S.sub(1), Constant(0.0), boundary)

bcs = [bc0, bc1]

The element i use is the regular lagrange element “CG”. But i’ll keep in mind for future projects, that there is a possibility to examine the output more closely
Now the value is the problem on a unit square plate the first eigenvalue is 35.9861 in the reference i want to validate my work with. The value i get is 19.74058961530659 which is the same value i found in a thesis about supported unit square plates.

The Ciarlet Raviart method solves the biharmonic problem by an operator splitting, see e.g. here. This seems to be exactly what you’re trying to do.

Applying the homogeneous BC to each subspace is equivalent to applying the homogeneous BC to the whole space.

Perhaps consider this excellent example of Timoshenko beam buckling, or fenics-shells.

1 Like

Hi Nate, me and my supervisor reviewed what you linked in your last replay and we found it very usefull. I just wanted to give you an update and thank you for your help!