Singular Stokes Problem

Dear All,

I’m trying to solve the stokes equation with Pure Neumann boundary conditions or Traction boundary conditions at the boundaries.


This problem is singular and similiar to (https://fenicsproject.org/olddocs/dolfin/1.3.0/python/demo/documented/singular-poisson/python/documentation.html#) because the velocity field and the pressure field are not determined up to a constant .

mesh=UnitSquareMesh(20,20)
V = VectorFunctionSpace(mesh,‘P’, 1)
p_element=FiniteElement(‘P’, mesh.ufl_cell(),1)
v_element=VectorElement(‘P’,mesh.ufl_cell(),2)
element = MixedElement([p_element, v_element])
FS=FunctionSpace(mesh,element)

q,v=TestFunctions(FS)
P,u=TrialFunctions(FS)

force=df.Expression((‘x[0]’,‘0’),degree=1)
a = inner(grad(u), grad(v))df.dx + div(v)pdf.dx + qdiv(u)*df.dx
L=inner(force,v)*df.dx

  1. Can someone help me with how to remove the null space of the Matrix (a), such that i can eliminate constant velocity and pressure solutions ? similiar to (https://fenicsproject.org/qa/4121/help-parallelising-space-method-eliminating-rigid-motion/) .
  2. For the elasticity problem however there is only one function space. How can one do this procedure for both the pressure and the velocity?

Have you looked at this post ?
https://fenicsproject.org/qa/13927/pressure-nullspace-for-stokes-problem/