Vortical flows with an axial (z-axis) swirl and a toroidal circulation (in the (ρ, z)-plane) can be observed in a wide range of fluid mechanical phenomena such as flow around rotary machines or natural vortices like tornadoes and hurricanes. In this paper, we obtain exact analytical solutions for a general class of steady systems with such three-dimensional circulating structures. Assuming incompressible ideal fluid, a general single-variable equation, known as the Squire-Long equation, can be constructed which can uniquely describe the velocity fields with steady axial and toroidal circulations. In this paper, we consider the case where this type of flow can be analysed by solving a linear homogeneous partial differential equation. The derived equation resembles the governing equation of the hydrogen problem. As a result, we obtain a quantization relation which is similar to the expression for the quantized energy states in a hydrogen atom. For circulating flows, this formalism provides a complete set of orthogonal basis functions which are regular and localized. Hence, each of the basis solutions can be used as a simplified model for a realistic phenomenon. Moreover, an arbitrary circulating field can be expanded in terms of these orthogonal functions. Such an expansion can be potentially useful in the study of more general vortices. As illustrations, we present a few examples where we solve the linear homogeneous equation to analyse fluid mechanical systems which can be models for circulating flow in confined geometry. First, we consider three-dimensional vortices confined between two parallel planar walls. Our examples include flows between two infinite planar walls, inside and outside a vertical cylinder bounded at the ends by horizontal plates, and in an axially confined annular region. Then we describe the special way in which the basis functions should be superposed so that a complicated steady velocity-field with three-dimensional vortical structures can be constructed. Two such cases are discussed to indicate that the derived solutions can be used for complicated fluid mechanical modelling.