Skip to content

Adding pchip interpolator to pybamm.Interpolant class. #4590

@martinjrobins

Description

@martinjrobins

Discussed in #4589

Originally posted by MartinFuentetaja November 15, 2024
Hello everyone! I am trying to use Akima1D interpolator to interpolate the OCPs of gr/LFP cell. I have tried to use pchip instead of cubic spline (due to the flatness of the OCP of LFP). However, the following error arises:

NotImplementedError: The interpolator 'pchip' is not supported by CasAdi. Use 'linear' or 'cubic' instead. Alternatively, set 'model.convert_to_format = 'python'' and use a non-CasADi solver.

Therefore, I have also tried to implement Akima1D interpolator from scratch. However, I did not success.

I have to mention that it works with linear interpolator, however I would prefer to use another one.

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