One promising cancer therapy is related to the treatment of diseased cells through thermal ablation by an individual or an agglomeration of nanoparticles acting as photothermal agents. The main principle of such a therapy consists in the photo-energy absorption by the nanoparticles and its conversion into heat in order to kill the biological media/cells in the neighboring regions of such a photothermal agent. Nevertheless, such a therapy must preserve the surrounding healthy cells (or biological media). In case of agglomerates of nanoparticles, the local concentrations of nanoparticles may increase the temperature locally. In this paper, we use the finite element method to calculate the temperature elevation for agglomerations of nanoparticles in a biological medium/cell. The positions of nanoparticles, forming the agglomerates, are randomly generated. The temperature elevation for such agglomerations of nanoparticles is then analyzed. We show that the control of the concentration of nanoparticles can preserve the efficiency of the thermal agent, but with limited risk of damage to the surrounding biological media/cells.