Hello everyone,
I am trying to use mini-elements to solve the Stokes flow problem (here is an example in the FEniCS documentation: link), and I would like to apply a free-slip boundary condition in my domain. Basically, it is a Dirichlet boundary condition applied in only one dimension in the vector function space.
Generally, you can apply the free-slip boundary condition like this:
scalar = FunctionSpace(mesh, "CG", 1)
vector = VectorFunctionSpace(mesh, "CG", 1)
system = vector*scalar
...
BC = DirichletBC(system.sub(0).sub(1), Constant(0.0), boundary_parts, 1)
Unfortunately, this does not give a stable solution to the Stokes flow problem and that’s why I’m trying the mini-element. My setup now looks like this:
scalar = FunctionSpace(mesh, "CG", 1)
vector = VectorFunctionSpace(mesh, "CG", 1)
bubble = VectorFunctionSpace(mesh, "Bubble", 3)
system = (vector+bubble)*scalar
...
BC = DirichletBC(system.sub(0).sub(1), Constant(0.0), boundary_parts, 1)
This gives me the following error: ValueError: Can only extract SubSpaces with i = 0 ... -1
. It seems that the vector+bubble
function space cannot be separated into subspaces for each spatial dimension, and thus I cannot apply my free-slip boundary condition. Does anybody know of a solution or a workaround?
Thanks in advance.