periodic boundary condition
Hi
I'm solving the navier stokes equation for flow inside a wavy channel using element based finite volume method on a colocated grid. I want to implement periodic boundary condition on inlet and outlet. I specified the velocities at the inlet and set the velocities at outlet equal to inlet but i don't know what to do with pressure. It would be great if someone could help me. thanks 
Periodic boundary conditions
Hi!
I'm not sure I have fully understood what you are doing, so please forgive me if I just tell you something that you already know! Physically, a pressure difference drives a fluid along, resulting in the velocity field. So if you define the pressure at both ends of the domain, the simulation should calculate the velocity field that would result. Conversely, if you set the velocity as you said you have, the simulation should calculate the pressure difference between the two ends (pressure drop). So setting both would overdefine the problem! Hope this helps, sorry if I didn't get what you were saying! :) 
David is right. This is not how periodicity is set up in codes. Actually, you don't have to fix anything. Just, anytime you are near/on a periodic boundary you have to consider the other periodic boundary as a neighbour one in the update of variables.
Example on a 1D grid: x1, x2, x3, ..., xn. Suppose that to update variables in node xi you need variables in nodes xi1 and xi+1. Then, this stencil won't need boundary conditions until you are on x1 and xn. In x1 you don't have x0 and, according to the periodicity, you will use xn (or xn1, depending how you want to implement it); in xn you don't have xn+1 and you will use x1 (or x2). Usually, to avoid later bothering, this is implemented by augmenting the original grid with ghost cells near the periodic boundaries and updating the values here with the relative periodic neighbours. Of course, ghost cells have to be properly dimensioned to get everything correct. 
Thank you Davey Baby and Sbaffini for your help. I will work on it.

Just to add to what others mentioned, in your case, the velocity will behave periodically, and exactly as Paolo describes. However, pressure won't be periodic. Instead, pressure drop is going to be constant. So, for every node (i, 0) on upstream side of the periodic pair and its corresponding node (i, N  1) on downstream side of the periodic pair, then
p(i, 0)  p(i, N  1) = Delta p for all i's Another way to look at this is that if you subtract a linear pressure drop, the new pressure (p' = p  (L  x)/L * Delta p) is going to be periodic. So, in your case, you can either specify Delta P, and solve for the flow rate, or specify the flow rate and solve for Delta P (you can't specify both). 
It worked.:) thank you guys.

All times are GMT 4. The time now is 00:05. 