A mathematical model for a homogeneous (over regions of distinctly different electrophysical properties) simulation of phenomena in a railgun launcher is constructed. The necessity of the use of three-dimensional (3-D) approximation is shown. The algorithm for defining boundary conditions is developed, so that a given total launcher current is equal to the current through a region of simulation. Numerical calculations with different ways of specifying boundary conditions are compared. The results of 3-D numerical simulation of railguns of different configurations are presented. Particularly, the muzzle-fed railgun is described in detail.