Galerkin method for a system of nonlinear PDEs

Suppose I have a nonlinear system of PDEs. I am actually interested in Navier-Stokes, but, for the sake of simplicity and example, suppose I had

$$\frac{\partial f}{\partial t} - f \frac{\partial g}{\partial x} = 0$$

$$\frac{\partial g}{\partial t} - g \frac{\partial f}{\partial x} = 0$$

I assume that the domain $\Omega$ is rectangular, say, and that some kind of appropriate boundary conditions have been specified on the boundary $\partial \Omega$.

How could I go about using a Galerkin method to solve for both $f$ and $g$? I understand the derivation of the method for one function fairly well, but I do not see how to generalize it to multiple unknown functions.

where $\boldsymbol{q} = [q_1, q_2]^T = [f, g]^T$, $F_1(\boldsymbol{q}) = q_2 \hat{e}_1$, and $F_2(\boldsymbol{q}) = q_1 \hat{e}_1$. Then you just perform the normal Galerkin for each equation using a set of weight functions for that equation. Let us assume we have some space of functions defined for each function/equation, call them $\mathcal{V}_k$. Then we can proceed with the Galerkin projection like so:
From here you can discretize things further with your approximate representation for the functions $q_k(x)$ using your space of functions $\mathcal{V}_k$ and come up with the equations you need in terms of any coefficients you are solving for.
• Quick clarification -- should one of those unit vectors be $\hat{e}_2$? Or are both $\hat{e}_1$? – emprice Nov 3 '17 at 0:36
• @nosuchthingasstars nope. Those unit vectors are tied to the fact your sample PDEs only have spatial derivatives in the variable $x$, which is in the first unit direction. – spektr Nov 3 '17 at 2:06