-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1130 from pybamm-team/polynomial-concentration
Polynomial concentration
- Loading branch information
Showing
42 changed files
with
1,549 additions
and
501 deletions.
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
5 changes: 0 additions & 5 deletions
5
docs/source/models/submodels/particle/fast_many_particles.rst
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
docs/source/models/submodels/particle/fast_single_particle.rst
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
5 changes: 5 additions & 0 deletions
5
docs/source/models/submodels/particle/polynomial_many_particles.rst
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,5 @@ | ||
Polynomial Many Particles | ||
========================= | ||
|
||
.. autoclass:: pybamm.particle.PolynomialManyParticles | ||
:members: |
5 changes: 5 additions & 0 deletions
5
docs/source/models/submodels/particle/polynomial_single_particle.rst
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,5 @@ | ||
Polynomial Single Particle | ||
=========================== | ||
|
||
.. autoclass:: pybamm.particle.PolynomialSingleParticle | ||
:members: |
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
327 changes: 327 additions & 0 deletions
327
examples/notebooks/compare-particle-diffusion-models.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,35 @@ | ||
# | ||
# Compare models for diffusion within the electrode particles | ||
# | ||
import pybamm | ||
|
||
# load models | ||
models = [ | ||
pybamm.lithium_ion.DFN( | ||
options={"particle": "Fickian diffusion"}, name="Fickian diffusion" | ||
), | ||
pybamm.lithium_ion.DFN( | ||
options={"particle": "uniform profile"}, name="uniform profile" | ||
), | ||
pybamm.lithium_ion.DFN( | ||
options={"particle": "quadratic profile"}, name="quadratic profile" | ||
), | ||
pybamm.lithium_ion.DFN( | ||
options={"particle": "quartic profile"}, name="quartic profile" | ||
), | ||
] | ||
|
||
# pick parameter values | ||
parameter_values = pybamm.ParameterValues(chemistry=pybamm.parameter_sets.Ecker2015) | ||
|
||
# create and solve simulations | ||
sims = [] | ||
for model in models: | ||
sim = pybamm.Simulation(model, parameter_values=parameter_values) | ||
sim.solve([0, 3600]) | ||
sims.append(sim) | ||
print("Particle model: {}".format(model.name)) | ||
print("Solve time: {}s".format(sim.solution.solve_time)) | ||
|
||
# plot results | ||
pybamm.dynamic_plot(sims) |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .base_particle import BaseParticle | ||
from .fickian_many_particles import FickianManyParticles | ||
from .fickian_single_particle import FickianSingleParticle | ||
from .fast_many_particles import FastManyParticles | ||
from .fast_single_particle import FastSingleParticle | ||
from .polynomial_single_particle import PolynomialSingleParticle | ||
from .polynomial_many_particles import PolynomialManyParticles |
Oops, something went wrong.