To investigate the possibility of using fuel for plant origin in a diesel generator, safflower methyl ester was prepared and used as a biodiesel. In this research, biodiesel was produced through a transesterification reaction using a hydrodynamic reactor, which increased the reaction efficiency and reduced fuel production time. Upon increasing the reaction time from 30 seconds to 60 seconds, the reaction performance increased by 5.5 %. Then, its important features complied with ASTM D-6751 standard. The performance and pollution indices of the diesel generator engine were tested with compounds B0, B20, B50, B80 and B100. The results of short-term engine tests showed that by increasing the share of biodiesel to 20 %, CO emissions were reduced by 21 % compared to pure diesel fuel, but the amount of NOX increased by 0.82 % compared to diesel. Also, the use of 20 % volume of biodiesel in the fuel composition increased the thermal efficiency of braking, braking power, and braking torque of fuel, compared to diesel. Also, the specific fuel consumption of B20 was reduced by 2 %, which is very important economically. Finally, the TOPSIS analysis illustrated that B50 fuel outperformed pure diesel fuel and other listed fuel combinations.