Skip to main content

library for the analysis of polarization curves

Project description

PolCurveFit

A python library to analyse polarization curves, by fitting theoretical curves to input data. Parameters such as the corrosion potential, corrosion rate, Tafel slopes and exchange current densities can be obtained, with three included techniques: Tafel extrapolation: a linear fit to a defined Tafel region Activation control fit: fitting of a theoretical curve describing the anodic and cathodeic activation controlled currents around OCP. Mixed activation-diffusion control fit: fitting of a theoretical curve describing an anodic domain with solely activation controlled currents and a cathodic domain with (mixed) activation and diffusion controlled currents

Installation

pip install PolCurveFit

Documentation

Find the documentation on: https://polcurvefit.readthedocs.io/

Example

Example of how to apply the code

import numpy as np

# An artificial polarization curve
E = np.arange(-1.0, 0.1, 0.01)
I = 0.002 * np.exp(2.3*(E+0.2)/0.08) - 0.002*np.exp(2.3*(-0.2-E)/0.18)/(1+((0.002*np.exp(2.3*(-0.2-E)/0.18))/0.3))

# Instantiate a polarization curve object
from polcurvefit import polcurvefit
Polcurve = polcurvefit(E,I, R= 0, sample_surface=1E-3)

# Apply a fitting technique: 'the activation control fit':
results = Polcurve.active_pol_fit(window=[-0.3,0.1])

# Save the results and visualise the obtained fit
Polcurve.save_to_txt(filename = './output_act')
Polcurve.plotting(output_folder='figures/output_act')

# Apply a fitting technique: 'the mixed activation-diffusion control fit' with a specific weight distribution:
results = Polcurve.mixed_pol_fit(window=[-0.7,0.1], apply_weight_distribution = True, w_ac = 0.07, W = 80)

# Save the results and visualise the obtained fit
Polcurve.save_to_txt(filename = './output_mixed')
Polcurve.plotting(output_folder='figures/output_mixed')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PolCurveFit-1.2.1.tar.gz (74.3 kB view details)

Uploaded Source

Built Distribution

PolCurveFit-1.2.1-py3-none-any.whl (73.5 kB view details)

Uploaded Python 3

File details

Details for the file PolCurveFit-1.2.1.tar.gz.

File metadata

  • Download URL: PolCurveFit-1.2.1.tar.gz
  • Upload date:
  • Size: 74.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.3

File hashes

Hashes for PolCurveFit-1.2.1.tar.gz
Algorithm Hash digest
SHA256 28c979d29cfe88acef7c6ed15cc4c94917d09de371f09c5fc9055db5c9779381
MD5 e22cc6792c9ddd39739a1ed3554aa8b6
BLAKE2b-256 f4cc5822766f5aeff4c624d713ed3e9d726495666ff80623dcb71ea22ec2feee

See more details on using hashes here.

File details

Details for the file PolCurveFit-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: PolCurveFit-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 73.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.3

File hashes

Hashes for PolCurveFit-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ea30661641b3075329a64a1a861e0ba3d95e6fd1b3660e1e571584ce70fa065
MD5 8a82adaf51ef3ad797b727fa6fe0d818
BLAKE2b-256 c4f0333ca8c146d54f9d3564dc49b9c75c87615c615cec250bc56a7ee7eaa986

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page