# Periodic boundary about taylor problem

**URL:** https://community.freefem.org/t/periodic-boundary-about-taylor-problem/553
**Category:** General Discussion
**Created:** [August 28, 2020, 8:17am UTC](https://community.freefem.org/t/periodic-boundary-about-taylor-problem/553 "2020-08-28T08:17:55Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![xlzheng](https://avatars.discourse-cdn.com/v4/letter/x/2acd7d/32.png) [@xlzheng](https://community.freefem.org/u/xlzheng)
#### Post date: [August 28, 2020, 8:17am UTC](https://community.freefem.org/t/periodic-boundary-about-taylor-problem/553/1 "2020-08-28T08:17:55Z")

</div>

Hi,  
I’m trying to solve the taylor vortex problem with periodic boundary in the two-dimensional domain x,yϵ[-1,1].  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/4f3fb9c6ede5dca83316a256fc9467e0cd18684a.png)  
I use the one order time precision discrete the equation, and Initialize the velocity and pressure with analytic solutions.

The procedure as follows:

mesh Th=square(32,32,[-1+2_x,-1+2_y]);  
fespace Vh(Th,P2,periodic=[[2,y],[4,y],[1,x],[3,x]]);  
fespace Ph(Th,P1,periodic=[[2,y],[4,y],[1,x],[3,x]]);  
Vh ux,uy,uxold,uyold,vx,vy,dux,duy;  
Ph p,pold,q,dp;

real err=10,eps=1e-6,dt=0.02,errt;  
uxold=-cos(pi_x)sin(piy);  
uyold=sin(pi_x)_cos(pi_y);  
pold=-(cos(2_pi_x)+cos(2_pi_y))/4;  
plot([uxold,uyold],wait=1);

solve taylor([ux,uy,p],[vx,vy,q]) =  
int2d(Th)(  
(ux_vx+uy_vy)/dt  
+(uxold_dx(ux)+uyold_dy(ux))_vx  
+(uxold_dx(uy)+uyold_dy(uy))vy  
-p(dx(vx)+dy(vy))  
-q_(dx(ux)+dy(uy))  
)  
-int2d(Th)((uxold_vx+uyold_vy)/dt)  
;

When running the case, FreeFem++ show that :

Problem build of FEspace (2d) (may be: due to periodic boundary condition missing) FH  
The number of DF must be 9216 and it is 9539

I don’t know why, I hope somebody could have a look and give me some advices 😃

---

<div class="post-metadata">

### Author: ![Alex](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@Alex](https://community.freefem.org/u/Alex)
#### Post date: [January 6, 2021, 2:37pm UTC](https://community.freefem.org/t/periodic-boundary-about-taylor-problem/553/2 "2021-01-06T14:37:05Z")

</div>

I am having exactly the same problem (same error statement) for the NSE in 3D. It definitely is the issue with periodic spaces; if you use fespace Vh(Th,P2) and fespace Vh(Th,P1), the error message will disappear. Hopefully someone will answer you and it will help me too:)
