Have you ever wondered how to include a moving gate in your CFD simulations? There’s actually quite a few ways to do that, but perhaps the most straightforward one is using a moving mesh region, combined with Cyclic Arbitrary Mesh Interfaces (AMI). In this video I show the setup and results for a simple case using this technique.

Notice that Paraview has a hard time rendering the free surface across the AMI interfaces, due to the neighbouring cells not connecting directly and having duplicate patches, which leads to some visual glitches. This works even worse when using the real polyhedric elements (instead of using the “Decompose polyhedra” option), which is unfortunate (the free surface, away from the interface looks nicer when polyhedric elements are not decomposed).

Despite the rendering issues, the technique works well, and is quite fast and robust. It does have some limitations though, like being very difficult to generate proper boundary elements on the gate itself.

Excuse the pretty rough mesh used in the example. I have the office cluster filled to the brim with actually important simulations, so this is all I could spare this weekend!

In case you want to take a closer look at how everything is put together, I have uploaded the case to GitHub:

https://github.com/nicolasbadano/WeirWithMovingGate