-
-
Notifications
You must be signed in to change notification settings - Fork 563
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 2418 dimensional #2419
Issue 2418 dimensional #2419
Conversation
…M into issue-2418-dimensional
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
…M into issue-2418-dimensional
…M into issue-2418-dimensional
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, @tinosulzer, looks great! A few minor changes and a couple of things to check. This is going to make contributing models much simpler.
pybamm/models/full_battery_models/lithium_ion/basic_dfn_composite.py
Outdated
Show resolved
Hide resolved
tests/integration/test_models/test_full_battery_models/test_lithium_ion/test_compare_outputs.py
Outdated
Show resolved
Hide resolved
…am/PyBaMM into issue-2418-dimensional
Divided by 3600 to replace t0_cr
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.
Looks great, amazing job @tinosulzer! Just a few very minor comments.
] | ||
|
||
self.algebraic[delta_phi] = sum_a_j_av - sum_a_j | ||
self.algebraic[delta_phi] = (sum_a_j_av - sum_a_j) / self.param.a_j_scale |
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.
Is dividing by self.param.a_j_scale
just to have a better conditioned problem?
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.
yes
@@ -297,16 +277,17 @@ def _get_standard_volumetric_current_density_variables(self, variables): | |||
phase_name = self.phase_name | |||
|
|||
if isinstance(self, pybamm.kinetics.NoReaction): | |||
a = 1 |
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.
Was this a bug or was it changed later one?(Asking because we have an issue with calendar ageing that could be related).
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.
for NoReaction
it should have no effect on results since j=0
and a
only ever appears as a * j
Co-authored-by: Ferran Brosa Planella <[email protected]>
Description
Makes all models dimensional. Major changes:
scale
andreference
attributes for variables, which can be set to make sure that variables are order 1. Algebraic equations also have to be multiplied by an appropriate number (e.g.L_x**2
) to make them order 1 and hence pass the tolerance check.Most models are now a lot faster but some of the degradation models might be a bit slower, possibly less robust.
Fixes #2418
Fixes #2281
Fixes #2690
Fixes #1260
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: