Specify Periodic BC

314 views
Skip to first unread message

M.kashi

unread,
Jun 28, 2022, 3:59:39 AM6/28/22
to Nek5000
Dear Community,
I was just wondering , How  Can I use the periodic boundary conditions ?
If i generate a mesh from .box file, should i specify this condition in the rea file?
Any help is greatly appreciated.
Thank you in advance

Best regards,

Mojtaba

stek...@gmail.com

unread,
Jun 28, 2022, 9:10:01 AM6/28/22
to Nek5000
Hi, it's best to use 'P  ' (remember the two spaces) in the .box file for periodic boundaries, see for example the .box file on this page:

M.kashi

unread,
Jun 29, 2022, 4:59:14 AM6/29/22
to Nek5000
hi,
Thank you for your reply. In this tutorial only mentions that just put the letter 'P  ' for periodic condition, but I mean Is this enough, or I must specify those elements that related to this condition?
Thank you for your time

Best

YuHsiang Lan

unread,
Jun 29, 2022, 8:40:35 AM6/29/22
to Nek5000
Hi Mojtaba,

It works if you only have a single box in your .box file.

The genbox will set the "element connectivity" into rea/re2. If you check the rea file, you can find it specifies the neighbor element and its face .
For example, this below rea line shows the fourth face of the first element connects to the second face of the tenth element.
  ***** BOUNDARY CONDITIONS *****
  ***** FLUID   BOUNDARY CONDITIONS *****
 P    1  4   10.0000       2.00000       0.00000       0.00000       0.00000

Note that, genbox only do this for the "single box".
If you have multiple boxes in your .box file and you want periodicity between two boxes, then you need to fix it with prenek with its "PERIODIC-AUTO".

After you get your rea file, the tools gencon/genmap/parCon (inside parRSB) will generate the "vertices connectivity" based on the coordinates and the element connectivity for periodic boundaries. The results will be stored into .map/.ma2/.co2 files. parCon does it on-the-fly.

In conclusion, you can make the periodicity in the following ways (from high level to low level)
- put "P  " in .box if you have single box
- for parallel faces, use periodic-auto in prenek
- modify boundary condition in .rea with "P  " and neighbor (e,f) into
- modify the vertices connectivity directly in .con/.co2/.map/.ma2 file
- overwrite the connectivity in user file with the subroutine usrsetvert

Hope this helps,
Yu-Hsiang
--

M.kashi

unread,
Jun 29, 2022, 2:37:18 PM6/29/22
to Nek5000
Dear Yu-Hsiang,

Thanks for your swift response. I will follow your nice explanations. 
thanks again for your attention.
Reply all
Reply to author
Forward
0 new messages