In the present study, the effect of the heating pipe profile on natural convection in a two-phase fluid inside a cavity has been investigated. This geometry has been simulated with the LB Method based on the D2Q9 model for analyzing stream lines, dimensionless velocity field of fluid flow, solid particles volume fraction, temperature arrangement, and Nusselt number. These parameters have been studied in three different cases of the cavity. The results are signified by changing the geometry from a horizontal ellipse to a circular one and a vertical ellipse;the maximum particle volume fraction is decreased. Also, by changing the geometry from a horizontal ellipse to a circular and vertical ellipse, larger velocity vectors have been formed around the geometry. The Nusselt number variations of circular and vertical ellipse geometries are from 90⁰ to 270⁰. The Nusselt number variation of horizontal ellipse geometry is negligible from 90⁰ to 270⁰. Also, the Nusselt number of the circular geometry is larger than the other geometries from 270⁰ to 90⁰. The highest average Nusselt number belongs to circular, vertical and horizontal ellipse geometries, respectively.