Two-phase flow in a horizontal pipe has a pronounced feature; that is, two-phase-flow parameters are highly nonsymmetric because gravity is perpendicular to the mean flow direction. Thus, three-dimensional analysis is necessary for the accurate prediction of two-phase flow in a horizontal pipe, such as the hot leg and cold leg of a pressurized water reactor and the pressure tubes in a CANDU reactor. In this study, we simulated bubbly flows in horizontal pipes using the CUPID code, which adopts a two-fluid, three-field model for two-phase flow. In the preliminary calculations, it was found that the particle-averaged two-fluid momentum equation, rather than the standard two-fluid momentum equation, predicts a physically reasonable slip ratio and nondrag forces, except turbulent dispersion forces have negligible effects on the radial void distribution when the particle-averaged two-fluid momentum equation is used. Based on the results, we selected the physical models and computational mesh for subsequent code assessment using various bubbly flow experiments in horizontal pipes. The turbulent dispersion force model was improved to take into account the large void fraction change at the top. The results of the code assessment show good predictions for the axial pressure drop, liquid velocity, and turbulent kinetic energy profile and predict reasonably well the effects of jl and jg on two-phase-flow parameters. However, additional studies are needed for more accurate prediction of the nonsymmetric distribution of gas velocity and turbulent kinetic energy.