Nonlinear phase field model for electrodeposition in electrochemical systems