# Periodic plus a value BC

**URL:** <https://community.freefem.org/t/periodic-plus-a-value-bc/1610>\
**Category:** General Discussion\
**Created:** [March 19, 2022, 5:23pm UTC](https://community.freefem.org/t/periodic-plus-a-value-bc/1610 "2022-03-19T17:23:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahdi](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mahdi](https://community.freefem.org/u/mahdi)\
**Post date:** [March 19, 2022, 5:23pm UTC](https://community.freefem.org/t/periodic-plus-a-value-bc/1610/1 "2022-03-19T17:23:58Z")

</div>

Dear Fellows!  
I am trying to find a Boundary condition where the value on boundary A is equal to the values of B plus a constant. More like a Periodic BC where the value on B is A+const.

Any thoughts or ideas are sincerely appreciated…

 ![Untitled](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/2X/3/36ee8dd8ef3c16c8a2dd76e362eb45359cee50cd.png)

---

<div class="post-metadata">

**Author:** ![mahdi](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@mahdi](https://community.freefem.org/u/mahdi)\
**Post date:** [March 24, 2022, 2:56am UTC](https://community.freefem.org/t/periodic-plus-a-value-bc/1610/2 "2022-03-24T02:56:04Z")

</div>

I think I have solved it somehow;  
I defined a new domain (here the triangle between A and B), as decomposition, and solved a dummy equation on it to have the value equal on both edges and received psiD, also defined psiE=psiD+const;

then I read it as on(A=PsiD) and on (B=psiE);

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [March 25, 2022, 9:57am UTC](https://community.freefem.org/t/periodic-plus-a-value-bc/1610/3 "2022-03-25T09:57:32Z")

</div>

If your problem is linear a(u,v)=f(v) , then you can solve 2 problems  
in space V\_0 (dirichlet 0) and in V\_p (periodic) and V\_0 is include in V\_p  
such that the solution will be u= u\_p + u\_c  
u\_c solution with dirichlet constant of a(u\_c,v)=0, u\_c= 0 on A and u\_c=const on B  
and u\_p solution a(u\_p,v)=f(v) in V\_p
