## Discrete Kelvin Circulation on Fluid Velocity Fields

In $\mathbb{R}^2$, circulation $\oint_C \mathbf{ds} \cdot \mathbf{u}$ around each square in a lattice can be computed and by example, I've seen that the circulation of an arbitrary curve composed of lattice points can be computed by adding the circulation of patches inside curve.

My question is, what theorem shows this fact? It seems like a discrete form of Green's Theorem or Stokes Theorem.

Additionally, is there a generalization of this to 3D where the circulation over every curve through the lattice is computable by edge-wise circulation in the lattice?

-