Optimization of calcium sulfate scale reduction using magnetic field