A ubiquitous arrangement in nature is a free-flowing fluid coupled to a porous medium, for example a river or lake lying above a porous bed. Depending on the environmental conditions, thermal convection can occur and may be confined to the clear fluid region, forming shallow convection cells, or it can penetrate into the porous medium, forming deep cells. Here, we combine three complementary approaches — linear stability analysis, fully nonlinear numerical simulations, and a coarse-grained model — to determine the circumstances that lead to each configuration. The coarse-grained model yields an explicit formula for the transition between deep and shallow convection in the physically relevant limit of small Darcy number. Near the onset of convection, all three of the approaches agree, validating the predictive capability of the explicit formula. The numerical simulations extend these results into the strongly nonlinear regime, revealing novel hybrid configurations in which the flow exhibits a dynamic shift from shallow to deep convection. This hybrid shallow-to-deep convection begins with small, random initial data, progresses through a metastable shallow state, and arrives at the preferred steady-state of deep convection. We construct a phase diagram that incorporates information from all three approaches and depicts the regions in parameter space that give rise to each convective state.

MSC Codes  76S05; 82B26; 76M10

§ INTRODUCTION

Convection in fluid-porous systems is a universally-observed phenomenon, with applications arising in technological, geophysical, and astrophysical settings.
In technological and industrial applications, fluid-porous convection is prevalent in heat sinks and cooling technologies found in laptops and computers <cit.>, as well as in the solidification of alloys <cit.>.
Geophysical examples can be seen in the coupled fluid-porous flow of sub-glacial or dry salt lakes <cit.>, in carbon-dioxide sequestration or the flow of oil in underground reservoirs <cit.>, and in contaminant transport in sub-soil water reservoirs <cit.>. Other geophysical applications that feature natural convection include plate tectonics  <cit.>, cave ventilation  <cit.>, and morphological formation from solute-laden flows <cit.>.
The phenomenon of convection also extends far beyond Earth and into astrophysical applications, such as in moons of Saturn and Jupiter <cit.>.

Although flow in fluid-porous systems has been a staple of the research community since Saffman and Jones' work in the 1970s <cit.>, convection in these systems still poses unique and timely questions.
Recent years have seen a resurgence of research on fluid-porous convection from a variety of viewpoints, including conducting nonlinear stability analysis, exploring bifurcations, and developing stable numerical schemes for solutions (see <cit.>.
One recurring theme observed in many of these works is the contrast between deep convection, in which convection cells occupy the entirety of the coupled domain, and shallow convection, in which cells only circulate in the free-flow region.

The arrangement we consider is a saturated porous layer lying beneath a clear fluid region that is free from obstructions, illustrated with the schematic in figure <ref>.
This entire coupled system is heated from below.
Each domain has a governing set of equations for the fluid flow — Navier-Stokes for the free-flow region, and Darcy's equations for the porous medium — with a set of conditions imposed along the interface between the two.
If the temperature difference between the lower and upper plates rises above a critical threshold, then the conductive state becomes unstable and gives way to natural convection.
If the temperature difference is sufficiently small, the conductive state remains stable.

In previous work, McCurdy et al., 2019 conducted linear and nonlinear stability analyses of the superposed system. With certain parameter regimes, the bimodal marginal stability curves suggested that a small change in the depth ratio of the two regions could trigger a drastic change in the convection patterns.
The interested reader can look ahead to figure <ref>a–b to see the stark contrast between the flow profiles for depth ratios of $\dhat = .18$ and $\dhat = .19$ respectively.
Indeed, slightly altering the depth ratio induces a qualitative shift in flow behavior, as originally observed by Chen & Chen, 1988.
This drastic change spurred McCurdy et al., 2019 to develop a simple, coarse-grained model to narrow down the parameter ranges for which the transition occurs.
This simple model, which neglected any coupling between the free-flow and porous regions, provided promising results and laid the groundwork for the current study.

Here, we improve upon the model to better account for the flow-conditions at the interface between the fluid and the porous medium. The analysis results in a simple, explicit formula for the critical depth ratio at which shallow convection transitions to deep convection.
We expect the new formula to be relevant for geophysical applications, such as predicting the penetration of tracers into groundwater, and industrial applications, for instance controlling heat dissipation by appropriately choosing the depth and/or porosity of a heat sink.
To test the new model, we conduct numerical simulations of the fully nonlinear, coupled Navier-Stokes-Darcy-Boussinesq system.
Computing numerical solutions to this system presents several challenges, for example accurately representing the sharp transitions in physical properties (e.g. density, conductivity, diffusivity) across interfaces and achieving stable time-stepping in face of the nonlinearities present in the Navier-Stokes equations.
As the numerical scheme is detailed, we explain how we address each of these challenges.
Ultimately, the fully nonlinear numerical simulations provide a more comprehensive picture of fluid-porous convection, revealing novel flow configurations not easily predicted by stability analysis or the coarse-grained model.

A few recent works have focused on convection in superposed fluid-porous layers from a numerical perspective.
[Zhang et al., 2020] used a finite element method (FEM) to study the stationary Navier-Stokes-Darcy-Boussinesq system and investigated the well-posedness of their finite element (FE) approximation.
Other works have numerically examined convection in related systems <cit.>, albeit with different governing equations (e.g. the Brinkman system instead of the Darcy system, or the Stokes equations instead of Navier-Stokes).
Some works have explored schemes to couple the Cahn-Hilliard equations with fluid-porous flow, <cit.>, while others have taken an analytical approach to convection in coupled layers.
For example, <cit.> recently examined transitions in the same Navier-Stokes-Darcy-Boussinesq system considered here, although through a different lens. Their main focus was the transition from a conductive to a convective state as the Raleigh number increases. The work of <cit.> rigorously showed that transitions exist between different convective profiles, like deep and shallow convection, and noted how the transitions behaved– as continuous transitions or jump transitions– around their critical Rayleigh numbers. In this work, we examine a similar kind of transition as we develop a model to predict the parameter regimes where the switch between deep and shallow convection takes place. This kind of transition, dubbed a `dynamic transition' by <cit.>, is a bifurcation of the system as one moves through the parameter space and has been observed in a number of papers, <cit.>. Our model improves the prediction of our previous model by utilizing an open boundary condition at the interface when calculating the critical Rayleigh numbers in our theory.  Additionally, we note a second kind of transition in this manuscript. This transition, which we refer to as a `dynamic shift,' is associated with the time evolution of the system where the conductive state transitions through a metastable shallow-convection state en route to its steady state of deep convection. Our numerical simulations shed light on this new flow configuration, shallow-to-deep convection.

The article is organized as follows.
In section <ref>, we present the system of equations, interface conditions, and the nondimensionalized system.
Then, the transition theory– one of the two main contributions of this work– is introduced in section <ref> along with results showing its efficacy.
Next, we detail our numerical scheme using a FEM in section <ref>, and we note how the treatment of interfacial and nonlinear terms allows us to write the system as a set of linear, sequentially decoupled equations.
Results are shown in section <ref> along with a discussion of how our three complementary approaches– stability analysis, fully nonlinear numerical simulations, and the coarse-grained model– agree to provide a more complete picture of convection in fluid-porous systems. Our results showcase the second main contribution of this paper: the novel convection pattern of shallow-to-deep convection.

§ THE COUPLED NAVIER-STOKES-DARCY SYSTEM

In this section, we present the governing equations, detail the boundary and interface conditions, and introduce the nondimensional system.

§.§ Governing equations

In the free-flow zone, we use the same system studied by [McCurdy et al., 2019, Han et al., 2020] – the incompressible Navier-Stokes equations with constant viscosity and the Boussinesq approximation, coupled with the advection-diffusion equations for heat:

\begin{equation}
\left. \begin{array}{rcl}
\rho_0\left( \DparD{\vuf}{t_f} + \left(\vuf \bcdot \bnabla\right) \vuf \right) &=& \bnabla \bcdot\mathsfbi{T}\left(\vuf, p_f \right) - g\rho_0 \left[1-\beta\left(T_f-T_0 \right) \right]\boldsymbol{k}\, , \\[14pt]
\bnabla \bcdot \vuf &=&0\, , \\[6pt]
\DparD{T_f}{t_f} + \vuf \bcdot \bnabla T_f &=&\dfrac{\kappa_f}{ \left(\rho_0c_p\right)_f} \bnabla^2T_f\, \, ,
\end{array}\right\}
\label{eq:NavStokesSys}
\end{equation}

where $\vuf = (u_f, v_f, w_f)$, $p_f$, and $T_f$ are the free flow velocity, pressure, and temperature, respectively, with $g$, $\rho_0$, $\beta$, and $T_0$ as acceleration due to gravity, the reference density of the fluid, the coefficient of thermal expansion, and the temperature of the conductive state at the interface, respectively.
The stress tensor and rate of strain tensor are defined as $\mathsfbi{T}(\vuf, p_f)=2\mu_0\mathsfbi{D}(\vuf)-p_f\mathsfbi{I}$ and $\mathsfbi{D}(\vuf)=\frac{1}{2}\left(\bnabla\vuf + \bnabla \vuf^{T}\right)$, respectively, with $\mu_0$ as dynamic viscosity and $\boldsymbol{k}$ as the upward pointing unit normal.
Additionally, $\kappa_f$, $c_p$, and $\lambda_f = \kappa_f/\left(\rho_0c_p\right)_f$ are the thermal conductivity of the fluid, specific heat capacity of the fluid, and thermal diffusivity of the fluid, respectively.

For fluid flow in the porous medium, we assume the medium has a small porosity, as is generally applicable to geophysical systems <cit.>. We therefore employ the Darcy-Boussinesq system with the advection-diffusion equation for heat:

\begin{equation}
\left. \begin{array}{rcl}
\dfrac{\rho_0}{\chi}\DparD{\vum}{t_m} + \dfrac{\mu_0}{\Pi} \vum &=& -\bnabla p_m - g\rho_0 \left[1-\beta\left(T_m-T_L \right) \right] \boldsymbol{k}\, ,\\[14pt]
\bnabla \bcdot \vum &=&0\\[6pt]
\dfrac{\left(\rho_0c_p\right)_m}{ \left(\rho_0c_p\right)_f}\DparD{T_m}{t_m} + \vum \bcdot \bnabla T_m &=&\dfrac{\kappa_m}{ \left(\rho_0c_p\right)_f} \bnabla^2T_m\, ,
\end{array}\right\}
\label{eq:DarcySys}
\end{equation}

where $\vum = (u_m, v_m, w_m),$ $p_m,$ and $T_m$ are the velocity, pressure, and temperature in the porous medium respectively, $\chi$ and $\Pi$ are the porosity and permeability, $\lambda_m = \kappa_m/\left(\rho_0 c_p\right)_f$ is the thermal diffusivity of the medium, and $T_L$ is the temperature at the lower boundary of the domain.
We assume the medium to be homogeneous and isotropic so that the permeability $\Pi$ is constant and scalar-valued.
The thermal conductivity $\kappa_m$ and specific heat capacity $(\rho_0\,c_p)_m$ of the porous medium are defined as averages of the fluid and solid components.
While many studies neglect the time derivative $\partial_t \vum$ in the first equation of (<ref>), retaining this term is useful for energy analysis of the system (see McCurdy et al., 2019).

[black, line width=1.75pt] (2,1.5) – (8,1.5);
[black, line width=1.0pt,dashed] (2,0) – (8,0);
[black, line width=1.75pt] (2,-1.5) – (8,-1.5);
at (.5,0) $z=0$;
at (.5,1.5) $z=d_f$;
at (.5,-1.5) $z=-d_m$;
at (3.25, 1.9) temperature: $T_U$;
at (3.25, -1.9) temperature: $T_L$;
at (3.25, .75) free-flow, $\Omega_f$;
at (3.25, -.75) porous medium, $\Omega_m$;
at (7.0, .4) interface, $\Gamma_i$;

Schematic of the domain $\Omega = \{(x,y)\in\mathbb{R}^2 \times z\in(-d_m,d_f)\}$, comprised of a free-flow region $\Omega_f$ and a porous medium $\Omega_m$. The two subdomains meet at an interface $\Gamma_i$. The upper and lower boundaries are impermeable and held at constant temperatures $T_U$ and $T_L$, respectively, with $T_L>T_U$. We assume periodicity of the velocity and temperature in the horizontal direction(s) as well.

§.§ Boundary and interface conditions

The domain, shown in figure <ref>, consists of flat, horizontal, non-penetrable plates at the top and bottom with a non-deforming interface between the two regions, $\Omega_f=\{(x,y,z)\in \mathbb{R}^2 \times (0,d_f)\}$ for the free flow and $\Omega_m=\{(x,y,z)\in \mathbb{R}^2 \times (-d_m,0)\}$ for the porous medium.
The temperature is held constant at the top and bottom plates.
The flow satisfies a free-slip condition at the top and an impermeable condition at the bottom:

\begin{equation}
\left. \begin{array}{ccrcccl}
T_f = T_U\,, &\quad &\vuf \bcdot \boldsymbol{n} = \frac{\p \vuf_\tau}{\p \boldsymbol{n}}&=0\, &
\quad &\mbox{on\ }&\quad z=d_f,\\[8pt]
T_m = T_L\,, &\quad &\vum \bcdot \boldsymbol{n} &=0\, &
\quad &\mbox{on\ }&\quad z=-d_m,\\[8pt]
\end{array}\right\}
\label{eq:BC}
\end{equation}

where ${\vuf}_\tau=(u_f, v_f)$ denotes the tangential (horizontal) components of the velocity at the top of the domain with $\boldsymbol{n}$ as the unit normal vector.

At the interface $\Gamma_i$ $(z=0)$, we require continuity of temperature, heat flux, and the normal component of velocity:

\begin{equation}
\left. \begin{array}{c}
T_f = T_m\, , \\[8pt]
\kappa_f\,\bnabla T_f \bcdot \boldsymbol{n} =  \kappa_m\,\bnabla T_m \bcdot \boldsymbol{n}\, ,\\[8pt]
\vuf \bcdot \boldsymbol{n} =  \vum \bcdot \boldsymbol{n}\, .
\end{array} \right\}
\end{equation}

For the last two conditions, we use the Beavers-Joseph-Saffman-Jones (BJSJ) condition [Saffman, 1971] and the Lions interface condition to specify the tangential and normal stresses, respectively. The BJSJ condition, also known as the Navier-slip condition, is

\begin{equation}\label{eq:BJSJcond}
-\boldsymbol{\tau} \bcdot \mathsfbi{T} \left(\vuf,p_f \right)\boldsymbol{n}
= \frac{\mu_0\,\alBJSJ}{\sqrt{\Pi}}\boldsymbol{\tau} \bcdot \vuf \, ,
\end{equation}

where $\alBJSJ$ is an empirically determined coefficient and $\boldsymbol{\tau}$ denotes the unit tangent vectors. Lastly, the Lions interface condition is

\begin{equation}
\label{normal_cond}
-\boldsymbol{n} \bcdot \mathsfbi{T}\left(\vuf,p_f \right)\boldsymbol{n} +\frac{\rho_0}{2}\left|\vuf \right|^2 = p_m\, .
\end{equation}

The inclusion of the $\frac{\rho_0}{2}\left|\vuf \right|^2$ term in this interface condition is essential in conducting the nonlinear stability analysis, <cit.>.

§.§ System of perturbed variables

Instead of working with the physical variables, we consider the perturbed variables; that is, we consider the deviation of the velocity, temperature, and pressure profiles from their conductive steady-states. The conductive state, denoted with an overhead bar, is a stationary fluid and a piecewise-linear temperature:

\begin{align*}
\vufbar &= \vumbar = 0\, , \\
\bar{T}_f&= T_0 + z\frac{T_U - T_0 }{d_f}\, ,\\
\bar{T}_m &= T_0 + z\frac{T_0 - T_L }{d_m} \, .
\end{align*}

Here, $T_0$ represents the interface temperature of the conductive solution

\begin{align*}
T_0 = \frac{\kappa_m\, d_f\, T_L + \kappa_f \,d_m\, T_U}{\kappa_m \,d_f + \kappa_f \,d_m}\, .
\end{align*}

If $T_U>T_L$, the conductive state is stable, but if $T_L>T_U$, buoyancy can destabilize the system. Throughout this work, we only consider the case where $T_L>T_U$. Additionally, we choose $\bar{p}_f$ and $\bar{p}_m$ to satisfy

\begin{align*}
\nabla \bar{p}_f &= -g\rho_0\left(1-\beta\left(\bar{T}_f-T_0\right)\right)\boldsymbol{k}\, , \\
\nabla \bar{p}_m &= -g\rho_0\left(1-\beta\left(\bar{T}_m-T_L\right)\right)\boldsymbol{k}\, .
\end{align*}

With the perturbation variables $\vup_j,$ $\theta_j,$ and $\pi_j$ for $j=\{f,m\}$ regions, we perturb the steady-state solutions:

\begin{align} \label{eq:perturbedSolns}
\vuf &=\vufbar + \vufp\, , \quad \vum =  \vumbar +\vump\, \nonumber,\\
T_f &= \bar{T}_f +\theta_f\, , \quad T_m = \bar{T}_m+\theta_m\, ,  \\
p_f &= \bar{p}_f +\pi_f\, , \quad p_m= \bar{p}_m + \pi_m \, . \nonumber
\end{align}

Substituting (<ref>) into the original system produces a system for the perturbed variables:

\begin{equation}
\left. \begin{array}{rcl}
\rho_0\left( \DparD{\vufp}{t_f} + \left(\vufp \bcdot \bnabla\right) \vufp \right) &=& \bnabla \bcdot\mathsfbi{T}\left(\vufp, \pi_f \right) + g\rho_0 \beta\theta_f\boldsymbol{k}\, , \\[14pt]
\bnabla \bcdot \vufp &=&0\, , \\[6pt]
\DparD{\theta_f}{t_f} + \vufp \bcdot \bnabla \theta_f &=&\lambda_f \bnabla^2\theta_f -\vufp\bcdot\boldsymbol{k} \left(\dfrac{T_U-T_0}{d_f}\right) \, \, ,
\end{array}\right\}
\label{eq:NavStokesPertSys}
\end{equation}

for $\Omega_f$;

