The solution of wellbore multiphase flow models has an important position in oil−gas field development. However, the solution of multiphase flow models often involves a series of complicated situations such as interphase mass and energy transfer, surface problems, and so on. Foam carrying sand particles in the wellbore is a solid, liquid, and gas three-phase cylinder flow problem. To solve this problem, we developed a computational fluid dynamics-discrete element method model based on the traditional N−S equations to track the streamline of the foam fluid and sand particles in the wellbore. On this basis, we investigated the influence of three factors, i.e., foam and sand properties and wellbore parameters, on the sand carrying rate of foam. The results show that whether the sand mound at the bottom of wells that can be dispersed is mainly affected by the properties of foam. The location of sand deposition in the wellbore and the effectiveness of foam in sand transportation are mainly influenced by the wellbore parameters and sand properties.