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]: ECM model does not work (solvers.py tries to get initial SOC from concentrations) #304

Open
Nomados opened this issue May 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Nomados
Copy link

Nomados commented May 27, 2024

liionpack Version

0.3.8

Python Version

3.8

Describe the bug

When trying to model with ECM model parameters (that was checked with pybamm separately) I am getting this error:

File "liionpack/solver_utils.py", line 427, in solve output = rm.solve( File "liionpack/solvers.py", line 207, in solve self.setup_actors(nproc, self.inputs_dict, initial_soc) File "liionpack/solvers.py", line 478, in setup_actors a.setup( File "liionpack/solvers.py", line 46, in setup _, _ = lp.update_init_conc(parameter_values, initial_soc, update=True) File "liionpack/sim_utils.py", line 53, in update_init_conc c_n_max = param["Maximum concentration in negative electrode [mol.m-3]"] KeyError: 'Maximum concentration in negative electrode [mol.m-3]'

Ofc it makes no sense for the ECM model but it is enforced in solvers.py (line 39)
self.parameter_values = parameter_values if initial_soc is not None: if ( (type(initial_soc) in [float, int]) or (type(initial_soc) is list and len(initial_soc) == 1) or (type(initial_soc) is np.ndarray and len(initial_soc) == 1) ): _, _ = lp.update_init_conc(parameter_values, initial_soc, update=True) else: lp.logger.warning( "Using a list or an array of initial_soc " + "is not supported, please set the initial " + "concentrations via inputs" )

Steps to Reproduce

No response

Expected behaviour

No response

Relevant log output

No response

Additional context

No response

@Nomados Nomados added the bug Something isn't working label May 27, 2024
@Nomados
Copy link
Author

Nomados commented May 27, 2024

actually a life example with ECM would be really cool

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

1 participant