From the documentation, it seems that PyFR itself does not itself create periodic boundary conditions (i.e. define the required connectivity) and hence such must be specified already in the mesh file.
In this regards, could folks mention how they create such boundary conditions? I have am currently using Gmsh for PyFY meshes, but its support for periodic boundaries is extremely poor.
I’m not sure whether Peter and his team have a solution for you on the solver side, but I’ll mention that we have worked with his team to provide native PyFR support on the meshing front in Pointwise. Creating periodic boundaries in Pointwise is much more straightforward and user-friendly. The software also supports exporting meshes created in Gmsh or PyFR’s native grid formats. If this is something that you may be interested in exploring, then feel free to contact me.
You are right that in PyFR, ‘periodic’ is not a boundary condition, like in many other CFD software. Periodicity is achieved at the stage of importing the mesh while setting up the connectivity between elements.
PyFR does not directly use the periodic information in gmsh msh file.
Rather, while importing the mesh, it matches the locations of surface elements on the surfaces which are named in pairs
“periodic_n_l” with “periodic_n_r” n= 0,1,2 … and makes them as periodic.
So if you want to make a periodic mesh for a rectangular channel, for instance, you would name:
min-x plane “periodic_0_l” and
max-x plane “periodic_0_r”, and likewise
min-z plane “periodic_1_l” and
max-z plane “periodic_1_r”
I do not think it matters which is _l and which is _r.
The catch here is,
the mesh on the _l and the _r must conform with a single displacement.
the displacement, if I remember it right, must me along x or y or z-axis (not rotating, not skewed).
When you make mesh with gmsh with extrusion of a surface wuth ‘layers’, the mesh is automatically conforming on the end surfaces of the extrusion, even if the surface has an unstructured mesh. So, you can apply periodicity on those surfaces.
Hi, Arvind or others.
As per my understanding, the two offset planes that need to be set as periodic boundary conditions should be labeled as “periodic_0_l” and “periodic_0_r” in Gmsh’s PhysicalNames. Also, I must ensure that these two offset planes are offset only along one of the X, Y, or Z axes, which I comprehend.
But I’m not sure if any other measures are required. It seems that simply placing the periodic faces into the designated named physical group should be enough to satisfy the aforementioned requirements, which doesn’t seem too complex.
In the provided couette-flow.msh file by the official source, there’s the following content.
The first number represents the element number, and the second number represents the element type. And then “number-of-tags” indicates the number of integer tags that follow for the n-th element. By default, the first tag is the number of the physical entity to which the element belongs, and the second is the number of the elementary geometrical entity to which the element belongs.
Therefore, the physical entity numbers for the first 4 elements are 2, belonging to “periodic_0_l,” while elements 5 to 8 belong to “periodic_0_r.” However, I’m unsure about the significance of the subsequent geometric entity numbers. I’m uncertain whether careful setting of geometric entity numbers is necessary to satisfy the periodic boundary conditions.
I acknowledge that this might be more related to Gmsh specifics, but I’m still quite eager to know the answer to this question. Many thanks for the help from kind individuals!
I’ve read your code, and the ease of manually generating Gmsh in version 2.2 is remarkable, greatly facilitating the work for all of us.
Your code perfectly addressed my confusion. In your code, you set the geometric entity numbers in Gmsh to match the physical entity numbers, and I’m very grateful for that.
One last minor question: Is the capitalization of “periodic_0_r” important?