A Mathematical Model of Electrochemical Reactions Coupled with Homogeneous Chemical Reactions