## 3 Weak Formulation  
This section is focused on fundamental aspects of the finite element procedure, encompassing the process of discretizing the governing partial differential equations through a weak formulation. The weak form permits the utilization of lower-degree polynomials for approximating field variables. Fundamentally, the concept of finite element analysis starts by partitioning the bounded domain A into a finite number of smaller, non-overlapping subdomains. Each of these subdomains represents a portion of the primary problem domain. FEM systematically models function spaces within subdomains and approximates functions within each subdomain using piecewise techniques rather than seeking a single function to represent the entire domain. This method generates a series of functions within subdomains intended for approximation within Sobolev test spaces, providing a measure of function smoothness and suitability for solving partial differential equation (PDE) problems. The weak formulation of flows of Bingham-type fluids is discussed in [42], while [43] focuses on laminar, uniform, and incompressible flow, and [40] addresses the power law fluid model. The given expression represents the weak form of Equations (7)-(11), as described in [38; 40]. \[\int{}_{A}\Big{(}\frac{\partial U}{\partial X}+\frac{\partial V}{\partial Y} \Big{)}wdA\,=0 \tag{17}\]  
\[\int{}_{A}\Big{(}U\,\frac{\partial U}{\partial X}+V\,\frac{\partial U}{ \partial Y}\Big{)}wdA\,+\,\int{}_{A}\frac{\partial^{2}V}{\partial X}wdA\,-\, Pr\int{}_{A}\Big{[}\frac{2}{\partial X}\Big{(}\overline{n_{a}}\Big{(}\frac{ \partial U}{\partial X}\Big{)}+\frac{\partial}{\partial Y}\Big{(}\overline{n _{a}}\Big{(}\frac{\partial U}{\partial X}+\frac{\partial Y}{\partial X} \Big{)}\Big{)}\Big{)}\Big{]}wdA \tag{18}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Level** & **NELs** & **DOFs** & \(Nu_{avg}\) \\ \hline Extremely coarse & 414 & 3296 & 0.991965238 \\ \hline Extra coarse & 540 & 4259 & 1.003046476 \\ \hline Coarser & 872 & 6705 & 1.007611373 \\ \hline Coarse & 1500 & 11,219 & 1.013042834 \\ \hline Normal & 1558 & 11,596 & 1.013021766 \\ \hline Fine & 2158 & 15,784 & 1.014833783 \\ \hline Finer & 4986 & 35,750 & 1.020302651 \\ \hline Extra fine & 13,800 & 96,065 & 1.025686961 \\ \hline Extremely fine & 17,104 & 117,541 & 1.025693644 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Grid independence test for \(n=0.7,\ Ra=10^{4},\ Ha=20,\ Da=0.001\), and \(\gamma=0^{\circ}\). \[\int{{}_{A}}\bigg{(}{U}\ \frac{\partial{U}_{k}}{\partial X}+V\ \frac{\partial{V}}{\partial Y}\bigg{)}w{ }_{k}dA\ +\ \int{{}_{A}}\frac{\partial{U}_{k}}{\partial X}w{}_{k}dA\ -Pr\int{{}_{A}}\bigg{[} \frac{\partial{\overline{u}}_{k}}{\partial X}\frac{\partial{U}_{k}}{\partial X }+\frac{\partial{\overline{u}}_{k}}{\partial Y}\bigg{(}\frac{\partial^{2}{U}_ {k}}{\partial Y^{2}}+\frac{\partial^{2}{V}_{k}}{\partial Y\partial X}\bigg{)} \bigg{]}w{}_{k}dA \tag{24}\] \[\int{{}_{A}}\bigg{(}{U}_{k}\ \frac{\partial{V}_{k}}{\partial X}+V \ \frac{\partial{V}_{k}}{\partial Y}\bigg{)}w{}_{k}dA\ +\ \int{{}_{A}}\frac{\partial{\overline{u}}_{k}}{\partial Y}w{}_{k}dA\ -Pr\int{{}_{A}}\bigg{[} \frac{\partial{\overline{u}}_{k}}{\partial Y}\frac{\partial^{2}{V}_{k}}{ \partial Y^{2}}+\frac{\partial^{2}{U}_{k}}{\partial X}\bigg{(}\frac{\partial^{ 2}{V}_{k}}{\partial X^{2}}+\frac{\partial^{2}{U}_{k}}{\partial X\partial Y} \bigg{)}\bigg{]}w{}_{k}dA\] (25) \[\int{{}_{A}}\bigg{(}{U}_{k}\ \frac{\partial{\theta}_{k}}{\partial X}+V _{k}\frac{\partial{\theta}_{k}}{\partial Y}\bigg{)}w{}_{k}dA\ -\ \int{{}_{A}}\bigg{(}\ \frac{\partial^{2}{\theta}_{k}}{\partial X^{2}}+\frac{ \partial^{2}{\theta}_{k}}{\partial Y^{2}}\bigg{)}w{}_{k}dA\ =0\] (26) \[\int{{}_{A}}\bigg{(}{U}_{k}\ \frac{\partial{C}_{k}}{\partial X}+V _{k}\frac{\partial{C}_{k}}{\partial Y}\bigg{)}w{}_{k}dA\ -\ \frac{1}{{}_{L}}\int{{}_{A}}\bigg{(}\ \frac{\partial^{2}{C}_{k}}{\partial X^{2}}+\frac{ \partial^{2}{C}_{k}}{\partial Y^{2}}\bigg{)}w{}_{k}dA\ =0 \tag{27}\]  
The viscosity relationship for each element in the power law fluid is as defined below.