I'm trying to test a PDE solver and I'm wondering if there is any 2D vector field that satisfies the following on the domain $\Omega = [0,1] \times [0,1]$:
$$\text{curl} \;\mathbf{u} = 0 \;\;\;\forall \mathbf{x} \in \Omega$$ $$\mathbf{u}\cdot\mathbf{t} = 0 \;\;\;\forall \mathbf{x} \in \partial\Omega$$
where $\mathbf{t}$ is the tangential vector to $\partial\Omega$.
i.e. I'm looking for a vector field that is conservative and also, on the boundary of the domain (the unit square) is perpendicular to the boundary.
Is this possible? I can come up with several examples for each separate condition, but none for both.
Consider the function $$f(x,y):=\sin(\pi x)\>\sin(\pi y)\qquad\bigl((x,y\in\Omega\bigr)$$ and put $${\bf u}(x,y):=\nabla f(x,y)=\bigl(\pi\cos(\pi x)\>\sin(\pi y),\ \pi\sin(\pi x)\>\cos(\pi y)\bigr)\ .$$ Then ${\rm curl}({\bf u})\equiv0$ and $${\bf u}(0,y)=\bigl(\pi\sin(\pi y),0\bigr)\ne{\bf 0}\qquad(0< y<1)\ ,$$ and similarly for the other three edges of $\Omega$.