You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: .../casadi/core/function_internal.hpp:1257: Input 1 (i1) has mismatching shape. Got 141-by-1. Allowed dimensions, in general, are:
- The input dimension N-by-M (here 122-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)
To Reproduce
Steps to reproduce the behaviour:
importpybammoptions= {"lithium plating": "irreversible"}
model=pybamm.lithium_ion.SPMe(options=options)
experiment=pybamm.Experiment(
[
"Discharge with 1 C for 30 minutes",
"Rest for 30 minutes",
]
)
solver=pybamm.CasadiSolver("fast with events")
parameter_values=model.default_parameter_values.copy()
parameter_values.update(
{
"Lithium metal partial molar volume [m3.mol-1]": 1.30e-5,
"Exchange-current density for plating [A.m-2]": 0.001,
"Initial plated lithium concentration [mol.m-3]": 0,
"Typical plated lithium concentration [mol.m-3]": 1000,
},
check_already_exists=False
)
sim=pybamm.Simulation(model, experiment=experiment, solver=solver, parameter_values=parameter_values)
sim.solve()
The issue is with the x-averaging of the plating model. I will open a separate issue, but for the moment you can replace the line where you define the model by
It should still work with the x-averaged form, there is just a bug in how multiple steps are set up. I thought I had fixed it but don't know where that branch went
develop
Describe the bug
Error:
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
No error
Additional context
The text was updated successfully, but these errors were encountered: