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

about the implemention of periodic boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2012, 10:34
Default about the implemention of periodic boundary condition
  #1
Member
 
Wu Jian
Join Date: Jun 2009
Location: Poitiers
Posts: 33
Rep Power: 17
harbinyg is on a distinguished road
Send a message via MSN to harbinyg
Hi,


I currently meet some problems with the implementaion of the periodic boundary condition for transient Rayleigh-Benard convection problem.


My code is based on FVM, SIMPLE algorithm and colocatted grid system (with Rhie-Chow interpolation) .

i am prettly sure that my code works for adiabtic boundary condition for temperature (no-slip wall for velocities), as i compared my results with some beachmark solutions.

To simulate a infinite long domain in horizontal direction (my solver is two - dimensional), i want to implment periodic boundary condition for temperature, velocity and pressure fields.

Thus i did some modification of the code,

for tempearture and velocity field, i exchange the values on boundaries, like (a N by N grid )
phi(1, j) = phi(N-1,j)
phi(N,j) = phi(2,j)
then treat the boundary type like Dirichlet condition;

for pressure field,

at the beginning i think we may not need any modification as the problem i considered is not like the other type periodic boundary condition , like there is a incomming flow and we need to guarantee the constant pressure drop.

then i realized that the pressure correction genearlly implicitly incoperates with Neumann boundaries for all boundaries, then i did some modification like temperature field.

However, i failed, as the solver directly divergence in the first two or three time steps and i do not know the reason. I wish someone who has similar experience can help me.

If someone can provide some usful materials, it would be great.
harbinyg is offline   Reply With Quote

Old   June 28, 2012, 10:36
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
you have to change your matrix by means of the link in the periodicity, you cannot use Dirichlet BCs..
FMDenaro is offline   Reply With Quote

Old   June 28, 2012, 10:50
Default
  #3
Member
 
Wu Jian
Join Date: Jun 2009
Location: Poitiers
Posts: 33
Rep Power: 17
harbinyg is on a distinguished road
Send a message via MSN to harbinyg
do you mean for the pressure correction equation?

in each time step,

i firstly compute U, V
then compute P
finally compute T

in the subroutine for computing pressure correction,

i first assemble AE, AW, AN, AS, AP and right hand side (Su)

then i set the value on boundaries according to the periodic boundary conditions, take the west side as example,

i set pp(1,j) = pp(N-1,j) , pp stands for pressure correction;

since i have the values on boundaries, i treat it like Dirichlet boundary condition

then i call the linear sysmeter solver ...

This is the procedure i did, do you mean 'even i known the values on boundaris , i can not treat it like Dirichlet type'? so what should i do ?

Thank you for your quick reply.





Quote:
Originally Posted by FMDenaro View Post
you have to change your matrix by means of the link in the periodicity, you cannot use Dirichlet BCs..
harbinyg is offline   Reply With Quote

Old   June 28, 2012, 17:55
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Example:

at point i=2
(p(i-1,j) - 2*p(i,j) + p(i+1,j))/dx/dx
becomes
(p(N-1,j) - 2*p(i,j) + p(i+1,j))/dx/dx

that means you changed the position in to the matrix entry. You never compute the value p(1,j) until the pressure solver has converged
FMDenaro is offline   Reply With Quote

Old   June 28, 2012, 18:31
Default
  #5
Member
 
Wu Jian
Join Date: Jun 2009
Location: Poitiers
Posts: 33
Rep Power: 17
harbinyg is on a distinguished road
Send a message via MSN to harbinyg
I get your point, in fact, i asked my teacher this afternoon, he shared a similiar idea ...


though i unstand your meaning now, there seems to be some problem from the implementaion point of view.

it seems this problem will change the structure of the coefficinet matrix to be non-diagonal ... which means tranditional linear system solver (like SIP ) may fail

tomorrow i will try to add one or two layer of ghost cells to see it works or not ...


thank you for your reply again ....

Quote:
Originally Posted by FMDenaro View Post
Example:

at point i=2
(p(i-1,j) - 2*p(i,j) + p(i+1,j))/dx/dx
becomes
(p(N-1,j) - 2*p(i,j) + p(i+1,j))/dx/dx

that means you changed the position in to the matrix entry. You never compute the value p(1,j) until the pressure solver has converged
harbinyg is offline   Reply With Quote

Old   July 12, 2012, 05:30
Default
  #6
Member
 
Ren/Xingyue
Join Date: Jan 2010
Location: Nagoya , Japan
Posts: 44
Rep Power: 16
hilllike is on a distinguished road
hi, dear harbinyg,
I faced same problem when I try to solve Poisson equation in cylindrical coordinates. And I didn't use any boundary condition in that case.

An*pn=Aw*p1+...+bn
A1*p1=Ae*pn+.. +b1

Just treat the points beside the periodic boundary as internal points, and that can solve the problem implicitly.
hilllike 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 in LES martor FLUENT 3 April 30, 2022 01:20
periodic boundary condition (translational) fluent 6.3 haihek FLUENT 3 January 22, 2014 05:10
Problem with a periodic boundary condition chuck209 CFX 10 May 9, 2012 17:15
External Radiation Boundary Condition for Grid Interface CFD XUE FLUENT 0 July 9, 2010 03:53
translational periodic boundary condition Rola Afify FLUENT 2 September 12, 2006 09:39


All times are GMT -4. The time now is 06:25.