\begin{equation}
\left. \begin{array}{rcl}
\dfrac{\rho_0}{\chi}\DparD{\vump}{t_m} + \dfrac{\mu_0}{\Pi} \vump &=& -\bnabla \pi_m + g\rho_0 \beta\theta_m\boldsymbol{k}\, ,\\[14pt]
\bnabla \bcdot \vump &=&0\\[6pt]
\dfrac{\left(\rho_0c_p\right)_m}{ \left(\rho_0c_p\right)_f}\DparD{\theta_m}{t_m} + \vump \bcdot \bnabla \theta_m &=&\lambda_m \bnabla^2\theta_m -\vump\bcdot\boldsymbol{k} \left(\dfrac{T_0-T_L}{d_m}\right)\, ,
\end{array}\right\}
\label{eq:DarcyPertSys}
\end{equation}

for $\Omega_m$;

\begin{equation}
\left. \begin{array}{c}
\theta_f = \theta_m\, , \\[8pt]
\kappa_f\,\bnabla \theta_f \bcdot \boldsymbol{n} =  \kappa_m\,\bnabla \theta_m \bcdot \boldsymbol{n}\, ,\\[8pt]
\vufp \bcdot \boldsymbol{n} =  \vump \bcdot \boldsymbol{n}\,, \\[8pt]
-\boldsymbol{\tau} \bcdot \mathsfbi{T} \left(\vufp,\pi_f \right)\boldsymbol{n}
= \dfrac{\mu_0\,\alBJSJ}{\sqrt{\Pi}}\boldsymbol{\tau} \bcdot \vufp \, ,\\[8pt]
-\boldsymbol{n} \bcdot \mathsfbi{T}\left(\vufp,\pi_f \right)\boldsymbol{n} +\dfrac{\rho_0}{2}\left|\vufp \right|^2 = \pi_m\,,
\end{array} \right\}
\end{equation}

for the interface conditions on $\Gamma_i$; and
\begin{equation}
\left. \begin{array}{ccrcccl}
\theta_f = 0\,, &\quad &\vufp \bcdot \boldsymbol{n} = \frac{\p \vufp_\tau}{\p \boldsymbol{n}}&=0\, &
\quad &\mbox{on\ }&\quad z=d_f,\\[8pt]
\theta_m = 0\,, &\quad &\vump \bcdot \boldsymbol{n} &=0\, &
\quad &\mbox{on\ }&\quad z=-d_m,\\[8pt]
\end{array}\right\}
\label{eq:BCPert}
\end{equation}

for the boundary conditions.

§.§ Nondimensional system

As in previous work, we nondimensionalize the system using the porous values as a reference <cit.>, with nondimensional variables denoted by tildes:

_j = _j ν/d_m  ,          x_j = x̃_j  d_m  ,          t_j = t̃  d_m^2/λ_m  ,          θ_j = θ̃_j  (T_0-T_L)ν/λ_m  ,             π_j = π̃_j  ρ_0  ν^2/d_m^2  ,

for $j=\{f,m\}$, where $\nu = \mu_0/\rho_0$ is the kinematic viscosity. We also note that the stress tensor has been altered slightly from when it was first introduced; the nondimensional stress tensor is defined as $\widetilde{\mathsfbi{T}}(\vufp, \pi_f)=2\mathsfbi{D}(\vufp)-\pi_f\mathsfbi{I}$.

Substituting the nondimensional variables into equations (<ref>)–(<ref>) results in the governing equations (after dropping the tildes) for $\Omega_f = \{(x,y,z) \in \mathbb{R}^2\times (0,\dhat)\}$, where $\dhat$ is the ratio of the free-flow depth to that of the porous medium:

\begin{equation}
\left. \begin{array}{rcl}
\dfrac{1}{\Prm}\DparD{\vufp}{t} + \left(\vufp \bcdot \bnabla \right)\vufp &=& \bnabla \bcdot\widetilde{\mathsfbi{T}}\left(\vufp, \pi_f \right) +\dfrac{\Ram}{\Da}\,\theta_f\,\boldsymbol{k} , \\[14pt]
\bnabla \bcdot \vufp &=&0\, , \\[6pt]
\DparD{\theta_f}{t} + \Prm\,\vufp \bcdot \bnabla \theta_f &=&\epsilon_T\,\bnabla^2 \theta_f + \dfrac{1}{\epsilon_T}\vufp\bcdot\boldsymbol{k} \, ,
\end{array}\right\}
\label{eq:NavStokesSysNondim}
\end{equation}

for $\Omega_m = \{(x,y,z) \in \mathbb{R}^2\times (-1,0)\}$:

\begin{equation}
\left. \begin{array}{rcl}
\dfrac{\Da}{\Prm\, \chi }\DparD{\vump}{t} + \vump &=&-\Da\bnabla \pi_m +\Ram\,\theta_m\,\boldsymbol{k} ,\\[14pt]
\bnabla \bcdot \vump &=&0\,,\\[6pt]
\varrho\,  \DparD{\theta_m}{t} + \Prm\,\vump \bcdot \bnabla \theta_m &=&\bnabla^2 \theta_m + \vump\bcdot\boldsymbol{k} \,,
\end{array}\right\}
\label{eq:DarcySysNondim}
\end{equation}

and at $\Gamma_i =  \{(x,y,z) \in \mathbb{R}^2\times (z=0)\}$:

\begin{align}
\theta_f &= \theta_m\, , \label{eq:InterfCondNondim.1}\\[6pt]
\epsilon_T \bnabla \theta_f\bcdot \boldsymbol{n} &=\bnabla \theta_m\bcdot \boldsymbol{n}\, , \label{eq:InterfCondNondim.2}\\[6pt]
\vufp \bcdot \boldsymbol{n} &=  \vump \bcdot \boldsymbol{n}\, \label{eq:InterfCondNondim.3}\\[6pt]
-\boldsymbol{\tau} \bcdot \widetilde{\mathsfbi{T}} \left(\vufp,\pi_f \right)\boldsymbol{n} & =\dfrac{\alBJSJ}{\sqrt{\Da}}\left(\boldsymbol{\tau}\bcdot \vufp \right)\,, \label{eq:InterfCondNondim.4}\\[6pt]
-\boldsymbol{n} \bcdot \widetilde{\mathsfbi{T}} \left(\vufp,\pi_f \right)\boldsymbol{n} +\frac{1}{2}|\vufp|^2 &=\,\pi_m \, .\label{eq:InterfCondNondim.5}
\end{align}

Boundary conditions at the top and bottom of the domain are

\begin{equation}
\left. \begin{array}{ccrcccl}
\theta_f = 0\,, &\quad &\vufp \bcdot \boldsymbol{n} = \frac{\p \vufp_\tau}{\p \boldsymbol{n}}&=0\, &
\quad &\mbox{on\ }&\quad z=\hat{d},\\[8pt]
\theta_m = 0\,, &\quad &\vump \bcdot \boldsymbol{n} &=0\, &
\quad &\mbox{on\ }&\quad z=-1.\\[8pt]
\end{array}\right\}
\label{eq:BCnondim}
\end{equation}

The nondimensional numbers $\dhat$, $\Prm$, $\Da$, $\epsilon_T$, and $\varrho$ are defined by

\begin{equation}
\dhat = \frac{d_f}{d_m}\,,\quad\Prm = \frac{\nu}{\lambda_m}\,,\quad \Da =  \frac{\Pi}{d_m^2}\,,\quad \epsilon_T = \frac{\lambda_f}{\lambda_m}\,,\quad \varrho = \frac{\left(\rho_0c_p\right)_m}{ \left(\rho_0c_p\right)_f}\,,
\end{equation}

and the Rayleigh numbers of both regions are

\begin{equation} \label{eq:rayleighDefns}
\Ram = \frac{g\beta \left(T_L-T_0 \right) \Da\, d_m^3}{\nu \,\lambda_m}\,, \quad
\Raf = \frac{\dhat^4}{\Da\,\epsilon_T^2}\Ram \,.
\end{equation}

While the Rayleigh number of the porous medium is used throughout this work, the corresponding Rayleigh number of the free-flow region can be determined via the relationship above.

The depth ratio of the two layers $\dhat$ plays a central role in our study.
Other dimensionless parameters, like $\Prm\,,\epsilon_T,\,\varrho$, represent values inherent to the fluid and/or porous medium.
In industrial applications, these cannot easily be altered, or it may be impractical to do so.
However, the depth ratio can more readily be changed; for example, by adding or removing fluid from the free-flow layer, the depth ratio varies.
The coarse-grained model presented in the next section details how changing the depth ratio can significantly affect convection profiles.

The second parameter of interest for geophysical applications is the Darcy number $\Da$–  especially the small Darcy regime since many materials have small permeability values.
Relatively impervious materials, like limestone or granite, can have permeabilities between $10^{-18}$ and $10^{-15}m^2$, while more porous media, like sorted gravel or sand, can have permeabilities between $10^{-10}\lesssim \Pi \lesssim 10^{-7}m^2$, <cit.>.
The resulting Darcy numbers in experiments and/or simulations is small (typically between $10^{-10}\leq \Da \leq 10^{-5}$), highlighting the necessity to study the relevant small-Darcy regime in more depth, as done in [Lyu & Wang, 2021].

§ COARSE-GRAINED MODEL FOR THE TRANSITION BETWEEN DEEP AND SHALLOW CONVECTION

[McCurdy et al., 2019] conducted linear and nonlinear stability analyses of the Navier-Stokes-Darcy-Boussinesq system to determine the threshold Rayleigh number needed for the conductive state to become unstable at a given wavenumber, $a_m$.
For a fixed depth ratio, figure <ref>c shows the collection of these points in the $a_m \text{-} \Ram$ plane, called the marginal stability curve, which delineates regions of stability from instability.
The critical Rayleigh number $\Ramcu$ is the global minimum of this curve, representing the lowest $\Ram$ value that produces a flow instability.
The corresponding critical wavenumber $a_m^*$ dictates the flow configuration at the onset of convection: small $a_m^*$ (i.e. large wavelength) indicates deep convection cells that occupy the entire coupled domain as seen in figure <ref>a, while large $a_m^*$ (i.e. small wavelength) indicates narrow convection cells that occupy the fluid region only, as seen in figure <ref>b.
The bimodal nature of the marginal stability curve can create an abrupt shift between these two flow configurations as the depth ratio changes.

The marginal stability curves shown in figure <ref>c are calculated for a range of $\dhat$ values using the linear stability analysis outlined by [McCurdy et al., 2019]. The global minimum of each curve corresponds to $\Ramcu$ and is indicated by a red dot. The red arrow illustrates the path that connects sequential values of $\Ramcu$ as $\dhat$ increases from 0.15 to 0.22. As seen in the figure, a jump in $a_m^*$ occurs as $\dhat$ changes from 0.18 to 0.19, indicating an abrupt transition from deep convection to shallow convection.

[inner sep=0pt] (russell) at (0,0)
at (.28,-1.9) $-1.0$ $0$   $1.0$;
at (3.2,-2.3) $x$ ;
at (-.24,-1.4) $-1.0$;
at (-.24,-.14) $-0.5$;
at (0.18,1.15) $0$;
at (-.18,1.7) $0.19$;
at (.4-6.61,-1.9) $-1.0$ $0$   $1.0$;
at (3.2-6.47,-2.3) $x$ ;
at (-.24-6.54,-1.4) $-1.0$;
at (-.24-6.54,-.14) $-0.5$;
at (0.18-6.54,1.15) $0$;
at (-.18-6.54,1.7) $0.18$;
at (-.3-6.65,0.2) $z$;
at (3.4-6.65,2.2)  (a) Deep convection, $\dhat=.18$;
at (3.4,2.2)   (b) Shallow convection, $\dhat=.19$;

