Giter Site home page Giter Site logo

limhes / ecsim Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 5.0 31 MB

Fast and general cyclic voltammetry simulator: simulation of electrode processes coupled to homogeneous reactions

License: GNU General Public License v3.0

C++ 89.31% Shell 0.12% QMake 0.04% Python 1.50% Jupyter Notebook 8.84% TeX 0.01% Dockerfile 0.02% C 0.15%
python electrochemistry voltammetry simulation

ecsim's People

Contributors

limhes avatar miguelaferreira avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ecsim's Issues

Error while importing pyecsim

import pyecsim returns the following error:

Simulation: PyType_Ready failed (UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 270: invalid start byte)!

Unsupported compiler -- at least C++11 support is needed!

Rather than an issue, this is probably the reflection of my ignorance. I am trying to install ecsim on a mac for python use and receive this error: Unsupported compiler -- at least C++11 support is needed! as a RuntimeError after running a python3.9 setup.py install. I imagine that you might need more details to hopefully try to help me. I do not think that it has to do with the pybind11 because I have that and there is some runtime. Again, not an expert on this, just a chemist. Thanks.

Python issues on high kinetics while simulating ECcat mechanism

Hey, I found this excellent package simulating the cyclic voltammetry and try to use it in my projects. When I simulated the ECcat mechanism with high homogeneous kinetics, this programme returns std::badloc error. I tried to solve it myself, but I failed.

Here is the codes I use:

import pyecsim as ecs
import matplotlib.pyplot as plt

simECr = ecs.Simulation(True)

P = ecs.Species('P', 1.0, 1.0e-9) # name, concentration [mol/m3], diffusion coefficient [m2/s]
Q = ecs.Species('Q', 0.0, 1.0e-9)

A = ecs.Species('A', 1.0, 1.0e-9)
B = ecs.Species('B', 0.0, 1.0e-9)
# C = ecs.Species('C', 0.0, 1.0e-9)

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

rxn1 = ecs.Reaction(A, Q, B, P, 300000, 0).enable() # reactant1, reactant2, product1, product2, k_f, k_b
simECr.sys.addReaction( rxn1 )

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

plt.plot(*simECr.run())

And the error message :

---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
<ipython-input-6-c5b7c4bcb650> in <module>
      1 # [potential, current] = simECr.run()
      2 # rxn1.setKf(2.3e3)
----> 3 plt.plot(*simECr.run())

MemoryError: std::bad_alloc

my working environment: CentOS 7.9, JupyterLab 3.2.9, Python 3.6.8, the pyecsim package was installed through PyPi.

I succeeded using these parameters on your website version, so I guess there might be something wrong with the python version.

Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.