The periodic boundary condition are used to represent the domain with infinite length, which is used when the simulation domain is too long. It can be used to reduce the simulation domain from higher dimension to lower dimension for example 3D to 2D or 3D to 1D. On the periodic boundary, the velocity at the outlet is copied to the velocity at the inlet and vice versa.
Periodic planes are used to define perodic boundary in the mesh. Periodic plane table contains two planes, plane1 and plane2 i.e fluid neighbor of plane1 is mapped to plane2 and vice versa. Following conditions must be satisfied in defining periodic planes
In seeder, the plane normals are defined by right hand rule, where thump finger represents the 1st vector and index finger represents the 2nd vector and middle finger represents the normal direction. This right hand rule can be seen perfectly in the left plane in the figure below.
Above image shows the normal directions for two planes pointing outwards the fluid domain. Normal direction of the plane can be changed by just swaping the vectors defining planes.i.e order of vector as shown in image below.
Correct plane definition should look like below
This can be achieved by shifting the plane by half of element size of maximum refinement level intersecting the periodic planes.\n
If any of the above condition is not satisfied then seeder will terminate an error message.
In seeder, when the node intersect only with periodic planes then the boundary id for that direction is set to huge number. So any node with direction of boundary id greater than number of boundaries then the following algorithm is used for that direction.
In the solver, the periodic boundaries are identified with the boundary id with negative values.
How to define periodic planes in lua file?
Example lua file to generate Channel with one element in z-direction
is available in the repository at: