Maintaining the soil in a frozen state in a cryolithozone is necessary for preventing the collapse of structures. The most effective technical solution for this is the use of two-phase passive heat stabilizers. Monitoring the state of permafrost soil allows to accept technical decisions that prevent soil thawing. Calculation the effective parameters of such decisions requires mathematical modeling of thermal and hydrodynamic processes. An approach is proposed to effectively compensate the heat flux from the pile on the ground, assuming the location of the heat stabilizer in the same well with the pile or at a slight distance from it. The aim of the work is to calculate the effective parameters of the heat stabilizer depending on its location relative to the pile. The developed mathematical model assumes the five tasks: 1) blowing the above-ground part of the heat stabilizer with air; 2) movement of liquid refrigerant to the bottom of the heat stabilizer; 3) cooling of the casing of the heat stabilizer with an two-phase flow of refrigerant; 4) heat exchange in the system refrigerant — the casing — frozen soil; 5) compensation of heat flow from the pile into the ground with heat flow from the ground into the heat stabilizer. The first problem is solved on the basis of an empirical criterion equation. The second and third tasks are solved using the laws of conservation of mass, momentum and energy. The fourth and fifth tasks involve solving the equation of thermal conductivity. As a result of calculations, the effective parameters of the heat stabilizer were obtained. The minimum lateral dimensions of the heat stabilizer casing have been established to compensate the heat flow from the pile into the ground. The time of freezing front reaching the pile from the heat stabilizer located at a distance of 0.5 m from one of its corners has been determined.