Skip to content
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 836 add lithium plating #1009

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
92c2f45
Add files via upload
felipe-salinas May 21, 2020
d3e32e8
Add files via upload
felipe-salinas May 21, 2020
ad23518
Adds default porosity model
felipe-salinas May 21, 2020
9c9fc62
Include change in porosity due to SEI current
felipe-salinas May 21, 2020
5230337
SEI model based on Yang et. al. 2017
felipe-salinas May 21, 2020
b6a1cb8
Parameters for SEI reaction Yang et. al. 2017
felipe-salinas May 21, 2020
b9d0187
Experiment of the related paper
felipe-salinas May 21, 2020
fa26ec9
Update CHANGELOG.md
felipe-salinas May 21, 2020
587a177
Needed for initial conditions of porosity
felipe-salinas May 21, 2020
31df1a4
Correct file with existing develop
felipe-salinas May 25, 2020
37aa4a2
Corrects porosity used and added to other models
felipe-salinas May 25, 2020
ecf53a7
Creates new porosity class
felipe-salinas May 25, 2020
62d7004
Corrects unnecessary changes to file from develop
felipe-salinas May 25, 2020
41b6606
Negative current scale
felipe-salinas May 25, 2020
50e6ad5
c_ec defined in get_coupled_variables
felipe-salinas May 27, 2020
e6ee84b
Add sei current and associated beta coefficient
felipe-salinas Jun 2, 2020
90162c5
Original file
felipe-salinas Jun 2, 2020
2b8d03c
adds Full porosity
felipe-salinas Jun 2, 2020
27342fd
Adds leading order porosity
felipe-salinas Jun 2, 2020
bd65b49
Adds leading order porosity
felipe-salinas Jun 2, 2020
ddc9e40
Beta coefficients and initial condition porosity
felipe-salinas Jun 2, 2020
b42b5a8
Adds X-averaged j_sei
felipe-salinas Jun 2, 2020
015931a
Adds ec reaction limited
felipe-salinas Jun 2, 2020
de368e2
Add test for ec reaction limited
felipe-salinas Jun 2, 2020
f31be98
Adds test for ex reaction limited
felipe-salinas Jun 2, 2020
a16fdaf
Adds reference performance tests
felipe-salinas Jun 2, 2020
384220a
Replaced by full order
felipe-salinas Jun 2, 2020
966f908
adds Ramadass2004
felipe-salinas Jun 2, 2020
022b613
Create dummy
felipe-salinas Jun 2, 2020
d58c8c4
Graphite of referenced paper
felipe-salinas Jun 2, 2020
0a058b9
Delete dummy
felipe-salinas Jun 2, 2020
be3838c
Create dummy
felipe-salinas Jun 2, 2020
4029d0a
Cathode of referenced paper
felipe-salinas Jun 2, 2020
13e781e
Create dummy
felipe-salinas Jun 2, 2020
8a68dc9
Cell geometry
felipe-salinas Jun 2, 2020
3afdfb5
Delete dummy
felipe-salinas Jun 2, 2020
cd0f9ba
Delete dummy
felipe-salinas Jun 2, 2020
f415bcf
Create dummy
felipe-salinas Jun 2, 2020
57cea0e
Electrolyte from reference
felipe-salinas Jun 2, 2020
91a598d
Delete dummy
felipe-salinas Jun 2, 2020
f8024f0
Create dummy
felipe-salinas Jun 2, 2020
0433800
Add files via upload
felipe-salinas Jun 2, 2020
248e776
Delete dummy
felipe-salinas Jun 2, 2020
67b04b0
Create dummy
felipe-salinas Jun 2, 2020
a43b93d
A separate type to allow changes in example
felipe-salinas Jun 2, 2020
5740132
Delete dummy
felipe-salinas Jun 2, 2020
49a490c
Merge pull request #1 from pybamm-team/develop
felipe-salinas Jun 5, 2020
ce006e7
Merge branch 'issue-836-add-lithium-plating' into Update
felipe-salinas Jun 5, 2020
2359e1f
Merge pull request #2 from felipe-salinas/Update
felipe-salinas Jun 5, 2020
c70e1fc
Update sei_parameters.py
felipe-salinas Jun 5, 2020
2f5295d
Update README.md
felipe-salinas Jun 5, 2020
5f7f7cf
Update README.md
felipe-salinas Jun 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ New SEI models, simplification of submodel structure, as well as optimisations a

