## 2 Mathematical Model
\[\frac{\partial U}{\partial X}+\frac{\partial V}{\partial Y}=0 \tag{7}\]  
\[U\frac{\partial U}{\partial X}+V\frac{\partial U}{\partial Y}=-\frac{ \partial P}{\partial X}+P_{r}\left[2\frac{\partial}{\partial X}\left(\overline {\mu_{a}}\left(\frac{\partial U}{\partial X}\right)+\frac{\partial}{\partial Y }\left(\overline{\mu_{a}}\left(\frac{\partial U}{\partial Y}+\frac{\partial V }{\partial X}\right)\right)\right]+\xi_{X}, \tag{8}\]  
\[U\frac{\partial V}{\partial X}+V\frac{\partial V}{\partial Y}=-\frac{ \partial P}{\partial Y}+P_{r}\left[2\frac{\partial}{\partial Y}\left( \overline{\mu_{a}}\left(\frac{\partial V}{\partial Y}\right)+\frac{\partial}{ \partial X}\left(\overline{\mu_{a}}\left(\frac{\partial U}{\partial Y}+\frac{ \partial V}{\partial X}\right)\right)\right]+\xi_{X}, \tag{9}\]  
\[ \begin{array}{c}(\xi_{X},\xi_{Y})=\left(Ha^{2}P_{r}\left(sin\gamma cos\gamma \ V-sin^{2}\gamma U\right)\right.\\ \left.-\frac{P_{r}}{Da}U,\ Ha^{2}P_{r}\left(sin\gamma cos\gamma\ U-cos^{2} \gamma\ V\right)-\frac{P_{r}}{Da}V\right.\\ \left.+P_{r}Ra(NC+\theta)\right)\end{array}  \tag{10}\]  
\[U\frac{\partial\theta}{\partial X}+V\frac{\partial\theta}{\partial Y}=\left( \frac{\partial^{2}\theta}{\partial X^{2}}+\frac{\partial^{2}\theta}{\partial Y ^{2}}\right) \tag{11}\]  
\[\overline{\mu_{a}}=\left\{2\left[\left(\frac{\partial U}{\partial X}\right)^{2 }+\left(\frac{\partial V}{\partial Y}\right)^{2}\right]+\left(\frac{\partial V }{\partial X}+\frac{\partial U}{\partial Y}\right)^{2}\right\}^{\frac{n-1}{2}}\]  
The dimensionless boundary conditions are  
1. The conditions at the cold wall are At \(C=0,\ \theta=0\)_and_\(U=V=0\)The conditions at the hot wall are At \(C=1\), \(\theta=1\) _and_\(U=V=0\)  
The conditions at the adiabat walls are At \(C_{n}=0\). \(\theta_{n}=0\), \(U=V=0\)  
The mean Nusselt number is computed thus  
\[Nu_{av}=\int_{0}^{1}Nu\;dY \tag{12}\]  
The mean Sherwood Number is computed thus  
\[Sh_{av}=\int_{0}^{1}Sh\;dY \tag{13}\]  
The Nusselt number \(\text{Nu}_{\text{lo}}\) and Sherwood Number (local) \(\text{Sh}_{\text{lo}}\) are computed through the equations. \[Nu_{lo}=-\left(\frac{\partial\theta}{\partial n}\right)_{s} \tag{14}\]  
\[Sh_{lo}=-\left(\frac{\partial C}{\partial n}\right)_{s} \tag{15}\]  
In addition, the kinetic energy (total) is  
\[K.E.=\frac{1}{2}\int_{\Omega}\|U\|^{2}d\Omega \tag{16}\]  
Various computational methods have been developed to analyze fluid flow and heat transfer rates within the cavity. This study employs the Finite Element Method (FEM) to discretize and solve Equations (7)-(11) along with their respective boundary conditions. To enhance the precision of the solution, a hybrid mesh combining both triangular and rectangular elements is employed, as illustrated in Figure 2. The simulation is conducted using COMSOL 6.1, a finite element-based software. Table 1 represents the grid convergence study of the simulation, where the number of elements is denoted as NELs, the degrees of freedom are DOFs, and the averaged Nusselt number is denoted as \(Nu_{avg}\). Values are reported for different grid levels. The simulation is conducted using a power law fluid with a shear-thinning behavior, measured by the power law index \(n=0.7\), \(\gamma=0^{o}\), \(Da=0.001\), the Hartmann number \(Ha=40\), and the Rayleigh number \(Ra=10^{4}\). The table shows that as the grid is refined from the extremely coarse level to the extremely fine level, the Nusselt number average value increases gradually. It can be noted that the increase in the Nusselt number average value is relatively small for the finer grid levels, which indicates that the values at the finer level match those at the extra fine level. Figure 2: Mesh analysis at an extra fine level is shown in the figure, highlighting the specific mesh region (**A–D**). The numerical methods used in this study were validated by comparing the results with [PERSON] [14] and [PERSON] [38], who investigated the natural convection of non-Newtonian fluids.