Electrochemistry: deforming electrodes

In electropolishing and electrochemical machining, the anode dissolves where the current leaves it, so its shape changes over time. Crests of a rough surface draw more current than troughs and dissolve faster, and the surface levels out. This tutorial models one wavelength of a rough anode facing a flat cathode, lets it dissolve for ten minutes, and checks the levelling rate against the classical linear theory.

What you will learn
  • Make an electrode surface move with its dissolution rate (Deforming electrode surface), and let the mesh follow it (Deforming Domain).

  • Run a Time Dependent study in which the shape changes.

  • Plot the electrode shape at every output time, and evaluate the roughness amplitude with coupling operators.

Table 1. Model at a glance

Space dimension

2D

Physics

Secondary Current Distribution (cd), primary current distribution, with a Deforming Domain

Study

Time Dependent, 0 to 600 s

Solve time

about 2 minutes (40 time steps, 81 solves)

Expected result

the amplitude decays exponentially with the removed thickness, at the rate k·coth(kL)

The physics

The electrolyte potential solves Laplace’s equation (primary current distribution: no kinetics, so the current is limited by the electrolyte’s resistance). At every instant, the metal recedes along the electrode normal at the dissolution velocity:

\[v_n = \varepsilon\,\frac{M\,i_{loc}}{n F \rho_m}\]

with the local current density \(i_{loc}\), molar mass M, number of electrons n, metal density \(\rho_m\) and current efficiency \(\varepsilon\).

For a small roughness \(h = a\cos kx\) at distance L from the cathode, linear theory gives the local current density \(i \propto 1 + a k \coth(kL) \cos kx\). Feeding it into the dissolution velocity gives the levelling law, in terms of the mean removed thickness \(\bar h\):

\[\frac{d \ln a}{d \bar h} = -k \coth(kL)\]

Every material and operating constant cancels: the amplitude falls by a factor e for every 1/k of metal removed, here 32 µm. This makes it a clean check of the moving boundary.

1. Model, parameters and geometry

  1. File  New › Model Wizard › 2D › Electrochemistry › Secondary Current Distribution › Add › Study › Time Dependent › Done.

  2. In Parameters 1:

    Name Expression Description

    lam

    200[um]

    Wavelength of the surface roughness

    L

    300[um]

    Gap from the mean anode surface to the cathode

    a0

    10[um]

    Initial amplitude of the roughness

    V

    50[mV]

    Cell voltage

    sigma

    10[S/m]

    Electrolyte conductivity

  3. Select Geometry 1 and set Length unit to µm.

  4. Draw the anode as a Parametric Curve (right-click Geometry 1 › Primitives › Parametric Curve): x lam*s, y a0*cos(2*pi*s), with s from 0 to 1, 121 points.

  5. Close the cell with a Polygon of Type Open curve: x lam lam 0 0, y a0 L L a0.

  6. Add Convert to Solid with both curves as input.

  7. Add four Box Selections (Geometry  Box Selection, level Boundary), labelled after what they select: Anode (y maximum L/2), Cathode (y minimum L/2), Left wall (x maximum lam/10) and Right wall (x minimum 0.9*lam). They stay right when the geometry is rebuilt.

  8. Press F8.

2. Physics

  1. Select Secondary Current Distribution and set Current distribution type to Primary.

  2. In Electrolyte 1, set Electrical conductivity to User defined, sigma.

  3. Add an Electrode Surface (Physics  Boundaries  Electrode Surface), label it Anode, and choose the Anode box selection. Keep Electric potential 0[V]. In the Dissolution section keep iron’s molar mass, two electrons and density, and check Deforming electrode surface (the boundary dissolves or grows). Current efficiency stays 1.

    Electrode Surface with Deforming electrode surface checked
    Figure 1. The anode: a primary electrode that dissolves
  4. Add an Electrolyte Potential on the Cathode with Electrolyte potential -V. The current then flows from the anode to the cathode, and the anode dissolves.

  5. Add a Symmetry on each wall. The walls are symmetry planes of a periodic surface, and the mesh slides along them.

  6. Add a Deforming Domain (Definitions  Deforming Domain; it goes under Component 1 › Definitions). It applies to all domains. The defaults are right: second-order (Heun) time integration, at most 0.3 boundary elements of motion per step, and a mesh that slides along straight walls.

    Deforming Domain settings
    Figure 2. Deforming Domain: how the boundary and the mesh move
