# Implementation of Periodic Boundary Condition

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

 April 26, 2012, 20:04 #21 Senior Member   Chris DeGroot Join Date: Nov 2011 Location: Canada Posts: 388 Rep Power: 8 Hmm... so this is not your standard periodic problem since the outflow and inflow are not in line with one another. I would make two suggestions: (i) I would suggest simulating two chambers such that your inlet and outlet are in line with one another. I don't believe that the way you have it set up that you can guarantee the outflow at the bottom is equal to to inflow at the top. If you simulate two chambers the geometric periodicity will guarantee periodicity in the flow. (ii) It sounds like you are coupling the inflow and outflow explicitly; that is you get a certain outflow profile and apply that as a Dirichlet BC at the inlet at the next iteration. Your code will converge much better if you couple them implicitly. However this much easier if you set up the problem as suggested in (i).

April 26, 2012, 20:33
#22
Member

Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 7
Quote:
 Originally Posted by cdegroot Hmm... so this is not your standard periodic problem since the outflow and inflow are not in line with one another. I would make two suggestions: (i) I would suggest simulating two chambers such that your inlet and outlet are in line with one another. I don't believe that the way you have it set up that you can guarantee the outflow at the bottom is equal to to inflow at the top. If you simulate two chambers the geometric periodicity will guarantee periodicity in the flow. (ii) It sounds like you are coupling the inflow and outflow explicitly; that is you get a certain outflow profile and apply that as a Dirichlet BC at the inlet at the next iteration. Your code will converge much better if you couple them implicitly. However this much easier if you set up the problem as suggested in (i).
Thanks for your suggestions. suggestion (i) makes sense and I'm gonna apply it know. About your second suggestion, your right; I am applying Dirichlet BC which is kinda explicit. But how can I apply it implicitly?

 April 26, 2012, 20:45 #23 Senior Member   Chris DeGroot Join Date: Nov 2011 Location: Canada Posts: 388 Rep Power: 8 As an example, let's say you were computing the gradient of a quantity PHI on the east face of a volume adjacent to the outflow boundary. To do this implicitly it would be (PHI(1)-PHI(N))/DELTAX, where "1" is the volume adjacent to the inlet and "N" is the volume adjacent to the outlet. So you are treating "1" like it is the east neighbour of "N" and this would be incorporated implicitly into your coefficient matrix. You would then form all of the terms in your equations in this manner, where inlet volumes are treated like neighbours of the outlet volumes and vice versa.

 April 26, 2012, 21:47 #24 New Member   JMC Join Date: Apr 2012 Posts: 9 Rep Power: 7 Can you verify that you are conserving mass? Are you solving a compressible or incompressible system? If it is compressible, then adjusting the pressure is not sufficient for convergence.

April 27, 2012, 08:53
#25
Member

Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 7
Quote:
 Originally Posted by DeepElm Can you verify that you are conserving mass? Are you solving a compressible or incompressible system? If it is compressible, then adjusting the pressure is not sufficient for convergence.
No, it is incompressible and I do check the continuity to be satisfied.

April 27, 2012, 10:39
#26
Senior Member

Join Date: Aug 2011
Posts: 271
Rep Power: 9
Quote:
 Originally Posted by BMCombustor In my new geometry, my boundaries are 1 as left and N as right. As you can see it in attached file (Geometry.jpg), this is a cavity like problem with one inlet at 1 and one outlet at N. But suppose that this is periodic problem and I am going to have the same chamber (but upside down) immediately after the current chamber. Therefore, the outlet velocity profile for the first chamber would be the inlet profile for the next one i
To my mind the geometry of your problem is not periodic.
If you want to impose periodic boundary condition you should consider your domain twice as it is in your simulation. Check the sketch below, I hope you will understand what I mean.... I think this is the first reason why your simulation doesn't work. Then you will have to consider the pressure drop.
Attached Images
 periodic.JPG (20.2 KB, 24 views)

April 27, 2012, 10:43
#27
Senior Member

Chris DeGroot
Join Date: Nov 2011
Posts: 388
Rep Power: 8
Quote:
 Originally Posted by leflix To my mind the geometry of your problem is not periodic. If you want to impose periodic boundary condition you should consider your domain twice as it is in your simulation. Check the sketch below, I hope you will understand what I mean.... I think this is the first reason why your simulation doesn't work. Then you will have to consider the pressure drop.
