How to create cyclic boundary condition as udf for pure granular flow

Is there a way to create X-cyclic boundary condition as udf for pure granular flow for a rectangular channel domain?
desgrid_mod.f (51.8 KB)

Please let me know the steps to create.

See discussion at Particle not moving in a packed manner