-
-
Notifications
You must be signed in to change notification settings - Fork 568
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 1781 utilization #1821
Merged
Merged
Issue 1781 utilization #1821
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
bcb0097
#1781 add utilization model
valentinsulzer fb90b16
Merge branch 'develop' into roughness-factor
valentinsulzer d2a6c66
#1781 merge develop
valentinsulzer 2de2a47
#1781 remove 'user' option
valentinsulzer 5feea0c
#1781 merge test reutilization
valentinsulzer f9a3755
#1781 fixing tests
valentinsulzer e0f5621
Merge branch 'reuse-tests' into issue-1781-utilization
valentinsulzer d5ccfd0
#1781 revert to separate model for full utilization
valentinsulzer 5a48029
#1781 fix tests
valentinsulzer e2e4503
Merge branch 'develop' into issue-1781-utilization
valentinsulzer 560dd43
#1781 fix lead-acid tests
valentinsulzer c849534
#1781 fix integration tests
valentinsulzer 9baf9b9
Merge branch 'develop' into issue-1781-utilization
valentinsulzer 4d3087e
#1781 examples
valentinsulzer 955bcbe
Merge branch 'develop' into issue-1781-utilization
valentinsulzer e9d1dc5
#1781 coverage
valentinsulzer c87b8f1
#1781 flake8
valentinsulzer 2b51faf
#1781 merge develop
valentinsulzer 4201607
#1781 ferran comments
valentinsulzer 2cbd04f
Merge branch 'develop' into issue-1781-utilization
valentinsulzer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Example showing how to change the interface utilisation | ||
# | ||
|
||
import pybamm | ||
import numpy as np | ||
|
||
pybamm.set_logging_level("INFO") | ||
|
||
models = [ | ||
pybamm.lithium_ion.DFN({"interface utilisation": "full"}, name="full utilisation"), | ||
pybamm.lithium_ion.DFN( | ||
{"interface utilisation": "constant"}, name="constant utilisation" | ||
), | ||
pybamm.lithium_ion.DFN( | ||
{"interface utilisation": "current-driven"}, name="current-driven utilisation" | ||
), | ||
] | ||
|
||
param = models[0].default_parameter_values | ||
# add the user supplied parameters | ||
param.update( | ||
{ | ||
"Initial negative electrode interface utilisation": 0.9, | ||
"Initial positive electrode interface utilisation": 0.8, | ||
"Negative electrode current-driven interface utilisation factor " | ||
"[m3.mol-1]": -4e-5, | ||
"Positive electrode current-driven interface utilisation factor " | ||
"[m3.mol-1]": 4e-5, | ||
}, | ||
check_already_exists=False, | ||
) | ||
|
||
# set up and solve simulations | ||
solutions = [] | ||
t_eval = np.linspace(0, 3600, 100) | ||
|
||
for model in models: | ||
|
||
sim = pybamm.Simulation(model, parameter_values=param) | ||
solution = sim.solve(t_eval) | ||
solutions.append(solution) | ||
|
||
# plot solutions | ||
pybamm.dynamic_plot( | ||
solutions, | ||
[ | ||
"Negative particle surface concentration [mol.m-3]", | ||
"Positive particle surface concentration [mol.m-3]", | ||
"Negative electrode interfacial current density [A.m-2]", | ||
"Positive electrode interfacial current density [A.m-2]", | ||
"Negative electrode interface utilisation", | ||
"Positive electrode interface utilisation", | ||
"Electrolyte potential [V]", | ||
"Terminal voltage [V]", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# | ||
import pybamm | ||
|
||
pybamm.set_logging_level("INFO") | ||
pybamm.set_logging_level("DEBUG") | ||
|
||
# load models | ||
models = [ | ||
|
@@ -20,4 +20,6 @@ | |
sims.append(sim) | ||
|
||
# plot | ||
pybamm.dynamic_plot(sims) | ||
pybamm.dynamic_plot( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we revert it? |
||
sims, ["Lithium metal interface utilisation", "Terminal voltage [V]"] | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we set it back to INFO?