# Discrete divergence free functions

I'm studying the weak formulation of NS equations. During the analysis, the book I'm using (Quarteroni-Valli, page 301-302), defined $$Z_h=\{v_h \in V_h: (\operatorname{div}(v_h),q_h)=0 \quad \forall q_h \in Q_h)$$

where $$Q_h \subset Q$$ and $$V_h \subset V$$ finite dimensional subspaces. Here we can set $$V=[H_0^1(\Omega)]^d$$ and $$Q = L^2(\Omega)$$.

They say:"The elements of $$Z_h$$ are not necessarily divergence free. So, what I am required to show is that $$(\operatorname{div}(v_h),q_h)=0 \quad \forall q_h \in Q_h$$ doesn't imply $$\operatorname{div}(v_h)=0$$

Let's say that Taylor-Hood elements, i.e. $$P^2-P^1$$, how can I find a counterexample? Any help is highly appreciated

• It is very hard to construct such an example by hand. Solving the Stokes equations and taking the divergence of the FEM solution reveals some failures (see relate.cs.illinois.edu/course/cs555-s20/f/demos/upload/… as an example) but I suspect that this will not be enough evidence for you, as it can be (maybe) attributed to the floating point arithmetic, the condition number, the usual (most of the time valid) excuses. Jul 9 at 5:02
• I have a few minor issues with the following paper, but it provides a lot of intuition and my issues are just nitpicking, so I am going to suggest it anyway: On the Divergence Constraint in Mixed Finite Element Methods for Incompressible Flows, by Volker John et al. Jul 9 at 5:31
• @AbdullahAliSivas Most books say "elements in $Z_h$ are not divergence free" and they never explain why. I thought it was a simple computation. Thanks for the resources you provided. I'm gonna have a look at the paper. Jul 9 at 7:39
• Probably someone smarter than I am knows how to find such a counter-example easily. But I am working on this problem for 2 hours now as it intrigued me. My approach is to take a mesh with only a few elements in it, project a divergence-free function on the velocity space and see if the projection (which lives in $Z_h$, can be shown by direct calculation after projection) itself is pointwise-divergence free. Unfortunately, you need a mesh with at least 3 elements (maybe more) which means that the smallest example has 36 terms. I am still working on confirming if I have a true counter-example. Jul 9 at 7:50
• All this says is that the space $Z_h$ is that of functions in $V_h$ such that $Q_h$ is orthogonal to the range space of $\text{div} V_h$. As a contrived example on the unit sphere, if $V_h$ is such that the divergence of any element is a spherical harmonic of degree $n$ (clearly not identically zero) and $Q_h$'s elements are the spherical harmonics of degree $n' \neq n$, the property obviously holds. Jul 12 at 13:45

You get a divergence-free $$Z_h$$ if you choose for example $$V_h$$ and $$Q_h$$ such that $$\forall v_h\in V_h(div(v_h)\in Q_h)$$. (An example for such a pair is the Scott-Vogelius element with $$V_h=P^k,Q_h=P^{k-1}_{discont}$$)
Because if you take $$v_h\in Z_h$$ it fulfills $$(div(v_h),q_h)=0 \ \forall q_h\in Q_h$$. Now by the special choice of $$V_h$$ and $$Q_h$$ above we can fix $$q_h=div(v_h)$$ and therefore get $$(div(v_h),div(v_h))=0\Rightarrow div(v_h)=0$$. So you see if you dont have this property, that $$div V_h\subseteq Q_h$$, you might not get that $$Z_h$$ is divergence free.
For example take the Taylor Hood elemet $$V_h:=P^k$$ and $$Q_h:=P^{k-1}$$ then for the weak-divergence we see $$div(v_h)\in P^{k-1}_{discont}\not\subseteq P^{k-1}$$ and therefore you cant follow that $$Z_h$$ is divergence free for this choice.