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]: Cannot solve the composite SiG-anode DFN model with an initial_soc #3321

Closed
michelegalasso opened this issue Sep 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@michelegalasso
Copy link

PyBaMM Version

23.5

Python Version

3.10.12

Describe the bug

I am trying to use the composite SiG-anode DFM model by following the guide at this link. I can reproduce the steps of the guide, but when I introduce an initial_soc value I get the following error:

KeyError: "'Negative electrode OCP [V]' not found. Use the dimensional version 'Primary: Negative electrode OCP [V]' instead."

Steps to Reproduce

import numpy as np

# load parameter values
params = pybamm.ParameterValues('Chen2020_composite')

# set current equal to C/40
params['Current function [A]'] = params['Nominal cell capacity [A.h]'] / 40

# load battery model
model = pybamm.lithium_ion.DFN({
    'particle phases': ('2', '1'),
    'open-circuit potential': (('single', 'current sigmoid'), 'single')
})

# simulate
sim = pybamm.Simulation(model, parameter_values=params)
sim.solve(t_eval=np.arange(0, 50 * 3600, 60), initial_soc=0.2)```

### Relevant log output

```shell
KeyError: "'Negative electrode OCP [V]' not found. Use the dimensional version 'Primary: Negative electrode OCP [V]' instead."
@michelegalasso michelegalasso added the bug Something isn't working label Sep 11, 2023
@rtimms
Copy link
Contributor

rtimms commented Sep 12, 2023

Thanks for bringing this up. This is a known issue, see #2682

@rtimms rtimms closed this as completed Sep 12, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
brosaplanella pushed a commit to aabills/PyBaMM that referenced this issue Sep 15, 2023
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