Compressibility assumption not respected

Hello everyone,

I’m trying to simulate a 2D fluid flow in two adjacent rectangular regions separated with a border: a free flow region (Stokes) and a porous region (Darcy). The inlet and the outlet are defined in the Stokes region. At the shared border (named gamma), two coupling conditions were set between the normal and tangentiel velocity in the two rgion. No slip conditions were set in the remaining borders. The fluid is supposed to be incompressible and the two problems were defined in FreeFEM to satisfy this assumption. However, with some boundary conditions, the compressibility of the fluid at Darcy region is not respected. Here the definition of the two problems:
"
problem Stokes ([u1, u2, pS], [v1, v2, qS], init=i)
= int2d(ThS)(
mu*(
Grad2(u1,u2)’ * Grad2(v1,v2)
)
-pS * Div2(v1,v2)
-qS * Div2(u1,u2)
- (pS * qS*1e-10)
)
-int1d(ThS, gamma)(mu * (U1gn1(u1,u2) * v1 + U1gn2(u1,u2) * v2))
+ on(LS, u1=v0s, u2=0) //v0s: inlet flow field= Poiseuille flow
+ on(US, u2=0)
//+ on(RS, u1=vm) //vm: outlet velocity = mean inlet velocity
;

problem Darcy1([uD1,uD2,pD], [vD1,vD2,qD], init=i)
= int2d(ThD)( // The bilinear part
-k *(pD * Div2(vD1,vD2))
+uD1 * vD1+uD2 * vD2
-qD * Div2(uD1,uD2)
-(pD * qD * 1e-10)
)
+ on(RD, uD1=0)
+ on(LD, uD1=0)
+ on(DD, uD2=0)
+ on(gamma, uD2=u2)
;
"

In the results:
int2D(ThS) (Div2(u1,u2))=-1.4 e-07
int2D(ThD)(Div2(uD1,uD2))=-276.952

With Div2(u,v) is the divergence operator, ThS stokes mesh and ThD Darcy mesh
How can I force the program to find a null divergence flow in the two domains?

Thank you.

Yes it is normal, you to problem are couple , you formulation are wrong , sorry.

Thank you Mr Hecht.
Can you precise why it is wrong? what matters with a coupled problem?
For some other outlet boundary condition, the divergence is null for the two domains. I mean, what makes the solver not respect the incompressibility assuption defined in the formulation?

Thank you.

You have 2 problem with a couple Boundary condition, you need a loop to solve this problem.