## 2 Materials and Methods
### Variational Formulation
#### 2.2.1 Spatial Discretization  
Let \(\mathcal{V}^{(h)}\) be a finite dimensional subspace of \(H^{1}(\Omega)\) generated by the basis \(\mathcal{B}=\{\varphi_{1},\varphi_{2},...,\varphi_{n_{k}}\}\). The approximation of the solution of (11), or its projection onto the subspace \(\mathcal{V}^{(h)}\) can be written as a linear combination of the elements of the base \(\mathcal{B}\):  
\[C_{h}=\sum_{j=1}^{n_{h}}c_{j}(t)\varphi_{j}(x,y). \tag{12}\]  
These functions (\(\varphi_{i}\)), called base functions, allow the construction of an approximation of the solution to the variational problem. In this case, the problem domain is a finite spatial discretization on which the basis \(\mathcal{B}\) of functions of the finite subspace \(\mathcal{V}^{(h)}\) is produced [16]. Replacing \(C_{h}\) in the variational formulation (11), we have  
\[\left(\frac{\partial C_{h}}{\partial t},w\right)_{\Omega}+\alpha(\
abla C_{h} \|\
abla w)_{\Omega}+\left((\overrightarrow{v}\cdot\
abla C_{h}),w\right)_{ \Omega}+\left((\sigma C_{h}),w\right)_{\Omega}=\left(f,w\right)_{\Omega}+ \langle\theta,w\rangle_{\Gamma_{1}} \tag{13}\]  
for all \(w\in\mathcal{V}^{(h)}\). By using (12), we have \[\frac{\partial C_{h}}{\partial t}=\sum_{j=1}^{n_{h}}\frac{dc_{j}}{dt}\varphi_{j} \quad\text{ and }\quad\
abla C_{h}=\sum_{j=1}^{n_{h}}c_{j}\
abla\varphi_{j}. \tag{14}\]  
Using (12) and (14) in (13), we have  
\[\left(\sum_{j=1}^{n_{h}}\frac{dc_{j}}{dt}\varphi_{j},w\right)_{\Omega}+\ \alpha\left(\sum_{j=1}^{n_{h}}c_{j}\
abla\varphi_{j}\|\
abla w \right)_{\Omega}+\left(\left(\overrightarrow{v}\cdot\sum_{j=1}^{n_{h}}c_{j} \
abla\varphi_{j}\right),w\right)_{\Omega}+\left(\left(\sigma\sum_{j=1}^{n_{h }}c_{j}\varphi_{j}\right),w\right)_{\Omega}=\left(f,w\right)_{\Omega}+\langle \theta,w\rangle_{\Gamma_{1}} \tag{15}\]  
for all \(w\in\mathcal{V}^{(h)}\). This procedure corresponds to the concept of separation of variables, and as the functions \(c_{j}(t)\) do not depend on \((x,y)\), it is possible to remove them from the inner product [16]. Then,  
\[\sum_{j=1}^{n_{h}}\frac{dc_{j}}{dt}\big{(}\varphi_{j},w\big{)}_{\Omega}+\alpha \sum_{j=1}^{n_{h}}c_{j}\big{(}\
abla\varphi_{j}\|\
abla w\big{)}_{\Omega}+ \sum_{j=1}^{n_{h}}c_{j}\big{(}(\overrightarrow{v}\cdot\
abla\varphi_{j}),w \big{)}_{\Omega}+\sum_{j=1}^{n_{h}}c_{j}\big{(}(\sigma\varphi_{j}),w\big{)}_{ \Omega}=\left(f,w\right)_{\Omega}+\langle\theta,w\rangle_{\Gamma_{1}} \tag{16}\]  
for all \(w\in\mathcal{V}^{(h)}\). In the Galerkin Method, the test functions (also called weight functions) \(w\) are of the same class as the base functions [16]. In this way, as the Equation (16) is valid for all \(w\in\mathcal{V}^{(h)}\), it is sufficient to calculate it for the elements in the base of \(\mathcal{V}^{(h)}\). Therefore,  
\[\sum_{j=1}^{n_{h}}\frac{dc_{j}}{dt}\big{(}\varphi_{j},\varphi_{i}\big{)}_{ \Omega}+\alpha\sum_{j=1}^{n_{h}}c_{j}\big{(}\
abla\varphi_{j}\|\
abla\varphi _{i}\big{)}_{\Omega}+\sum_{j=1}^{n_{h}}c_{j}\big{(}(\overrightarrow{v}\cdot \
abla\varphi_{j}),\varphi_{i}\big{)}_{\Omega}+\sum_{j=1}^{n_{h}}c_{j}\big{(} (\sigma\varphi_{j}),\varphi_{i}\big{)}_{\Omega}=\left(f,\varphi_{i}\right)_{ \Omega}+\langle\theta,\varphi_{i}\rangle_{\Gamma_{1}} \tag{17}\]  
for all \(\varphi_{i}\in\mathcal{B}=\left\{\varphi_{1},\varphi_{2},...,\varphi_{n_{h}}\right\}\). Organizing the Equation (17) possibility to write this sentence in the form of a system of first-order ordinary differential equations, we obtain  
\[\sum_{j=1}^{n_{h}}\frac{dc_{j}}{dt}\big{(}\varphi_{j},\varphi_{i}\big{)}_{ \Omega}+\sum_{j=1}^{n_{h}}c_{j}\Big{[}\alpha\big{(}\
abla\varphi_{j}\|\
abla \varphi_{i}\big{)}_{\Omega}+\big{(}(\overrightarrow{v}\cdot\
abla\varphi_{j} ),\varphi_{i}\big{)}_{\Omega}+\big{(}(\sigma\varphi_{j}),\varphi_{i}\big{)}_{ \Omega}\Big{]}=\left(f,\varphi_{i}\right)_{\Omega}+\langle\theta,\varphi_{i} \rangle_{\Gamma_{1}} \tag{18}\]  
for all \(\varphi_{i}\in\mathcal{B}\).