-
-
Notifications
You must be signed in to change notification settings - Fork 589
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
Issue 1253 reformat dfn half cell #1282
Issue 1253 reformat dfn half cell #1282
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1282 +/- ##
========================================
Coverage 98.09% 98.10%
========================================
Files 270 272 +2
Lines 15155 15214 +59
========================================
+ Hits 14866 14925 +59
Misses 289 289
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brosaplanella , looks good, but my worry is this is going to have to be developed completely separately from the existing submodel structure (including degradation mechanisms, etc)
@@ -27,6 +27,8 @@ def domain_size(domain): | |||
"negative electrode": 11, | |||
"separator": 13, | |||
"positive electrode": 17, | |||
"working electrode": 19, | |||
"working particle": 23, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check why this was necessary but not urgent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this has to do because the separator and current collector were defined in fixed_domain_sizes
but the new domains weren't, so when they interact it breaks down...
Also, random question related to that. When we get the size of a variable defined in a domain in fixed_domain_sizes
, why do we take the sum and not the product? I thought the idea of assigning prime numbers to the domains was to get unique signatures for each combination.
pybamm/models/full_battery_models/lithium_ion/basic_dfn_half_cell.py
Outdated
Show resolved
Hide resolved
I agree. I was debating if I wanted to created the PR until I had integrated it into the submodel structure, but I thought it would be much better to get feedback at this stage. The problem with the old version, apart from signs changing depending on which is the working electrode, was that you got a lot of unused variables. Probably this is not ideal either though... Is there any other way we can do this? The only way I can think of bringing all the models closer together is by redefining them so you can define each electrode separately, but that would be a major reformat of PyBaMM... |
I was running the DFN_half_cell example and changing "Lithium counter electrode thickness [m]" and it didn't appear to change anything... |
This only appears in the Ohmic losses in the lithium counter, but the conductivity is so high that you probably won't see any change unless you plug in a massive lithium counter. |
Description
Reformatted the Basic DFN half-cell model. In the new setup, the lithium counter always sits on the left and the working electrode on the right. The new geometry has a
working electrode
and aworking particle
.Fixes #1253
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.
Key checklist:
$ flake8
$ python run-tests.py --unit
$ cd docs
and then$ make clean; make html
You can run all three at once, using
$ python run-tests.py --quick
.Further checks: