The invention discloses a
triazole modified
mannich base compound and a preparation method thereof.CH3I and THF are added into a reactor, CH3SCH3 is added dropwise, and stirring is performed for 8-12 h; then, a
deprotonation reaction is performed for 0.2-1.5 h, then,
mannich base is added dropwise at the temperature of 15-35 DEG C, a heat preservation reaction is performed after the
mannich base is added dropwise, and a mannich base
epoxy compound is obtained;
triazole and DMF are added into a reaction kettle, the mannich base
epoxy compound is added into the reaction kettle dropwise, the base is added, a thermostatic reaction is performed, and a
heterocyclic compound modified mannich base compound is obtained.A
triazole modified mannich base
corrosion inhibitor is obtained through an epoxidation reaction and etheric ring-opening reaction.According to the mannich base, N and O atoms are used as
corrosion inhibitor molecules of an
active center, complexing can be performed on
lone pair electrons and
metal ions in a coordinate bond mode to form a
polymer, and the
lone pair electrons can be combined with the
metal ions so as to cover the surface of equipment in an adsorption membrane to achieve the
corrosion inhibiting action.