Skip to content

Make calc_esoh a model attribute #4619

@rtimms

Description

@rtimms

Currently the Simulation class uses the following logic to decide if it should calculate the state of health in a simulation

    def _get_esoh_solver(self, calc_esoh):
        if (
            calc_esoh is False
            or isinstance(self._model, pybamm.lead_acid.BaseModel)
            or isinstance(self._model, pybamm.equivalent_circuit.Thevenin)
            or self._model.options["working electrode"] != "both"
        ):
            return None

        return pybamm.lithium_ion.ElectrodeSOHSolver(
            self._parameter_values, self._model.param, options=self._model.options
        )

It would be nice if cacl_esoh was a model attribute (True by default) so that when writing custom models you don't have to pass calc_esoh=False to the solver every time.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions