The buoyant rise of thermals (i.e. bubbles of enhanced entropy, but initial
ly in pressure equilibrium) is investigated numerically in three dimensions
for the case of an adiabatically stratified layer covering 6-9 pressure sc
ale heights. It is found that these bubbles can travel to large heights bef
ore being braked by the excess pressure that builds up in order to drive th
e gas sideways in the head of the bubble. Until this happens, the momentum
of the bubble grows ass described by the time-integrated buoyancy force. Th
is validates the simple theory of bubble dynamics whereby the mass entrainm
ent of the bubble provides an effective braking force well before the bubbl
e stops ascending. This is quantified by an entrainment parameter alpha whi
ch is calculated from the simulations and is found to he in good agreement
with the experimental measurements. This work is discussed in the context o
f contact binaries whose secondaries could be subject to dissipative heatin
g in the outermost layers.