This article presents a model that is suitable for modeling changes in the chemical potential and the rate of attraction of phases, taking into account thermal effects, by solving the Kahn-Hilliard equation under various initial conditions. Thermal radiation is solved in the framework of the Kahn-Hilliard equation, which has been applied to many physical applications, such as two - and three-phase fluid flow, phase separation, flow visualization, and quantum dot formation. In this article, the numerical solution of the Kahn-Hilliard equation is made on a spaced grid, where the scalar values (pressure, phase function, density, viscosity) are determined in the center of the cell, and the velocity components are at a distance of half a step. Numerical research has shown that the use of a spaced grid avoids the appearance of a so-called staggered oscillating pattern for pressure. An additional advantage of using a spaced grid is that the discrete pressure field automatically satisfies the discrete representation of the integral boundary condition.