Given $\omega$ I want to compute the vector $q=(u,v)$ such that $$ v_x - u_y = \omega, \qquad u_x + v_y = 0, \qquad \textrm{in } \Omega $$ and $$ u n_x + v n_y = 0, \qquad \textrm{on } \partial\Omega $$ I am looking for a finite element method to find such a vector field.
I can introduce a stream function $\psi$ such that $$ \Delta\psi = -\omega $$ and then $(u,v) = (\psi_y, -\psi_x)$. Solving this numerically I would obtain $\psi^h \in P_k$ but then $(u^h, v^h) = (\psi_y^h, -\psi_x^h)$ will not be globally divergence-free, i.e., normal component of velocity will not be continuous across the elements when using $C^0$ elements.
So I want to obtain a globally divergence-free vector field with specified curl.
Projection to Raviart-Thomas space
I obtain $\psi^h \in P_k$ and then project to $RT_k$: find $q^h \in RT_k$ such that $$ \int_\Omega q^h \cdot w dx = \int_\Omega (\psi^h_y, -\psi^h_x) \cdot w dx, \qquad \forall w \in RT_k $$ I can check that the resulting $q^h$ indeed has zero divergence and converges with error $O(h^k)$ which seems less than optimal. I don't know how to prove these things but I guess this must already be published somewhere. I am looking for some reference on this sort of projection.
But I am also interested to know if we can compute $q$ without using a stream-function.