pybamm-team / PyBaMM

Fast and flexible physics-based battery models in Python
https://www.pybamm.org/
BSD 3-Clause "New" or "Revised" License
1.12k stars 549 forks source link

Extend `pybamm.ParameterValues.create_from_bpx()` to automate initial concentrations for blended electrodes #4338

Open ejfdickinson opened 3 months ago

ejfdickinson commented 3 months ago

Description

Calling pybamm.ParameterValues.create_from_bpx() with a BPX file containing a blended electrode returns a warning as follows:

Initial concentrations cannot be set using stoichiometry limits for blend electrodes. Please set the initial concentrations manually.

The method could automate this calculation by solving the equations specified in the BPX standard.

Motivation

No response

Possible Implementation

No response

Additional context

No response

rtimms commented 3 months ago

Tagging https://github.com/pybamm-team/PyBaMM/issues/2682 as related. Currently the electrode state of health models in pybamm don't support blended electrodes.

ejfdickinson commented 3 months ago

@rtimms Off-topic I know, but for this reason I find it odd that calc_esoh=True is the default in pybamm.Simulation.solve().

rtimms commented 3 months ago

Yes, this is simply because calc_esoh predates blended electrodes. I’m open to changing this.

valentinsulzer commented 3 months ago

The proper fix, which we are planning to do, is to do "just in time" calculations of esoh values only when they are requested