I'm trying to assemble global matrices for the following system.
$$ \begin{bmatrix} K& Q\\ Q^T&S \end{bmatrix} \begin{bmatrix} u_h\\ p_h \end{bmatrix} = \begin{bmatrix} f_u\\ f_p \end{bmatrix}$$
In which, $$ K, Q, Q^T, S $$
are matrix generated from element integral, which I know how to compute. Likewise, $$f_u, f_p$$ are vectors generated from the integral over the element (right-hand side), which I'm able to compute.
The question that I have is how to compute the global matrix? I know how to compute if it was a simple $KU = F$ system. I'm not sure how to go about it in a coupled case.
So far, I have matrices all elements, but I don't know how to assemble a global matrix system. Can I just create a global matrix for $K$, $Q$, $S$, $u_h$, $p_h$, and then assume they are block matrices and append them together in a big matrix? My problem is that, in a global matrix, each node won't be coupled.
The problem is that Taylor-Hood elements are used, so $u$ has $9$ nodes, and $p$ has $4$ nodes. So each node has a varying # degrees of freedom, either 2 or 3.