periodic boundary condition with multi-boxes in genbox

229 views
Skip to first unread message

zaiza...@gmail.com

unread,
Jan 9, 2022, 10:38:40 PM1/9/22
to Nek5000
Dear Neks, 

I want to define a mesh that contains two connecting boxes using genbox like the following:

main.rea

 3                      spatial dimension

 3                      number of fields

Box 1

-10    -10     -5        nelx,nely,nelz for Box)

0        6      1         x0 x1 ratio

0        6      1         y0 y1 ratio

0        3      0.9       z0 z1 ratio

P  ,P  ,P  ,P  ,P  ,   ,        V bc's  ! NB:  3 characters each !

P  ,P  ,P  ,P  ,P  ,   ,        T bc's  !      You must have 2 spaces!!

P  ,P  ,P  ,P  ,P  ,   ,        S bc's  !

Box 2

-10     -10    -5        nelx,nely,nelz for Box)

0        6      1         x0 x1 ratio

0        6      1         y0 y1 ratio

3        6      1.1       z0 z1 ratio

P  ,P  ,P  ,P  ,   ,P  ,        V bc's  ! NB:  3 characters each !

P  ,P  ,P  ,P  ,   ,P  ,        T bc's  !      You must have 2 spaces!!

P  ,P  ,P  ,P  ,   ,P  ,        S bc's  !


The idea is that i want to achieve a mesh that has more mesh grids at the center of vertical coordinate than the boundaries. Meanwhile, I want to achieve the periodic B.C. at the top/bot boundary. However, it seems that Nek5000 (v19.0) doesn't allow me to define periodic B.C with multi-boxes like that, since I got the following error message when i run genmap:

 abort: PERIODIC MISMATCH 2:

           1  5 P    ie 

        1901  6      je 

   1901.0000000000000        0.0000000000000000       bc

 exit status           8


Can anyone help me to achieve this mesh use/without genbox?

Best,

Yuchen

Fischer, Paul

unread,
Jan 10, 2022, 12:37:39 AM1/10/22
to zaiza...@gmail.com, Nek5000

Dear Yuchen,

Periodicity + multiple boxes presents challenges for genbox.

However, I think you don't need multiple boxes.

Just explicitly prescribe your mesh coordinates in the direction(s) of choice.

e.g.,

5 -5 -2 
0 1 1.1 1.2 3   x0-xn
0  1 1              y0, yn, ratio
-1 1 1              z0, zn, ratio
P  ,P  ,etc.


hth

Paul


From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of zaiza...@gmail.com <zaiza...@gmail.com>
Sent: Sunday, January 9, 2022 9:38 PM
To: Nek5000 <nek...@googlegroups.com>
Subject: [nek5000] periodic boundary condition with multi-boxes in genbox
 
--
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/45978200-a13c-47ad-b258-d05fd708745bn%40googlegroups.com.

zaiza...@gmail.com

unread,
Jan 10, 2022, 9:15:54 AM1/10/22
to Nek5000
Dear Paul,

Thank you for your quick reply! Sorry that I haven't be specific in my description but actually I want to design a kind of large mesh with 100 elements in each direction. I guess in principle I can prescribe the mesh coordinates for one single direction but it could be tedious. Therefore I wonder is there possibly a better way to do this? 

Sincerely,
Yuchen

Fischer, Paul

unread,
Jan 10, 2022, 9:26:44 AM1/10/22
to zaiza...@gmail.com, Nek5000
Dear Yuchen,

I usually use a matlab code or other script to generate the
coordinates.

You can have up to 80 characters per line, just break the lines
between the numbers.   genbox will read enough lines to take in
the nelx+1 values that are prescribed.

hth.

Paul

PS - here is an example of the input for 101 GLL points

 -1.00000000 -0.99927326 -0.99756443 -0.99488064 -0.99122471 -0.98660025

 -0.98101179 -0.97446479 -0.96696566 -0.95852172 -0.94914122 -0.93883333

 -0.92760812 -0.91547656 -0.90245050 -0.88854266 -0.87376665 -0.85813689

 -0.84166866 -0.82437805 -0.80628195 -0.78739805 -0.76774479 -0.74734138

 -0.72620775 -0.70436455 -0.68183314 -0.65863551 -0.63479434 -0.61033292

 -0.58527516 -0.55964553 -0.53346908 -0.50677139 -0.47957853 -0.45191709

 -0.42381409 -0.39529698 -0.36639364 -0.33713230 -0.30754155 -0.27765031

 -0.24748778 -0.21708343 -0.18646698 -0.15566833 -0.12471758 -0.09364497

 -0.06248086 -0.03125570  0.00000000  0.03125570  0.06248086  0.09364497

  0.12471758  0.15566833  0.18646698  0.21708343  0.24748778  0.27765031

  0.30754155  0.33713230  0.36639364  0.39529698  0.42381409  0.45191709

  0.47957853  0.50677139  0.53346908  0.55964553  0.58527516  0.61033292

  0.63479434  0.65863551  0.68183314  0.70436455  0.72620775  0.74734138

  0.76774479  0.78739805  0.80628195  0.82437805  0.84166866  0.85813689

  0.87376665  0.88854266  0.90245050  0.91547656  0.92760812  0.93883333

  0.94914122  0.95852172  0.96696566  0.97446479  0.98101179  0.98660025

  0.99122471  0.99488064  0.99756443  0.99927326  1.00000000




Sent: Monday, January 10, 2022 8:15 AM
To: Nek5000 <nek...@googlegroups.com>
Subject: Re: [nek5000] periodic boundary condition with multi-boxes in genbox
 

zaiza...@gmail.com

unread,
Jan 10, 2022, 9:29:44 AM1/10/22
to Nek5000
Dear Paul,

Thank you so much! I will use generate my code using Matlab too.

Sincerely,
Yuchen
Reply all
Reply to author
Forward
0 new messages