  We numerically investigate turbulent Rayleigh-B\'enard convection within two
immiscible fluid layers, aiming to understand how the layer thickness and fluid
properties affect the heat transfer (characterized by the Nusselt number $Nu$)
in two-layer systems. Both two- and three-dimensional simulations are performed
at fixed global Rayleigh number $Ra=10^8$, Prandtl number $Pr=4.38$, and Weber
number $We=5$. We vary the relative thickness of the upper layer between $0.01
\le \alpha \le 0.99$ and the thermal conductivity coefficient ratio of the two
liquids between $0.1 \le \lambda_k \le 10$. Two flow regimes are observed: In
the first regime at $0.04\le\alpha\le0.96$, convective flows appear in both
layers and $Nu$ is not sensitive to $\alpha$. In the second regime at
$\alpha\le0.02$ or $\alpha\ge0.98$, convective flow only exists in the thicker
layer, while the thinner one is dominated by pure conduction. In this regime,
$Nu$ is sensitive to $\alpha$. To predict $Nu$ in the system in which the two
layers are separated by a unique interface, we apply the Grossmann-Lohse theory
for both individual layers and impose heat flux conservation at the interface.
Without introducing any free parameter, the predictions for $Nu$ and for the
temperature at the interface well agree with our numerical results and previous
experimental data.
