Solving Electrochemical Models
Due to the highly nonlinear nature of electrode kinetics, some electrochemical models can be difficult to solve. This section includes some general tips and tricks to facilitate model solving, trouble shooting, and to improve solution accuracy.
General Current Distribution Problems
Start with the following suggestions if you encounter difficulty solving a problem.
Consider using a Stationary with Initialization or a Time Dependent with Initialization study. Both these studies will use a Current Distribution Initialization study step as a first step to solve for the potentials only. If you run into problems solving for the second step in this study you may have to change the “Current distribution type” setting to Secondary on the Current Distribution Initialization study step node, and also review the Initial Values as described in the next bullet.
Review the Initial Values, especially the potentials. Suitable initial potential values can usually be derived making a “potential walk” through the geometry, starting at the grounded boundary. Compute electric and electrolyte potentials in other domains by assuming equilibrium potential differences between electrode and electrolyte for the main electrode reactions.
Switch to Linearized Butler-Volmer kinetics (or a Primary current distribution) while troubleshooting. This can be useful to help achieve a solution for a model that does not solve with nonlinear kinetics, thereby indicating suitable initial values for the nonlinear problem.
Specifying Initial Values and Meshing Techniques in the COMSOL Multiphysics Reference Manual
Electrochemistry Coupled to Mass Transport
If the model involves electrochemistry coupled to mass transport, here are a few things to try to help improve model convergence.
Review the Initial Values for the concentration values. Zero initial concentration values can be unsuitable for tertiary current distribution problems and battery simulations, since they could imply that no charge carriers or no reacting material is present.
When setting up user-defined kinetics expressions, avoid evaluating negative concentrations by using expressions such as max(c, eps^2), where eps is the machine epsilon (a very small but finite number).
In the COMSOL Multiphysics Reference Manual:
Setting up a Study Sequence for Multiphysics Problems
For multiphysics problems, try to adjust the study sequence.
In the COMSOL Multiphysics Reference Manual:
Time-dependent Problems with Load Steps
For time-dependent problems, try the following to address accuracy and convergence issues with regards to sudden current or potential load steps.
Reduce the Maximum step taken by the solver if you want to prevent the solver from “missing” short square load steps, or change the Steps taken by solver setting from Free to Strict, or Intermediate, to control the time steps using the Times text field. Using the Events interface can also be an option in certain cases if the load cycle itself varies dynamically.
In the COMSOL Multiphysics Reference Manual:
Solver Settings
Try adjusting the solver settings.
In rare cases, try to increase the Maximum number of iterations.
If you know the order of magnitude of the dependent variables beforehand, setting the scaling method to Manual for these can improve convergence and the accuracy of the results. This may be of special importance when solving for concentrations that are initially very small but where the final order of magnitude is know a priori. This could be the case for the active species in a battery model, for example.
In the COMSOL Multiphysics Reference Manual:
 
Electrochemistry Studies and Study Steps and Cyclic Voltammetry in the COMSOL Multiphysics Reference Manual
In multicomponent systems it is rarely straightforward to predict the rest potential and direction of current flow. The Current Initialization step in COMSOL Multiphysics does this for you but is only correct if concentrations and formal potentials for all electrode reactions are specified precisely and with respect to a common reference scale.
Electrochemistry Studies and Study Steps in the COMSOL Multiphysics Reference Manual
Studies and Solvers and Building a COMSOL Multiphysics Model in the COMSOL Multiphysics Reference Manual