COMSOL users: Deforming Domain sits under Definitions, as in COMSOL. The check box on the Electrode Surface replaces the Deforming Electrode Surface boundary condition, and Prescribed Normal Mesh Velocity (also under Definitions) moves any other boundary with an expression.

3. Mesh

A structured mesh suits this geometry. Set Mesh 1 to User-controlled mesh, add Mapped, and four Distribution nodes: 40 elements on the anode and on the cathode, 30 on each wall.

4. Study

Select Step 1: Time Dependent and set Output times to range(0,60,600) (seconds).

Time Dependent settings
Figure 3. Time Dependent step: one output every minute

Press Ctrl+=. At every time step, Elmer Studio solves the current distribution on the present shape. It moves the anode at its dissolution velocity and smooths the mesh behind it. It shortens time steps automatically where the boundary moves fast. The Messages pane reports 40 time steps and 81 solves (the Heun predictor doubles them).

5. Results

The default plots show the electrolyte potential and the current density on the deformed geometry at the selected time.

Potential on the deformed geometry
Figure 4. Electrolyte potential after 600 s: the anode has receded by about 35 µm and is much smoother

A deforming electrode also gets an Electrode Shape (cd) plot group. It is a Line Graph along the moving boundaries, with x-axis parameter x and expression +y, drawn for All output times.

Anode outlines over time
Figure 5. Electrode Shape: the anode outline every minute

Amplitude and removed thickness

To put numbers on the levelling:

  1. Add a Maximum, a Minimum and an Average coupling operator (Definitions  Component Couplings), each with Geometric entity level Boundary and the Anode selection.

  2. Add a Global Evaluation with Time/parameter selection All and two expressions:

    • (maxop1(y)-minop1(y))/2, unit um, description Amplitude;

    • -aveop1(y), unit um, description Mean removed thickness.

  3. Click Evaluate.

Global Evaluation table
Figure 6. Amplitude and removed thickness at every output time

A 1D Plot Group with a Global plot of the amplitude, on a logarithmic y axis, shows a straight line: the decay is exponential.

Amplitude against time
Figure 7. The amplitude decays exponentially

6. Check the results

  • Levelling rate. From the table, the amplitude falls from 10 µm to 3.39 µm while 34.8 µm of metal is removed, and a fit of \(\ln a\) against the removed thickness over all output times gives \(d\ln a/d\bar h\) = −31 100 m⁻¹. Linear theory gives \(-k\coth(kL)\) = −31 416 m⁻¹, 1.0 % away. The difference is the theory’s own error: it neglects terms of order \((a k)^2\), and here \(a_0 k\) = 0.31.

  • Small amplitudes. The test suite (tests/test_deforming.py) runs the same cell with a 2 µm amplitude. The measured rate then agrees with linear theory within 1 %. A control run with a uniform recession velocity (Current efficiency 1[A/m^2]/iloc) shows no levelling. So the levelling comes from the current distribution, not from the mesh smoothing.

  • A flat anode. With a0 = 0, the gap grows as the metal dissolves, and the current falls. The recession has a closed form, \((L_0+h)^2 = L_0^2 + 2 c\,\sigma V t\) with \(c = M/(nF\rho_m)\). Elmer Studio reproduces it within 2·10⁻⁴, and the electrode current within 10⁻⁹ of \(\sigma V \lambda/(L_0+h)\).

What next

  • Electrochemical machining moves boundaries much further, and sharp corners round off. Check Remesh when the mesh gets distorted on the Deforming Domain, so the mesh is rebuilt on the new shape when its elements degrade (2D models).

  • Passivation thresholds: the current efficiency can depend on the local current density, for example iloc > 10[A/cm^2], so that only areas above the threshold dissolve.

  • Kinetics: the electrode may use any kinetics of the Electrode Surface. Butler–Volmer kinetics reduce the levelling, because the kinetic resistance evens out the current.

The Deforming Domain and the moving electrode surface are described in User guide › Electrochemistry.