Thermodynamic and kinetics investigation of homogeneous and heterogeneous nucleation