A system including a perpendicular recording head and soft underlayer has been studied using micromagnetic simulation. The model uses cubic cells in the underlayer and pole tips. In our model the total field consists of the magnetostatic interaction field, exchange field, anisotropy field and applied field from the nontip region of the head. A closed form result was used to calculate interaction fields in the soft underlayer and pole tips. The equation of motion for the magnetization is taken to be the Landau-Lifshitz-Gilbert equation. The geometrical configuration of the head and underlayer was varied to optimize for a high perpendicular field component and a high gradient at the media.