I want to solve two dimensional Navier Stokes equations on a staggered grid for the case of Taylor-Green Vortex. My initial conditions are standard sine and cosine functions. As I am aware, I should use periodic boundary conditions on all the four boundaries. I am facing some trouble regarding implementation of this BC as I could not find enough literature about it.
Suppose, if my index ranges from $0$ to $N$. Then, is this the correct way to use periodic BC?
$$u_\text{vel}(N) = u_\text{vel}(1)\\ u_\text{vel}(0) = u_\text{vel}(N-1)$$
and similarly for $v_\text{vel}$ and pressure variables?