Is it possible to apply periodic condition on a FiniteElement Space (Mixed Formulation)

Hi,

I would like to constrain (periodicaly) a subdomain of a FunctionSpace define like

V = VectorElement("CG", mesh.ufl_cell(), 2)
Q = FiniteElement("CG", mesh.ufl_cell(), 1)
TH = V * Q
W = FunctionSpace(mesh, TH)

It doesn’t seem possible to constrain Q (with the FiniteElement syntax) as for the syntax “Function space” syntax (see : https://fenicsproject.org/qa/5279/periodic-boundaries-and-mixed-formulation-poisson-equation/)?
I tried
Q = FiniteElement("CG", mesh.ufl_cell(), 1, constrained_domain=PeriodicBoundary1())
but it doesn’t work.

Is there a way to constrain Q = W.sub(1) directly in the definition of W ?

Thank you in advance for your answer

By design creating a mixed space where only one of the variables is periodic is not supported in dolfin. You can check this discussion (if I understand your question correctly).

Instead of creating a MixedFunctionSpace, you could create a block system from scratch (I have never tested this though) or use this approach.

Thank you very much for your answer. That’s exactly what I’m trying to do.

Maybe I’m going wrong in the resolution of my problem.

I would like your opinion on how to implement my system of equations on Fenics.

I solve a darcy mixed formulation

u = -K/mu*grad( p )
div(u)=0

(so as to keep the incompressibility, that I could lose with a resolution of a simple pressure equation -div ( Kgrad( p ) ) = 0) on a square with the boundaries conditions :
SquareCLperiodic

I take (G1, G2) = (1,0).

I end up with a periodic pressure in the horizontal and a vertical pressure gradient. So, I need a first periodicity on Q (my space pressure).
Then, the conditions on the Darcy’s velocity ask (as I am on a square ie without curvatures: I know well the form of my normals n_i) a periodicty on W.sub (0).sub (0) to the horizontal and on W.sub (0).sub (1) verticaly (where W.sub (0) = V is the velocity space).

So, It seems that I can not force the periodicity horizontally and vertically directly on my space W = V*Q .

Thank you