Tanks in series
Tanks-In-Series Model
Implementation of the tanks in series model within Pybamm. Based on DOI: 10.1149/2.0342001JES.
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. If necessary, also add to the list of breaking changes.
- [x] New feature (non-breaking change which adds functionality)
- [ ] Optimization (back-end change that speeds up the code)
- [ ] Bug fix (non-breaking change which fixes an issue)
Key checklist:
- [x] No style issues:
$ pre-commit run(or$ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code) - [ ] All tests pass:
$ python run-tests.py --all(or$ nox -s tests) - [ ] The documentation builds:
$ python run-tests.py --doctest(or$ nox -s doctests)
You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).
Further checks:
- [ ] Code is commented, particularly in hard-to-understand areas
- [ ] Tests added that prove fix is effective or that feature works
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.46%. Comparing base (
1e3f139) to head (e121f32). Report is 344 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #4310 +/- ##
===========================================
- Coverage 99.50% 99.46% -0.05%
===========================================
Files 289 290 +1
Lines 22146 22242 +96
===========================================
+ Hits 22037 22123 +86
- Misses 109 119 +10
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I have the model written up in a .py file, but I think there is an issue with domains/discretization. I'm getting this error when I run the following code:
Initially, I got an error of size (400,1) vs (1,1), and then I used pybamm.x_average(param.n.prim.c_init) on the initial conditions for the negative particle concentration, but the size still doesn't match up.
You need to average in both x- and r-directions, you can use param.n.prim.c_init_av which is already averaged
It seems to be working now with Chen2020 parameter set.
Looking good! Have you done a comparison to other models, e.g. using this example?
@parkec3 I am going to close this for now, we can re-open it in the future if you would like