scale only axis,
title = (c) Marginal Stability Curves and their $\Ramcu$ values, while varying $\dhat$,
xlabel=Porous wavenumber, $a_m$,
ylabel= Porous Rayleigh number, $\Ram$,
axis background/.style=fill=white,
axis x line*=bottom,
axis y line*=left,
[color=mycolor1, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	60.758836

1	26.701025

1.1	23.950715

1.2	21.921826

1.3	20.406327

1.4	19.26766

1.5	18.413048

1.6	17.778073

1.7	17.316238

1.8	16.993762

1.9	16.785536

2	16.672303

2.1	16.63943

2.2	16.675333

2.3	16.771021

2.4	16.918999

2.5	17.113764

2.6	17.349979

2.7	17.62376

2.8	17.931683

2.9	18.271647

3	18.638639

3.5	20.843945

4	23.517234

4.5	26.509791

5	29.644038

5.5	32.718587

6.0	 35.457959

6.1	35.944214

6.2	36.404293

6.3	36.836124

6.4	 37.231550

6.5	37.605283

6.6	37.942405

6.7	38.247914

6.8	38.552129

6.9	38.758423

7.0	38.964762

7.1	39.146656

7.2	39.300058

7.3	39.408513

7.4	39.488374

7.5	39.566215

7.6	39.600855

7.7	39.616056

7.8	39.610445

7.9	39.588535

8.0	39.541620

8.1	39.483271

8.2	39.409069

8.3	39.321330

8.4	39.221203

8.5	39.111058

8.6	38.990374

8.7	38.861587

8.8	38.725953

8.9	38.583645

9.0	38.435330

9.1	38.282318

9.2	38.125144

9.3	37.964578

9.4	37.801299

9.5	37.635795

9.6	37.468672

9.7	37.300319

9.8	37.131360

9.9	36.960593

10.0	36.792165

10.5	35.953968

11	35.151282

11.5	34.401579

12	33.714119

12.1	33.584679

12.2	33.457834

12.3	33.334647

12.4	33.21139

12.5	33.093376

12.6	32.977157

12.7	32.86629

12.8	32.757132

12.9	32.643124

13	32.540395

13.1	32.437964

13.2	32.338196

13.3	32.241341

13.4	32.145682

13.5	32.054921

13.6	31.965755

13.7	31.879368

13.8	31.795402

13.9	31.714231

14	31.635091

14.1	31.558817

14.2	31.485131

14.3	31.414559

14.4	31.345028

14.5	31.279005

14.6	31.214848

14.7	31.153385

14.8	31.093911

14.9	31.037651

15	30.983343

15.5	30.746044

16	30.565401

16.5	30.438044

17	30.362153

17.5	30.335769

18	30.357147

18.5	30.424719

19	30.537166

19.5	30.693278

20	30.892005

20.5	31.132621

21	31.414273

21.5	31.736692

22	32.099173

22.5	32.501257

23	32.943504

23.5	33.425048

24	33.946191

24.5	34.506933

25	35.107526

[color=mycolor2, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	75.074308

1	26.137306

1.1	23.454416

1.2	21.476187

1.3	19.999125

1.4	18.890251

1.5	18.058893

1.6	17.441974

1.7	16.994369

1.8	16.682804

1.9	16.48279

2	16.375554

2.1	16.346761

2.2	16.38513

2.3	16.481541

2.4	16.629337

2.5	16.822057

2.6	17.054993

2.7	17.325192

2.8	17.627881

2.9	17.960748

3	18.321279

3.5	20.468955

4	23.045702

4.5	25.877233

5	28.762148

5.50	31.458768

5.60	31.929166

5.70	32.417134

5.80	32.861573

5.90	33.279146

6.00	33.662766

6.10	34.021208

6.20	34.363530

6.30	34.663044

6.40	34.929316

6.50	35.166056

6.60	35.378663

6.70	35.542283

6.80	35.684309

6.90	35.795272

7.00	35.879795

7.10	35.937260

7.20	35.969612

7.30	35.978865

7.40	35.966528

7.50	35.942000

7.60	35.860907

7.70	35.817223

7.80	35.735535

7.90	35.640242

8.00	35.533607

8.10	35.416039

8.20	35.289379

8.30	35.154676

8.40	35.012382

8.50	34.864266

9	34.061558

9.5	33.213143

10	32.373052

10.5	31.570742

11	30.825809

11.5	30.14596

12	29.535923

12.1	29.423079

12.2	29.313316

12.3	29.198739

12.4	29.094878

12.5	28.990779

12.6	28.891592

12.7	28.794205

12.8	28.699091

12.9	28.606914

13	28.517254

13.1	28.430267

13.2	28.346047

13.3	28.264042

13.4	28.184948

13.5	28.108075

13.6	28.034033

13.7	27.962122

13.8	27.892847

13.9	27.826003

14	27.761601

14.1	27.699563

14.2	27.639903

14.3	27.582571

14.4	27.527665

14.5	27.474922

14.6	27.424507

14.7	27.376354

14.8	27.333262

14.9	27.286711

15	27.245179

15.5	27.069688

16	26.945883

16.5	26.871433

17	26.844354

17.5	26.862573

18	26.925213

18.5	27.030116

19	27.176384

19.5	27.362968

20	27.589128

20.5	27.853989

21	28.157204

21.5	28.498282

22	28.876976

22.5	29.29306

23	29.74652

23.5	30.237295

24	30.765529

24.5	31.331512

25	31.935357

[color=mycolor3, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	73.399425

1	25.596586

1.1	22.97756

1.2	21.047005

1.3	19.606364

1.4	18.525458

1.5	17.715824

1.6	17.115777

1.7	16.681041

1.8	16.37939

1.9	16.186649

2	16.084493

2.1	16.059003

2.2	16.098653

2.3	16.195301

2.4	16.341405

2.5	16.531468

2.6	16.760512

2.7	17.025844

2.8	17.320567

2.9	17.647337

3	17.995927

3.5	20.080035

4	22.544965

4.5	25.191839

5	27.790073

5.50	30.055153

5.60	30.441005

5.70	30.802109

5.80	31.131986

5.90	31.436105

6.00	31.704736

6.10	31.946601

6.20	32.160038

6.30	32.336257

6.40	32.476568

6.50	32.593279

6.60	32.685097

6.70	32.736765

6.80	32.782302

6.90	32.786135

7.00	32.783469

7.10	32.738542

7.20	32.687034

7.30	32.618484

7.40	32.534736

7.50	32.442795

7.60	32.327616

7.70	32.202223

7.80	32.066916

7.90	31.939915

8.00	31.785859

8.5	31.000522

9	30.150651

9.5	29.308508

10	28.507227

10.5	27.764775

11	27.088377

11.5	26.482059

12	25.949711

12.1	25.851006

12.2	25.755088

12.3	25.661795

12.4	25.571109

12.5	25.483084

12.6	25.397668

12.7	25.31493

12.8	25.234562

12.9	25.156831

13	25.081611

13.1	25.008861

13.2	24.938585

13.3	24.870707

13.4	24.805257

13.5	24.742173

13.6	24.68145

13.7	24.62304

13.8	24.56692

13.9	24.513076

14	24.46154

14.1	24.412146

14.2	24.36522

14.3	24.327695

14.4	24.277101

14.5	24.23643

14.6	24.197848

14.7	24.161194

14.8	24.126891

14.9	24.094456

15	24.064041

15.5	23.941562

16	23.86663

16.5	23.837077

17	23.851003

17.5	23.906758

18	24.002932

18.5	24.138231

19	24.311944

19.5	24.522814

20	24.770643

20.5	25.054504

21	25.374164

21.5	25.72936

22	26.119896

22.5	26.545735

23	27.006901

23.5	27.503518

24	28.03578

24.5	28.603974

25	29.208425

[color=mycolor4, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	71.79791

1	25.076038

1.1	22.517592

1.2	20.632303

1.3	19.226054

1.4	18.171534

1.5	17.382237

1.6	16.797744

1.7	16.375014

1.8	16.082196

1.9	15.895746

2	15.798036

2.1	15.774834

2.2	15.815432

2.3	15.911193

2.4	16.054527

2.5	16.240982

2.6	16.464905

2.7	16.722394

2.8	17.010452

2.9	17.327089

3	17.670329

3.5	19.674502

4	22.008536

4.5	24.441845

5.00	26.709801

5.10	27.117393

5.20	27.502885

5.30	27.864043

5.40	28.201767

5.50	28.509798

5.60	28.784764

5.70	29.039260

5.80	29.258569

5.90	29.444631

6.00	29.611025

6.10	29.727688

6.20	29.836671

6.30	29.901008

6.40	29.946644

6.50	29.965244

6.60	29.962356

6.70	29.932933

6.80	29.886204

6.90	29.821565

7.00	29.739577

7.10	29.645447

7.20	29.535122

7.30	29.417327

7.40	29.287742

7.50	29.150787

7.60	29.005308

7.70	28.854566

7.80	28.698139

7.90	28.538351

8.00	28.374632

8.5	27.529086

9	26.685946

9.5	25.883435

10	25.140899

10.5	24.467397

11	23.869714

11.5	23.335466

12	22.873665

12.1	22.789224

12.2	22.707465

12.3	22.628127

12.4	22.551343

12.5	22.476994

12.6	22.405245

12.7	22.335766

12.8	22.268769

12.9	22.204235

13	22.141889

13.1	22.082327

13.2	22.024266

13.3	21.968855

13.4	21.914856

13.5	21.864689

13.6	21.815878

13.7	21.769264

13.8	21.725575

13.9	21.682328

14	21.641976

14.1	21.60367

14.2	21.567371

14.3	21.53314

14.4	21.500834

14.5	21.470503

14.6	21.44216

14.7	21.415552

14.8	21.391143

14.9	21.368463

15	21.347494

15.5	21.27033

16	21.236767

16.5	21.244848

17	21.292882

17.5	21.379429

18	21.503258

18.5	21.663367

19	21.85892

19.5	22.089206

20	22.353782

20.5	22.652302

21	22.984226

21.5	23.349707

22	23.748519

22.5	24.180947

23	24.646873

23.5	25.146598

24	25.680412

24.5	26.248634

25	26.851702

[color=mycolor5, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	70.261276

1	24.572951

1.1	22.072463

1.2	20.230243

1.3	18.856612

1.4	17.826968

1.5	17.056717

1.6	16.48677

1.7	16.074932

1.8	15.790107

1.9	15.60934

2	15.514498

2.1	15.492629

2.2	15.533469

2.3	15.626514

2.4	15.767308

2.5	15.947869

2.6	16.166964

2.7	16.418548

2.8	16.697998

2.9	17.003307

3	17.332731

3.5	19.250116

4	21.433917

4.50	23.624342

4.60	24.038897

4.70	24.438393

4.80	24.819379

4.90	25.195092

5.00	25.525997

5.10	25.843186

5.20	26.138125

5.30	26.398653

5.40	26.637425

5.50	26.840681

5.60	27.033798

5.70	27.171849

5.80	27.278632

5.90	27.371589

6.00	27.432058

6.10	27.465027

6.20	27.473222

6.30	27.457954

6.40	27.422111

6.50	27.366443

6.60	27.293484

6.70	27.204552

6.80	27.105963

6.90	26.986672

7.00	26.861005

7.10	26.726248

7.20	26.584587

7.30	26.433962

7.40	26.280289

7.50	26.119895

8	25.284861

8.5	24.436955

9	23.635739

9.5	22.89036

10	22.215849

10.5	21.617593

11	21.084577

11.5	20.624462

12	20.229749

12.1	20.158292

12.2	20.089305

12.3	20.022614

12.4	19.958328

12.5	19.896349

12.6	19.836685

12.7	19.779335

12.8	19.723922

12.9	19.671103

13	19.620252

13.1	19.571572

13.2	19.525212

13.3	19.480552

13.4	19.438128

13.5	19.397833

13.6	19.359328

13.7	19.322954

13.8	19.288474

13.9	19.255896

14	19.225377

14.1	19.196682

14.2	19.169698

14.3	19.144746

14.4	19.121526

14.5	19.100127

14.6	19.080468

14.7	19.062574

14.8	19.04642

14.9	19.031979

15	19.019244

15.5	18.98042

16	18.981225

16.5	19.020993

17	19.097347

17.5	19.20914

18	19.355348

18.5	19.535394

19	19.748347

19.5	19.993779

20	20.271303

20.5	20.580671

21	20.921735

21.5	21.294449

22	21.698915

22.5	22.135213

23	22.603593

23.5	23.104321

24	23.637773

24.5	24.204355

25	24.804532

[color=mycolor6, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	68.782207

1	24.085526

1.1	21.640182

1.2	19.839102

1.3	18.496396

1.4	17.49028

1.5	16.737915

1.6	16.181563

1.7	15.779501

1.8	15.501712

1.9	15.325325

2	15.233234

2.1	15.211685

2.2	15.250851

2.3	15.341548

2.4	15.476637

2.5	15.654769

2.6	15.865052

2.7	16.108555

2.8	16.377807

2.9	16.669998

3	16.986588

3.5	18.800659

4.00	20.814804

4.10	21.215828

4.20	21.610564

4.30	21.996261

4.40	22.369989

4.50	22.732553

4.60	23.066120

4.70	23.400118

4.80	23.705274

4.90	23.983406

5.00	24.241637

5.10	24.467774

5.20	24.645162

5.30	24.815326

5.40	24.976590

5.50	25.069807

5.60	25.150596

5.70	25.226906

5.80	25.254644

5.90	25.266214

6.00	25.244459

6.10	25.201676

6.20	25.140534

6.30	25.062791

6.40	24.969428

6.50	24.864535

6.60	24.745426

6.70	24.615119

6.80	24.478362

6.90	24.334343

7.00	24.182379

7.10	24.023545

7.20	23.863035

7.30	23.698911

7.40	23.532525

7.50	23.364662

8	22.523331

8.5	21.708918

9	20.960541

9.5	20.281032

10	19.678669

10.5	19.153437

11	18.68237

11.5	18.286771

12	17.952672

12.1	17.892706

12.2	17.835136

12.3	17.779723

12.4	17.726542

12.5	17.67536

12.6	17.62656

12.7	17.562002

12.8	17.534736

12.9	17.491922

13	17.45101

13.1	17.412223

13.2	17.3754

13.3	17.340466

13.4	17.307366

13.5	17.275666

13.6	17.246746

13.7	17.219174

13.8	17.193428

13.9	17.169352

14	17.147067

14.1	17.126508

14.2	17.107846

14.3	17.089758

14.4	17.074202

14.5	17.060255

14.6	17.049051

14.7	17.038561

14.8	17.029523

14.9	17.02213

15	17.01626

15.5	17.009626

16	17.039995

16.5	17.105445

17	17.204938

17.5	17.33729

18	17.501704

18.5	17.697468

19	17.924122

19.5	18.181222

20	18.46854

20.5	18.785954

21	19.133367

21.5	19.510912

22	19.91871

22.5	20.35696

23	20.825976

23.5	21.326096

24	21.857746

24.5	22.421396

25	23.017566

[color=mycolor7, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	67.35359

1	23.611631

1.1	21.219212

1.2	19.45731

1.3	18.144273

1.4	17.254264

1.5	16.424923

1.6	15.881004

1.7	15.488177

1.8	15.216624

1.9	15.044154

2	14.953781

2.1	14.93239

2.2	14.969597

2.3	15.057112

2.4	15.18768

2.5	15.35725

2.6	15.559633

2.7	15.790873

2.8	16.047509

2.9	16.327192

3	16.626223

3.5	18.328672

4.00	20.147344

4.10	20.497371

4.20	20.836588

4.30	21.162102

4.40	21.470822

4.50	21.758993

4.60	22.030415

4.70	22.279787

4.80	22.496535

4.90	22.709478

5.00	22.873644

5.10	23.010992

5.20	23.120720

5.30	23.196205

5.40	23.258068

5.50	23.289270

5.60	23.303270

5.70	23.289221

5.80	23.244603

5.90	23.170465

6.00	23.092621

6.10	22.999284

6.20	22.887557

6.30	22.771346

6.40	22.639332

6.50	22.501895

6.60	22.357547

6.70	22.203497

6.80	22.048579

6.90	21.886751

7.00	21.722191

7.5	20.886808

8	20.069408

8.5	19.314101

9	18.6196

9.5	18.00807

10	17.47828

10.5	17.00365

11	16.604416

11.5	16.267063

12	15.986575

12.1	15.936928

12.2	15.889325

12.3	15.843772

12.4	15.800282

12.5	15.758724

12.6	15.719119

12.7	15.681394

12.8	15.645556

12.9	15.611522

13	15.579514

13.1	15.549231

13.2	15.520705

13.3	15.493885

13.4	15.468792

13.5	15.445414

13.6	15.422871

13.7	15.403787

13.8	15.38558

13.9	15.368856

14	15.353737

14.1	15.340198

14.2	15.3282

14.3	15.317791

14.4	15.308906

14.5	15.301395

14.6	15.295534

14.7	15.291078

14.8	15.288124

14.9	15.286652

15	15.286575

15.5	15.307137

16	15.361555

16.5	15.448515

17	15.566944

17.5	15.715965

18	15.894871

18.5	16.103143

19	16.34038

19.5	16.606362

20	16.900868

20.5	17.223951

21	17.575636

21.5	17.956054

22	18.36544

22.5	18.804079

23	19.272326

23.5	19.770589

24	20.299355

24.5	20.859129

25	21.450495

[color=mycolor8, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	65.970808

1	23.149504

1.1	20.808109

1.2	19.083845

1.3	17.798861

1.4	16.836132

1.5	16.116398

1.6	15.583033

1.7	15.199353

1.8	14.933111

1.9	14.763491

2	14.673815

2.1	14.651159

2.2	14.683315

2.3	14.767984

2.4	14.892559

2.5	15.052412

2.6	15.24561

2.7	15.46523

2.8	15.708548

2.9	15.972244

3	16.253375

3.50	17.824042

3.60	18.154529

3.70	18.480009

3.80	18.797324

3.90	19.107878

4.00	19.428287

4.10	19.722410

4.20	20.000427

4.30	20.261497

4.40	20.500645

4.50	20.710263

4.60	20.914123

4.70	21.075817

4.80	21.244679

4.90	21.371410

5.00	21.449847

5.10	21.505450

5.20	21.530480

5.30	21.526129

5.40	21.519891

5.50	21.476534

5.60	21.421670

5.70	21.347704

5.80	21.256879

5.90	21.148591

6.00	21.032330

6.10	20.903293

6.20	20.765272

6.30	20.621132

6.40	20.469342

6.50	20.312117

6.60	20.153207

6.70	19.990790

6.80	19.824402

6.90	19.672839

7.00	19.501070

7.5	18.671266

8	17.898705

8.5	17.196945

9	16.573149

9.5	16.035739

10	15.562586

10.5	15.146518

11	14.803362

11.5	14.517703

12	14.28163

12.1	14.238415

12.2	14.204984

12.3	14.168071

12.4	14.132804

12.5	14.099653

12.6	14.0682

12.7	14.038441

12.8	14.010373

12.9	13.983986

13	13.959295

13.1	13.936538

13.2	13.915188

13.3	13.895447

13.4	13.877322

13.5	13.860739

13.6	13.845484

13.7	13.832189

13.8	13.820117

13.9	13.809651

14	13.800597

14.1	13.806699

14.2	13.786815

14.3	13.782076

14.4	13.778679

14.5	13.776769

14.6	13.776879

14.7	13.776943

14.8	13.779054

14.9	13.782493

15	13.787792

15.5	13.823726

16	13.904847

16.5	14.009472

17	14.143283

17.5	14.305756

18	14.496158

18.5	14.714272

19	14.959524

19.5	15.231998

20	15.53172

20.5	15.858597

21	16.212824

21.5	16.594575

22	17.004187

22.5	17.441989

23	17.908397

23.5	18.403876

24	18.928954

24.5	19.48418

25	20.070175

[color=mycolor9, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	64.630674

1	22.699352

1.1	20.405168

1.2	18.717026

1.3	17.458943

1.4	16.516301

1.5	15.813017

1.6	15.29114

1.7	14.913466

1.8	14.651211

1.9	14.4831

2	14.391791

2.1	14.365049

2.2	14.398052

2.3	14.474021

2.4	14.591614

2.5	14.742763

2.6	14.9235

2.7	15.129572

2.8	15.357227

2.9	15.602997

3	15.862788

3.50	17.287941

3.60	17.573934

3.70	17.855594

3.80	18.140095

3.90	18.405467

4.00	18.656429

4.10	18.890439

4.20	19.104805

4.30	19.292282

4.40	19.469859

4.50	19.610490

4.60	19.735993

4.70	19.833550

4.80	19.900050

4.90	19.954559

5.00	19.963729

5.10	19.957999

5.20	19.925935

5.30	19.868696

5.40	19.801517

5.50	19.715963

5.60	19.615366

5.70	19.500297

5.80	19.365839

5.90	19.232809

6.00	19.090353

6.10	18.946200

6.20	18.791215

6.30	18.634666

6.40	18.475522

6.50	18.316987

7	17.487445

7.5	16.701186

8	15.98343

8.5	15.344288

9	14.783038

9.5	14.3082

10	13.883213

10.5	13.531909

11	13.238913

11.5	12.998604

12	12.8067

12.1	12.773872

12.2	12.742696

12.3	12.713134

12.4	12.685262

12.5	12.659042

12.6	12.634808

12.7	12.611924

12.8	12.590629

12.9	12.570895

13	12.552364

13.1	12.535941

13.2	12.520809

13.3	12.507095

13.4	12.494847

13.5	12.48396

13.6	12.474533

13.7	12.466615

13.8	12.45999

13.9	12.454729

14	12.450816

14.1	12.448237

14.2	12.446967

14.3	12.447021

14.4	12.448354

14.5	12.450964

14.6	12.454838

14.7	12.459959

14.8	12.466318

14.9	12.473935

15	12.482721

15.5	12.544725

16	12.635621

16.5	12.75475

17	12.901153

17.5	13.074184

18	13.273662

18.5	13.49915

19	13.750564

19.5	14.027806

20	14.330943

20.5	14.660108

21	15.015488

21.5	15.397395

22	15.806168

22.5	16.242198

23	16.705973

23.5	17.197991

24	17.718779

24.5	18.26899

25	18.849238

[color=mycolor10, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	63.320158

1	22.259648

1.1	20.009415

1.2	18.356015

1.3	17.123581

1.4	16.204029

1.5	15.512037

1.6	14.996724

1.7	14.627379

1.8	14.367606

1.9	14.198178

2	14.107089

2.1	14.081927

2.2	14.106738

2.3	14.176341

2.4	14.283998

2.5	14.424016

2.6	14.591515

2.7	14.78213

2.8	14.991961

2.9	15.217504

3	15.454634

3.50	16.713624

3.60	16.968241

3.70	17.205568

3.80	17.430570

3.90	17.640704

4.00	17.833068

4.10	18.000810

4.20	18.154310

4.30	18.277608

4.40	18.389952

4.50	18.467910

4.60	18.503648

4.70	18.547690

4.80	18.555936

4.90	18.534171

5.00	18.491239

5.10	18.429030

5.20	18.350772

5.30	18.256118

5.40	18.142606

5.50	18.019244

5.60	17.895158

5.70	17.755456

5.80	17.608777

5.90	17.456885

6.00	17.299988

6.10	17.140204

6.20	16.982539

6.30	16.814823

6.40	16.671649

6.50	16.502149

7	15.691529

7.5	14.954635

8	14.295301

8.5	13.717941

9	13.223895

9.5	12.789924

10	12.427765

10.5	12.12513

11	11.876123

11.5	11.675653

12	11.520039

12.1	11.493701

12.2	11.469083

12.3	11.445975

12.4	11.424599

12.5	11.403441

12.6	11.384888

12.7	11.367857

12.8	11.353382

12.9	11.338254

13	11.326982

13.1	11.314061

13.2	11.305771

13.3	11.297194

13.4	11.289941

13.5	11.284014

13.6	11.279409

13.7	11.276075

13.8	11.274004

13.9	11.273198

14	11.273632

14.1	11.275292

14.2	11.278573

14.3	11.282472

14.4	11.287659

14.5	11.293976

14.6	11.301613

14.7	11.310486

14.8	11.320218

14.9	11.331398

15	11.343595

15.5	11.421181

16	11.525714

16.5	11.656564

17	11.81295

17.5	11.994527

18	12.200795

18.5	12.43211

19	12.687893

19.5	12.968349

20	13.27359

20.5	13.603841

21	13.959334

21.5	14.340435

22	14.747555

22.5	15.18112

23	15.641645

23.5	16.129678

24	16.645805

24.5	17.190676

25	17.764958

[color=mycolor11, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	62.052352

1	21.819026

1.1	19.621429

1.2	18.000892

1.3	16.793669

1.4	15.884369

1.5	15.206329

1.6	14.701638

1.7	14.339201

1.8	14.083832

1.9	13.917399

2	13.824233

2.1	13.791825

2.2	13.81026

2.3	13.871383

2.4	13.968452

2.5	14.095714

2.6	14.248144

2.7	14.421895

2.8	14.610761

2.9	14.812853

3	15.026221

3.50	16.117399

3.60	16.317805

3.70	16.505098

3.80	16.675955

3.90	16.825941

4.00	16.965876

4.10	17.068328

4.20	17.166747

4.30	17.230447

4.40	17.277712

4.50	17.291781

4.60	17.284582

4.70	17.251562

4.80	17.203450

4.90	17.134863

5.00	17.048453

5.10	16.948236

5.20	16.835577

5.30	16.710670

5.40	16.576470

5.50	16.433181

5.60	16.283980

5.70	16.130378

5.80	15.973019

5.90	15.813505

6.00	15.651482

6.10	15.488254

6.20	15.335203

6.30	15.170987

6.40	15.009092

6.50	14.849577

6.60	14.692446

6.70	14.537931

6.80	14.386069

6.90	14.237306

7.00	14.080912

7.10	13.948364

7.20	13.808061

7.30	13.672007

7.40	13.538715

7.50	13.408690

8	12.809313

8.5	12.291023

9	11.859292

9.5	11.470541

10	11.155638

10.5	10.896464

11	10.68638

11.5	10.520958

12	10.396259

12.1	10.375782

12.2	10.357018

12.3	10.339198

12.4	10.323269

12.5	10.307702

12.6	10.29421

12.7	10.282036

12.8	10.27294

12.9	10.263648

13	10.255654

13.1	10.24894

13.2	10.243476

13.3	10.239268

13.4	10.236278

13.5	10.235037

13.6	10.234122

13.7	10.234548

13.8	10.236231

13.9	10.239353

14	10.24363

14.1	10.248683

14.2	10.255093

14.3	10.262589

14.4	10.271082

14.5	10.28077

14.6	10.291449

14.7	10.303361

14.8	10.316098

14.9	10.330196

15	10.345189

15.5	10.435805

16	10.551368

16.5	10.691911

17	10.856157

17.5	11.044369

18	11.256102

18.5	11.491404

19	11.750227

19.5	12.032688

20	12.338951

20.5	12.669323

21	13.024113

21.5	13.403691

22	13.808522

22.5	14.239088

23	14.695939

23.5	15.179647

24	15.69084

24.5	16.230178

25	16.798378

[color=mycolor12, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	60.805812

1	21.392965

1.1	19.236209

1.2	17.649217

1.3	16.46675

1.4	15.573996

1.5	14.907865

1.6	14.412862

1.7	14.051833

1.8	13.798069

1.9	13.630862

2	13.534555

2.1	13.496632

2.2	13.507394

2.3	13.558634

2.4	13.643497

2.5	13.75595

2.6	13.892492

2.7	14.044228

2.8	14.210135

2.9	14.391502

3	14.576121

3.50	15.477798

3.60	15.628805

3.70	15.766347

3.80	15.882438

3.90	15.972115

4.00	16.059906

4.10	16.117042

4.20	16.146740

4.30	16.151246

4.40	16.138771

4.50	16.103791

4.60	16.048420

4.70	15.975946

4.80	15.888280

4.90	15.781365

5.00	15.665442

5.10	15.537267

5.20	15.398561

5.30	15.254124

5.40	15.103986

5.50	14.949665

5.60	14.792303

5.70	14.632949

5.80	14.480510

5.90	14.322568

6.00	14.151710

6.10	13.997299

6.20	13.838140

6.30	13.681615

6.40	13.525703

6.50	13.376394

6.60	13.229226

6.70	13.081631

6.80	12.942133

6.90	12.803210

7.00	12.668646

7.5	12.041079

8	11.499076

8.5	11.035654

9	10.643162

9.5	10.314333

10	10.042208

10.5	9.820824

11	9.644667

11.5	9.49749

12	9.410769

12.1	9.395067

12.2	9.380763

12.3	9.369714

12.4	9.358302

12.5	9.348193

12.6	9.339337

12.7	9.331714

12.8	9.325809

12.9	9.320261

13	9.316069

13.1	9.313586

13.2	9.311938

13.3	9.311265

13.4	9.311659

13.5	9.313695

13.6	9.316405

13.7	9.320473

13.8	9.325571

13.9	9.33165

14	9.33885

14.1	9.347061

14.2	9.35642

14.3	9.366772

14.4	9.378156

14.5	9.390484

14.6	9.403876

14.7	9.418251

14.8	9.433606

14.9	9.449949

15	9.466057

15.5	9.568424

16	9.693211

16.5	9.841039

17	10.011902

17.5	10.205123

18	10.420857

18.5	10.659044

19	10.919812

19.5	11.203265

20	11.509741

20.5	11.839499

21	12.192906

21.5	12.570403

22	12.972486

22.5	13.39968

23	13.852542

23.5	14.331702

24	14.837792

24.5	15.371512

25	15.933576

[color=mycolor13, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	59.564106

1	20.965491

1.1	18.853339

1.2	17.296746

1.3	16.135085

1.4	15.262693

1.5	14.607699

1.6	14.119801

1.7	13.762704

1.8	13.50972

1.9	13.340801

2	13.240045

2.1	13.195582

2.2	13.19736

2.3	13.237233

2.4	13.308264

2.5	13.404354

2.6	13.520036

2.7	13.65495

2.8	13.796539

2.9	13.947769

3.00	14.095311

3.10	14.261054

3.20	14.411280

3.30	14.554080

3.40	14.685812

3.50	14.801989

3.60	14.906411

3.70	14.984647

3.80	15.063143

3.90	15.102736

4.00	15.128965

4.10	15.131609

4.20	15.111629

4.30	15.071618

4.40	15.013025

4.50	14.937581

4.60	14.842327

4.70	14.734838

4.80	14.615417

4.90	14.485784

5.00	14.348769

5.10	14.202880

5.20	14.052477

5.30	13.898087

5.40	13.741486

5.50	13.583448

5.60	13.441444

5.70	13.274648

5.80	13.111669

5.90	12.952096

6.00	12.797939

6.10	12.644612

6.20	12.494571

6.30	12.345902

6.40	12.192299

6.50	12.059751

7	11.402728

7.5	10.832282

8	10.343938

8.5	9.931874

9	9.585925

9.5	9.297861

10	9.064422

10.5	8.877075

11	8.729999

11.5	8.621353

12	8.546829

12.1	8.535611

12.2	8.525892

12.3	8.517644

12.4	8.510162

12.5	8.50394

12.6	8.498899

12.7	8.494828

12.8	8.491967

12.9	8.490296

13	8.489727

13.1	8.490275

13.2	8.491866

13.3	8.49453

13.4	8.498245

13.5	8.503

13.6	8.508782

13.7	8.515571

13.8	8.523381

13.9	8.532169

14	8.542066

14.1	8.552755

14.2	8.564512

14.3	8.575425

14.4	8.590859

14.5	8.605525

14.6	8.620942

14.7	8.637534

14.8	8.654953

14.9	8.673292

15	8.692546

15.5	8.802423

16	8.934242

16.5	9.088681

17	9.264203

17.5	9.461279

18	9.679851

18.5	9.919972

19	10.181772

19.5	10.465499

20	10.771452

20.5	11.099992

21	11.451536

21.5	11.82655

22	12.225544

22.5	12.649071

23	13.097767

23.5	13.572231

24	14.073033

24.5	14.601223

25	15.157155

[color=mycolor14, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	58.370746

1	20.545605

1.1	18.475033

1.2	16.948485

1.3	15.806107

1.4	14.951382

1.5	14.306734

1.6	13.822444

1.7	13.470872

1.8	13.217772

1.9	13.045895

2	12.938454

2.1	12.887446

2.2	12.878809

2.3	12.905654

2.4	12.960811

2.5	13.039291

2.6	13.137248

2.7	13.248547

2.8	13.358051

2.9	13.489866

3.00	13.612041

3.10	13.730701

3.20	13.841792

3.30	13.941180

3.40	14.034917

3.50	14.100820

3.60	14.160777

3.70	14.198660

3.80	14.215517

3.90	14.212599

4.00	14.189716

4.10	14.149067

4.20	14.082693

4.30	14.003414

4.40	13.908674

4.50	13.799716

4.60	13.679863

4.70	13.552140

4.80	13.413323

4.90	13.264506

5.00	13.115855

5.10	12.961621

5.20	12.805558

5.30	12.648544

5.40	12.508647

5.50	12.343335

5.60	12.181369

5.70	12.024134

5.80	11.870114

5.90	11.722273

6.00	11.574318

6.10	11.428408

6.20	11.285214

6.30	11.149628

6.40	11.014906

6.50	10.883427

7	10.277687

7.5	9.75528

8	9.325185

8.5	8.959332

9	8.654917

9.5	8.405341

10	8.204778

10.5	8.045356

11	7.924659

11.5	7.839361

12	7.784504

12.1	7.777138

12.2	7.770901

12.3	7.765957

12.4	7.761983

12.5	7.758736

12.6	7.75727

12.7	7.756515

12.8	7.756801

12.9	7.758124

13	7.76044

13.1	7.763979

13.2	7.767979

13.3	7.773591

13.4	7.779758

13.5	7.787045

13.6	7.795349

13.7	7.802064

13.8	7.814653

13.9	7.825725

14	7.837541

14.1	7.850575

14.2	7.864341

14.3	7.87904

14.4	7.894627

14.5	7.911137

14.6	7.928499

14.7	7.952407

14.8	7.965856

14.9	7.985849

15	8.006645

15.5	8.123088

16	8.261697

16.5	8.420497

17	8.599833

17.5	8.799748

18	9.020249

18.5	9.261463

19	9.52361

19.5	9.806978

20	10.111895

20.5	10.438776

21	10.788064

21.5	11.160263

22	11.555966

22.5	11.975728

23	12.420044

23.5	12.889755

24	13.385473

24.5	13.907933

25	14.457909

[color=mycolor15, line width=1.2pt, forget plot]
table[row sep=crcr]
0.5	57.184928

1	20.128686

1.1	18.098686

1.2	16.601222

1.3	15.481974

1.4	14.638852

1.5	14.004138

1.6	13.527129

1.7	13.175706

1.8	12.921571

1.9	12.745628

2	12.63386

2.1	12.571289

2.2	12.550631

2.3	12.562542

2.4	12.603894

2.5	12.661163

2.6	12.74112

2.7	12.825747

2.8	12.915619

2.9	13.006631

3.00	13.094999

3.10	13.177774

3.20	13.247462

3.30	13.309605

3.40	13.355041

3.50	13.384782

3.60	13.393667

3.70	13.385082

3.80	13.359046

3.90	13.313448

4.00	13.254728

4.10	13.168577

4.20	13.069780

4.30	12.964913

4.40	12.844663

4.50	12.718769

4.60	12.575984

4.70	12.431603

4.80	12.281552

4.90	12.128022

5.00	11.973114

5.10	11.817135

5.20	11.679534

5.30	11.514368

5.40	11.349512

5.50	11.198609

5.60	11.046014

5.70	10.901989

5.80	10.756601

5.90	10.614042

6.00	10.475218

6.10	10.339598

6.20	10.207549

6.30	10.078593

6.40	9.953775

6.50	9.832110

7	9.279947

7.5	8.815246

8	8.440797

8.5	8.100535

9	7.832605

9.5	7.617143

10	7.444855

10.5	7.311821

11	7.214165

11.5	7.14805

12	7.110932

12.1	7.106775

12.2	7.103674

12.3	7.101599

12.4	7.100552

12.45	7.100007

12.5	7.100512

12.6	7.101118

12.7	7.103692

12.8	7.10631

12.9	7.110049

13	7.114999

13.1	7.117444

13.2	7.127448

13.3	7.13506

13.4	7.143412

13.5	7.152597

13.6	7.163312

13.7	7.174611

13.8	7.186603

13.9	7.199509

14	7.213238

14.1	7.226914

14.2	7.243423

14.3	7.25977

14.4	7.276914

14.5	7.294946

14.6	7.313787

14.7	7.333284

14.8	7.353648

14.9	7.374786

15	7.39674

15.5	7.520283

16	7.663024

16.5	7.825495

17	8.007684

17.5	8.209547

18	8.4312

18.5	8.672865

19	8.934984

19.5	9.217271

20	9.520765

20.5	9.845617

21	10.192414

21.5	10.561605

22	10.953705

22.5	11.369556

23.5	12.274497

24	12.765046

24.5	13.282007

25	13.826086

[only marks, mark=*, mark options=, mark size=1.75pt, color=red, fill=red, forget plot] table[row sep=crcr]
x	y

2.1	16.63943

2.1	16.346761

2.1	16.059003

2.1	15.774834

2.1	15.492629

2.1	15.211685

2.1	14.93239

14.5	13.776769

14.2	12.446967

13.9	11.273198

13.6	10.234122

13.3	9.311265

13	8.489727

12.7	7.756515

12.45	7.100007

[->,color=red, line width=1.4pt, forget plot]
table[row sep=crcr]
2.1	25.00

2.1	16.63943

2.1	16.346761

2.1	16.059003

2.1	15.774834

2.1	15.492629

2.1	15.211685

2.1	14.93239

14.5	13.776769

14.2	12.446967

13.9	11.273198

13.6	10.234122

13.3	9.311265

13	8.489727

12.7	7.756515

12.45	7.100007

11.95 	5.97

11.7		5.49

11.4		5.07

[->,color=red, line width=1.4pt, forget plot]
table[row sep=crcr]
2.1	25.00

2.1	20.00

[->,color=red, line width=1.4pt, forget plot]
table[row sep=crcr]
2.1	14.93239

8.3	14.35

at (14.5,3.5) $\dhat=.22$;
at (14.5,5.9) $\dhat=.15$;

[->,>=stealth,line width=.9pt] (13.8,5.7) – (13.8,3.7);

Marginally stable flow configurations and temperature profiles (color) for (a) $\dhat=.18$ and (b) $\dhat=.19$, with $\sqrt{\Da} = 5.0\times 10^{-3},\, \Prm =.7,\,\epsilon_T=.7,\,\alpha=1.0$ fixed. (c) Marginal stability curves while varying $\dhat$ from $\dhat=.15$ to $\dhat=.22$ by increments of 0.05 with the respective critical Rayleigh numbers $\Ramcu$ shown in red. As $\dhat$ crosses the critical depth ratio of $\dhatc=.181$ for this parameter regime, the most unstable wavenumber jumps from $a_m\approx 2.1$ to $a_m\approx 14.5$. This signifies a sudden transition from deep to shallow convection (at the onset of convection) as $\dhat$ increases from $\dhat<\dhatc \rightarrow \dhat > \dhatc$.

This observation spurred [McCurdy et al., 2019] to develop a simple model to predict the critical depth ratio $\dhatc$ that distinguishes shallow convection from deep convection.
A brief outline of this model is as follows.
First, due to the dimensionless definitions, the depth ratio can be expressed as the following combination of the other parameters:

\begin{equation}
\label{dhateq}
\hat{d} = \left[\dfrac{\Raf\,\Da\,\epsilon_T^2}{\Ram}\right]^{1/4}\,.
\end{equation}

Of particular importance is the appearance of the two Raleigh numbers, $\Raf$ and $\Ram$.
If the Rayleigh number exceeds its critical value in the fluid region, $\Raf > \Rafcu$, but remains below the critical value in the porous medium, $\Ram < \Ramcu$, then only shallow convection cells would be expected to form.
On the other hand, if the Rayleigh number exceeds the critical value in both regions, then convection cells can penetrate deeper into the porous domain.
Hence, the transition between shallow and deep convection should occur when both Rayleigh numbers, $\Raf$ and $\Ram$, become critical simultaneously.
In reality, the critical values, $\Rafcu$ and $\Ramcu$, are coupled to one another through the flow details at the interface.
However, [McCurdy et al., 2019] showed that useful estimates could be obtained by treating the fluid and porous regions as uncoupled for the sake of calculating $\Rafcu$ and $\Ramcu$, and then inputting these values into (<ref>) to estimate the critical depth ratio $\dhatc$ that defines the transition between shallow and deep convection:

\begin{align}
\dhatc = \left[\dfrac{\Rafcu}{\Ramcu}\,\Da\,\epsilon_T^2\right]^{1/4}\,.
\end{align}

In particular, [McCurdy et al., 2019] assumed no-slip and no-penetration conditions along the boundaries of the fluid domain and no-penetration conditions along the boundaries of the porous medium. These assumptions yield  $\Rafcu=1707.8$ and $\Ramcu = 4\pi^2\approx 39.5$, which gives

\begin{align}
\dhatc = \left[\dfrac{1707.8}{39.5}\,\Da\,\epsilon_T^2\right]^{1/4}\,.
\end{align}

This formula was shown to predict the actual critical depth ratio to within a relative error of 13–17$\%$ for the cases tested by  [McCurdy et al., 2019].
This level of accuracy, while not exceptional, is promising considering that the formula neglects any kind of coupling between the two regions.

Here, we further refine this model by introducing asymptotically weak coupling at the interface <cit.>.
As demonstrated below, the new model yields improved estimates for $\dhatc$, with relative errors on the order of 0–4% for sufficiently small $\Da$.
We first asymptotically expand both velocity fields, i.e. inside the fluid and the medium regions, in small $\Da:=\varepsilon^2$:

\begin{equation}
\vuj^{\varepsilon} = \vuj^{(0)} + \varepsilon\, \vuj^{(1)} + \varepsilon^2 \,\vuj^{(2)} +\hdots,\quad \textrm{for }j\in\{f,m\}\,,
\end{equation}

If $\Da=0$, the Darcy system (<ref>) is degenerate, giving a porous-medium velocity that vanishes throughout the domain, $\vump^{(0)} \equiv 0$.
Therefore, interface condition (<ref>) gives $\vufp^{(0)}\bcdot\boldsymbol{n}=0$ at leading order.
Meanwhile, the leading-order equation of the BJSJ condition (<ref>) gives $\vufp^{(0)}\bcdot\boldsymbol{\tau}=0$. Thus, both components of the fluid-velocity $\vufp^{(0)}$ vanish at the interface to leading order in $\varepsilon$, and so the no-slip and no-penetration interface conditions assumed by [McCurdy et al., 2019] are valid to leading-order in the fluid domain. We therefore continue to use the corresponding value $\Rafcu=1707.8$ in the new model.

Approaching the interface from the porous-medium side, though, the condition for an impenetrable boundary, $\vump\bcdot \boldsymbol{n}=0$, is not recovered as the leading-order non-trivial dynamics in small Darcy number. In the improved model, we instead view the top of the porous domain as an open boundary, along which the pressure is uniform <cit.>. Due to Darcy's law (<ref>), the condition of constant pressure along a horizontal interface implies that the tangential velocity vanishes $\vump\times \boldsymbol{n}=0$, which produces a critical value of $\Ramcu= 27.1$ at the porous wavenumber of $a_{m,1}^*=2.3$ for the uncoupled porous medium  <cit.>. Although we have been so far unable to rigorously justify the use of this condition from first principles, we observe that, in practice, it yields significantly improved estimates for $\Ramcu$ and $a_{m,1}^*$ as $\Da \to 0$. Table <ref> demonstrates this idea by showing the true critical values $\Ramcu$ for the coupled system and their critical wavenumbers as calculated numerically by the linear stability analysis, for a range of Darcy numbers and three values of $\epsilon_T$. The table shows that as $\Da \to 0$, $\Ramcu$ is well approximated by 27.1 in each case, with relative errors on the order of 1-2%.

2c|$\epsilon_T=0.5$      2c|$\epsilon_T=0.7$                       2c$\epsilon_T=1.0$

$\sqrt{\Da}$      $a_{m,1}^*$     $\Ramcu$     $a_{m,1}^*$     $\Ramcu$     $a_{m,1}^*$     $\Ramcu$

$1.0\times 10^{-2}$       $2.1$     $11.04$     $2.1$     $11.66$     $2.1$     $12.34$

$5.0\times 10^{-3}$       $2.1$     $14.05$     $2.1$     $14.85$     $2.1$     $15.72$

$2.5\times 10^{-3}$       $2.1$     $16.75$     $2.1$     $17.60$     $2.1$     $18.50$

$1.0\times 10^{-3}$       $2.1$     $19.76$     $2.2$     $20.50$     $2.2$     $21.28$

$5.0\times 10^{-4}$       $2.2$     $21.55$     $2.2$     $22.20$     $2.2$     $22.83$

$2.5\times 10^{-4}$       $2.2$     $22.98$     $2.2$     $23.49$     $2.2$     $24.00$

$1.0\times 10^{-4}$       $2.3$     $24.37$     $2.3$     $24.74$     $2.3$     $25.09$

$1.0\times 10^{-5}$       $2.3$     $26.82$      $2.3$     $26.78$      $2.3$     $26.72$

Critical Rayleigh numbers $\Ramc$ and their critical wavenumbers $a_{m,1}^*$ at respective $\dhatc$ values with $\epsilon_T=\{0.5, 0.7,1.0\}$ and Darcy numbers $\Da\to 0$.

$\epsilon_T=.5$         $\epsilon_T=.7$         $\epsilon_T=1.0$

$\sqrt{\Da}$     1c|$e_{rel}$     1c|$e_{rel}$      1c$e_{rel}$

$1.0\times 10^{-2}$            $13.00\%$   	$11.71\%$   	$10.36\%$

$5.0\times 10^{-3}$     	$9.52\%$   	$7.91\%$   	$6.55\%$

$2.5\times 10^{-3}$    	$6.73\%$   	$5.33\%$   	$3.84\%$

$1.0\times 10^{-3}$    	$3.89\%$   	$2.68\%$   	$1.32\%$

$5.0\times 10^{-4}$    	$2.33\%$   	$1.20\%$   	$0.004\%$

$2.5\times 10^{-4}$    	$1.10\%$   	$0.10\%$   	$0.96\%$

$1.0\times 10^{-4}$    	$0.06\%$   	$0.91\%$   	$1.84\%$

Relative errors– calculated with (<ref>)– between predicted $\dhatc$ values and values found using the linear stability analysis with $\epsilon_T=\{0.5, 0.7,1.0\}$ and Darcy numbers $\Da\to 0$.

With these new critical Rayleigh numbers, we obtain the more accurate coarse-grained model for predicting the critical depth ratio:

\begin{align}
\dhatc = \left[ \dfrac{1707.8}{27.1}\, \Da\,\epsilon_T^2 \right]^{1/4}\,. \label{eq:better}\end{align}

As we show below, the results produced with this model become increasingly accurate in the small Darcy limit, which is reasonable given that our intuition in choosing boundary conditions came from the small Darcy limit.

Figure <ref> shows data for three different $\epsilon_T$ values while varying $\Da$, since our formula is a function of these two variables. As $\Da\to0,$ the critical depth ratio $\dhatc$ goes to zero as well.
We plot the critical depth ratios found with two methods– the first predicted from the heuristic theory, compared to the second obtained from the marginal stability results from [McCurdy et al., 2019].
To show that our model predicts $\dhatc$ going to zero at the same rate as the actual values found using the linear stability analysis $\dhatc_{LSA}$, we plot the data $\Da$ vs. $\dhatc$ with a log-log plot along with a reference triangle to illustrate the slope of $1/4.$

To quantify the error of our predicted $\dhatc$ values, we define the relative error between the predicted $\dhatc$ values from (<ref>), $\dhatc_{Thry}$, and values found using the linear stability analysis, $\dhatc_{LSA}$, with
\begin{align}
e_{rel} = \frac{\left|\dhatc_{LSA}-\dhatc_{Thry} \right|}{\dhatc_{LSA}} \label{eq:relErrorForm}\,.
\end{align}

The relative errors are noted in table <ref>. For $\Da=1.0\times10^{-4}$ values, the model has about 10% relative error, while the relative error drops to less than 2% when $\Da=1.0\times10^{-8}.$
The worst relative error with our new formula outperforms the best relative error of the formula presented in [McCurdy et al., 2019].

scale only axis,
title =$\Da$ vs. $\dhatc$,
xlabel=Darcy number, $\Da$,
ylabel= Critical depth ratio, $\dhatc$,
extra y ticks=10^(-.5),10^(-1.5),
legend style=at=(1.3,.75),
anchor=north,legend columns=1
[firstColor, line width=1pt]
((1.0e-02)^2, 0.199228714051074)
((1.0e-04)^2, 0.0199228714051074)
[secondColor, line width=1pt]
((1.0e-02)^2, 0.235730593482099)
((1.0e-04)^2, 0.0235730593482099)
[thirdColor, line width=1pt]
((1.0e-02)^2, 0.281751949425180)
((1.0e-04)^2, 0.0281751949425180)
combo legend

[black, line width=1pt]
((1.0e-02)^2, 0.199228714051074)
((1.0e-04)^2, 0.0199228714051074)

[firstColor, line width=1pt]
((1.0e-02)^2, 0.199228714051074)
((1.0e-04)^2, 0.0199228714051074)

only marks,
scatter/use mapped color = draw=black, fill=black,black]
((1.0e-02)^2, .229)
((5.0e-03)^2, .1557)
((2.5e-03)^2, .1068)
((1.0e-03)^2, .06555)
((5.0e-04)^2, .04561)
((2.5e-04)^2, .03185)
((1.0e-04)^2, .01991)

only marks,
scatter/use mapped color = draw=firstColor, fill=firstColor,firstColor]
((1.0e-02)^2, .229)
((5.0e-03)^2, .1557)
((2.5e-03)^2, .1068)
((1.0e-03)^2, .06555)
((5.0e-04)^2, .04561)
((2.5e-04)^2, .03185)
((1.0e-04)^2, .01991)
only marks,
scatter/use mapped color = draw=secondColor, fill=secondColor, secondColor]
((1.0e-02)^2, .267)
((5.0e-03)^2, .181)
((2.5e-03)^2, .1245)
((1.0e-03)^2, .0766)
((5.0e-04)^2, .05335)
((2.5e-04)^2, .03731)
((1.0e-04)^2, .02336)
only marks,
scatter/use mapped color = draw=thirdColor, fill=thirdColor, thirdColor]
((1.0e-02)^2, .3143)
((5.0e-03)^2, .2132)
((2.5e-03)^2, .1465)
((1.0e-03)^2, .09029)
((5.0e-04)^2, .063004)
((2.5e-04)^2, .044125)
((1.0e-04)^2, .027666)
[black, line width=1pt]
(3.16228e-07, 0.0316227766)
(0.0000316228, 0.0316227766)
(0.0000316228, 0.1)
(3.16228e-07, 0.0316227766)
[black, line width=1pt] coordinates (3.16228e-07, 0.0316227766) (0.0000316228, 0.0316227766)
node[below, pos = .5] 4;
[black, line width=1pt] coordinates (0.0000316228, 0.0316227766) (0.0000316228, 0.1)
node[right, pos = .5] 1;

at(5.53,1.6)  <ref>     Marginal Stability
<ref>    Theory ;

Critical depth ratios for various $\epsilon_T$ (ratio of thermal diffusivities) values, $\epsilon_T=0.5, 0.7, 1.0$. The solid lines represent the predicted $\hat{d}^*$ values from our theory (<ref>), and the circles are the $\hat{d}^*$ values calculated from the marginal stability curves determined by [McCurdy et al., 2019].

This coarse-grained model allows us to accurately predict the depth ratio that triggers a shift between deep and shallow convection.
In applications with technology, being able to harness convection in this manner could have considerable impact with the design of heat sinks.
By selecting physical properties of the porous medium, a suitable depth ratio could be chosen to obtain the desired flow configuration to prevent overheating and enhance circulation.
Rather than conduct costly experiments to determine a depth ratio that yields the intended results, our formula provides a reference for an appropriate range of $\dhat$ values needed for deep or shallow convection.

This bifurcation from shallow to deep convection is highlighted in several works, using linear stability or numerical simulations to show the deep versus shallow convection profiles. Finding the critical depth ratio with either of these methods– linear stability and numerical simulations– can be computationally-expensive and time-consuming. Our model allows us to accurately predict a range of depth ratios where this shift in convection occurs, each of which are in good agreement with the critical depth ratios found by previous researchers. For example, with the same governing equations we consider, <cit.> showed via linear stability that a transition occurred between depth ratios of $\dhat = 0.12$ and $\dhat=0.13$ using the fixed parameters $\sqrt{Da}=0.003,\,\epsilon_T=0.7$. Substituting these values into <ref> allows our model to predict that a transition occurs at the depth ratio of

\begin{align*}
\dhatc = \left[ \dfrac{1707.8}{27.1}\, \left(0.003\right)^2\,\left(0.7\right)^2 \right]^{1/4}\approx 0.1291\,,\end{align*}
agreeing well with the work conducted by Chen & Chen. The recent work by <cit.> presented an example where the convection profiles shifted from shallow to deep convection as the depth ratio was altered from $\dhat=0.16$ to $\dhat=0.17$, found via numerics and their center manifold theory (see figure 5.2 of [Han et al., 2020]). With the values of $\Da=25\times 10^{-6}$ and $\epsilon_T=0.7$ from this example in their work, we predict a critical depth ratio of $\dhatc \approx \,0.1667\,,$ which falls in the range Han et. al determined. The formula we developed greatly reduces the computational time needed to determine where the shallow to deep transition occurs. Using our coarse-grained model bypasses the necessity of searching through large parameter spaces while solving stability problems or conducting numerical simulations, as it quickly narrows the parameter regime where the transition occurs, especially for small Darcy numbers. In Appendix <ref>, we present data showing good agreement between true critical depth ratios and those predicted from our model. Additionally, we show that our formula (<ref>) can be used to predict how altering the ratio of thermal diffusivities $\epsilon_T$ or the Darcy number $\Da$ can trigger a shift in convection.

Although each of the papers noted above use 2D simulations or experiments in their work, our model can also be used in 3D settings as well. Since our theory comes from the stability of the uncoupled systems under the assumption of infinite horizontal plates, both the 2D and 3D problems reduce to one spatial dimension– the vertical direction. As such, our model can be applied to both 2D and 3D systems, albeit with some error since the assumption of infinite horizontal plates cannot be satisfied in physical settings or numerical simulations.

The main limitation of our coarse-grained model is that the results are confined to the onset of convection, where Raleigh numbers are close to their critical counterparts.
To develop a more comprehensive understanding of this phenomenon over a more broad parameter regime, we turn to numerical simulations of the full, nonlinear system.

§ NUMERICAL SCHEME

The stability analyses and coarse-grained model can predict flow configurations near the onset of convection, but numerical simulations are needed to examine dynamics outside of this regime.
In this section, we present a numerical scheme to simulate convection in the superposed fluid-porous medium system using a FEM.
The main advantage to this scheme is that, by lagging the nonlinear terms and the terms associated with interface conditions, we produce a set of linear, sequentially decoupled equations.
A similar scheme was studied by <cit.> with the Cahn-Hilliard-Navier-Stokes-Darcy-Boussinesq system– or, the same system we study with the inclusion of a phase-field function using the Cahn-Hilliard equations.
Using a numerical method related to that of <cit.> is beneficial since the method is unconditionally long-time stable.
We outline the scheme below, and note the time-lagged terms as they are shown.
Next, we detail how the variational forms are obtained, using the following notation for vector-valued functions $\vecf$ and $\vecg$ and matrix-valued functions $\matA$ and $\matB$:

\begin{align*}
\left(\vecf, \vecg \right)_j = \int_{\Omega_j}\vecf\bcdot \vecg\,d\Omega_j\, , \hspace{.15in}\langle\matA, \matB \rangle_j = \int_{\Omega_j}\matA\,\colon\matB\,d\Omega_j\, , \hspace{.15in} \|\vecf\,\|_j^2=(\vecf,\vecf\,)_j\, , \hspace{.15in} |\vecf\,|^2 = \vecf\bcdot \vecf\, ,
\end{align*}

for domains $j \in \{f,m\}$ where the $f$ and $m$ subscripts correspond to the fluid and porous medium regions, respectively.

We introduce the following FE spaces:

* $W_f = \{ \wuf \in \left[H^1\left(\Omega_f \right)\right]^2: \wuf \bcdot \boldsymbol{n} =0 \textrm{ at top $+$ periodic on left and right} \}\,$,

* $Q_f = \{ q_f \in L^2\left(\Omega_f \right): \int_{\Omega_f} q_f\,d\boldsymbol{x}=0 \}=L^2_0\left( \Omega_f\right)\,$,

* $Q_m = \{ q_m \in L^2\left(\Omega_m \right): \int_{\Omega_m} q_m\,d\boldsymbol{x}=0 \}=L^2_0\left( \Omega_m\right)\,$,

* $\Psi = \{ \psi \in H^1\left(\Omega \right): \psi =0 \textrm{ at top and bottom $+$ periodic on left and right} \}\,$.

The space $\Psi$ spans the entire domain and is reserved for the temperature field over $\Omega$, since the advection-diffusion equation (ADE) for heat can be written as one equation over the entirety of the domain.
Instead of solving two problems for $\theta_f$ and $\theta_m,$ we solve only one for

\begin{equation}
\theta = \left\{
\begin{array}{ll}
\theta_f &\textrm{for } \boldsymbol{x}\in\Omega_f\,, \\[2pt]
\theta_m & \textrm{for }\boldsymbol{x}\in\Omega_m\,.
\end{array} \right.
\end{equation}

With superscripts denoting the time iteration, we present the variational problems corresponding to the system  (<ref>)–(<ref>).

First, given $\left(\vufp^{(n)},\vufp^{(n-1)}, \theta_m^{(n)}\right)$, we find the perturbed pressure in the porous medium $\pi_m^{(n+1)}\in Q_m$ with

\begin{align}
&\Da\left(\bnabla \pi_m^{(n+1)}, \bnabla q_m\right)_m -\Ram\, \left(\theta_m^{(n)}\boldsymbol{k}, \bnabla q_m\right)_m \nonumber  \\[5pt]
&\quad +\int_{\Gamma_i}\left[ \dfrac{\Da}{\Prm\, \chi }\,\dfrac{\vufp^{(n)}-\vufp^{(n-1)}}{\Delta t} + \vufp^{(n)} \right] \bcdot \boldsymbol{n}\, q_m \,d\Gamma_i=0\quad \forall q_m\in Q_m\,.\label{eqn:variDarcy}
\end{align}

To begin decoupling the problems, we use the previous $\vufp^{(n)}$ values in the integral along the interface.
Our treatment of the interface term, along with the method in which we solve for the Darcy velocity, differ from the method used in <cit.>.
We still observe experimentally that our method is stable, with the time-step restriction of $\Delta t \sim \mathcal{O}(\Da)$ or smaller.
Having solved for $\pi_m^{(n+1)}$, we can use the previous Darcy velocity $\vump^{(n)}$ to find the updated velocity $\vump^{(n+1)}$.
The Darcy equation is

\begin{align*}
\dfrac{\Da}{\Prm\, \chi}\dfrac{\vump^{(n+1)} - \vump^{(n)} }{\Delta t} + \vump^{(n+1)} &=-\Da\bnabla \pi_m^{(n+1)} +\Ram\,\theta_m^{(n)}\,\boldsymbol{k} \, ,
\end{align*}

which we can solve for $\vump^{(n+1)}$ with

\begin{align}
\vump^{(n+1)} &=\left[-\Da\bnabla \pi_m^{(n+1)} +\Ram\,\theta_m^{(n)}\,\boldsymbol{k} + \dfrac{\Da}{\Prm\, \chi\,\Delta t} \vump^{(n)}\right]\left(\dfrac{\Prm\, \chi\,\Delta t}{\Da +\Prm\, \chi\,\Delta t} \right) \, . \label{eqn:updateDarcyVel}
\end{align}

Next, using $\left(\vufp^{(n)},\,\pi_m^{(n+1)},\,\theta_f^{(n)}\right)$–where the previously-found $\pi_m^{(n+1)}$ term is used in an integral along the interface– we find $\left(\vufp^{(n+1)},\,\pi_f^{(n+1)}\right)\in W_f\times Q_f$ by solving

\begin{align}
&\left(\frac{1}{\Prm}\,\dfrac{\vufp^{(n+1)}-\vufp^{(n)}}{\Delta t},\wuf \right)_f+ \mathsfbi{B}_f\left(\vufp^{(n)},\vufp^{(n+1)},\wuf \right)+2 \left<\mathsfbi{D}\left(\vufp^{(n+1)} \right),\mathsfbi{D}\left(\wuf \right) \right>_f \nonumber \\[5pt]
&\quad - \left(\pi_f^{(n+1)},\bnabla \bcdot \wuf \right)_f + \left(\bnabla \bcdot \vufp^{(n+1)}, q_f \right)_f +\dfrac{\Ram}{\Da} \left( \theta_f^{(n)}, \wuf\bcdot \boldsymbol{k} \right)_f +  \int_{\Gamma_i}\pi_m^{(n+1)} \left(\wuf \bcdot \boldsymbol{n} \right) \,d\Gamma_i  \nonumber \\[5pt]
&  \quad+  \int_{\Gamma_i}\dfrac{\alBJSJ}{\sqrt{\Da}}  \left(\vufp^{(n+1)} \bcdot \boldsymbol{\tau} \right)\left(\wuf \bcdot \boldsymbol{\tau} \right) \,d\Gamma_i= 0 \quad \forall \wuf\in W_f,\,q_f\in Q_f\,, \label{eqn:variNS}
\end{align}
where the trilinear term $\mathsfbi{B}_f$ is defined with

\begin{align*}
2\,\mathsfbi{B}_f\left(\vu,\vup, \wu \right) =  \int_{\Omega_f}\left(\vu\bcdot \bnabla \vup \right)\wu - \left(\vu\bcdot \bnabla \wu \right)\vup\,d\Omega_f + \int_{\Gamma_i}\left(\vu\bcdot \wu \right)\left(\vup \bcdot \boldsymbol{n} \right) - \left(\vu\bcdot \vup \right)\left(\wu \bcdot \boldsymbol{n} \right)\,d\Gamma_i\,.
\end{align*}
The first integral of the trilinear term $\mathsfbi{B}_f$ was first used by Temam in the late 1960s <cit.> and has remained a critical tool in approximating solutions to the Navier-Stokes equations since then. The second integral is included to deal with the non-homogeneous boundary value in our application. The skew-symmetric form of the trilinear term $\mathsfbi{B}\left(\vufp^{(n)},\vufp^{(n+1)},\wuf \right)_f$ allows for partial time-lagging of the nonlinear term of Navier-Stokes, which linearizes the problem while still conserving the energy of the system. Treating the nonlinear term in this manner has been used in a number of recent works <cit.>, albeit for an additional reason as well. With the coupled Navier-Stokes-Darcy equations, use of this trilinear form allows for cancellation of the $\frac{1}{2}|\vufp|^2$ term from the Lions interface condition (<ref>) with integration by parts on the $(\vup\bcdot\bnabla)\vup$ term of Navier-Stokes.

With the velocity of both sub-domains known, we write them as a single, updated velocity field:

\begin{equation}
\vup^{(n+1)} = \left\{
\begin{array}{ll}
\vufp^{(n+1)} &\textrm{for } \boldsymbol{x}\in\Omega_f\,, \\[2pt]
\vump^{(n+1)} & \textrm{for }\boldsymbol{x}\in\Omega_m\,.
\end{array} \right.
\end{equation}
With $\left(\vup^{(n+1)},  \theta^{(n)}\right)$, we obtain $\theta^{(n+1)}\in \Psi$ by solving

\begin{align}
& \left(\delta_1\,\dfrac{\theta^{(n+1)}-\theta^{(n)}}{\Delta t}, \psi \right)_\Omega +
\Prm\, \mathsfbi{B}\left(\vup^{(n+1)},\theta^{(n+1)} \, , \psi \right) \nonumber \\
&\quad + \left(\delta_2 \bnabla \theta^{(n+1)} \,,\bnabla \psi \right)_\Omega - \left(\delta_3  \vup^{(n+1)}\bcdot \boldsymbol{k} \,, \psi \right)_\Omega  =0\,\quad \forall \psi\in\Psi\label{eqn:variHeat}
\end{align}

where the coefficients $\delta_i$ are defined by

\begin{align}
\delta_1=\begin{cases}
1 &\textrm{for } \boldsymbol{x}\in\Omega_f\,, \\[2pt]
\varrho & \textrm{for }\boldsymbol{x}\in\Omega_m\,,
\end{cases} \quad
\delta_2=\begin{cases}
\epsilon_T &\textrm{for } \boldsymbol{x}\in\Omega_f\,, \\[2pt]
1 &\textrm{for } \boldsymbol{x}\in\Omega_m\,,
\end{cases} \quad
\delta_3=\begin{cases}
1/\epsilon_T &\textrm{for } \boldsymbol{x}\in\Omega_f\,, \\[2pt]
1 & \textrm{for }\boldsymbol{x}\in\Omega_m\,,
\end{cases}\label{eqn:consts}
\end{align}

and the trilinear term $\mathsfbi{B}$ is defined with

\begin{align*}
2\,\mathsfbi{B}\left(\vu, v, w \right) =  \int_{\Omega}\vu\bcdot\left(w\bnabla v\right) - \vu\bcdot\left(v\bnabla w\right)\,d\Omega\,.
\end{align*}

These coefficients are discontinuous over the interface since they are related to physical properties of each region, and are chosen to enforce the interface conditions– continuity of the temperature and heat flux.
With the updated velocity field over the entire domain, we are also able to solve for the streamlines $\phi$:

\begin{align}
\left( \bnabla\phi^{(n+1)}, \bnabla \varphi\right)_\Omega - \left(\bnabla \times \vup^{(n+1)}, \varphi \right)_\Omega  = 0\, \quad  \forall \varphi \in \Phi\,,\label{eqn:variStream}
\end{align}

where $\Phi=\{\varphi \in H^1\left(\Omega \right): \varphi=0 \textrm{ on top and bottom $+$ periodic on left and right}\}$.

Each simulation begins by perturbing the conductive steady-state. That is, we apply a seeded, random perturbation (on the order of $10^{-6}$) to a stationary fluid and a piecewise linear temperature profile. The simulations begin with:

\begin{align}
\vufp^{(0)} &= \vump^{(0)} = \boldsymbol{0} + \boldsymbol{\varepsilon}_1(\boldsymbol{x})\, , \nonumber \\
\theta_f^{(0)}&=\theta_m^{(0)} = 0 + \varepsilon_2(\boldsymbol{x})\,,
\end{align}

where $\boldsymbol{\varepsilon}_1(\boldsymbol{x})$ and $\varepsilon_2(\boldsymbol{x})$ are small, seeded, random perturbations. These perturbations– the components of the vector-valued function $\boldsymbol{\varepsilon}_1(\boldsymbol{x})$ and the scalar $\varepsilon_2(\boldsymbol{x})$– take the form
\begin{align*}
A\sum_{k,\ell=-N}^{N}\frac{1}{\sqrt{\pi}}e^{-\frac{1}{2}\left(k^2+\ell^2\right)}\sin\left(\frac{k\pi\,x}{L_x} + \alpha_{k,\ell}\right) \sin\left(\frac{\ell\pi\,(y-\hat{d}\,)}{1+\hat{d}} + \beta_{k,\ell}\right)\,,
\end{align*}
where $\alpha_{k,\ell},\,\beta_{k,\ell}$ are randomized phases from a uniform distribution on $[0,2\pi)$ and $A$ sets the overall magnitude of the perturbation.

For numerical stability,
the time-step is heavily restricted by the requirement $\Delta t \sim \mathcal{O}(\Da)$.
Our method is first-order in time and second-order in space.
The time-integrator could be swapped out for a high-order method.
However, in practice, we find that the spatial error dominates errors from time discretization, essentially rendering higher-order time integrators unnecessary.
Each simulation conducted in this work has a length scale in $x$ of $2.1$ units, which, through experimentation, we determined to be the smallest domain able to support a pair of counter-rotating, deep convection cells.
The length scale in $y$ has height $1+\dhat,$ with $1$ unit for the porous height and $\dhat$ for the fluid region.
For the spatial discretisation, we use a uniform grid with $32 \times 32$ triangular elements over a unit area in the nondimensional domain. Future work is being conducted on using a nonuniform mesh for this system to investigate the associated errors with this discretisation.
All of the numerical simulations are run using FreeFem++ <cit.>.

§ RESULTS AND DISCUSSION

From stability analyses and our theory, there are two types of convection we expect– deep and shallow convection.
In figure <ref>, these two flow configurations are shown at their steady-states with streamlines shown as countours and the temperature profiles in color.
The system with deep convection exhibits cells which extend throughout the entirety of the domain, evidenced by the wave-like temperature profile and streamlines circulating throughout the whole domain.
In contrast, with shallow convection, almost all of the velocity and temperature deviations from the conductive state are confined to the fluid region alone, leaving the porous medium largely unchanged with the exception of a small region immediately below the interface.
For these two cases, the systems begin with random initial data and go directly to their preferred convection states.

With the case shown in figure <ref>a, the fluid evolves from random, disorganized data to a steady-state with shallow convection.
Conversely, for the simulation in figure <ref>b, the system goes from the perturbed conductive state to a stable steady-state of deep convection.
That is, in these two respective cases, the shallow convection case's cells originate and stay in the fluid region, while cells from the deep convection case occupy the whole domain for the duration of the simulations.
This phenomenon is expected; with these two types of convection, instabilities from one group of wavenumbers outperform the other by a significant margin.
For example, with deep convection, the growth from small wavenumbers of the perturbation dominates any contribution from the larger wavenumbers, resulting in large cells.
Alternatively, with shallow convection, the growth from small wavenumbers pales in comparison to that of the larger wavenumbers.

[inner sep=0pt] (russell) at (0,0)
at (.65,-1.9) $-1.0$ $0$   $1.0$;
at (3.4,-2.3) $x$ ;
at (0,-1.4) $-1.0$;
at (0,-.2) $-0.5$;
at (0,1.05) $\phantom{-0.}0$;
at (0,1.6) $\phantom{-}0.2$;
at (-6.3,-2.1) $-1.0$ $0$   $1.0$;
at (3.2-6.82,-2.5) $x$ ;
at (-6.95,-1.55) $-1.0$;
at (-6.95,-.25) $-0.5$;
at (-6.95,.85) $\phantom{-0.}0$;
at (-6.95,1.7) $0.35$;
at (-6.95,0.2) $z$;
at (3.2-6.7,2.2)  (a) Shallow convection;
at (3.65,2.1)   (b) Deep convection;

Shallow and deep convection with temperature (color) and streamlines (contour) at their respective steady-states, with (a) $\Ram=10,\,\dhat=.35$ at $t=3.0$ and (b) $\Ram=30,\,\dhat=.20$ at $t=3.0$, respectively. Fixed parameters: $\Da=1.0\times10^{-4},\,\Prm =.7,\,\epsilon_T=.7,\,\alpha=1.0,\, \Delta t = 2.5\times10^{-4}.$

[inner sep=0pt] (russell) at (0,0)
at (.6,-1.9) $-1.0$ $0$   $1.0$;
at (3.38,-2.3) $x$ ;
at (0,-1.5) $-1.0$;
at (0,-.3) $-0.5$;
at (0,.9) $\phantom{-0.}0$;
at (0,1.6) $\phantom{-}0.3$;
at (-6.55,-1.9) $-1.0$ $0$   $1.0$;
at (-3.77,-2.3) $x$ ;
at (-7.15,-1.5) $-1.0$;
at (-7.15,-.3) $-0.5$;
at (-7.15,.9) $\phantom{-0.}0$;
at (-7.15,1.6) $\phantom{-}0.3$;
at (-7.05,0.2) $z$;
at (0.00,2.3)  Shallow-to-deep convection ;
at (3.6,2.0)   $t=0.75$ ;
at (-3.45,2.0)   $t=0.50$ ;

[inner sep=0pt] (russell) at (0,0)
at (.6,-1.9) $-1.0$ $0$   $1.0$;
at (3.38,-2.3) $x$ ;
at (0,-1.5) $-1.0$;
at (0,-.3) $-0.5$;
at (0,.9) $\phantom{-0.}0$;
at (0,1.6) $\phantom{-}0.3$;
at (-6.55,-1.9) $-1.0$ $0$   $1.0$;
at (-3.77,-2.3) $x$ ;
at (-7.15,-1.5) $-1.0$;
at (-7.15,-.3) $-0.5$;
at (-7.15,.9) $\phantom{-0.}0$;
at (-7.15,1.6) $\phantom{-}0.3$;
at (-7.05,0.2) $z$;
at (3.6,2.0)   $t=1.25$ ;
at (-3.45,2.0)   $t=1.00$ ;

Shallow-to-deep convection with $\Ram=20,\,\dhat=.30$ with temperature (color) and streamlines (contour). Fixed parameters: $\Da=1.0\times10^{-4},\,\Prm =.7,\,\epsilon_T=.7,\,\alpha=1.0,\, \Delta t = 2.5\times10^{-4}.$

There is another form of convection that the stability analyses cannot predict though: shallow-to-deep convection, as shown in figure <ref>.
This kind of convection takes place in a parameter regime where both the small and large wavenumbers are unstable, and the interaction between their instabilities gives rise to this hybrid category of convection.
In these situations, the system goes from random initial data to a metastable shallow convection state, followed by the collapse and consolidation of cells in the fluid region.
The joined cells gain enough strength to penetrate into the porous medium, forming larger-scale cells which occupy the fluid and porous regions alike, and the system finally steadies out at the preferred stable configuration of deep convection.
For this choice of parameters, this route– from random initial data to a metastable shallow state followed by a dynamic shift to deep convection– is the route taken from perturbing the unstable conductive state. While we observe shallow-to-deep convection, we never observe a deep-to-shallow dynamic shift; this leads us to speculate that when both small and large wavenumbers are unstable, deep convection is the preferred steady-state of this system.

Although shallow-to-deep convection and deep convection ultimately both achieve a steady-state with cells that extend throughout the domain, they are distinct flow progressions. Their most notable differences concern the routes taken to their steady-state and the efficiency of heat transfer; shallow-to-deep convection has metastable shallow cells before forming deep convection cells for its steady-state, and these flow profiles can exhibit higher Nusselt values compared to their counterparts with deep convection.

To measure convection, we define two quantities.
The first is a mathematical energy that allows us to find the $\Ram$ value where $\frac{dE}{dt}= 0$, distinguishing between the regions of stability and instability– with $\frac{dE}{dt}< 0$ and $\frac{dE}{dt}> 0$, respectively– like done in <cit.>.
This uses the volume-averaged norms of the perturbed velocity and temperature profiles, measuring how these profiles compare to their conductive steady-states:

\begin{align}
2\,E(t) = \frac{1}{\Prm}\frac{1}{V} \|\vup \|_{\Omega}^2 +\frac{1}{V} \|\theta\|_{\Omega}^2\,,
\end{align}
with $V$ as the volume.
Qualitatively, the onset of convection is noted by a jump in the energy profile.
Second, we use the physically-motivated Nusselt number $Nu(t)$ as the ratio of vertical convective and conductive fluxes with

\begin{align}\label{NusseltInfo}
Nu(t) = \frac{ J_{cnv } + J_{cnd}}{J_{cnd}}  \quad \textrm{ with  }   J_{cnv} = \left(\vu\cdot \boldsymbol{k},\,\left(\theta + \bar{T}\right)\right)_{\Omega} \textrm{   and  } J_{cnd}=-\left(\delta_2\,\nabla \left(\theta + \bar{T}\right) \cdot \boldsymbol{k},1\right)_{\Omega}\,.
\end{align}
where $\bar{T}$ is the conductive temperature and $\delta_2$ is defined in (<ref>), which allows us to write the conductive fluxes of each region as a single term.

scale only axis,
xlabel style=font=,
ytick = 0, 50, 100, 150, 200, 250,
ylabel style=font=,anchor=north,
axis background/.style=fill=white,
title style=font=,
[color=firstColor, line width=1.5pt, forget plot]
table[row sep=crcr]
0	4.74642547487747e-12

0.71674999999999	0.000310746543931373

0.754500000000007	0.000984066851174248

0.777500000000003	0.00198626144799618

0.794499999999999	0.00333794553560551

0.807749999999999	0.0050025491469512

0.818749999999994	0.00699946575838339

0.828249999999997	0.00935504495399186

0.836500000000001	0.0120351003686778

0.843999999999994	0.0151323723671339

0.850750000000005	0.0185959275146672

0.856999999999999	0.0225059557630232

0.863	0.0270309332328793

0.868500000000012	0.0319737402089402

0.873750000000001	0.037532699847759

0.878749999999997	0.0437230162744129

0.883749999999992	0.0509341772796006

0.888499999999993	0.0588833220753315

0.893249999999995	0.0680728513829365

0.897999999999996	0.0786962425661386

0.902500000000003	0.0902854210411306

0.907000000000011	0.103580826944295

0.91149999999999	0.118833519101685

0.915999999999997	0.136331452882757

0.920500000000004	0.156404888448805

0.925000000000011	0.179432587280957

0.92949999999999	0.205848910350539

0.933999999999997	0.236151947345121

0.938500000000005	0.270912824309477

0.943000000000012	0.310786357086954

0.947499999999991	0.356523241052287

0.951999999999998	0.408983992934594

0.956500000000005	0.469154889296732

0.961000000000013	0.538166177576727

0.965499999999992	0.6173128712758

0.969999999999999	0.708078478599674

0.974500000000006	0.812162056401547

0.979000000000013	0.931509025908099

0.983499999999992	1.06834623454461

0.988	1.22522179788155

0.992500000000007	1.40505030660947

0.997000000000014	1.61116403143836

1.00149999999999	1.84737080544303

1.006	2.11801930061355

1.01050000000001	2.42807243852434

1.01499999999999	2.78318968046841

1.01949999999999	3.18981891500994

1.024	3.65529859040845

1.02850000000001	4.1879706114579

1.03299999999999	4.79730430325611

1.03749999999999	5.49403142357511

1.042	6.29029173232351

1.04650000000001	7.19978730968251

1.05099999999999	8.23794769031721

1.05549999999999	9.42209829874599

1.06	10.7716264537452

1.06450000000001	12.3081279037998

1.06899999999999	14.0555610548258

1.0735	16.040351369828

1.07825	18.4249435722904

1.083	21.1433828957202

1.08775	24.2357749963276

1.0925	27.7448897564419

1.09725	31.7156137126741

1.10225	36.4447024513317

1.10724999999999	41.790032412916

1.11224999999999	47.802870910115

1.11750000000001	54.884819568859

1.12299999999999	63.192803814673

1.12875	72.878873551732

1.13475	84.070945887008

1.14125000000001	97.376959830225

1.14875000000001	114.041874041905

1.15899999999999	138.33755167766

1.17525000000001	176.865229958164

1.1825	192.481785598097

1.1885	204.106349884699

1.19374999999999	213.129140664652

1.1985	220.292304596412

1.203	226.177038327259

1.20724999999999	230.932899130146

1.21125000000001	234.716366750932

1.215	237.679226934346

1.21850000000001	239.961885973521

1.22174999999999	241.689766968074

1.22475	242.97216892565

1.22749999999999	243.902434356684

1.22999999999999	244.558926508423

1.23224999999999	245.006481829358

1.23425	245.298070296222

1.23599999999999	245.476456557835

1.23750000000001	245.575732051657

1.23875000000001	245.622672408262

1.23949999999999	245.635897553033

1.24000000000001	245.638689780268

1.24025	245.638314281954

1.24074999999999	245.634079199692

1.2415	245.619192677264

1.24250000000001	245.583903509308

1.24375000000001	245.51601304115

1.24549999999999	245.37911084874

1.2475	245.167268328212

1.25	244.827379249369

1.25299999999999	244.322800609934

1.25649999999999	243.621633737146

1.26075	242.640518428316

1.26625000000001	241.219013951157

1.27475000000001	238.837612556227

1.29050000000001	234.414153644398

1.29825	232.427279136698

1.30500000000001	230.854405768378

1.31125	229.543099856408

1.31700000000001	228.463844230547

1.32249999999999	227.544651713804

1.32775000000001	226.767164382293

1.333	226.082510333732

1.33799999999999	225.511438669797

1.34275	225.036839950913

1.3475	224.623147830634

1.352	224.282585314787

1.35650000000001	223.98736637779

1.36099999999999	223.733033854483

1.36525	223.526475225871

1.36949999999999	223.349037229225

1.37375	223.197409541034

1.37799999999999	223.068483300218

1.38200000000001	222.965284686832

1.386	222.877400274494

1.38999999999999	222.802777211465

1.39400000000001	222.73954141959

1.398	222.685993947997

1.40199999999999	222.640607825531

1.40600000000001	222.602017731724

1.41024999999999	222.56710980362

1.4145	222.537237219216

1.41900000000001	222.509880093652

1.42400000000001	222.483326244626

1.42975000000001	222.456237173036

1.43725000000001	222.424127320969

1.4665	222.301880147386

1.47825	222.248310879125

1.49775	222.155844138351

1.51374999999999	222.081333270233

1.52475000000001	222.033068043743

1.53424999999999	221.994176626612

1.54275000000001	221.961917136394

1.55074999999999	221.933891512832

1.55850000000001	221.908953622986

1.566	221.88688254297

1.57325	221.867425553524

1.5805	221.849736474803

1.58775	221.833717140984

1.59475	221.819731559114

1.60175000000001	221.80709350725

1.60874999999999	221.795694225102

1.61600000000001	221.78507752672

1.62325000000001	221.775555635956

1.63075000000001	221.766737047472

1.63849999999999	221.758605556499

1.6465	221.751133866358

1.65475000000001	221.744288769366

1.66325000000001	221.738035438183

1.67250000000001	221.732023522944

1.68225000000001	221.726449473799

1.69274999999999	221.721188910905

1.70400000000001	221.716277434094

1.71600000000001	221.711737458372

1.72900000000001	221.707506170724

1.74299999999999	221.703621107605

1.75825	221.700056672984

1.77475000000001	221.696855293423

1.79300000000001	221.693971898713

1.81299999999999	221.691461560928

1.8355	221.68928555352

1.86125000000001	221.687442256856

1.89175	221.685911013849

1.92850000000001	221.684722065166

1.97624999999999	221.683849179971

2.05375000000001	221.683081373613

2.15575000000001	221.682712112181

2.37975	221.682765054508

2.70625000000001	221.683540960428

2.95650000000001	221.684984951762

3	221.685282527009

[color=secondColor, line width=1.5pt, forget plot]
table[row sep=crcr]
0	9.2370555648813e-13

0.145499999999998	0.000310796207642738

0.154250000000005	0.000975661837088637

0.159750000000003	0.0020037048660555

0.163749999999993	0.0033825039464972

0.167000000000002	0.00517684960294673

0.169749999999993	0.00742160130951675

0.172250000000005	0.0102976499321983

0.174499999999995	0.0138285596334953

0.176749999999998	0.0185710003643464

0.179000000000002	0.0249408548232282

0.181250000000006	0.0334967662793986

0.183250000000001	0.043538449058957

0.185249999999996	0.056591470719539

0.187250000000006	0.0735587298787408

0.189250000000001	0.0956135147059314

0.191249999999997	0.124280191842544

0.193250000000006	0.161538763841278

0.195250000000001	0.209960206771925

0.197249999999997	0.272881396832474

0.199250000000006	0.354630779476764

0.201250000000002	0.460818777798593

0.203249999999997	0.598710291194692

0.205250000000007	0.777700425826026

0.207250000000002	1.00991858216348

0.209249999999997	1.31098965071634

0.211250000000007	1.700983249525

0.213250000000002	2.20558069722881

0.215249999999997	2.85748134274542

0.217500000000001	3.81884198094242

0.219750000000005	5.09426010579055

0.221999999999994	6.77901250834695

0.224249999999998	8.99168473246012

0.226500000000001	11.875592542158

0.228750000000005	15.5964329912898

0.230999999999995	20.3332089431666

0.233500000000006	26.9972292623232

0.236249999999998	36.2292227847396

0.239249999999998	48.5845715468117

0.243499999999997	69.0761366147651

0.248500000000007	92.7874216562572

0.251000000000005	102.020628065524

0.253	107.392704511084

0.254750000000001	110.485177013812

0.256	111.792730920796

0.257000000000005	112.334148183147

0.257750000000001	112.469299960858

0.257999999999996	112.466229441579

0.258499999999998	112.392147785533

0.259249999999994	112.12229541971

0.260249999999999	111.498314491704

0.261750000000006	110.096900538748

0.263999999999996	107.264708894728

0.27525	91.8423677226102

0.27825	88.950664446326

0.28125	86.6365302596906

0.28425	84.7984566173067

0.28725	83.3278124556373

0.290499999999994	82.0356336787199

0.294250000000005	80.8059494062813

0.298749999999998	79.5513283269782

0.304749999999999	78.0678213890675

0.313000000000002	76.1915528149098

0.320999999999998	74.508431846571

0.328000000000003	73.1633317152873

0.334500000000006	72.0304790309142

0.340999999999994	71.0066465450602

0.347499999999997	70.0823911161478

0.353999999999999	69.2458613360201

0.360749999999996	68.4576417749469

0.367500000000007	67.7404691774339

0.374499999999998	67.0621444979021

0.381500000000003	66.4424387936423

0.388750000000002	65.8553782857211

0.396000000000001	65.3180628700041

0.40325	64.8253446115047

0.410749999999993	64.3578594882361

0.41825	63.9290712586096

0.425749999999994	63.5351920420519

0.433250000000001	63.172921877848

0.441000000000003	62.8287193774124

0.448750000000004	62.5123857810949

0.456500000000005	62.2214341534303

0.464250000000007	61.9536398157285

0.471999999999994	61.7070268489232

0.479749999999996	61.4798145302559

0.487499999999997	61.2703865479671

0.495249999999999	61.0772797205535

0.503	60.8991636914975

0.510750000000002	60.7348300019516

0.518749999999997	60.5784864628082

0.526750000000007	60.4345591913135

0.534750000000003	60.3020476336944

0.542749999999998	60.1800351210081

0.550749999999994	60.0676789134812

0.558750000000003	59.9642055461816

0.566749999999999	59.8689098023826

0.574749999999995	59.781139060705

0.582750000000004	59.7002894877913

0.59075	59.6258088309643

0.598749999999995	59.5571956717053

0.606750000000005	59.4939900892491

0.614750000000001	59.4357635118976

0.622749999999996	59.382119952549

0.630750000000006	59.3326953251568

0.638750000000002	59.2871578031656

0.646749999999997	59.2452036910841

0.654750000000007	59.206550185706

0.662750000000003	59.1709386465899

0.670749999999998	59.1381275661868

0.678749999999994	59.1078947074206

0.686750000000004	59.0800376650705

0.694749999999999	59.0543688849072

0.703000000000003	59.0300073833623

0.711250000000007	59.0076163325965

0.719499999999996	58.9870370787276

0.72775	58.9681232535644

0.736000000000004	58.9507393038874

0.744500000000002	58.9342957632136

0.753	58.9192186127679

0.761499999999998	58.9053935609602

0.770250000000004	58.8923603334571

0.778999999999996	58.8804407809488

0.787999999999997	58.8692406128497

0.796999999999997	58.8590182277414

0.806250000000006	58.8494412890609

0.815749999999994	58.8404991950317

0.825500000000005	58.8321780239033

0.835499999999996	58.8244596567481

0.846000000000004	58.8171591753853

0.856999999999999	58.810304907448

0.868250000000003	58.8040437770293

0.880250000000004	58.7981065665663

0.892750000000007	58.7926411312377

0.906000000000006	58.7875508401627

0.920000000000002	58.7828616700725

0.935000000000002	58.7785173693957

0.950999999999993	58.7745499279894

0.968500000000006	58.7708771128134

0.987499999999997	58.7675463042983

1.0085	58.7645196737144

1.03175	58.7618178966516

1.05800000000001	58.7594159085044

1.0885	58.757278757162

1.124	58.7554385342377

1.16725	58.7538563706686

1.22125	58.7525424831533

1.295	58.7514148667336

1.404	58.7504134583086

1.6195	58.749208719798

2.375	58.7458601115008

3	58.7432782882126

[color=thirdColor, line width=1.5pt, forget plot]
table[row sep=crcr]
0	2.95585778076202e-12

0.0927499999999952	0.000308945547942585

0.0987499999999955	0.000990339133096541

0.102499999999992	0.00205655254023895

0.105250000000012	0.00351892312468749

0.107499999999987	0.00546507235813465

0.109499999999997	0.0080868612558902

0.111250000000013	0.0113991317295188

0.113	0.0160741316676081

0.114749999999987	0.0226747464946015

0.116500000000002	0.0319971482394976

0.118249999999989	0.045167712461847

0.120000000000005	0.0637802203553974

0.121749999999992	0.0900900329257013

0.123500000000007	0.127288746728198

0.125249999999994	0.179892350992105

0.12700000000001	0.25428905427276

0.128749999999997	0.359510905996274

0.130500000000012	0.508317412060308

0.132249999999999	0.718710692493858

0.133999999999986	1.01604063888223

0.135750000000002	1.43590279533564

0.137499999999989	2.02807329726045

0.139250000000004	2.86174392598332

0.140999999999991	4.03227231962529

0.142750000000007	5.66945717287501

0.144499999999994	7.94676626822428

0.146250000000009	11.0898594211486

0.147999999999996	15.3808805607128

0.149750000000012	21.1521316532509

0.151749999999993	30.0148025706222

0.153750000000002	41.7355436271256

0.156000000000006	58.5817469140071

0.158999999999992	86.1240509921328

0.164500000000004	137.459810154923

0.166750000000008	152.158518568549

0.168499999999995	159.685638160651

0.169999999999987	163.494877321679

0.170999999999992	164.832321140372

0.171750000000003	165.288703605082

0.172249999999991	165.363187093487

0.172500000000014	165.337738984355

0.173000000000002	165.171837172177

0.173750000000013	164.666079868838

0.175000000000011	163.268650438867

0.176999999999992	160.081776344165

0.184500000000014	147.200821796179

0.187000000000012	144.239493711617

0.18950000000001	142.004853715364

0.192000000000007	140.315219829385

0.194749999999999	138.859063755943

0.19874999999999	137.10188071042

0.211999999999989	131.735684908101

0.217999999999989	129.518976856756

0.223500000000001	127.71599213832

0.229000000000013	126.117339964468

0.234749999999991	124.622816019198

0.241000000000014	123.161223225523

0.247500000000002	121.790418446881

0.253999999999991	120.550886732173

0.260750000000002	119.384760771959

0.267500000000013	118.325732759214

0.274499999999989	117.325459226156

0.281499999999994	116.412200843485

0.288749999999993	115.546793465449

0.295999999999992	114.753546628898

0.303500000000014	114.000134163226

0.311000000000007	113.307678218579

0.318749999999994	112.649474941418

0.32650000000001	112.043644496438

0.334249999999997	111.484971026786

0.342250000000007	110.952996253222

0.350249999999988	110.462290567264

0.358249999999998	110.009204344069

0.366250000000008	109.590412603331

0.374500000000012	109.191316374447

0.382749999999987	108.822679052443

0.390999999999991	108.481867300506

0.399249999999995	108.166546521264

0.407499999999999	107.874517890686

0.415750000000003	107.603818573229

0.424250000000001	107.345475697123

0.432749999999999	107.10630449959

0.441249999999997	106.884747316843

0.449749999999995	106.679201040179

0.458249999999992	106.488297991759

0.467000000000013	106.30564552199

0.475750000000005	106.135675901458

0.484749999999991	105.972972127364

0.494	105.817148166108

0.503250000000008	105.671748241932

0.513000000000005	105.52848402648

0.52324999999999	105.38724759062

0.533500000000004	105.254576721193

0.544499999999999	105.120424904204

0.556749999999994	104.978867482846

0.5685	104.850297660056

0.582999999999998	104.699040554449

0.599250000000012	104.536316038598

0.65025	104.030964151492

0.666500000000013	103.862233769979

0.679249999999996	103.722907335429

0.691499999999991	103.582437541142

0.704250000000002	103.428919964005

0.714750000000009	103.295154708623

0.724250000000012	103.165555263509

0.734749999999991	103.013587347414

0.744	102.871222262698

0.753500000000003	102.71464118585

0.765500000000003	102.506304102341

0.776250000000005	102.309044675857

0.787749999999988	102.086146701533

0.79849999999999	101.865733299439

0.808500000000009	101.648029400053

0.818250000000006	101.421501530654

0.828000000000003	101.18003008764

0.838999999999999	100.891903789149

0.849999999999994	100.586838001842

0.863499999999988	100.19401535615

0.893000000000001	99.3256614218519

0.899499999999989	99.1594723568031

0.90424999999999	99.0534296222171

0.907749999999993	98.987717815198

0.910750000000007	98.9425598499162

0.913000000000011	98.9171041796458

0.914749999999998	98.9031889075662

0.916249999999991	98.8958851239282

0.917249999999996	98.8936226839962

0.917750000000012	98.8933266352351

0.918499999999995	98.8939772407395

0.919250000000005	98.8959992999156

0.92025000000001	98.9009440856477

0.921500000000009	98.9109757484227

0.923000000000002	98.929113262459

0.924749999999989	98.9594700193342

0.926749999999998	99.0075331415123

0.928750000000008	99.0713660946007

0.931000000000012	99.1640967384229

0.933500000000009	99.2961804104314

0.936000000000007	99.4626593897429

0.938749999999999	99.6904646931298

0.941499999999991	99.9702501073098

0.944500000000005	100.340441796267

0.947750000000013	100.823925892881

0.951249999999987	101.445414446959

0.955000000000013	102.228105132919

0.959249999999997	103.252031475314

0.964499999999987	104.67741498809

0.983249999999998	109.92558059492

0.988249999999994	111.072137481765

0.993249999999989	112.079695035008

0.998750000000001	113.058001594678

1.005	114.055489223866

1.01349999999999	115.304957944417

1.03375	118.247226079598

1.042	119.554964175205

1.04949999999999	120.842470871858

1.05674999999999	122.197492849587

1.06375	123.623792994697

1.07075	125.177879469868

1.07775000000001	126.872518797177

1.08475000000001	128.723012711838

1.09174999999999	130.744130607387

1.0985	132.873341065923

1.10525000000001	135.199908428515

1.11199999999999	137.745345529279

1.11875000000001	140.53382440626

1.12549999999999	143.591007552437

1.13225	146.936182304932

1.1395	150.853043845917

1.14750000000001	155.528947907057

1.15825000000001	162.216557120037

1.18199999999999	177.085016758883

1.19325000000001	183.672179266294

1.20325	189.170757818882

1.21225000000001	193.788063879552

1.22049999999999	197.715741623233

1.22825	201.121226183594

1.23575	204.145688858313

1.24275	206.725305963623

1.24950000000001	208.992000992406

1.256	210.974319802887

1.26224999999999	212.700497056277

1.26849999999999	214.256422619468

1.27449999999999	215.596757272679

1.28025	216.747015366703

1.286	217.772686877338

1.29150000000001	218.643663098889

1.29675	219.380277184674

1.30199999999999	220.029784588036

1.30699999999999	220.572578470939

1.31174999999999	221.02419755508

1.31649999999999	221.417414176675

1.321	221.739501408432

1.32525000000001	222.001615353716

1.3295	222.225605911296

1.33349999999999	222.403942206019

1.33725000000001	222.544326264164

1.34075000000001	222.653244173183

1.34399999999999	222.736494952854

1.34700000000001	222.799067059273

1.34999999999999	222.848805492932

1.35249999999999	222.881011985267

1.35475	222.903181292704

1.35675000000001	222.917703489321

1.35849999999999	222.926564772247

1.36000000000001	222.931405867067

1.36125000000001	222.933559882996

1.36224999999999	222.934087384577

1.36324999999999	222.933579096492

1.36425	222.932059857127

1.3655	222.928776328806

1.36699999999999	222.922866675089

1.36875000000001	222.913355341263

1.37100000000001	222.897168592724

1.37350000000001	222.874239634228

1.37649999999999	222.840291326368

1.37975	222.796174013039

1.3835	222.736610096039

1.38775000000001	222.658994899438

1.39275000000001	222.555578292388

1.39850000000001	222.422901584523

1.40525	222.251889725565

1.4135	222.025754512358

1.42425	221.712192751468

1.44624999999999	221.04651542475

1.46250000000001	220.564927594585

1.47475	220.219794698033

1.48575	219.927200573819

1.49600000000001	219.671129017027

1.50575000000001	219.443101422831

1.51499999999999	219.241315373322

1.524	219.058587803898

1.53274999999999	218.893559502207

1.54124999999999	218.74480265788

1.54949999999999	218.611026397745

1.55775	218.487294714586

1.56575000000001	218.376462049979

1.57374999999999	218.274186697729

1.58150000000001	218.182854581821

1.58924999999999	218.098721022374

1.59700000000001	218.021337834249

1.60475	217.950255427439

1.61224999999999	217.887098843772

1.61975000000001	217.829116186383

1.62725	217.775959054592

1.63475	217.727294575529

1.642	217.684223660525

1.64924999999999	217.644776655625

1.65649999999999	217.608684406272

1.66374999999999	217.57569152151

1.67099999999999	217.545575325554

1.67824999999999	217.51811392734

1.68549999999999	217.49309324201

1.69274999999999	217.470313271117

1.69999999999999	217.449572723052

1.70724999999999	217.430724675679

1.71449999999999	217.413617973964

1.72174999999999	217.398094620284

1.72900000000001	217.384022976649

1.73625000000001	217.371282013772

1.74350000000001	217.359760781307

1.751	217.349015495512

1.7585	217.339344200128

1.76625000000001	217.330366447235

1.774	217.322322505129

1.78200000000001	217.314901259613

1.79024999999999	217.308093064348

1.79875000000001	217.301883761999

1.80775	217.296101711148

1.81700000000001	217.290920921397

1.82675	217.286187243273

1.83725000000001	217.281811835155

1.8485	217.277833187272

1.86025000000001	217.274365872308

1.87299999999999	217.27130581027

1.88825	217.268320507969

1.90525	217.265648609077

1.92349999999999	217.263425201454

1.94450000000001	217.26152124811

1.96725000000001	217.260107615403

1.99725000000001	217.258886747056

2.03399999999999	217.25804419296

2.13399999999999	217.256710066075

2.21000000000001	217.256022919595

2.26675	217.25533292781

2.50450000000001	217.252329171232

2.58949999999999	217.25205325126

2.79325	217.251654929803

2.893	217.250568115785

3	217.249552763262

scale only axis,
xlabel style=font=,
ytick=  1.0, 1.25, 1.5, 1.75, 2.0, 2.25,
ylabel style=font=,anchor=north,
axis background/.style=fill=white,
title style=font=,
title=Nusselt number,
legend style=at=(-.89125,0.3236), anchor=south west, legend cell align=left, align=left, draw=white!15!black,font=

[color=firstColor, line width=1.5pt]
table[row sep=crcr]
0	0.9999999999

0.91225	1.0003135206

0.94975	1.0009839461

0.973	1.0019993353

0.99	1.0033566873

1.00325	1.0050253181

1.01425	1.0070228478

1.02375	1.0093732809

1.03225	1.0121313863

1.03975	1.0152259322

1.04675	1.0188147676

1.05325	1.0228904419

1.05925	1.027419253

1.06475	1.0323380989

1.07025	1.0381182142

1.0755	1.0445692216

1.0805	1.0516906053

1.0855	1.0599031717

1.0905	1.0693567158

1.0955	1.0802145262

1.1005	1.0926517223

1.1055	1.1068521465

1.1105	1.1230028576

1.1155	1.1412859049

1.12075	1.1629587658

1.126	1.1873140444

1.1315	1.2157971786

1.1375	1.2503159679

1.144	1.2915115408

1.15175	1.3449326971

1.1635	1.4310483228

1.1755	1.5176465036

1.1825	1.5638242618

1.1885	1.5993791868

1.19375	1.6268866383

1.1985	1.6486693841

1.203	1.6665371668

1.20725	1.6809715283

1.21125	1.6924603029

1.215	1.7014654094

1.21875	1.7088509238

1.22225	1.714369013

1.2255	1.7183818212

1.22875	1.7214004576

1.23175	1.7233705602

1.235	1.7246931276

1.23825	1.7252473524

1.2415	1.7251105452

1.245	1.7242775036

1.24875	1.7226978336

1.253	1.7201813906

1.258	1.7164240968

1.264	1.7110678197

1.272	1.7030163667

1.30125	1.6727876672

1.31	1.6650473036

1.318	1.6587769363

1.326	1.653301172

1.334	1.64859987

1.34225	1.6445104659

1.35075	1.6410250575

1.35975	1.6380375217

1.3695	1.63548748

1.3805	1.633298391

1.393	1.6314794734

1.40825	1.6299261228

1.4285	1.6285400172

1.46	1.6270881485

1.51175	1.6253786014

1.5655	1.6242169174

1.62825	1.6235299073

1.72875	1.6231462132

1.97325	1.6230008375

3	1.6230117396

[color=secondColor, line width=1.5pt]
table[row sep=crcr]
0	0.99999999966

0.18175	1.0003041885

0.1905	1.0009576334

0.196	1.0019687966

0.2	1.003324133

0.20325	1.0050851108

0.20625	1.0075240336

0.20875	1.0104218269

0.211	1.0139623138

0.21325	1.0186871553

0.2155	1.0249777428

0.21775	1.0333266305

0.22	1.044360814

0.22225	1.0588625159

0.2245	1.0777801457

0.22675	1.1022157703

0.229	1.1333663967

0.2315	1.1772625745

0.23425	1.238182255

0.23725	1.3198220227

0.2415	1.4549693495

0.24625	1.6019530594

0.24875	1.6610688503

0.25075	1.6941181053

0.25225	1.7098701084

0.2535	1.7172250335

0.2545	1.7195964154

0.25525	1.7195046977

0.256	1.7179612379

0.257	1.7139026149

0.2585	1.7042756966

0.2605	1.6867331012

0.26475	1.6420586907

0.26925	1.5975017566

0.2725	1.5712989539

0.2755	1.5518844081

0.2785	1.5364783291

0.2815	1.524299431

0.2845	1.5145690165

0.28775	1.5060084938

0.2915	1.4978334187

0.29625	1.4890189459

0.303	1.4779378938

0.31175	1.4647789709

0.32	1.4534330955

0.3275	1.4441507092

0.33475	1.4361441062

0.34225	1.4287884831

0.35	1.4220511884

0.35825	1.415692315

0.36725	1.4095527808

0.377	1.4036862505

0.3875	1.3981353026

0.39875	1.3929327543

0.41075	1.3881007611

0.42375	1.3835699704

0.43775	1.3793773326

0.453	1.3754879401

0.4695	1.3719415886

0.48775	1.3686800022

0.508	1.3657227345

0.5305	1.3630914469

0.556	1.3607641645

0.58525	1.3587496319

0.6195	1.3570454059

0.66075	1.3556489136

0.7125	1.3545564466

0.78175	1.3537619468

0.88575	1.3532555943

1.087	1.353017587

2.0725	1.3529544584

3	1.3529309769

[color=thirdColor, line width=1.5pt]
table[row sep=crcr]
0	1.0000000024

0.119	1.0003084027

0.12475	1.0009582473

0.1285	1.0020102164

0.13125	1.0034620193

0.1335	1.0054001755

0.1355	1.0080133315

0.13725	1.0113101443

0.139	1.0159452315

0.14075	1.0224413063

0.1425	1.0315043518

0.14425	1.0440668876

0.146	1.0613206956

0.14775	1.0847155601

0.14975	1.1210672368

0.15175	1.1699203246

0.154	1.2416403468

0.15675	1.3515777138

0.16325	1.6232945571

0.16525	1.6776872054

0.16675	1.7041052966

0.168	1.717095651

0.169	1.7222454618

0.16975	1.7234642954

0.1705	1.7227405412

0.17125	1.7203665981

0.1725	1.713504753

0.17425	1.6997493286

0.18275	1.6266188321

0.18525	1.6124771018

0.18775	1.6018445016

0.19025	1.5937629588

0.19325	1.5861257084

0.198	1.5759918052

0.211	1.5501633693

0.217	1.5395799531

0.22275	1.5306691655

0.229	1.5221733203

0.23575	1.5140799137

0.243	1.5063698968

0.25075	1.4990609431

0.25875	1.4923724627

0.26725	1.4860672288

0.2765	1.4799889442

0.2865	1.4741858567

0.29725	1.4686916803

0.30875	1.46352918

0.32125	1.458623073

0.33475	1.4540180779

0.34925	1.4497457525

0.365	1.4457700492

0.38225	1.4420795871

0.40125	1.4386805844

0.422	1.4356213135

0.445	1.4328785635

0.471	1.4304287094

0.50075	1.4282747175

0.536	1.4263783403

0.57875	1.4247358237

0.63425	1.4232792733

0.82675	1.418733531

0.8995	1.4163881079

0.91125	1.4167711636

0.9195	1.4176368188

0.92625	1.4189745001

0.932	1.4207627408

0.93725	1.4230896218

0.942	1.425908662

0.94675	1.4295175507

0.95125	1.4337271903

0.95625	1.4393015649

0.962	1.4467025571

0.97425	1.4639018547

0.9815	1.4733307879

0.98775	1.4804542967

0.9945	1.4871968899

1.0035	1.49522597

1.03025	1.5185426123

1.03975	1.5279310526

1.0485	1.5374481716

1.057	1.5476232036

1.0655	1.5587938295

1.074	1.5710108226

1.0825	1.5843310562

1.091	1.598804962

1.0995	1.6145177113

1.108	1.6315789717

1.11625	1.6495560408

1.12425	1.6684743086

1.1325	1.689638269

1.14125	1.7138930246

1.152	1.7457037757

1.178	1.8233964563

1.18875	1.8530903505

1.19875	1.878888379

1.20775	1.9004272526

1.21625	1.9191746153

1.22425	1.9353170512

1.23175	1.9490872673

1.239	1.9611375914

1.246	1.9716106049

1.253	1.980974571

1.25975	1.9889934546

1.2665	1.9960631912

1.27325	2.0022336508

1.28	2.0075591447

1.287	2.0122498984

1.294	2.0161570647

1.30125	2.0194456301

1.30875	2.0221134479

1.3165	2.0241677437

1.3245	2.0256246485

1.33325	2.0265479388

1.3425	2.0268718066

1.353	2.0265723557

1.36475	2.0255778906

1.37875	2.0237280906

1.397	2.0206293562

1.43275	2.0137386316

1.46475	2.0078867866

1.49	2.0039130791

1.51475	2.0006604158

1.54025	1.9979569395

1.5675	1.995713896

1.59775	1.9938737845

1.6325	1.992410451

1.6745	1.9912985684

1.729	1.9905213546

1.8095	1.9900598495

1.9735	1.9898816527

3	1.9898435684

Energy and Nusselt profiles for the three flow configurations shown in figures <ref> and <ref>. Fixed parameters: $\Da=1.0\times10^{-4},\,\Prm =.7,\,\epsilon_T=.7,\,\alpha=1.0,\, \Delta t = 2.5\times10^{-4}.$

In figure <ref>, we plot the energy and Nusselt profiles for the three different qualitative states presented in figures <ref> and <ref>.
For each curve, the initial jump indicates the time of noticeable formation of convection cells in their respective cases with their steady-states achieved as the profiles level out.
The deep and shallow cases (shown in red and blue, respectively) show the formation of cells, immediately followed by a steady-state.
The phenomenon of shallow convection cells forming faster than deep cells is expected.
Shallow cells have nothing obstructing their formation, while deep convection is hindered by the porous medium.
As a result, it takes longer for the fluid to gain enough velocity in the porous region for noticeable deep convection cells to form.
More precisely, the characteristic timescale for the porous-media flow given in (<ref>) is ${d_m^2}/{\lambda_m}$, which has been normalized to unity in our analysis. The flow timescale for the fluid region, meanwhile, is ${d_f^2}/{\lambda_f}$, which is shorter by a factor of $\dhat^2/\epsilon_T$.

These timescales can be used to better understand the shallow-to-deep convection case, which is shown by the yellow curves in figure <ref>.
The first jump in $E$ and $Nu$ occurs as the convection cells form in the free-flow zone, followed sometime later by a secondary jump whereby the cells coalesce into the larger, deep convection cells and push into the porous medium.
As noted above, the timescale for porous-media flow has been normalized to unity and the timescale for free-fluid flow is shorter by a factor of $\dhat^2/\epsilon_T$ or about 0.09 in the case shown.
These values are consistent with the quick initial onset free-flow convection, followed by a slower shift to deep convection.

The jumps in $Nu$ with the shallow-to-deep case demonstrate that these configurations have the potential to transfer heat more efficiently than their counterparts with deep or shallow convection.
Further investigations into this hybrid flow pattern could determine the parameter regimes which produce shallow-to-deep convection to maximize heat flow in various applications, like heat sink technology.
For example, in comparing the deep convection and shallow-to-deep convection cases with the $E(t)$ and $Nu(t)$ profiles, we see both cases eventually steady-out to approximately the same energy; that is, they have comparable deviations from their conductive states.
However, the case with shallow-to-deep convection has a larger Nusselt number than its deep-convection counterpart, indicating a greater efficiency in transferring heat. We speculate that shallow-to-deep convection is more efficient in its heat transfer than deep convection due to the route each takes to its steady state. For shallow-to-deep convection, as cells form and gain speed in the free-flow region, there is a spike in the the $Nu$ profile. As the shallow cells consolidate and penetrate into the medium, a second spike in the Nusselt value occurs.

The parameters for the simulations with deep and shallow convection are chosen so that a single group of wavenumbers was the contributing to the perturbations.
These calculations come from looking at the marginal stability curves that identify the $\Ram$ values for the onset of convection at a given depth ratio.
For larger Rayleigh numbers, where the small and large wavenumbers both contribute the perturbation growth, the stability analyses cannot predict the preferred flow configuration.
To provide a more holistic picture of flow behaviour, we use marginal stability analyses and numerical simulations to identify regions in a $\dhat-\Ram$ phase space where each configuration occurs.

Marginal stability analyses are able to predict the $\Ram$ values for the onset of convection at a given depth ratio (shown with the solid black lines of figure <ref>).
There is a small region above the critical Rayleigh numbers where a single group of wavenumbers is unstable, resulting in either deep or shallow convection, and the upper bound is noted in the phase-space diagrams with the dashed lines.
For example, with $\dhat = .2$ and $\Ram=25$, only the small wavenumbers are unstable, resulting in deep convection.
However, once the Rayleigh number is increased passed the dashed line, say to $\Ram=50$ or $\Ram=80$, the larger wavenumbers are unstable as well.
In regions where both groups of wavenumbers unstable, linear stability analysis and our coarse-grained model are not able to accurately predict convection patterns.
In practice, we find the deep or shallow convection regimes extend above the predicted regions from the stability analyses, as evidenced with the green and red triangles extending into the blue region where both groups of wavenumbers are unstable. The distance in which the red triangles persist into the blue region tells us that for these Rayleigh numbers, the small wavenumbers (which produce the deep convection cells) are only slightly unstable, and not enough so to overpower the instabilities coming from the large wavenumbers which produce the shallow cells.
For Rayleigh numbers well-above these regions in the phase space, where larger and smaller wavenumbers can interact and our analytical tools are ineffective, shallow-to-deep convection takes place.

[inner sep=0pt] (russell) at (0,0)
at (-5.25,-3.25) $0.1$;
at (-3.5,-3.25) $0.2$;
at (-1.44,-3.25) $0.3$;
at (0,-3.25) $0.4$;
at (1.75,-3.25) $0.5$;
at (-1.44,-3.8) Depth ratio, $\dhat$ ;
at (-5.65,-2.85) $10^0$;
at (-5.65,0.1) $10^1$;
at (-5.65,3.0) $10^2$;
at (-1.95,-2.7) $\dhatc \approx .27$ ;
at (-5.9,-2) Porous Rayleigh number, $\Ram$;
at (3.7,2.21)  Convection type ;
at (2.95,1.66)   Deep ;
at (2.95,1.22)   Shallow ;
at (2.95,.68)   Shallow-to-deep ;
at (2.95,.21)   None ;
at (-1.44,3.45)  Phase-space diagram of $\dhat$ vs. $\Ram$ ;

[mark size=2.5pt,color=black,rotate=180] at (2.735,1.7) triangle*;
[mark size=2pt,color=green,rotate=180] at (2.735,1.7) triangle*;

[mark size=2.5pt,color=black,left] at (2.9-0.05,1.2) triangle*;
[mark size=2pt,color=red,left] at (2.9-0.05,1.2) triangle*;

[mark size=2.5pt,color=black,left,thick] at (2.9-0.05,.7) diamond*;
[mark size=2pt,color=blue,left,thick] at (2.9-0.05,.7) diamond*;

[mark size=2pt,color=black,left] at (2.98-0.06,.21) $\bullet$;

Phase space with different types of convection noted. Solid black lines note the $\Ram$ values for marginal stability, and dashed lines mark the $\Ram$ values where both large and small wavenumbers become unstable. Fixed parameters: $\Da=1.0\times10^{-4},\,\Prm =.7,\,\epsilon_T=.7,\,\alpha=1.0,\, \Delta t = 2.5\times10^{-4}.$

The phase space shown in figure <ref> ties our theory, the stability analyses, and numerical simulations together nicely.
Marginal stability predicts the Rayleigh numbers needed for the onset of convection, and the wavenumbers associated with the unstable modes ultimately dictate the flow configuration for Rayleigh numbers near their corresponding critical value.
This is represented in the phase diagram by the region between the solid and dashed lines where the marginal stability curves can effectively determine the behaviour of convection.
The shift in the unstable wavenumbers occurs where the solid and dashed lines come together, noting the shift in convection, that can accurately be determined by our theory.
The numerical simulations agree with results from the stability analyses and theory for Rayleigh numbers around the onset of convection.
Further, the numerics allow for a more comprehensive understanding of superposed fluid-porous convection with higher Rayleigh numbers.

§ CONCLUSIONS

Based on the framework developed in <cit.>, we proposed a coarse-grained model to predict the critical depth ratio needed for the transition from deep to shallow convection, and we observed the formula is increasingly accurate in the limit of $\Da\rightarrow 0$.
The previous stability analyses and the new transition theory, when viewed in tandem with these novel numerical simulations, provide a more complete view into the phenomenon of convection in superposed fluid-porous media systems.

The coarse-grained model presented was formed under the assumption that heuristically, the shift between deep convection and shallow convection takes place when the Rayleigh numbers of the fluid and porous regions are equivalent in some sense.
In the physically relevant small Darcy number regime, we deduced appropriate boundary conditions for the uncoupled regions to determine their critical Rayleigh numbers, and as a result, we saw the formula became more accurate in the small Darcy limit of $\Da\rightarrow 0.$

To explore the extensive parameter regime outside the limitations of our model, we outlined a numerical scheme to simulate the full nonlinear system.
The main contributions were with the decoupling and time-lagging of nonlinear terms; these adjustments to the system allow for linear, decoupled, sequential solvers to be used in approximating solutions.

With our simulations, we verified results from our coarse-grained model and previous stability analyses, namely with deep and shallow convection.
However, we additionally observed a type of convection not able to be predicted by marginal stability, shallow-to-deep convection.
This kind of convection presents an exciting new direction of work, as there is potential to investigate the dynamic reorganization of the flow.
Additionally, the numerical simulations provide opportunities to explore less structured domains, perhaps with more complex interfaces <cit.>, boundaries that evolve in time <cit.>, or with some permeable membrane developing between the regions <cit.>.

[Acknowledgements]We would like to thank the reviewers for carefully critiquing the manuscript. With their suggestions, we were able to better convey our arguments and present our results in a clearer manner.

[Funding]This work was supported by the National Science Foundation (N.M., grant DMS-2012560) and the National Natural Science Foundation of China (X. W., grants 12271237 and 11871159).

[Declaration of interests]The authors report no conflict of interest.

[Data availability statement]The data that support the findings of this study are openly available at http://doi.org/10.5281/zenodo.7320220.

[Author ORCIDs]M. McCurdy, https://orcid.org/0000-0002-7343-1659; N. Moore, https://orcid.org/0000-0001-9578-7982; X. Wang, https://orcid.org/0000-0002-2399-6336