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

Solving 2D pouch model with explicit experiment fails #1547

Closed
DavidMStraub opened this issue Jul 14, 2021 · 3 comments · Fixed by #1548
Closed

Solving 2D pouch model with explicit experiment fails #1547

DavidMStraub opened this issue Jul 14, 2021 · 3 comments · Fixed by #1548

Comments

@DavidMStraub
Copy link
Contributor

Describe the bug

Running the default pouch model with a manually specified Experiment causes the Casadi solver to fail.

To Reproduce

import pybamm
options = {"cell geometry": "pouch", "thermal": "x-lumped", "dimensionality": 2}
model = pybamm.lithium_ion.SPMe(options=options)
experiment = pybamm.Experiment([
    "Discharge with 5 C for 1 minute"
])
sim = pybamm.Simulation(model, experiment=experiment)
sim.solve()

Expected behaviour
Solve

Screenshots

RuntimeError: .../casadi/core/function_internal.hpp:1257: Input 1 (i1) has mismatching shape. Got 11-by-1. Allowed dimensions, in general, are:
 - The input dimension N-by-M (here 2-by-1)
 - A scalar, i.e. 1-by-1
 - M-by-N if N=1 or M=1 (i.e. a transposed vector)
 - N-by-M1 if K*M1=M for some K (argument repeated horizontally)
 - N-by-P*M, indicating evaluation with multiple arguments (P must be a multiple of 1 for consistency with previous inputs)
 - ```
@valentinsulzer
Copy link
Member

This will fix it for now

sim.solve(calc_esoh=False)

also solver=pybamm.CasadiSolver("fast with events") might be a bit faster

@DavidMStraub
Copy link
Contributor Author

Hi @tinosulzer, I just ran into a very similar issue (Input 1 (i1) has mismatching shape. Got 141-by-1.) when doing a simulation with "lithium plating": "irreversible". Setting calc_esoh=False didn't solve it. I'm using current develop. Any idea how to fix it?

@DavidMStraub
Copy link
Contributor Author

I'll open a new issue with a minimal example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants