The first step of a project to study three-dimensional numerical dynamo models in a rapidly rotating sphere is reported. We aim at finding solutions in the magnetostrophic regime, where the Taylor's condition is obeyed. Viscous terms, including the Ekman suction at the boundary, are discarded. At this stage, our project consists of investigating the coupling of the momentum and induction equations. The energy equation is ignored and an imposed velocity provides the energy source. We present our code and we show that the algorithm to calculate the geostrophic velocity is stable.