Skip to main content

PyECsim: fast and general voltammetry simulation

Project description

PyECsim is a fast and general simulator of voltammetry experiments. Using the latest state-of-the-art algorithms, it simulates

  • any number of electrode processes, using Butler-Volmer charge transfer kinetics, coupled to

  • any number of homogeneous reactions (first or second order), using

  • user-defined voltammetry waveforms.

A typical simulation, even with very large reaction rate constants (10e9 /s), takes around 10 ms to run. Because the simulations are fast, you can use them inside the target function of an optimization routine.

In-depth documentation can be found on read the docs.

# Install

Installing PyECsim is easy:

pip install --user pyecsim

# Quick-start

The below example is a minimal piece of code that simulates a charge transfer step (ox + e <-> red) coupled to a chemical reaction (ox <-> prod).

Import PyECsim into your Python code (and matplotlib to plot the voltammogram):

import pyecsim as ecs
import matplotlib.pyplot as plt

Then create a simulator and species, a charge transfer step and a chemical reaction:

sim = ecs.Simulation(True) # or False to suppress output

red = ecs.Species('reduced species', 1.0, 1.0e-9) # name, concentration [mol/m3], diffusion coefficient [m2/s]
ox = ecs.Species('oxidized species', 0.0, 1.0e-9)
prod = ecs.Species('reaction product', 0.0, 1.0e-9)

rdx1 = ecs.Redox(ox, red, 1, 0.0, 10.0, 0.5).enable() # ox, red, n, E_0 [V], k_e [m/s], alpha
sim.sys.addRedox( rdx1 )

rxn1 = ecs.Reaction(ox, None, prod, None, 5.0, 0.0).enable() # reactant1, reactant2, product1, product2, k_f, k_b
sim.sys.addReaction( rxn1 )

Lastly, we set the electrode type and radius, the voltammograms initial/vertex/final potentials and the scan rate:

sim.el.disk(1.0e-3) # radius [m]
sim.exper.setScanPotentials(-0.5, [0.5], -0.5) # potentials [V]: initial, [0 or more vertices], final
sim.exper.setScanRate(1.0) # scan rate [V/s]

And then we can run the simulation and plot the results:

[potential, current] = sim.run()
plt.plot(potential, current)

Which gives:

http://limhes.net/upload/images_ecsim/cv_readme.png

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyecsim-0.2.3.post2-cp39-cp39-win_amd64.whl (172.4 kB view details)

Uploaded CPython 3.9Windows x86-64

pyecsim-0.2.3.post2-cp39-cp39-manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.9

pyecsim-0.2.3.post2-cp38-cp38-win_amd64.whl (171.7 kB view details)

Uploaded CPython 3.8Windows x86-64

pyecsim-0.2.3.post2-cp38-cp38-manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.8

pyecsim-0.2.3.post2-cp37-cp37m-win_amd64.whl (170.2 kB view details)

Uploaded CPython 3.7mWindows x86-64

pyecsim-0.2.3.post2-cp37-cp37m-manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.7m

pyecsim-0.2.3.post2-cp36-cp36m-win_amd64.whl (228.4 kB view details)

Uploaded CPython 3.6mWindows x86-64

pyecsim-0.2.3.post2-cp36-cp36m-manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.6m

pyecsim-0.2.3.post2-cp35-cp35m-win_amd64.whl (180.7 kB view details)

Uploaded CPython 3.5mWindows x86-64

pyecsim-0.2.3.post2-cp35-cp35m-manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.5m

File details

Details for the file pyecsim-0.2.3.post2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 172.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4003b07599f4cebbb92abb7f468a571a7e07a9147af91f76c007fddca7e7ccb5
MD5 03846379646c3e985008de30bdcc925a
BLAKE2b-256 0e01745038faa4b75dbf9190dcf5b301df63235d811ba8f7f2e1f2a5985f4c37

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 4.5 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6acb98526f64701e8786dada09a3367f521b1b69e80289345f7ce727d91d2d0
MD5 cd0351bd42d598a9377480983b5f63ac
BLAKE2b-256 108471b8eaf0d21a5e48ec216afad18967b8b2840b691aac7838dfa9366cb382

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 171.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1909d90ae9da522b3c4ef4092285793dc43cc42d53a8d61513fbf3bed05a6a69
MD5 3234a6b25fc96a65862deef8c5707117
BLAKE2b-256 86eace1e4d22be04052f877b5b747f7974100d15a2b3e5e88c923865be867ece

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 de644d581b059991511feb1cb47f8908198cc6e37b14296ef995c639cefcd8e3
MD5 76cbd93a3b58259497fc3a03584bb2fa
BLAKE2b-256 7dcfee38f12fe32e12a0a2974d5f4890cddfd070ce12da6bee496dd82fe7b1e4

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 170.2 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 570473a7bb7ac016405c4a22def5ea26364534f6942b6d7cc9882d5c1933158e
MD5 780daeedc3906ca4878bb28be804bd2f
BLAKE2b-256 113a74cf8bf3ce295a677a45e60c06f9012ee411f683a94eaf33af7afa8aa01c

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0d20ffe29fbde902a0743909b02431a6090be04596989d44da67dc2e7de0a1c
MD5 a29d54a34b8fed3e8555c5eab5e2ef3f
BLAKE2b-256 f57e94d24dd29cf8addb5ca46b45cc40fe04ed7e938b8b1f2ea58e53766496f6

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 228.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 a2f83dd3d6886f7051b630e591817ad825e68655a4a7ead4e88665addb6bade5
MD5 eec4c75163c4489ade159fe9b0f82750
BLAKE2b-256 db363119ed2c2660cf9bec6e3c50377c5860cfcb450725dbb04963272defa566

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp36-cp36m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp36-cp36m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c1595e9c6de17c8b2e492116b58999ed3d7203d4fae7bb94fe7ba6fb5d1314f
MD5 fb682b4e806b6bec7b34846b37b2d8d5
BLAKE2b-256 2c59a22fa56a4c324df8666715783467aa831b0f3f52717e1e9f9ebbb36c6373

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 180.7 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 c0a70d670a5e621387ded7000b7a4efa3ec3ecf245b162aebf705266895c8749
MD5 b8ae3d776d6b580129800a40b5c60a93
BLAKE2b-256 ccce97765a11bef721bb80c6dee39f9fe9a4acb722ceb06b25e6537b42bff3a2

See more details on using hashes here.

File details

Details for the file pyecsim-0.2.3.post2-cp35-cp35m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyecsim-0.2.3.post2-cp35-cp35m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for pyecsim-0.2.3.post2-cp35-cp35m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 48b35d8022f542154cf02f51346b9eb58578b3d901169444ee76e77491628853
MD5 941081af338c7bc196a61ff72e943b25
BLAKE2b-256 edbaffd1647d71b87907551d8942731e51188156b54cb5b1759571e1519c02ee

See more details on using hashes here.

Supported by

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