V = VectorFunctionSpace(mesh,"CG",1)
Q = FunctionSpace(mesh,"CG",1)
W = V*Q
v,p = TrialFunctions(W)
w,q = TestFunctions(W)
...
a = (dot(v, w) - p*div(w) - div(v)*q)*dx + 0.5*dot(v+grad(p),w+grad(q))*dx
L = f*q*dx
if that's what you're asking
Plausibly also your boundary conditions are not applied correctly.
In the hdiv-L2 formulation I would apply the pressure bcs weakly. But they're homogeneous, so those surface integral a vanish. Because the spaces match correctly this is enough. In the TH or VMS formulation to you have to explicitly apply the bcs strongly to the pressure variable?
Lawrence