  We present results from three-dimensional, self-gravitating radiation
hydrodynamical models of gas accretion by planetary cores. In some cases, the
accretion flow is resolved down to the surface of the solid core -- the first
time such simulations have been performed. We investigate the dependence of the
gas accretion rate upon the planetary core mass, and the surface density and
opacity of the encompassing protoplanetary disc. Accretion of planetesimals is
neglected.
  We find that high-mass protoplanets are surrounded by thick circumplanetary
discs during their gas accretion phase but, contrary to locally-isothermal
calculations, discs do not form around accreting protoplanets with masses ~<
50M_Earth when radiation hydrodynamical simulations are performed, even if the
grain opacity is reduced from interstellar values by a factor of 100. We find
that the opacity of the gas plays a large role in determining the accretion
rates for low-mass planetary cores. For example, reducing the opacities from
interstellar values by a factor of 100 leads to roughly an order of magnitude
increase in the accretion rates for 10-20M_Earth protoplanets. The dependence
on opacity becomes less important in determining the accretion rate for more
massive cores where gravity dominates the effects of thermal support and the
protoplanet is essentially accreting at the runaway rate. Finally, for low-mass
planetary cores (~< 20M_Earth), we obtain accretion rates that are in agreement
with previous one-dimensional quasi-static models. This indicates that
three-dimensional hydrodynamical effects may not significantly alter the gas
accretion timescales that have been obtained from quasi-static models.
