The ablation process of hydrogen fuel pellets in hot magnetized plasmas is investigated using a newly developed two dimensional time dependent hydrodynamics code, P2D. Surface evaporation and ablated fluid flow are evolved, coupled with a kinetic calculation of the non-local heating due to slowing down of hot Maxwellian background electrons in the cold ablated plasma. Results of the neutral gas shielding model of pellet ablation are extended to include effects due to non-spherical ablation flows, proper treatment of scattering in the kinetic calculation of the hot electron heat deposition, and atomic physics processes in the ablation cloud and at the pellet surface. These effects have been considered previously, though never as a comprehensive whole. The non-spherical nature of the ablation flow reduces the ablation rate by about a factor of two, while the use of a full Maxwellian distribution for the hot electrons increases ablation by a factor of about four. With Maxwellian hot electrons, atomic physics effects (principally due to dissociation and sublimation) can reduce the ablation rate by up to a factor of two. These effects are systematically quantified using simple physical arguments and code results. For comparison with experiment, we give a simple fit to the code ablation rate results for spherical deuterium pellets: G2DGS approximately=1.65*1015Rp(cm)1.26ne(cm-3)0.35Te(eV)1.87 atoms/s, where Rp is the pellet radius and ne (Te) is the plasma density (temperature). This fit is compared with measured local ablation rates in Ohmic discharges on TFTR and JET. Predicted ablation rate profiles agree well with those on TFTR, but poorly with those on JET; pellet penetration depths agree well on both machines. Probable causes of the observed discrepancies (both experimental and theoretical) are discussed; in particular, transport processes in the post injection plasmas are shown to be able to account for some of the differences