[![Documentation Status](https://readthedocs.org/projects/rfbzero/badge/?version=latest)](https://rfbzero.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/github/ericfell/rfbzero/graph/badge.svg)](https://codecov.io/github/ericfell/rfbzero) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) [![pypi](https://img.shields.io/pypi/v/rfbzero?color=orange)](https://pypi.org/project/rfbzero/)
[![DOI](https://joss.theoj.org/papers/10.21105/joss.06537/status.svg)](https://doi.org/10.21105/joss.06537) [![DOI](https://zenodo.org/badge/667614807.svg)](https://zenodo.org/doi/10.5281/zenodo.11594955)
RFBzero
------------
`rfbzero` is a Python package for zero dimensional simulation of electrochemical cycling in redox flow batteries (RFBs).
This package includes modules to describe the initial flow cell setup, chemical and electrochemical properties of the redox-active electrolytes being cycled, cell cycling protocol selection, and optional inputs for capacity degradation mechanisms and active species crossover.
## Installation
`rfbzero` can be installed from [PyPI](https://pypi.org/project/rfbzero/) using pip.
```bash
pip install rfbzero
```
See [Getting started with `rfbzero.py`](https://rfbzero.readthedocs.io/en/latest/getting-started.html) for instructions on simulating RFBs.
### Dependencies
`rfbzero.py` requires:
- Python (>=3.10)
- SciPy
### Examples and Documentation
Several simulated RFB examples can be found in a notebook in `docs/source/examples` (requires Jupyter notebook/lab). The documentation can be found at [rfbzero.readthedocs](https://rfbzero.readthedocs.io/en/latest/index.html).
## Package Structure
- `redox_flow_cell.py`: Configures flow cell and electrolyte parameters
- `experiment.py`: Specifies electrochemical cycling protocol
- `degradation.py`: Optional degradation mechanism functions
- `crossover.py`: Optional crossover mechanism
## Examples
To simulate a full cell with constant current (CC) cycling:
```python
from rfbzero.redox_flow_cell import ZeroDModel
from rfbzero.experiment import ConstantCurrent
# define full cell and electrolyte parameters
cell = ZeroDModel(
volume_cls=0.005, # liters
volume_ncls=0.010, # liters
c_ox_cls=0.01, # molar
c_red_cls=0.01, # molar
c_ox_ncls=0.01, # molar
c_red_ncls=0.01, # molar
ocv_50_soc=1.0, # volts
resistance=0.5, # ohms
k_0_cls=1e-3, # cm/s
k_0_ncls=1e-3, # cm/s
)
# define cycling protocol
protocol = ConstantCurrent(
voltage_limit_charge=1.5, # volts
voltage_limit_discharge=0.5, # volts
current=0.1, # amps
)
# simulate cell via protocol for 1000 seconds
results = protocol.run(cell_model=cell, duration=1000)
```
or a symmetric cell with constant current constant voltage (CCCV) cycling, with an electrolyte undergoing a first order chemical degradation in the reduced form:
```python
from rfbzero.redox_flow_cell import ZeroDModel
from rfbzero.degradation import ChemicalDegradationReduced
from rfbzero.experiment import ConstantCurrentConstantVoltage
# define symmetric cell and electrolyte parameters
cell = ZeroDModel(
volume_cls=0.005, # liters
volume_ncls=0.010, # liters
c_ox_cls=0.01, # molar
c_red_cls=0.01, # molar
c_ox_ncls=0.01, # molar
c_red_ncls=0.01, # molar
ocv_50_soc=0.0, # volts
resistance=0.5, # ohms
k_0_cls=1e-3, # cm/s
k_0_ncls=1e-3, # cm/s
)
# define cycling protocol
protocol = ConstantCurrentConstantVoltage(
voltage_limit_charge=0.2, # volts
voltage_limit_discharge=-0.2, # volts
current_cutoff_charge=0.005, # amps
current_cutoff_discharge=-0.005, # amps
current=0.1, # amps
)
# define first order chemical degradation mechanism
chem_deg = ChemicalDegradationReduced(rate_order=1, rate_constant=1e-5)
# simulate cell via protocol for 1000 seconds
results = protocol.run(cell_model=cell, degradation=chem_deg, duration=1000)
```
## 📖 Citing RFBzero
If you use RFBzero in your work, please cite our paper
> Fell, E. M., Fell, J. A., & Aziz, M. J. (2024). RFBzero: A Python package for zero-dimensional simulation of redox flow battery cycling. _Journal of Open Source Software_, **9**, 6537.
You can use the BibTeX
```
@article{Fell2024,
title = {{RFBzero: A Python package for zero-dimensional simulation of redox flow battery cycling}},
author = {Fell, Eric M. and Fell, Jeremy A. and Aziz, Michael J.},
doi = {10.21105/joss.06537},
journal = {Journal of Open Source Software},
publisher = {The Open Journal},
volume = {9},
number = {98},
pages = {6537},
year = {2024},
url = {https://doi.org/10.21105/joss.06537},
}
```
## License
[MIT](https://choosealicense.com/licenses/mit/)
Raw data
{
"_id": null,
"home_page": null,
"name": "rfbzero",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "batteries, electrochemistry, redox flow",
"author": null,
"author_email": "Eric Fell <efell@g.harvard.edu>, Jeremy Fell <jfell@sfu.ca>, Michael Aziz <maziz@harvard.edu>",
"download_url": "https://files.pythonhosted.org/packages/3d/8c/7badcee723c3532c3a714c25871b3e1b438044cb90e96e2f5c0141cb2f9d/rfbzero-1.0.1.tar.gz",
"platform": null,
"description": "[![Documentation Status](https://readthedocs.org/projects/rfbzero/badge/?version=latest)](https://rfbzero.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/github/ericfell/rfbzero/graph/badge.svg)](https://codecov.io/github/ericfell/rfbzero) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/pylint-dev/pylint) [![pypi](https://img.shields.io/pypi/v/rfbzero?color=orange)](https://pypi.org/project/rfbzero/)\n\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.06537/status.svg)](https://doi.org/10.21105/joss.06537) [![DOI](https://zenodo.org/badge/667614807.svg)](https://zenodo.org/doi/10.5281/zenodo.11594955)\n\n\nRFBzero\n------------\n\n`rfbzero` is a Python package for zero dimensional simulation of electrochemical cycling in redox flow batteries (RFBs). \n\nThis package includes modules to describe the initial flow cell setup, chemical and electrochemical properties of the redox-active electrolytes being cycled, cell cycling protocol selection, and optional inputs for capacity degradation mechanisms and active species crossover.\n\n## Installation\n\n`rfbzero` can be installed from [PyPI](https://pypi.org/project/rfbzero/) using pip.\n\n```bash\npip install rfbzero\n```\n\nSee [Getting started with `rfbzero.py`](https://rfbzero.readthedocs.io/en/latest/getting-started.html) for instructions on simulating RFBs.\n\n### Dependencies\n\n`rfbzero.py` requires:\n\n- Python (>=3.10)\n- SciPy\n\n### Examples and Documentation\n\nSeveral simulated RFB examples can be found in a notebook in `docs/source/examples` (requires Jupyter notebook/lab). The documentation can be found at [rfbzero.readthedocs](https://rfbzero.readthedocs.io/en/latest/index.html).\n\n## Package Structure\n\n- `redox_flow_cell.py`: Configures flow cell and electrolyte parameters\n- `experiment.py`: Specifies electrochemical cycling protocol\n- `degradation.py`: Optional degradation mechanism functions\n- `crossover.py`: Optional crossover mechanism\n\n\n## Examples\n\nTo simulate a full cell with constant current (CC) cycling:\n\n```python\nfrom rfbzero.redox_flow_cell import ZeroDModel\nfrom rfbzero.experiment import ConstantCurrent\n\n\n# define full cell and electrolyte parameters\ncell = ZeroDModel(\n volume_cls=0.005, # liters\n volume_ncls=0.010, # liters\n c_ox_cls=0.01, # molar\n c_red_cls=0.01, # molar\n c_ox_ncls=0.01, # molar\n c_red_ncls=0.01, # molar\n ocv_50_soc=1.0, # volts\n resistance=0.5, # ohms\n k_0_cls=1e-3, # cm/s\n k_0_ncls=1e-3, # cm/s\n)\n\n# define cycling protocol\nprotocol = ConstantCurrent(\n voltage_limit_charge=1.5, # volts\n voltage_limit_discharge=0.5, # volts\n current=0.1, # amps\n)\n\n# simulate cell via protocol for 1000 seconds\nresults = protocol.run(cell_model=cell, duration=1000)\n```\n\nor a symmetric cell with constant current constant voltage (CCCV) cycling, with an electrolyte undergoing a first order chemical degradation in the reduced form:\n\n```python\nfrom rfbzero.redox_flow_cell import ZeroDModel\nfrom rfbzero.degradation import ChemicalDegradationReduced\nfrom rfbzero.experiment import ConstantCurrentConstantVoltage\n\n\n# define symmetric cell and electrolyte parameters\ncell = ZeroDModel(\n volume_cls=0.005, # liters\n volume_ncls=0.010, # liters\n c_ox_cls=0.01, # molar\n c_red_cls=0.01, # molar\n c_ox_ncls=0.01, # molar\n c_red_ncls=0.01, # molar\n ocv_50_soc=0.0, # volts\n resistance=0.5, # ohms\n k_0_cls=1e-3, # cm/s\n k_0_ncls=1e-3, # cm/s\n)\n\n# define cycling protocol\nprotocol = ConstantCurrentConstantVoltage(\n voltage_limit_charge=0.2, # volts\n voltage_limit_discharge=-0.2, # volts\n current_cutoff_charge=0.005, # amps\n current_cutoff_discharge=-0.005, # amps\n current=0.1, # amps\n)\n\n# define first order chemical degradation mechanism\nchem_deg = ChemicalDegradationReduced(rate_order=1, rate_constant=1e-5)\n\n# simulate cell via protocol for 1000 seconds\nresults = protocol.run(cell_model=cell, degradation=chem_deg, duration=1000)\n```\n\n## \ud83d\udcd6 Citing RFBzero\n\nIf you use RFBzero in your work, please cite our paper\n\n> Fell, E. M., Fell, J. A., & Aziz, M. J. (2024). RFBzero: A Python package for zero-dimensional simulation of redox flow battery cycling. _Journal of Open Source Software_, **9**, 6537.\n\nYou can use the BibTeX\n\n```\n@article{Fell2024,\n title = {{RFBzero: A Python package for zero-dimensional simulation of redox flow battery cycling}},\n author = {Fell, Eric M. and Fell, Jeremy A. and Aziz, Michael J.},\n doi = {10.21105/joss.06537}, \n journal = {Journal of Open Source Software},\n publisher = {The Open Journal},\n volume = {9}, \n number = {98}, \n pages = {6537},\n year = {2024},\n url = {https://doi.org/10.21105/joss.06537},\n}\n```\n\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/) \n",
"bugtrack_url": null,
"license": null,
"summary": "A package for zero dimensional simulation of electrochemical cycling in redox flow batteries",
"version": "1.0.1",
"project_urls": {
"Documentation": "https://rfbzero.readthedocs.io/en/latest/index.html#",
"Homepage": "https://github.com/ericfell/rfbzero"
},
"split_keywords": [
"batteries",
" electrochemistry",
" redox flow"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3c653720913496f8becadbf2d9bdb1b1b279cdc7bf743becaafd111608a6a9ee",
"md5": "3b144eda18119761a165afe587e78cc0",
"sha256": "9f777cda041406654f19901a63bc4b5e42ce7a411ace14c3dece6d6335f65e42"
},
"downloads": -1,
"filename": "rfbzero-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b144eda18119761a165afe587e78cc0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 18951,
"upload_time": "2024-06-26T13:45:08",
"upload_time_iso_8601": "2024-06-26T13:45:08.661866Z",
"url": "https://files.pythonhosted.org/packages/3c/65/3720913496f8becadbf2d9bdb1b1b279cdc7bf743becaafd111608a6a9ee/rfbzero-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3d8c7badcee723c3532c3a714c25871b3e1b438044cb90e96e2f5c0141cb2f9d",
"md5": "775420562e7d4555db8b8f1fc00ff2e3",
"sha256": "0d6330f7c4af6eb1f26b9056f710e9df3b098c84a58028641cfbfae1d8210ed1"
},
"downloads": -1,
"filename": "rfbzero-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "775420562e7d4555db8b8f1fc00ff2e3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 404130,
"upload_time": "2024-06-26T13:45:18",
"upload_time_iso_8601": "2024-06-26T13:45:18.505096Z",
"url": "https://files.pythonhosted.org/packages/3d/8c/7badcee723c3532c3a714c25871b3e1b438044cb90e96e2f5c0141cb2f9d/rfbzero-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-26 13:45:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ericfell",
"github_project": "rfbzero",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "scipy",
"specs": []
}
],
"lcname": "rfbzero"
}