Fundamentals of electrocoagulation