Issue 685 casadi interpolation#714
Conversation
…ssue-685-casadi-interpolation
Codecov Report
@@ Coverage Diff @@
## master #714 +/- ##
==========================================
+ Coverage 98.17% 98.18% +0.01%
==========================================
Files 176 175 -1
Lines 9135 9089 -46
==========================================
- Hits 8968 8924 -44
+ Misses 167 165 -2
Continue to review full report at Codecov.
|
rtimms
left a comment
There was a problem hiding this comment.
looks great, thanks @tinosulzer !
| "In this notebook we will use the SPM as the example model, and change the input current from the default option. If you are not familiar with running a model in PyBaMM, please see [this](./models/SPM.ipynb) notebook for more details.\n", | ||
| "\n", | ||
| "In PyBaMM, the current function is set using the parameter \"Current function\". By default this is set to be a constant current provided by the class [`pybamm.GetConstantCurrent`](https://pybamm.readthedocs.io/en/latest/source/parameters/standard_current_functions/get_constant_current.html). This class takes a single optional argument \"current\" which is the size of the current in Amperes. If no argument is passed, the value of the current is set by the parameter \"Typical current [A]\" (see [this](parameter-values.ipynb) notebook for more information about parameters).\n", | ||
| "In PyBaMM, the current function is set using the parameter \"Current function\". By default this is set to be a constant current provided by the class [`pybamm.ConstantCurrent`](https://pybamm.readthedocs.io/en/latest/source/parameters/standard_current_functions/get_constant_current.html). This class takes a single optional argument \"current\" which is the size of the current in Amperes. If no argument is passed, the value of the current is set by the parameter \"Typical current [A]\" (see [this](parameter-values.ipynb) notebook for more information about parameters).\n", |
There was a problem hiding this comment.
should the read the docs link now be constant_current instead of get_constant_current?
There was a problem hiding this comment.
Just looking at it now I can't find the page this was supposed to link to anyway. Getting rid of it in #699 so just going to leave it for now. We should look into finding a way to test hyperlinks in markdown/notebooks to make sure they exist
| "## Adding your own current function <a name=\"function\"></a>\n", | ||
| "\n", | ||
| "A user defined current function can be passed to any model using the class [`pybamm.GetUserCurrent`](https://pybamm.readthedocs.io/en/latest/source/parameters/standard_current_functions/get_user_current). The class takes in a method, which returns the current as a function of time, followed by any keyword arguments required by the method. \n", | ||
| "A user defined current function can be passed to any model using the class [`pybamm.UserCurrent`](https://pybamm.readthedocs.io/en/latest/source/parameters/standard_current_functions/get_user_current). The class takes in a method, which returns the current as a function of time, followed by any keyword arguments required by the method. \n", |
There was a problem hiding this comment.
same re read the docs link here
| ) | ||
| ) | ||
|
|
||
| @property |
|
|
||
| @property | ||
| def default_var_pts(self): | ||
| # Choose points that give uniform grid for the standard parameter values |
There was a problem hiding this comment.
makes sense. is this the case for li-ion too?
There was a problem hiding this comment.
Thought I needed this to make one of the tests work but it turned out to be an issue with the solver. I guess we could add functionality so that the user can pass in grid points for, say, x_n, and then "uniform" for the other two, and it automatically selects the right number of points to make the grid uniform?
Description
Fixes #685
Should allow fixing #463 by testing examples both with and without the optional solvers (requires changing scikits dae solver example to casadi, or skipping).
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s.
Key checklist:
$ flake8$ python run-tests.py --unit$ cd docsand then$ make clean; make htmlYou can run all three at once, using
$ python run-tests.py --quick.Further checks: