In this work, the possibility of modeling the process of thermal decomposition in the COMSOL Multiphysics program for the preparation of nanoparticles of metals and their alloys was determined. To identify the most suitable pyrolysis medium, two environments are presented: a water solution and ethanol.