Boundary conditions in a genbox-generated cYlinder mesh

12 views
Skip to first unread message

Thor Gjesdal

unread,
Sep 22, 2025, 9:15:20 AM (3 days ago) Sep 22
to Nek5000
hello,

we have used genbox to generate an annular 2D mesh of a circle within a square, using the cYlinder primitive, with Wall boundary conditions on the circle and SYMmetry (slip) on the outer square.


The input files and a plot of the mesh are enclosed

This works well, but now we want to modify the case and change the top and bottom outer boundaries to periodic. However since the topology of the mesh is in cylindrical coordinates, the entire outer boundary is essentially the same. It is therefore not entirely clear how we can set up the connections to achieve this periodicity.
  
Does anyone have any suggestions for this?

regards
Thor

22mma.rea
22mm.box
mesh2D.png

Chinthaka Jacob

unread,
Sep 23, 2025, 9:17:01 AM (2 days ago) Sep 23
to Nek5000
Hi Thor,

  This is not an expert answer, but rather a mesh-generation idea that might be helpful. I would rebuild the case in 2D Cartesian coordinates with the desired boundary tags in Gmsh (inner circle ('  W'), outer top/bottom ('  P'), left/right ('SYM'), then convert to Nek with gmsh2nek. That way, the periodic pairing is set before you get to Nek.

   Also, one can naturally think of starting with a rectangular 2D box with the top and bottom edges marked '  P' (periodic) and the left and right set to your desired BCs ('SYM'), and then mapping the interior into a circle; however, I am not sure whether this is achievable in userdat2, especially since this interior circle should be tagged with a separate boundary condition (' W' in this case).

Chinthaka.

Thor Gjesdal

unread,
Sep 24, 2025, 4:50:12 AM (yesterday) Sep 24
to Nek5000
Thank you Chintaka,

we have partially explored this option, but for the time being we will try to go down the genboc route if possible.

I will keep your suggestions in mid, though

all the best

Thor

Thor Gjesdal

unread,
5:25 AM (3 hours ago) 5:25 AM
to Nek5000
Update: after some tweaking, I have managed to use preNek to set the periodicity in the genbox-generated mesh.

For the next step, I use n2to3 to extrude the 2D mesh and apply periodic conditions also in the Z-direction. 
I now have essentially annular flow in a square channel with a cylinder core. This works fine with slip at the outer walls, but we now want to include periodicity in one of the "radial" directions

When I try to run a case on this mesh, it fails during the setup of the pressure solver. See the screen dump below.

Does anyone have any suggestions on this before I dive into the details?

regards,

Thor



nek_eigenvalue_error_output.png

Reply all
Reply to author
Forward
0 new messages