Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: running an experiment where amperage is described in C ratings causes errors #201

Open
skywo1f opened this issue Dec 16, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@skywo1f
Copy link

skywo1f commented Dec 16, 2022

liionpack Version

June 2022

Python Version

3.8

Describe the bug

running an experiment where amperage is described in C ratings causes errors


experiment = pybamm.Experiment(
    [
        
            "Charge at 1 C until 3.65 V",
            "Hold at 3.65 V until C/10",
            "Rest for 5 minutes",
            "Discharge at 3 C until 2.5 V",
            "Rest for 5 minutes",
        
    ],period="10 seconds"
    )

causes:

Traceback (most recent call last):
  File "testA.py", line 44, in <module>
    output = lp.solve(netlist=netlist,
  File "/home/iviti/batterySims/liionpack/liionpack/solver_utils.py", line 436, in solve
    output = rm.solve(
  File "/home/iviti/batterySims/liionpack/liionpack/solvers.py", line 317, in solve
    self.protocol = lp.generate_protocol_from_experiment(experiment, flatten=True)
  File "/home/iviti/batterySims/liionpack/liionpack/protocols.py", line 28, in generate_protocol_from_experiment
    if t % dt != 0:
TypeError: unsupported operand type(s) for %: 'NoneType' and 'float'

Steps to Reproduce

run any experiment where discharging or charging is described in terms of C

Expected behaviour

This works in regular pybamm

Relevant log output

No response

Additional context

No response

@skywo1f skywo1f added the bug Something isn't working label Dec 16, 2022
@philgravy
Copy link

did you ever fix this? I'm trying to run experiments like that but I keep getting errors that say "only current operations are supported". Looking into modifying the source code but I'm curious if you've fixed it before I try doing so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants