Once in a while, I need to compute a steady state flow solution along a channel, or a conduit with regularly repeating geometry. Using cyclic boundary conditions can lead to very fast solutions for those cases.

In this video, I show the setup for one of these cases, involving an old underground river with a roof supported by columns (inspired by a few running under Buenos Aires).

Only a single module is modeled, and the inlet and outlet patches are configured as Cyclic Arbitrary Mesh Interfaces (AMI). Using AMI means that the mesh doesn’t need to match perfectly between patches, which makes things much simpler to set up. Creating perfectly matching patches is very difficult/impossible with some meshers.

Most flow variables, such as velocity and phase fraction, can be mapped directly between patches. However, as flow steadily goes downward, the p_rgh needs to have a discrete jump between both ends. To this end, I have a custom boundary condition called p_rghJump which introduces the correct offset based on the density of the fluid on each face.

Using this cyclic approach, the steady-state solution can be obtained at a much reduced computational cost, compared to simulating a stretch of many modules.

If you are curious, I have uploaded the source code for this case and the boundary condition to GitHub:

https://github.com/nicolasbadano/CyclicAMIChannel