Equations for determining the electric field near a separatrix in a diverted tokamak are derived. The momentum equations play a central role, and include the effects of inertia, gyroviscous stress and turbulence. The turbulence terms are derived in a general form. The radial component of the electric field is determined by different physical mechanisms well inside and well outside the separatrix, and a viscous boundary layer is required to connect them. The equations show that radial current must be allowed for in this boundary layer. Mechanisms that drive radial current are discussed