# Double-Diffusive Effects on the Onset of Rayleigh-Benard Convection of Water-Based Nanofluids
## 2 Materials and Methods
### Computational Procedure  
The system of Equations (1)-(4), with the boundary and initial conditions, is solved using the open source framework OpenFOAM [38]. A new solver, derived from the basic solver named _buoyantSimpleFoam_ provided in OpenFOAM, has been developed with the implementation of the nanoparticle diffusion mass equation and assuming that all the physical properties of the nanofluid are temperature-dependent. The pressure-velocity coupling is solved by the SIMPLE algorithm, and all the convective terms are discretized using the QUICK scheme. The computational domain consists of a non-uniform structured grid, having a higher concentration of grid lines near the boundary walls of the enclosure and a uniform spacing in the interior of the cavity. Starting from the assigned initial conditions, the steady-state solution is attained when the relative changes at any computational node for each variable, between two consecutive iterations, are smaller than the pre-specified values of \(10^{-6}\).  
At the steady-state, the heat transfer rates \(Q_{h}\) and \(Q_{c}\) at the heated and cooled walls are expressed by:  
\[Q_{h}=\int_{0}^{W}-(k_{n})_{h}\cdot\left.\frac{\partial T}{ \partial y}\right|_{y=0}dx \tag{14}\] \[Q_{c}=\int_{0}^{W}-(k_{n})_{c}\cdot\left.\frac{\partial T}{ \partial y}\right|_{y=H}dx \tag{15}\]  
where \((k_{n})_{h}\) and \((k_{n})_{c}\) are the nanofluid thermal conductivities at temperatures \(T_{h}\) and \(T_{c}\), respectively.  
Since at steady-state the incoming and outgoing heat transfer rates are the same, the rate of heat transferred across the cavity can be calculated as:  
\[Q_{h}=-Q_{c}=Q \tag{16}\]  
Accordingly, the average convective heat transfer coefficient, \(h_{av}\), is calculated as:  
\[h_{av}=\frac{Q}{(T_{h}-T_{c})W} \tag{17}\]  
Numerical tests have been performed to analyze the sensitivity of the mesh spacing for several combinations of the controlling parameters, i.e., \(m_{av}\), \(\Delta T=T_{h}-T_{c}\), and \(A=H/W\). In the rest of the discussion, the average nanoparticle volume fraction, \(\varphi_{av}\), will be considered instead of \(m_{av}\):  
\[\varphi_{av}=\left[\left(\frac{1}{m_{av}}-1\right)\frac{\rho_{s}}{\rho_{f}}+1 \right]^{-1} \tag{18}\]  
where the mass densities \(\rho_{s}\) and \(\rho_{f}\) are evaluated at temperature \(T_{av}\):  
\[T_{av}=\frac{T_{h}+T_{c}}{2} \tag{19}\]  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Nanoparticles** & \(\rho\) **(kg/m3)** & \(k\) **(W/m K)** & \(C_{p}\) **(J/kg K)** \\ \hline Al\({}_{2}\)O\({}_{3}\) & 3880 & 36 & 773 \\ CuO & 6500 & 17.6 & 540 \\ TiO\({}_{2}\) & 4175 & 8.4 & 692 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Physical properties of metal-oxide nanoparticles (at 25 \({}^{\circ}\)C) [6; 36; 37].  
The typical number of nodal points \((x\times y)\) used for simulations are \(100\times 100\) for the square cavity and \(200\times 100\) for the cavity with aspect ratio \(A=0.25\), whereas the time-steps lie in the range between \(10^{-3}\) s and \(10^{-2}\) s. Typical results of the sensitivity analysis are presented in Tables 2 and 3.  
To validate the numerical code, two tests have been carried out. In the first test, the average Nusselt numbers computed numerically for a Prandtl number \(Pr=5.8\) (which means water at \(T_{av}=300\) K) and Rayleigh numbers \(Ra=10^{3}\)-\(10^{6}\), assuming \(m_{av}=0\) and \(A=0.5\), have been compared with the correlation of [PERSON] et al. [39] based on wide sets of experimental data for laminar free convection in cavities filled with air and water. In the second test, the experiments of [PERSON] et al. [40], for a square cavity filled with Al\({}_{2}\)O\({}_{3}\) + H\({}_{2}\)O, have been reproduced for two different values of nanofluid volume fraction, \(\varphi_{av}=0.01\) and \(0.04\). The comparisons between our numerical solutions and the literature data are shown in Figures