That is what I was thinking as well. It seems like you definitely need two chambers for periodicity. Thanks for the sketch by the way. That was what I was trying to explain above but was too lazy to draw out.

 April 27, 2012, 11:50 #28 Senior Member   Join Date: Aug 2011 Posts: 271 Rep Power: 9 Yes you got the point Chris ! We agree...

April 27, 2012, 12:52
#29
Member

Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 7
Quote:
 Originally Posted by leflix To my mind the geometry of your problem is not periodic. If you want to impose periodic boundary condition you should consider your domain twice as it is in your simulation. Check the sketch below, I hope you will understand what I mean.... I think this is the first reason why your simulation doesn't work. Then you will have to consider the pressure drop.
Thanks leflix for the attachment. But I think Patankar solved the same problem and reported his work in:
Kelkar K.M., Patankar S.V., 1987, "Numerical Prediction of Flow and Heat Transfer in a Parallel Plate Channel With Staggered Fins" ASME J. of Heat Transfer; Vol 109, pp 25:30.
cdegroot gave me the same suggestion as you did and I am going to apply it. However, just a couple of minutes ago, I finally got result from my simulation with a single channel. The change I applied was that I first let the code converge with a prescribed inlet velocity (which prescribes a specific mass flow); then I used the converged outlet velocity as the inlet boundary condition and solved the problem again from the beginning. The thing is that if I initialize my flow field with the previous solution result, the same thing happens as before, but if I initialize it as a new problem and with zero velocity and pressure everywhere, it gets converged. I do the procedure over and over until the point that my inlet and outlet velocity difference approached to zero. I also correct my outflow with prescribed flow because otherwise my velocity increases over and over. The only thing is that Re number is a little different from what is presumed.The remedy is to correct the viscosity at any iteration to retain my Re. Now I am checking my result with the result of the paper. Then I will apply two channels side by side to investigate to all the suggestions you guys offered me.

May 1, 2012, 16:38
#30
Member

Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 7
Quote:
 Originally Posted by cdegroot ... Consider a volume "I" adjacent to the outlet and its periodic neighbour "J" adjacent to the inlet. Instead of taking the pressure at the neighbour of "I" to be P(J) take it to be P(J)+DELTAP. Similarly take the pressure at the neighbour of "J" to be P(I)-DELTAP. DELTAP can either be specified if you know the pressure drop and want to find the mass flow. If you know the mass flow, then find DELTAP iteratively using the method of Beale described in his article "Use of Streamwise Periodic Boundary Conditions for Problems in Heat and Mass Transfer". ...!
I just found out what you meant. Thanks a lot for your help.

 April 10, 2013, 00:41 Coefficient matrix for Finite Volume method with periodic boundary in x direction #31 New Member   siyamak Join Date: Feb 2013 Location: Baton Rouge Posts: 3 Rep Power: 6 Hello, Help please! I wrote a 2D finite volume code for a rectangular using Neumann boundary in bottom, Dirichlet boundary at top and periodic boundary in x direction. I get some results and everything seems to be fine other than by results tilted toward right boundary and I'm assuming that is because of NOT applying correct periodic boundary condition. Could you please let me know how to build a coefficient matrix which have periodic boundary in x direction? I appreciate if anybody can help me with that.

 April 12, 2013, 09:09 #32 Senior Member     p ding Join Date: Mar 2009 Posts: 322 Rep Power: 11 in x direction, if we have N control volumes. start from 0, to N-1. where 0 means the left boundary, N-1 means the right boundary. for control volume 1 , if no periodic bc: we have AP1*1=AE1*E+Sp. the effects from the 0 boundary has been lumped into source term Sp. but with periodic bc, we have a fictious (N-2) control volume at the left of 1 CV. we have AP1*1=AW1*(N-2)+AE1*E+Sp. where AP, AE , AW means the matrix coefficent . Hope this help, if you get some problem again, please let me know. siyamak likes this.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Arif FLUENT 3 March 9, 2017 02:18 fs82 OpenFOAM 2 December 19, 2011 08:04 cubicmatrixist Main CFD Forum 0 October 14, 2010 12:26 bearcharge Main CFD Forum 0 May 14, 2010 11:32 Sima Baheri Phoenics 5 October 20, 2007 09:20

All times are GMT -4. The time now is 14:08.