We study the structure and dynamics of the gap created by a protoplanet in an accretion disc . The hydrodynamic equations for a flat , two-dimensional , non-selfgravitating protostellar accretion disc with an embedded , Jupiter sized protoplanet on a circular orbit are solved . To simulate possible accretion of mass onto the protoplanet we continually remove mass from the interior of the planet ’ s Roche lobe which is monitored . Firstly , it is shown that consistent results independent on numerical issues ( such as boundary or initial conditions , artificial viscosity or resolution ) can be obtained . Then , a detailed parameter study delineates the influence of the disc viscosity and pressure on the magnitude of the accretion rate . We find that , even after the formation of a gap in the disc , the planet is still able to accrete more mass from the disc . This accretion occurs from regions of the disc which are radially exterior and interior to the planet ’ s orbital radius . The rate depends on the magnitude of the viscosity and vertical thickness of the disc . For a disc viscosity \alpha = 10 ^ { -3 } and vertical thickness H / r = 0.05 we estimate the time scale for the accumulation of one Jupiter mass to be of order hundred thousand years . For a larger ( smaller ) viscosity and disc thickness this accretion rate is increasing ( decreasing ) . For a very small viscosity \alpha \raisebox { -2.58 pt } { $ \stackrel { { \displaystyle < } } { \sim } $ } 5 10 ^ { -4 } the mass accretion rate through the gap onto the planet is markedly reduced , and the corresponding accretion time scale becomes larger than the viscous evolution time of the disc .