-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Deprecate number of electrodes in parallel parameter #4854
base: develop
Are you sure you want to change the base?
Deprecate number of electrodes in parallel parameter #4854
Conversation
- Move hatch-vcs config to `tool.hatch` in `pyproject.toml` - Switch to `_version.py` for versioning with hatch-vcs - Remove manual `version.py` updates, using git tags instead
- Removed manual version writing in `update_version.py`. - Added `src/pybamm/_version.py` to `.gitignore`.
- Deprecate the `n_electrodes_parallel` parameter due to inconsistent usage. - Updated area calculations in thermal models to use total effective area.
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 decide what to do about Ai2020 and Sulzer2019 - perhaps just scaling the electrode width. Also this will need a clear deprecation message (we could check specifically for when people give a value that is not equal to 1 and raise a warning in that case)
@@ -37,7 +37,7 @@ def _set_parameters(self): | |||
"Current function [A]", {"Time [s]": pybamm.t} | |||
) | |||
self.current_density_with_time = self.current_with_time / ( | |||
self.n_electrodes_parallel * self.geo.A_cc | |||
self.n_electrodes_pair * self.geo.A_cc |
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.
why is this kept here?
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.
@valentinsulzer should I completely remove this, or is there another way I should handle this? I wasn't sure how to approach this, so I changed the name from n_electrodes_parallel
to n_electrodes_pair
. Would appreciate your guidance on the right approach here.
@valentinsulzer Thanks for the suggestion! For Ai2020 and Sulzer2019, I'll look into scaling the electrode width as you mentioned. Regarding the deprecation message, I can add a check for when the |
I see why you want to do this but it can be a bit of a shock to people new to PyBaMM. I was just mentoring someone who was struggling to get the correct capacity and didn't realize that they needed to double the electrode length (compared to what it was in the paper) to account for it being double-sided, which implies the authors of that paper did it a different way than Chen et al. |
Thanks for taking this on, @vidipsingh . I can't help but notice that there are a bunch of changes made here that are unrelated to this issue. Perhaps they are related to #4802 ? It would be good to start this from a clean branch to ensure that nothing extraneous is considered here. |
My argument is just that we should either make everything consistent with this parameter, or deprecate it, of which I thought deprecation made more sense. Maybe we should debate this at the original issue, #4833 |
Thanks for pointing that out, @aabills. I did start from a clean branch, so I'm not entirely sure how the changes from that PR ended up here. What would you suggest I do at this point? If I start from a new branch, I'll likely need to close this PR and raise a new one. |
Seems reasonable to me, make sure you check out discussion in #4833 first. |
Sure, will check that. |
Description
This PR deprecates the
n_electrodes_parallel
parameter due to its inconsistent usage across the codebase. Area calculations in the thermal models have been updated to use the total effective area instead.Fixes: #4833
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #)
Important checks:
Please confirm the following before marking the PR as ready for review:
nox -s pre-commit
nox -s tests
nox -s doctests