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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file PolCurveFit-1.2.0.tar.gz
.
File metadata
- Download URL: PolCurveFit-1.2.0.tar.gz
- Upload date:
- Size: 74.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01c364a884e0d1ce6372e3b69f7e141f2178916049ea2c8443b630598862cbe6 |
|
MD5 | ff5c0b83a2aca16e4b50843832c4adc2 |
|
BLAKE2b-256 | 918d63946cf8b77af358242c6a4f5e8d1c4c80ef9504c119ac68e3d27ca4d13b |
File details
Details for the file PolCurveFit-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: PolCurveFit-1.2.0-py3-none-any.whl
- Upload date:
- Size: 73.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 227dfbc713af18d53efe6341ffe0e591d2e9a51962d58f1092b116c9bfe7fff6 |
|
MD5 | b6a72f0c8085c5fe1391962a9cd17225 |
|
BLAKE2b-256 | c1ab413cec5ba73b660f3977bfeae279f24bebd0358048a7a49bf642fc73470e |