-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
OCP curves from data #600
Comments
Nice! Yeah this would be useful to have as core functionality. I guess something similar to the |
Yes, PChip would be better. What I don't see is in which folder this function would be defined. |
This should be just like the other functions in |
Hi guys, I would also like to make use of this function. Is there any chance you can push this to master? I understand it may be part of a bigger development project you are working on but would really help |
Hi Tom. The only progress I have done on that is including the interpolating functions in the main script and calling them from there, but it is not integrated into PyBaMM. Not sure if @tinosulzer has done anything on it. If you want to add it to the main script you only need to add this lines to the code
There is some fudging with the formatting that could be possibly improved. The command @primitive tells |
So how do you just update the OCV parameter to point to new function. It would be a good utility function to be able to do this more generically for any interpolation from a dataset |
You just update the parameters like this:
It would be good to have it in a more general form, so it could be assigned just doing
where |
You would have to make |
I see. Then it should be a script similar to the GetUserCurrent one, which we could call something like I can give it a go, but not sure I will be able to do any proper work on it in the next week and a half. If it is urgent, feel free to give it a go and I can review the pull request later. |
I'd put it in the expression tree folder in a new file |
Summary
It would be useful to define a function within PyBaMM that, given a data file, produces the interpolating function and also its Jacobian within
autograd
. That would be useful for OCPs, but shouldn't limit to that as some other parameter function might be provided as a dataset of experimental measurements (e.g. the entropic change).I have already the code that produces this in the main script, but I think it would be a good idea to have it as a PyBaMM function that deals with it behind the scenes.
Motivation
In many cases, the parameter functions come from experimental data so interpolation is a straightforward way to include them in the simulations.
Additional context
The code in my main script looks like
The text was updated successfully, but these errors were encountered: