# are periodic boundary conditions exact?

 Register Blogs Members List Search Today's Posts Mark Forums Read

December 18, 2018, 14:23
are periodic boundary conditions exact?
#1
New Member

Theo
Join Date: Mar 2009
Posts: 26
Rep Power: 17
I try to perform a rather simple simulation: an incompressible flow through a duct using periodic boundary conditions for each velocity component and pressure in streamwise directions. I always considered periodic bcs to be exact. However, looking at the attached in-plane velocity field (underresolved resolution, but that's not the point) i can see structures which are related to the application of the boundary conditions. One can clearly see the vertical blue and red areas on both sides of the domain.

The question is: did i do a mistake in the implementation of the periodic bcs or is there an inherent inaccuracy in the method?

btw, I use a staggered grid and I tried both periodic pressure and pressure gradient with similar result: p_in = p_out and px/dx_in = px/dx_out
Attached Images
 2018-12-18-201212_646x369_scrot.png (103.8 KB, 19 views)

December 18, 2018, 14:44
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,780
Rep Power: 71
Quote:
 Originally Posted by holgerbre I try to perform a rather simple simulation: an incompressible flow through a duct using periodic boundary conditions for each velocity component and pressure in streamwise directions. I always considered periodic bcs to be exact. However, looking at the attached in-plane velocity field (underresolved resolution, but that's not the point) i can see structures which are related to the application of the boundary conditions. One can clearly see the vertical blue and red areas on both sides of the domain. The question is: did i do a mistake in the implementation of the periodic bcs or is there an inherent inaccuracy in the method? btw, I use a staggered grid and I tried both periodic pressure and pressure gradient with similar result: p_in = p_out and px/dx_in = px/dx_out

Periodic BCs. are exact but imply a strong condition on the flow and the lenght must be enough to let develop physically the flow structures... looking at your plot the periodicity lenght seems smaller than the extension of the computational domain in streamwise direction, thus I think about a bug in your code.
Note that what is periodic in the pressure field is the fluctuating part that must be superiposed to a constant gradient field.

 December 18, 2018, 14:57 #3 New Member   Theo Join Date: Mar 2009 Posts: 26 Rep Power: 17 - right, I use periodic bc for the fluctuating pressure and superimpose it with a constant pressure that drives the flow - agree, the domain is too small and also the resolution is way too coarse. So the result will be physically wrong. But still, if I implement the bcs correctly, I should not see these structures at the domain borders, or? or can it be related to that?

December 18, 2018, 15:02
#4
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,780
Rep Power: 71
Quote:
 Originally Posted by holgerbre - right, I use periodic bc for the fluctuating pressure and superimpose it with a constant pressure that drives the flow - agree, the domain is too small and also the resolution is way too coarse. So the result will be physically wrong. But still, if I implement the bcs correctly, I should not see these structures at the domain borders, or? or can it be related to that?

Structures can appear, passing the BCs. edges and moving along the domain, what I see not correct (and I suppose due to a bug) is the fact you have the same structures at a lenght lower than the periodicity lenght.
However, I strongly suggest to check you code on the analytical Taylor solution before using the duct problem

 December 19, 2018, 00:15 #5 New Member   Theo Join Date: Mar 2009 Posts: 26 Rep Power: 17 you mean a 2D Taylor vortex flow, right? Thanks, I will try that.