Magnetic fields of planets, stars, and galaxies result from self-excitation in moving electroconducting fluids, also known as the dynamo effect. This phenomenon was recently experimentally confirmed in the Riga dynamo experiment ͓A. Gailitis et al., Phys. Rev. Lett. 84, 4365 ͑2000͒; A. Gailitis et al., Physics of Plasmas 11, 2838 ͑2004͔͒, consisting of a helical motion of sodium in a long pipe followed by a straight backflow in a surrounding annular passage, which provided adequate conditions for magnetic-field self-excitation. In this paper, a first attempt to simulate computationally the Riga experiment is reported. The velocity and turbulence fields are modeled by a finite-volume Navier-Stokes solver using a Reynolds-averaged-Navier-Stokes turbulence model. The magnetic field is computed by an Adams-Bashforth finite-difference solver. The coupling of the two computational codes, although performed sequentially, provides an improved understanding of the interaction between the fluid velocity and magnetic fields in the saturation regime of the Riga dynamo experiment under realistic working conditions.