Replies: 2 comments 1 reply
-
This is because steps were only introduced in v23.5. If you are using v23.4.1, please use the notebook from the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
PyBaMM Version
23.4.1
Python Version
3.11
Describe the bug
Note: you may need to restart the kernel to use updated packages.
ImportError Traceback (most recent call last)
Cell In[31], line 4
2 import pybamm
3 import numpy as np
----> 4 from .pybamm import step
ImportError: attempted relative import with no known parent package
At t = 171.794 and h = 4.37397e-08, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 159.052 and h = 1.45264e-07, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 214.473 and h = 1.75885e-09, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 205.566 and h = 5.27685e-08, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 93.6236 and h = 1.34871e-09, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 88.3555 and h = 3.05449e-07, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 96.6589 and h = 2.72697e-10, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 216.923, , mxstep steps taken before reaching tout.
At t = 215.86 and h = 1.17469e-09, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 87.8776 and h = 1.96369e-07, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 88.0662 and h = 1.96173e-07, the corrector convergence failed repeatedly or with |h| = hmin.
At t = 96.9816, , mxstep steps taken before reaching tout.
t
0.00
<pybamm.plotting.quick_plot.QuickPlot at 0x221565eebd0>
[('Discharge at 1C for 0.5 hours', 'Discharge at C/20 for 0.5 hours'),
('Discharge at 1C for 0.5 hours', 'Discharge at C/20 for 0.5 hours'),
('Discharge at 1C for 0.5 hours', 'Discharge at C/20 for 0.5 hours'),
('Charge at 0.5 C for 45 minutes',)]
AttributeError Traceback (most recent call last)
Cell In[24], line 1
----> 1 pybamm.step.string("Discharge at 1C for 1 hour", period="1 minute", temperature="25oC", tags=["tag1"])
AttributeError: module 'pybamm' has no attribute 'step'
AttributeError Traceback (most recent call last)
Cell In[17], line 1
----> 1 pybamm.step.current(1, duration="1 hour", termination="2.5 V")
AttributeError: module 'pybamm' has no attribute 'step'
AttributeError Traceback (most recent call last)
Cell In[35], line 1
----> 1 pybamm.step.string("Discharge at 1A for 1 hour or until 2.5V")
AttributeError: module 'pybamm' has no attribute 'step'
AttributeError Traceback (most recent call last)
Cell In[26], line 4
2 sin_t = 0.5 * np.sin(2 * np.pi * t)
3 drive_cycle_power = np.column_stack([t,sin_t])
----> 4 experiment = pybamm.Experiment([pybamm.steps.power(drive_cycle_power)])
5 sim = pybamm.Simulation(model, experiment=experiment)
6 sim.solve()
AttributeError: module 'pybamm' has no attribute 'steps'
[1] Joel A. E. Andersson, Joris Gillis, Greg Horn, James B. Rawlings, and Moritz Diehl. CasADi – A software framework for nonlinear optimization and optimal control. Mathematical Programming Computation, 11(1):1–36, 2019. doi:10.1007/s12532-018-0139-4.
[2] Marc Doyle, Thomas F. Fuller, and John Newman. Modeling of galvanostatic charge and discharge of the lithium/polymer/insertion cell. Journal of the Electrochemical society, 140(6):1526–1533, 1993. doi:10.1149/1.2221597.
[3] Charles R. Harris, K. Jarrod Millman, Stéfan J. van der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith, and others. Array programming with NumPy. Nature, 585(7825):357–362, 2020. doi:10.1038/s41586-020-2649-2.
[4] Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. An asymptotic derivation of a single particle model with electrolyte. Journal of The Electrochemical Society, 166(15):A3693–A3706, 2019. doi:10.1149/2.0341915jes.
[5] Peyman Mohtat, Suhak Lee, Jason B Siegel, and Anna G Stefanopoulou. Towards better estimability of electrode-specific state of health: decoding the cell expansion. Journal of Power Sources, 427:101–111, 2019.
[6] Valentin Sulzer, Scott G. Marquis, Robert Timms, Martin Robinson, and S. Jon Chapman. Python Battery Mathematical Modelling (PyBaMM). Journal of Open Research Software, 9(1):14, 2021. doi:10.5334/jors.309.
[7] Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, and others. SciPy 1.0: fundamental algorithms for scientific computing in Python. Nature Methods, 17(3):261–272, 2020. doi:10.1038/s41592-019-0686-2.
[8] Andrew Weng, Jason B Siegel, and Anna Stefanopoulou. Differential voltage analysis for battery manufacturing process control. arXiv preprint arXiv:2303.07088, 2023.
Steps to Reproduce
In Tutorial 5 run all. and it appears
Relevant log output
No response
Beta Was this translation helpful? Give feedback.
All reactions