Optimizing the performance of a composite corrosion/scale inhibitor for CO2 flooding wells