# Getting error while solving stokes interface problem in a square domain

**URL:** <https://community.freefem.org/t/getting-error-while-solving-stokes-interface-problem-in-a-square-domain/4033>\
**Category:** General Discussion\
**Created:** [August 3, 2025, 8:57am UTC](https://community.freefem.org/t/getting-error-while-solving-stokes-interface-problem-in-a-square-domain/4033 "2025-08-03T08:57:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RaghunathBandha](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/raghunathbandha/32/1843_2.png) [@RaghunathBandha](https://community.freefem.org/u/RaghunathBandha)\
**Post date:** [August 3, 2025, 8:57am UTC](https://community.freefem.org/t/getting-error-while-solving-stokes-interface-problem-in-a-square-domain/4033/1 "2025-08-03T08:57:03Z")

</div>

I have taken [-2,2]\times [-2,2] as domain with interface [-1,1]\times[-1,1]. But after solving in Free Fem++, I am getting a large error for pressure. Please look into it.

[stokessquareinterface.edp](https://community.freefem.org/uploads/short-url/vq9TiHJcd77xa4nTFZr7BmTdiA5.edp) (1.8 KB)

---

<div class="post-metadata">

**Author:** ![fb77](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/fb77/32/3796_2.png) [@fb77](https://community.freefem.org/u/fb77)\
**Post date:** [August 6, 2025, 2:00pm UTC](https://community.freefem.org/t/getting-error-while-solving-stokes-interface-problem-in-a-square-domain/4033/2 "2025-08-06T14:00:17Z")

</div>

You are solving a problem with unknowns [ut1x,ut1y,pt1] in domain T1, and [ut2s,ut2y,pt2] in domain T2. There is no coupling in your problem since in your variational formulation there is no cross termm mixing [ut1x,ut1y,pt1] and [vt2x,vt2y,qt2], or [ut2x,ut2y,pt2] and [vt1x,vt1y,qt1]

As a consequence, your are solving two independent problems of stokes for [ut1x,ut1y,pt1] over T1, and Stokes for [ut2x,ut2y,pt2] on T2.

The boundary conditions you set are not satisfied by your “candidate solutions” [u1x,u1y,p1],

and [u2x,u2y,p2]. This is why you don’t get these candidate solutions.

For informatio, the boundary conditions set by your variational formulation are:

For [u2x,u2y,p2] :

```auto
  u2x=0, u2y=0 on the external boundary,

```

(b\_2 \\nabla u\_2-p\_2)N=0 on the internal boundary

For [u1x,u1y,p1]

(b\_1\\nabla u\_1-p\_1)N=0 on the internal boundary
