Skip to content

lucasdekam/frumkin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

244 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frumkin

Alexander Frumkin was a Soviet Russian electrochemist, famous for his contributions to the understanding of the relationship between kinetics and the electric double layer structure.

This repository contains code for modelling the electric double layer (in absence of chemisorption) using modified Poisson-Boltzmann theory. The theory is largely based on the work of Iglič, Gongadze, and Kralj-Iglič (2019). The code is intended to be easy to use, for easy comparison to experimental capacitance data.

Installation

Install from latest Git commit:

pip install git+https://github.com/lucasdekam/frumkin

Minimal example

First, we need to define an electrolyte. We specify a list of solvents and ions. Water has been implemented out-of-the-box, and has size parameter 1. The ions have sizes 6 and 2, respectively. The size parameter specifies the size of species relative to the lattice spacing. The lattice spacing is defined here such that if all lattice sites are occupied by water molecules, their density equals the water density at room temperature.

from frumkin.electrolyte import LatticeElectrolyte, Ion, Water
conc = 1e-2  # molar concentration
el = LatticeElectrolyte([
    Water(),
    Ion(name=r"cation", size=6, concentration=conc, charge=+1),
    Ion(name=r"anion", size=2, concentration=conc, charge=-1),
])

For implementing other solvents look at the definition of the Solvent class in frumkin/electrolyte.py.

Next, we set up the model:

from frumkin.gongadze_iglic import GongadzeIglic
model = GongadzeIglic(el, ohp=3)

The ohp (outer Helmholtz plane) parameter specifies the distance of closest approach for ions in Ångstrom. If it is not specified, the model will calculate ohp as half the size of a counterion (positive ions if the surface is negatively charged and vice versa).

It is also possible to specify the permittivity in the Stern layer to a fixed value with the eps_stern parameter. If it is not specified, the Stern layer permittivity is continuous with the bulk permittivity and thus depends on the local electric field.

Given an array of potentials w.r.t the potential of zero charge, we can run a voltammetry experiment and plot the resulting surface charge and capacitance:

import numpy as np
potential = np.linspace(-1, 1, 200)
result = model.voltammetry(potential)

The result object has attributes potential, capacitance, surface_charge and electric_field. For example, one can plot the capacitance:

Charge and capacitance plots

We can also show the spatial profiles of the double layer at a fixed potential, defined in volts w.r.t. the point of zero charge:

profiles = model.single_point(potential=-1)

The profiles object has attributes x, potential, electric_field, permittivity and concentrations. The latter is a dictionary, so one can for example access the cation concentration profile through concentrations['cation'] (same name as specified in the LatticeElectrolyte object when it was created).

Spatial extent of the double layer

For detailed examples, see the examples folder.

Units

  • The standard unit of length is Ångstrom (Å) and the standard unit of energy is electronvolt (eV).
  • The second-order Poisson-Boltzmann equation has been rewritten into a system of two first-order equations (the derivation was rather involved and was checked with Wolfram Mathematica; it still needs to be written out at some point). A starting point for redoing this process with SymPy can be found in solving.ipynb.

Further reading

Further theoretical background on modified Poisson-Boltzmann models:

Development

In the future it would be interesting to add orbital-free density functional theory, chemisorption, solvent structure and more surface-specific boundary conditions, such as for metal oxides (this and this paper for example -- a start has been made in the dev-waterlayer branch).

It might be good to upgrade the solver from SciPy's solve_bvp to a finite element solver like FEniCS. Such a solver has already been implemented for Poisson-Nernst-Planck models in the electrochemistry module of matscipy.

Papers that used Frumkin

About

Modelling of electrified interfaces using Poisson-Boltzmann theory

Resources

Stars

4 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages