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
# upload an example polarization curve, using the module DataImport
from polcurvefit import DataImport as di
inputfile = './PolCurveFit/data/example_txt.txt'
E,I = di.load_txt(inputfile, lines_header = 1)
# Instantiate a polarization curve object
from polcurvefit import polcurvefit
Polcurve = polcurvefit(E,I, R= 0, sample_surface=2.0106E-04)
# Apply a fitting technique: 'the activation control fit':
results = Polcurve.active_pol_fit(window=[-0.05,0])
# 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.4,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.1.1.tar.gz
.
File metadata
- Download URL: PolCurveFit-1.1.1.tar.gz
- Upload date:
- Size: 74.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cc3dec2fe50209d577b708ed48e172499b554b283ce8db2fde0502c066d88f8 |
|
MD5 | f98f547d243ee22a44ce600de2b384fa |
|
BLAKE2b-256 | 9537e1aa08c84e3644211d260fb29fcfc9e5b2088554b60b042b3793f903a54f |
File details
Details for the file PolCurveFit-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: PolCurveFit-1.1.1-py3-none-any.whl
- Upload date:
- Size: 73.3 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 | cb908ce7d1b394e4c5a3060ddf7d5ff1381a31e4ec1b84b2465e05cb91b8bade |
|
MD5 | db732a08b330d7b88e8bf35e53444a2a |
|
BLAKE2b-256 | 610c6ad988c643063c1a75b9151e76ab72d217ab3d779610a040925d43d08ab1 |