## Features

- Added SEI reaction based on Yang et. al. 2017 and reduction in porosity ([#836](https://github.com/pybamm-team/PyBaMM/issues/836))
- Reformatted `Geometry` and `Mesh` classes ([#1032](https://github.com/pybamm-team/PyBaMM/pull/1032))
- Added arbitrary geometry to the lumped thermal model ([#718](https://github.com/pybamm-team/PyBaMM/issues/718))
- Allowed `ProcessedVariable` to handle cases where `len(solution.t)=1` ([#1020](https://github.com/pybamm-team/PyBaMM/pull/1020))
Expand Down
3 changes: 3 additions & 0 deletions docs/source/models/submodels/interface/sei.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ SEI models
:members:

.. autoclass:: pybamm.sei.SolventDiffusionLimited
:members:

.. autoclass:: pybamm.sei.EcReactionLimited
:members:
51 changes: 51 additions & 0 deletions examples/scripts/cycling_ageing_yang.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import pybamm as pb
options = {"sei": "ec reaction limited",
"porosity": "variable porosity"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the "sei film resistance" is set automatically by the following lines in BaseBatteryModel:

        # Change the default for SEI film resistance based on which sei option is
        # provided
        extra_options = extra_options or {}
        sei_option = extra_options.get("sei", None)  # return None if option not given
        if sei_option is None:
            default_options["sei film resistance"] = None
        else:
            default_options["sei film resistance"] = "distributed"

Something similar could be done for porosity

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip: I will erase the redundant setting for sei film resistance in this example. In the case of porosity, It would be a nice feature, but the variable porosity is not a default option for SEI models (older publications like Ramadass et. al. 2003 don't include it), so I think that is better to leave it as a "visible" option.

param = pb.ParameterValues(chemistry=pb.parameter_sets.Ramadass2004)
model = pb.lithium_ion.DFN(options)
experiment = pb.Experiment((
[
"Charge at 1 C until 4.2 V",
"Hold at 4.2 V until C/10",
"Rest for 5 minutes",
"Discharge at 2 C until 2.8 V (1 seconds period)",
"Rest for 5 minutes",
]
* 5 +
[
"Charge at 1 C until 4.2 V",
"Hold at 4.2 V until C/20",
"Rest for 30 minutes",
"Discharge at C/3 until 2.8 V(1 seconds period)",
"Charge at 1 C until 4.2 V",
"Hold at 4.2 V until C/20",
"Rest for 30 minutes",
"Discharge at 1 C until 2.8 V(1 seconds period)",
"Charge at 1 C until 4.2 V",
"Hold at 4.2 V until C/20",
"Rest for 30 minutes",
"Discharge at 2 C until 2.8 V(1 seconds period)",
"Charge at 1 C until 4.2 V",
"Hold at 4.2 V until C/20",
"Rest for 30 minutes",
"Discharge at 3 C until 2.8 V(1 seconds period)",
]) * 2
)
sim = pb.Simulation(model, experiment=experiment,
parameter_values=param)
sim.solve(solver=pb.CasadiSolver(mode="safe"))
sim.plot(
[
"Current [A]",
'Total current density [A.m-2]',
"Terminal voltage [V]",
"Discharge capacity [A.h]",
"Electrolyte potential [V]",
"Electrolyte concentration [mol.m-3]",
"Total negative electrode sei thickness",
"Negative electrode porosity",
"Negative electrode sei interfacial current density [A.m-2]",
"X-averaged total negative electrode sei thickness [m]",
]
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice example!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:D


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Graphite anode parameters

Parameters for a graphite anode, from the paper

> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019).
> P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko N. Popov.["Development of First Principles Capacity Fade Model for Li-Ion Cells."](https://scholarcommons.sc.edu/cgi/viewcontent.cgi?article=1161&context=eche_facpub) (2004)

and references therein.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from pybamm import exp, constants, standard_parameters_lithium_ion


def graphite_electrolyte_exchange_current_density_Ramadass2004(c_e, c_s_surf, T):
"""
Exchange-current density for Butler-Volmer reactions between graphite and LiPF6 in
EC:DMC.

References
----------
.. [2]

Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
c_s_surf : :class:`pybamm.Symbol`
Particle concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]

Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""
m_ref = 4.854 * 10 ** (-6) # (A/m2)(mol/m3)**1.5
E_r = 37480
arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T))

c_n_max = standard_parameters_lithium_ion.c_n_max

return (
m_ref * arrhenius * c_e ** 0.5 * c_s_surf ** 0.5 * (c_n_max - c_s_surf) ** 0.5
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from pybamm import exp, cosh


def graphite_entropic_change_Moura2016(sto, c_n_max):
"""
Graphite entropic change in open circuit potential (OCP) at a temperature of
298.15K as a function of the stochiometry taken from Scott Moura's FastDFN code
[1].

References
----------
.. [1] https://github.com/scott-moura/fastDFN

Parameters
----------
sto : :class:`pybamm.Symbol`
Stochiometry of material (li-fraction)

"""

du_dT = (
-1.5 * (120.0 / c_n_max) * exp(-120 * sto)
+ (0.0351 / (0.083 * c_n_max)) * ((cosh((sto - 0.286) / 0.083)) ** (-2))
- (0.0045 / (0.119 * c_n_max)) * ((cosh((sto - 0.849) / 0.119)) ** (-2))
- (0.035 / (0.05 * c_n_max)) * ((cosh((sto - 0.9233) / 0.05)) ** (-2))
- (0.0147 / (0.034 * c_n_max)) * ((cosh((sto - 0.5) / 0.034)) ** (-2))
- (0.102 / (0.142 * c_n_max)) * ((cosh((sto - 0.194) / 0.142)) ** (-2))
- (0.022 / (0.0164 * c_n_max)) * ((cosh((sto - 0.9) / 0.0164)) ** (-2))
- (0.011 / (0.0226 * c_n_max)) * ((cosh((sto - 0.124) / 0.0226)) ** (-2))
+ (0.0155 / (0.029 * c_n_max)) * ((cosh((sto - 0.105) / 0.029)) ** (-2))
)

return du_dT
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from pybamm import exp, constants


def graphite_mcmb2528_diffusivity_Dualfoil1998(sto, T):
"""
Graphite MCMB 2528 diffusivity as a function of stochiometry, in this case the
diffusivity is taken to be a constant. The value is taken from Dualfoil [1].

References
----------
.. [1] http://www.cchem.berkeley.edu/jsngrp/fortran.html

Parameters
----------
sto: :class:`pybamm.Symbol`
Electrode stochiometry
T: :class:`pybamm.Symbol`
Dimensional temperature

Returns
-------
:class:`pybamm.Symbol`
Solid diffusivity
"""

D_ref = 3.9 * 10 ** (-14)
E_D_s = 42770
arrhenius = exp(E_D_s / constants.R * (1 / 298.15 - 1 / T))

return D_ref * arrhenius
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from pybamm import exp


def graphite_ocp_Ramadass2004(sto):
"""
Graphite Open Circuit Potential (OCP) as a function of the
stochiometry (theta?). The fit is taken from Ramadass 2004.

References
----------
.. [1]
"""

u_eq = (
0.7222 + 0.1387 * sto
+ 0.029 * (sto ** 0.5) - 0.0172 / sto
+ 0.0019 / (sto ** 1.5)
+ 0.2808 * exp(0.9 - 15 * sto)
- 0.7984 * exp(0.4465 * sto - 0.4108)
)

return u_eq
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Name [units],Value,Reference,Notes
# Empty rows and rows starting with ‘#’ will be ignored,,,
,,,
# Electrode properties,,,
Negative electrode conductivity [S.m-1],100,Ramadass,graphite
Maximum concentration in negative electrode [mol.m-3],30555,Ramadass,
Negative electrode diffusivity [m2.s-1],[function]graphite_mcmb2528_diffusivity_Dualfoil1998,Also valid for Ramadass,
Negative electrode OCP [V],[function]graphite_ocp_Ramadass2004,
,,,
# Microstructure,,,
Negative electrode porosity,0.485,Ramadass,electrolyte volume fraction
Negative electrode active material volume fraction,0.49,Ramadass,
Negative particle radius [m],2e-06,Ramadass,
Negative particle distribution in x,1,,
Negative electrode surface area to volume ratio [m-1],735000, 3eps.radi-1,
Negative electrode Bruggeman coefficient (electrolyte),4,Guess,
Negative electrode Bruggeman coefficient (electrode),4,Ramadass,
,,,
# Interfacial reactions,,,
Negative electrode cation signed stoichiometry,-1,,
Negative electrode electrons in reaction,1,,
Reference OCP vs SHE in the negative electrode [V],,,
Negative electrode charge transfer coefficient,0.5,Ramadass,
Negative electrode double-layer capacity [F.m-2],0.2,,
Negative electrode exchange-current density [A.m-2],[function]graphite_electrolyte_exchange_current_density_Ramadass2004,,
,,,
# Density,,,
Negative electrode density [kg.m-3],1657,,
,,,
# Thermal parameters,,,
Negative electrode specific heat capacity [J.kg-1.K-1],700,,
Negative electrode thermal conductivity [W.m-1.K-1],1.7,,
Negative electrode OCP entropic change [V.K-1],[function]graphite_entropic_change_Moura2016,,
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Lithium Cobalt Oxide cathode parameters

Parameters for a lithium Cobalt Oxide cathode, from the paper

> Scott G. Marquis, Valentin Sulzer, Robert Timms, Colin P. Please, and S. Jon Chapman. "An asymptotic derivation of a single particle model with electrolyte." [arXiv preprint arXiv:1905.12553](https://arxiv.org/abs/1905.12553) (2019).
> P. Ramadass, Bala Haran, Parthasarathy M. Gomadam, Ralph White, and Branko N. Popov.
"Development of First Principles Capacity Fade Model for Li-Ion Cells." (2004)

and references therein.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
0.000000000000000000e+00, 4.714135898019971016e+00
2.040816326530612082e-02, 4.708899441575220557e+00
4.081632653061224164e-02, 4.702448345762175741e+00
6.122448979591836593e-02, 4.694558534379876136e+00
8.163265306122448328e-02, 4.684994372928071193e+00
1.020408163265306006e-01, 4.673523893805322516e+00
1.224489795918367319e-01, 4.659941254449398329e+00
1.428571428571428492e-01, 4.644096031712390271e+00
1.632653061224489666e-01, 4.625926611260677390e+00
1.836734693877550839e-01, 4.605491824833229053e+00
2.040816326530612013e-01, 4.582992038370575116e+00
2.244897959183673186e-01, 4.558769704421606228e+00
2.448979591836734637e-01, 4.533281647154224103e+00
2.653061224489795533e-01, 4.507041620859735254e+00
2.857142857142856984e-01, 4.480540404981123714e+00
3.061224489795917880e-01, 4.454158468368703439e+00
3.265306122448979331e-01, 4.428089899175588151e+00
3.469387755102040782e-01, 4.402295604083254155e+00
3.673469387755101678e-01, 4.376502631465185367e+00
3.877551020408163129e-01, 4.350272100879827519e+00
4.081632653061224025e-01, 4.323179536958428493e+00
4.285714285714285476e-01, 4.295195829713853719e+00
4.489795918367346372e-01, 4.267407675466301065e+00
4.693877551020407823e-01, 4.243081968022011985e+00
4.897959183673469274e-01, 4.220583168834260768e+00
5.102040816326530726e-01, 4.177032236370062712e+00
5.306122448979591066e-01, 4.134943568540559333e+00
5.510204081632652517e-01, 4.075402582839823928e+00
5.714285714285713969e-01, 4.055407164381796825e+00
5.918367346938775420e-01, 4.036052896449991323e+00
6.122448979591835760e-01, 4.012970397550268409e+00
6.326530612244897211e-01, 3.990385577539371287e+00
6.530612244897958663e-01, 3.970744780585252709e+00
6.734693877551020114e-01, 3.954753574690877738e+00
6.938775510204081565e-01, 3.942237451863396025e+00
7.142857142857141906e-01, 3.932683425747200534e+00
7.346938775510203357e-01, 3.925509771581312979e+00
7.551020408163264808e-01, 3.920182838859009422e+00
7.755102040816326259e-01, 3.916256861206461881e+00
7.959183673469386600e-01, 3.913378070528176877e+00
8.163265306122448051e-01, 3.911274218446639583e+00
8.367346938775509502e-01, 3.909739285381772067e+00
8.571428571428570953e-01, 3.908613829807601192e+00
8.775510204081632404e-01, 3.907726324580658162e+00
8.979591836734692745e-01, 3.906474088522892796e+00
9.183673469387754196e-01, 3.900204875423951556e+00
9.387755102040815647e-01, 3.848912814816038974e+00
9.591836734693877098e-01, 3.445226042113884724e+00
9.795918367346938549e-01, 1.687177743081021308e+00
1.000000000000000000e+00, 6.378908986260003328e-03
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from pybamm import exp, constants


def lico2_diffusivity_Ramadass2004(sto, T):
"""
LiCo2 diffusivity as a function of stochiometry, in this case the
diffusivity is taken to be a constant. The value is taken from Ramadass 2004.

References
----------
.. [1]

Parameters
----------
sto: :class:`pybamm.Symbol`
Electrode stochiometry
T: :class:`pybamm.Symbol`
Dimensional temperature

Returns
-------
:class:`pybamm.Symbol`
Solid diffusivity
"""
D_ref = 1 * 10 ** (-14)
E_D_s = 18550
arrhenius = exp(E_D_s / constants.R * (1 / 298.15 - 1 / T))

return D_ref * arrhenius
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from pybamm import exp, constants, standard_parameters_lithium_ion


def lico2_electrolyte_exchange_current_density_Ramadass2004(c_e, c_s_surf, T):
"""
Exchange-current density for Butler-Volmer reactions between lico2 and LiPF6 in
EC:DMC.

References
----------
.. [2]

Parameters
----------
c_e : :class:`pybamm.Symbol`
Electrolyte concentration [mol.m-3]
c_s_surf : :class:`pybamm.Symbol`
Particle concentration [mol.m-3]
T : :class:`pybamm.Symbol`
Temperature [K]

Returns
-------
:class:`pybamm.Symbol`
Exchange-current density [A.m-2]
"""
m_ref = 2.252 * 10 ** (-6) # (A/m2)(mol/m3)**1.5
E_r = 39570
arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T))

c_p_max = standard_parameters_lithium_ion.c_p_max

return (
m_ref * arrhenius * c_e ** 0.5 * c_s_surf ** 0.5 * (c_p_max - c_s_surf) ** 0.5
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from pybamm import cosh


def lico2_entropic_change_Moura2016(sto, c_p_max):
"""
Lithium Cobalt Oxide (LiCO2) entropic change in open circuit potential (OCP) at
a temperature of 298.15K as a function of the stochiometry. The fit is taken
from Scott Moura's FastDFN code [1].

References
----------
.. [1] https://github.com/scott-moura/fastDFN

Parameters
----------
sto : :class:`pybamm.Symbol`
Stochiometry of material (li-fraction)

"""

# Since the equation for LiCo2 from this ref. has the stretch factor,
# should this too? If not, the "bumps" in the OCV don't line up.
stretch = 1.062
sto = stretch * sto

du_dT = (
0.07645 * (-54.4806 / c_p_max) * ((1.0 / cosh(30.834 - 54.4806 * sto)) ** 2)
+ 2.1581 * (-50.294 / c_p_max) * ((cosh(52.294 - 50.294 * sto)) ** (-2))
+ 0.14169 * (19.854 / c_p_max) * ((cosh(11.0923 - 19.8543 * sto)) ** (-2))
- 0.2051 * (5.4888 / c_p_max) * ((cosh(1.4684 - 5.4888 * sto)) ** (-2))
- (0.2531 / 0.1316 / c_p_max) * ((cosh((-sto + 0.56478) / 0.1316)) ** (-2))
- (0.02167 / 0.006 / c_p_max) * ((cosh((sto - 0.525) / 0.006)) ** (-2))
)

return du_dT
Loading