Skip to content

Adding Electrochemistry

Matthew Hockley edited this page Nov 3, 2020 · 5 revisions

Electrochemistry (EC) is the study of electricity and chemical change. EC has many applications namely electrolysis, a reaction driven by an electric input, or chemical reaction producing an electric output such as a battery. The equations governing the EC in BERNAISE is an adaption of the advection-diffusion-reaction equations with an electric field condition, more information is available in Asger Bolet's, Gaute Linga's and Joachim Mathiesen's paper and FEniCS Advection-Diffusion-Reaction Equations Demo. In microfluidics, understanding how micro-droplets behave in an electric field (TBC) as well as the transport of chemicals (TBC - Spiral 2D EC) is fundamental.

The EC models often are limited to the time step where assumptions are made for the diffusion. Too large a time step, the assumption will be unrealistic and lead to an unstable system. The EC chemicals are defined as solutes which have the format name, which phase (1 if no phase field), diffusion in phase 1 (m2/s), diffusion in phase 2 (m2/s), solubility energy in phase 1 (N/A) and solubility energy in phase 1 (N/A).

solutes = [["c_p", 1, 1e-5, 1e-3, 4., 1.]]

problem()

As mentioned above, a solutes variable needs to be created to define the chemical species in the system. See above for more information. As mentioned in Creating a CFD problem, the most important function is problem(). This function contains a dictionary called parameters which needs the following amended or added...

Parameter Description
enable_EC Enable Electrochemistry study
V_left or V_right Define electric field variables to apply to boundaries. See create_bcs().
solutes = solutes Store the solutes array in the parameter dictionary

initialize()

initialize() function allows for assignment of a pre-defined assumption for the problems. Read more in initialize() main. In EC problems, initial placement of chemicals in the system can be define by position and phase similar to solutes in problem().