  We numerically investigate turbulent Rayleigh-B\'enard convection with gas
bubbles attached to the hot plate, mimicking a core feature in electrolysis,
catalysis, or boiling. The existence of bubbles on the plate reduces the global
heat transfer due to the much lower thermal conductivity of gases as compared
to liquids and changes the structure of the boundary layers. The numerical
simulations are performed in 3D at Prandtl number Pr=4.38 (water) and Rayleigh
number $10^7\le Ra \le10^8$. For simplicity, we assume the bubbles to be
equally-sized and having pinned contact lines. We vary the total gas-covered
area fraction $0.18 \le S_0 \le 0.62$, the relative bubble height $0.02\le h/H
\le0.05$ (where $H$ is the height of the Rayleigh-B\'enard cell), the bubble
number $40 \le n \le 144$, and their spatial distribution. In all cases,
asymmetric temperature profiles are observed, which we quantitatively explain
based on the heat flux conservation at each horizontal section. We further
propose the idea of using an equivalent single-phase setup to mimic the system
with attached bubbles. Based on this equivalence, we can calculate the heat
transfer. Without introducing any free parameter, the predictions for the
Nusselt number, the upper and lower thermal boundary layer thicknesses, and the
mean centre temperature well agree with the numerical results. Finally, our
predictions also work for the cases with much larger Pr (e.g. $400$), which
indicates that our results can also be applied to predict the mass transfer in
water electrolysis with bubbles attached to the electrode surface or in
catalysis.
