CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Implementation of Periodic Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2012, 20:04
Default
  #21
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
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).
cdegroot is offline   Reply With Quote

Old   April 26, 2012, 20:33
Default
  #22
Member
 
Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 14
BMCombustor is on a distinguished road
Quote:
Originally Posted by cdegroot View Post
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?
BMCombustor is offline   Reply With Quote

Old   April 26, 2012, 20:45
Default
  #23
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
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.
cdegroot is offline   Reply With Quote

Old   April 26, 2012, 21:47
Default
  #24
New Member
 
JMC
Join Date: Apr 2012
Posts: 9
Rep Power: 14
DeepElm is on a distinguished road
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.
DeepElm is offline   Reply With Quote

Old   April 27, 2012, 08:53
Default
  #25
Member
 
Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 14
BMCombustor is on a distinguished road
Quote:
Originally Posted by DeepElm View Post
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.
BMCombustor is offline   Reply With Quote

Old   April 27, 2012, 10:39
Default
  #26
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Quote:
Originally Posted by BMCombustor View Post
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
File Type: jpg periodic.JPG (20.2 KB, 32 views)
leflix is offline   Reply With Quote

Old   April 27, 2012, 10:43
Default
  #27
Senior Member
 
cdegroot's Avatar
 
Chris DeGroot
Join Date: Nov 2011
Location: Canada
Posts: 414
Rep Power: 17
cdegroot is on a distinguished road
Quote:
Originally Posted by leflix View Post
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.
BMCombustor likes this.
cdegroot is offline   Reply With Quote

Old   April 27, 2012, 11:50
Default
  #28
Senior Member
 
Join Date: Aug 2011
Posts: 272
Rep Power: 15
leflix is on a distinguished road
Yes you got the point Chris ! We agree...
leflix is offline   Reply With Quote

Old   April 27, 2012, 12:52
Default
  #29
Member
 
Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 14
BMCombustor is on a distinguished road
Quote:
Originally Posted by leflix View Post
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.
hosseinbasser likes this.
BMCombustor is offline   Reply With Quote

Old   May 1, 2012, 16:38
Default
  #30
Member
 
Mosi Owa
Join Date: Nov 2011
Posts: 35
Rep Power: 14
BMCombustor is on a distinguished road
Quote:
Originally Posted by cdegroot View Post
...

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.
BMCombustor is offline   Reply With Quote

Old   April 10, 2013, 00:41
Default 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: 13
siyamak is on a distinguished road
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.
siyamak is offline   Reply With Quote

Old   April 12, 2013, 09:09
Default
  #32
Senior Member
 
ztdep's Avatar
 
p ding
Join Date: Mar 2009
Posts: 427
Rep Power: 19
ztdep is on a distinguished road
Send a message via Yahoo to ztdep Send a message via Skype™ to ztdep
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*\varphi1=AE1*\varphiE+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*\varphi1=AW1*\varphi(N-2)+AE1*\varphiE+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.
ztdep is offline   Reply With Quote

Old   February 20, 2018, 18:39
Default
  #33
New Member
 
Victoria
Join Date: Feb 2018
Posts: 3
Rep Power: 8
hosseinbasser is on a distinguished road
Hi,
I have a similar problem in implementing periodic boundary condition.
I am trying to simulate a free surface flow over an inclined surface with explicit incompressible SPH and periodic boundary conditions in x-direction. The flow is driven by gravity in x direction (gsin(theta)). But I can't get the analytical solution and the velocity keeps increasing until it converges to a value which is not what I expect (as you can see in the figure). Do you have any idea what the problem could be?
I initialise the flow with hydrostatic pressure and zero velocity.
Thanks a lot
Attached Images
File Type: jpg SPH problem.jpg (52.4 KB, 7 views)
hosseinbasser is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Periodic boundary condition Arif FLUENT 3 March 9, 2017 01:18
Implementation of a relaxation boundary condition fs82 OpenFOAM 2 December 19, 2011 07:04
Simulating A water bubble in air with periodic boundary condition cubicmatrixist Main CFD Forum 0 October 14, 2010 12:26
vorticity boundary condition bearcharge Main CFD Forum 0 May 14, 2010 11:32
periodic boundary condition? Sima Baheri Phoenics 5 October 20, 2007 09:20


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