Skip to content

triitium/pyCEx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pycex

pycex is a small electrochemistry package for Tafel and Butler-Volmer analysis from measurement data.

Installation

For now installation has to be done manually by the user but publishing of the library is planned as soon as its finished.

Scope

pycex expects the user to import files and prepare arrays externally. It does not include a dedicated IO layer.

Overpotential

pycex treats overpotential as:

eta = E - E_eq

You can construct ElectrochemData in either of these two ways:

ElectrochemData(eta=eta, current_density_A_cm2=j)

or

ElectrochemData(
    potential_V=E,
    equilibrium_potential_V=E_eq,
    current_density_A_cm2=j,
)

Quick start

import numpy as np
from pycex import ButlerVolmerFit, ElectrochemData, TafelFit

E = np.linspace(-0.12, 0.12, 121)
E_eq = 0.0
j = 1e-6 * (
    np.exp(0.5 * 96485.33212 / (8.31446261815324 * 298.15) * (E - E_eq))
    - np.exp(-0.5 * 96485.33212 / (8.31446261815324 * 298.15) * (E - E_eq))
)

data = ElectrochemData(
    potential_V=E,
    equilibrium_potential_V=E_eq,
    current_density_A_cm2=j,
)

tafel = TafelFit(data, eta_min_abs=0.03, eta_max_abs=0.12).analyze().summary
bv = ButlerVolmerFit(data, eta_min_abs=0.0, eta_max_abs=0.12).analyze().result

Notes

  • eta is overpotential in volts
  • j is current density in A cm^-2
  • The conventional sign convention is assumed: anodic current positive and cathodic current negative
  • If needed, iR correction should be handled before constructing ElectrochemData

About

Electrochemical exchange current evaluation library including tafel and butler-volmer analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages