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

# 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


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.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

PolCurveFit-1.1.0-py3-none-any.whl (73.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for PolCurveFit-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1ef79d28162cf4dd2eadb5329e62cfdfac59c1dfbca89ee1b37b6038e4eae8da
MD5 eb1d27061905660162b3a125766b6f19
BLAKE2b-256 ce42a3eefd1842b7b1526d83f32f7342e392324881c1d3a18daf9905b129ac68

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for PolCurveFit-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94e72b4dc5a00e28391f26f31f619de3823c8590f978668bb344a7f0271ffcab
MD5 838ece369f4723650fcaebb89908d30d
BLAKE2b-256 1fe34587221204b8dd73eaea7d9b9b10836c0df9d71f16d83a6fdc7dd77f9215

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