# Boundary conditions in large fluid problem in the document

**URL:** https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236
**Category:** General Discussion
**Created:** [January 21, 2023, 4:38pm UTC](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236 "2023-01-21T16:38:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![cfdyuewu](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@cfdyuewu](https://community.freefem.org/u/cfdyuewu)
#### Post date: [January 21, 2023, 4:38pm UTC](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236/1 "2023-01-21T16:38:49Z")

</div>

Hello, I am new to cfd and I just try to understand the boundary condition of the epsilon in the page large fluid problem, the link is `[large fluid problem] (https://doc.freefem.org/tutorials/aLargeFluidProblem.html)`  
the code is

> 89problem ViscosityTurbulence(ep, q)  
> 90 = int2d(Th)(  
> 91 (1.92_epp/kp + alpha) \* ep \* q  
> 92 + muT \* grad(ep)’ \* grad(q)  
> 93 )  
> 94 + int1d(Th, b1, b2)(  
> 95 T \* q \* 0.001  
> 96 )  
> 97 + int2d(Th)(  
> 98 prode \* q  
> 99 - alpha_convect([Upx, Upy], -dt, epp)_q  
> 100 )  
> 101 + on(b5, b6, ep=0.00001)  
> 102 + on(b1, b2, ep=beta_nuep\*pow(stress,1.5))  
> 103 ;  
> in the int1d part, what is the boundary condition of epsilon, that is ep,on b1,b2?

---

<div class="post-metadata">

### Author: ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)
#### Post date: [January 25, 2023, 10:27am UTC](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236/2 "2023-01-25T10:27:00Z")

</div>

b1 and b2 are the boundaries. I think since the `int1d` and `on` commands both act on boundaries b1 and b2, this is a mixed boundary condition.

---

<div class="post-metadata">

### Author: ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)
#### Post date: [January 28, 2023, 5:24pm UTC](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236/3 "2023-01-28T17:24:52Z")

</div>

Note that strong form of the epsilon equation contains a viscous diffusion term (Laplacian). Hence, the term on line 92 was integrated by parts to get this weak form. Since there is no corresponding boundary integral, this imposes a Neumann condition on `ep` for any boundary without corresponding Dirichlet conditions (i.e. `b3, b4`).

The `int1d` term on line 95 is a boundary term that does not involve `ep`, hence it only appears in the RHS.

So, from what I can tell, we have homogeneous Neumann conditions along `b3,b4` and inhomogeneous Dirichlet conditions on `b1,b2,b5,b6`.

---

<div class="post-metadata">

### Author: ![cfdyuewu](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@cfdyuewu](https://community.freefem.org/u/cfdyuewu)
#### Post date: [February 11, 2023, 1:43am UTC](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236/4 "2023-02-11T01:43:29Z")

</div>

hello, after reading some papers, I find out that the correct boundary conditions for epsilon is robin on the wall

---

<div class="post-metadata">

### Author: ![cmd](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/cmd/32/67_2.png) [@cmd](https://community.freefem.org/u/cmd)
#### Post date: [February 11, 2023, 7:34am UTC](https://community.freefem.org/t/boundary-conditions-in-large-fluid-problem-in-the-document/2236/5 "2023-02-11T07:34:14Z")

</div>

Yes, that could be a correct BC in some applications, but it is not always the case. The author of that script chose Dirichlet/Neumann conditions for their problem, and apparently that was sufficient for their purpose.

If you want to implement a Robin BC, you can use, an `int1d` along your boundary of interest that enforces the Dirichlet part of the constraint. Note that the Neumann condition is already handled naturally via the elimination of the boundary term in the integration by parts.
