# Coupling a systeme of equation

**URL:** https://community.freefem.org/t/coupling-a-systeme-of-equation/3945
**Category:** General Discussion
**Created:** [May 27, 2025, 1:43pm UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945 "2025-05-27T13:43:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![taha](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@taha](https://community.freefem.org/u/taha)
#### Post date: [May 27, 2025, 1:43pm UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945/1 "2025-05-27T13:43:39Z")

</div>

![Capture d'écran 2025-05-27 154046](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/1/181eebd004841c22ff45e994a2bc740d8a3044bc.png)

Hello everyone,i’m just trying to couple this three equations,but i get false relsuts,i coupled the systeme by giving an arbitrary value of T,then solving the first equation then the third and then the second,and i keep doing until it converge,but it converges to the false solution.And thank you so much with your help i have been strugling in ths since last week  
[boussinesqq.edp](https://community.freefem.org/uploads/short-url/rMu4bSD9oUWoBiE1FZUTF9aiYqA.edp) (2.2 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: [May 28, 2025, 7:48am UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945/2 "2025-05-28T07:48:59Z")

</div>

Hello,  
Your iterative method is sound, and it converges nicely to the obvious solution P=cst, T=T(x) linear in x satisfying the left and right boundary conditions.  
Why do you call this “false solution” ?

---

<div class="post-metadata">

### Author: ![taha](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@taha](https://community.freefem.org/u/taha)
#### Post date: [May 28, 2025, 8:10am UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945/3 "2025-05-28T08:10:11Z")

</div>

Hello,  
Thank you so much for your response,it just because we know that P is not a cst in the domain since we know that the gradient of pressure is not 0 ,and the values of Ux are veryy low

---

<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: [May 28, 2025, 8:37am UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945/4 "2025-05-28T08:37:58Z")

</div>

Maybe you did not set the boundary conditions as you should.  
You set the temperature on borders 1,3 (left, right).  
Maybe you should set it on borders 4,2 (bottom, top).

But then there is a problem on your pressure equation as long as you consider Neumann BC, because integrating (1) over the domain you get  
0+a\int\_x (T\_{top}-T\_{bottom}) =0, which is a contradition.  
Maybe you should set `+on(2,p=0)`

---

<div class="post-metadata">

### Author: ![taha](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@taha](https://community.freefem.org/u/taha)
#### Post date: [May 28, 2025, 11:37am UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945/5 "2025-05-28T11:37:03Z")

</div>

thank you so much for your response,we don’t have boundry condition for pressure,but we know in theorie that we should have a pressure gradient generated by the temprature difference,and when i set +on(2,p=0) it doesn’t converge.

---

<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: [May 28, 2025, 12:34pm UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945/6 "2025-05-28T12:34:55Z")

</div>

Probably you need also a boundary condition on the bottom for P.  
It can be v.N =0, hence (\nabla P +a Te\_2)\cdot N=0 on the bottom, which is a nonhomogeneous Neumann BC.  
Thus the boundary settings are:

1. For the P equation

```auto
- int1d(Th,4)(-a*T*N.y*Q)
+on(2,p=0)

```

1. For the T equation

```auto
+ on(4, T=300)
+ on(2, T=250)

```

With that it converges to a solution which depends only on y, with v=0. It looks physically correct.

---

<div class="post-metadata">

### Author: ![taha](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@taha](https://community.freefem.org/u/taha)
#### Post date: [May 28, 2025, 12:48pm UTC](https://community.freefem.org/t/coupling-a-systeme-of-equation/3945/7 "2025-05-28T12:48:14Z")

</div>

> [@fb77](#):
>
> ```auto
> + on(4, T=300)
> + on(2, T=250)
> 
> ```

thank you so mush,it lookes like it’s the right solution
