Coder Social home page Coder Social logo

ericfell / rfbzero Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 1.54 MB

Redox flow battery electrochemical cycling models in Python

Home Page: https://rfbzero.readthedocs.io/en/latest/index.html

License: MIT License

Python 100.00%
batteries battery-models microkinetics python simulation rfbzero

rfbzero's Issues

[JOSS Review] - tests failing

Dear authors,
I ran the tests in the repository using pytest and it looks like there is an issue with a test failing. Perhaps a good idea to add automated testing using Github CI / Github Actions? I have pasted in the output below:

(base) ➜ rfbzero git:(main) pytest tests/
============================= test session starts ==============================
platform darwin -- Python 3.11.8, pytest-7.4.0, pluggy-1.0.0
rootdir: /Users/johh/github/rfbzero
configfile: pyproject.toml
plugins: anyio-4.2.0
collected 73 items

tests/test_crossover.py .. [ 2%]
tests/test_degradation.py ......................... [ 36%]
tests/test_experiment.py .......F.......... [ 61%]
tests/test_redox_flow_cell.py ............................ [100%]

=================================== FAILURES ===================================
___________________________ TestLowCapacity.test_cc ____________________________

self = <tests.test_experiment.TestLowCapacity object at 0x117c58cd0>
capsys = <_pytest.capture.CaptureFixture object at 0x117ccced0>

def test_cc(self, capsys):
    deg = ChemicalDegradationReduced(rate_order=2, rate_constant=10)

    cell = ZeroDModel(volume_cls=0.005,  # L
                      volume_ncls=0.03,  # L
                      c_ox_cls=0.01,  # M
                      c_red_cls=0.01,  # M
                      c_ox_ncls=0.01,  # M
                      c_red_ncls=0.01,  # M
                      ocv_50_soc=0.0,  # V
                      resistance=0.8,  # ohms
                      k_0_cls=1e-3,  # cm/s
                      k_0_ncls=1e-3,  # cm/s
                      )
    protocol = ConstantCurrent(voltage_limit_charge=0.2,  # V
                               voltage_limit_discharge=-0.2,  # V
                               current=0.05,  # A
                               )
    all_results = protocol.run(cell_model=cell,
                               duration=1000,  # cycle time to simulate (s)
                               degradation=deg,
                               )

    warn_out = "capacity is less than 1% of initial CLS capacity."
    captured = capsys.readouterr()

    cyclestatus = captured.out.strip().rsplit('time steps: ', 1)[1]
  assert cyclestatus == warn_out

E AssertionError: assert 'CyclingStatus.LOW_CAPACITY.' == 'capacity is ...CLS capacity.'
E - capacity is less than 1% of initial CLS capacity.
E + CyclingStatus.LOW_CAPACITY.

tests/test_experiment.py:536: AssertionError
=========================== short test summary info ============================
FAILED tests/test_experiment.py::TestLowCapacity::test_cc - AssertionError: assert 'CyclingStatus.LOW_CAPACITY.' == 'capacity is ...CLS...
======================== 1 failed, 72 passed in 27.35s =========================

[JOSS Review] – Software paper

Dear authors,

Could you improve the state of the field? In the Background section it is not clear enough what the new features are of this software package versus existing packages, especially in comparison with the cited references, i.e., which features are the other packages missing?

This issue is related to openjournals/joss-reviews#6537

[JOSS Review] – Community guidelines

Dear authors,

To improve the community guidelines, could you please make a 'Contribution' section to improve the visibility for third parties? Now it is mentioned before the installation, which is easy to overlook when looking for the contribution guidelines.

This issue is related to openjournals/joss-reviews#6537

[JOSS Review] - Suggestions for the documentation

Dear authors,

Some very minor suggestions for the documentation:

  • Could you add the installation section to the documentation? Copy-paste from your README file is more than fine, but then everything can be found in the same documentation.

  • The crossover documentation mentions that the class is still limited to symmetric cells and that current-driven crossover cannot be simulated. If you are not working on this yourself anymore by any chance, it would be nice to make a list of possible extensions of the code for others to contribute to.

This issue is related to openjournals/joss-reviews#6537

Current-driven crossover

Description

In some cases we may want to model current-driven crossover of redox-actives, rather than purely concentration-gradient-driven crossover (as is already included in the Crossover class).

Motivation

Current-driven crossover is not a dominant effect for the large redox-active organic molecules with which rfbzero was primarily built to model, but is definitely important to include when simulating the metal-ion RFB systems (Fe, V, Cr, etc.), or systems employing small molecules and size-exclusion membranes.

Possible Implementation

If we can assume dilute solution theory is applicable, then the equations for current-driven crossover have previously been adapted for zero-dimensional cases, see The Influence of Electric Field on Crossover in Redox-Flow Batteries and later work, A Method for Quantifying Crossover in Redox Flow Cells through Compositionally Unbalanced Symmetric Cell Cycling. This should be straightforward to implement in Crossover, but more input parameters will be needed to describe membrane properties (membrane conductivity, electro-osmotic coefficient, concentration of fixed ion sites, etc.).

Additional Context

No response

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.