Skip to content

Commit d8aa59c

Browse files
committed
#729 added parameter set but doesn't work
1 parent 865a92e commit d8aa59c

File tree

15 files changed

+113
-66
lines changed

15 files changed

+113
-66
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
from pybamm import exp
2+
from pybamm import FunctionParameter
3+
4+
5+
def graphite_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g):
6+
"""
7+
Graphite diffusivity as a function of stochiometry [1, 2].
8+
9+
References
10+
----------
11+
.. [1] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of
12+
a lithium-ion battery i. determination of parameters." Journal of the
13+
Electrochemical Society 162.9 (2015): A1836-A1848.
14+
.. [2] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of
15+
a lithium-ion battery ii. model validation." Journal of The Electrochemical
16+
Society 162.9 (2015): A1849-A1857.
17+
18+
Parameters
19+
----------
20+
sto: :class: `numpy.Array`
21+
Electrode stochiometry
22+
T: :class: `numpy.Array`
23+
Dimensional temperature
24+
T_inf: double
25+
Reference temperature
26+
E_D_s: double
27+
Solid diffusion activation energy
28+
R_g: double
29+
The ideal gas constant
30+
31+
Returns
32+
-------
33+
: double
34+
Solid diffusivity
35+
"""
36+
37+
D_ref = FunctionParameter("Measured negative electrode diffusivity [m2.s-1]", sto)
38+
arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T))
39+
40+
return D_ref * arrhenius

input/parameters/lithium-ion/anodes/graphite_Ecker2015/graphite_electrolyte_reaction_rate_Ecker2015.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import autograd.numpy as np
1+
from pybamm import exp
22

33

44
def graphite_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g):
@@ -31,6 +31,6 @@ def graphite_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g):
3131
Reaction rate
3232
"""
3333
m_ref = 2.79 * 10 ** (-6)
34-
arrhenius = np.exp(E_r / R_g * (1 / T_inf - 1 / T))
34+
arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T))
3535

3636
return m_ref * arrhenius

input/parameters/lithium-ion/anodes/graphite_Ecker2015/parameters.csv

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Name [units],Value,Reference,Notes
44
# Electrode properties,,,
55
Negative electrode conductivity [S.m-1],14,,
66
Maximum concentration in negative electrode [mol.m-3],31920,,
7-
Negative electrode diffusivity [m2.s-1],[data]graphite_diffusivity_Ecker2015,,
7+
Measured negative electrode diffusivity [m2.s-1],[data]measured_graphite_diffusivity_Ecker2015,,
8+
Negative electrode diffusivity [m2.s-1],[function]graphite_diffusivity_Ecker2015,,
89
Negative electrode OCP [V],[data]graphite_ocp_Ecker2015,,
910
,,,
1011
# Microstructure,,,
1112
Negative electrode porosity,0.329,,
13+
Negative electrode active material volume fraction, 0.4, (1-eps_n) * (1- inactive),
1214
Negative particle radius [m],1.37E-05,,
1315
Negative particle distribution in x,1,,
1416
Negative electrode surface area density [m-1],81548,,
@@ -23,13 +25,8 @@ Reference OCP vs SHE in the negative electrode [V],,,
2325
Negative electrode charge transfer coefficient,0.489,,
2426
Negative electrode double-layer capacity [F.m-2],0.2,,
2527
,,,
26-
# Density,,,
27-
Negative electrode density [kg.m-3],N/A,,
28-
,,,
2928
# Thermal parameters,,,
30-
Negative electrode specific heat capacity [J.kg-1.K-1],N/A,,
31-
Negative electrode thermal conductivity [W.m-1.K-1],N/A,,
32-
Negative electrode OCP entropic change [V.K-1],N/A,,
29+
Negative electrode OCP entropic change [V.K-1],0,,
3330
,,,
3431
# Activation energies,,,
3532
Reference temperature [K],296.15,23C,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
from pybamm import exp
2+
from pybamm import FunctionParameter
3+
4+
5+
def nco_diffusivity_Ecker2015(sto, T, T_inf, E_D_s, R_g):
6+
"""
7+
NCO diffusivity as a function of stochiometry [1, 2].
8+
9+
References
10+
----------
11+
.. [1] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of
12+
a lithium-ion battery i. determination of parameters." Journal of the
13+
Electrochemical Society 162.9 (2015): A1836-A1848.
14+
.. [2] Ecker, Madeleine, et al. "Parameterization of a physico-chemical model of
15+
a lithium-ion battery ii. model validation." Journal of The Electrochemical
16+
Society 162.9 (2015): A1849-A1857.
17+
18+
Parameters
19+
----------
20+
sto: :class: `numpy.Array`
21+
Electrode stochiometry
22+
T: :class: `numpy.Array`
23+
Dimensional temperature
24+
T_inf: double
25+
Reference temperature
26+
E_D_s: double
27+
Solid diffusion activation energy
28+
R_g: double
29+
The ideal gas constant
30+
31+
Returns
32+
-------
33+
: double
34+
Solid diffusivity
35+
"""
36+
37+
D_ref = FunctionParameter("Measured positive electrode diffusivity [m2.s-1]", sto)
38+
arrhenius = exp(E_D_s / R_g * (1 / T_inf - 1 / T))
39+
40+
return D_ref * arrhenius

input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/nco_electrolyte_reaction_rate_Ecker2015.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import autograd.numpy as np
1+
from pybamm import exp
22

33

44
def nco_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g):
55
"""
6-
Reaction rate for Butler-Volmer reactions between LiNiCoO2 and LiPF6 in EC:DMC [1, 2].
6+
Reaction rate for Butler-Volmer reactions between NCO and LiPF6 in EC:DMC [1, 2].
77
88
References
99
----------
@@ -31,6 +31,6 @@ def nco_electrolyte_reaction_rate_Ecker2015(T, T_inf, E_r, R_g):
3131
Reaction rate
3232
"""
3333
m_ref = 6 * 10 ** (-7)
34-
arrhenius = np.exp(E_r / R_g * (1 / T_inf - 1 / T))
34+
arrhenius = exp(E_r / R_g * (1 / T_inf - 1 / T))
3535

3636
return m_ref * arrhenius

input/parameters/lithium-ion/cathodes/LiNiCoO2_Ecker2015/parameters.csv

+5-9
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Name [units],Value,Reference,Notes
44
# Electrode properties,,,
55
Positive electrode conductivity [S.m-1],68.1,,
66
Maximum concentration in positive electrode [mol.m-3],48580,,
7-
Positive electrode diffusivity [m2.s-1],[data]nco_diffusivity_Ecker2015,,
7+
Measured positive electrode diffusivity [m2.s-1],[data]measured_nco_diffusivity_Ecker2015,,
8+
Positive electrode diffusivity [m2.s-1],[function]nco_diffusivity_Ecker2015,,
89
Positive electrode OCP [V],[data]nco_ocp_Ecker2015,,
910
,,,
1011
# Microstructure,,,
1112
Positive electrode porosity,0.296,,
13+
Positive electrode active material volume fraction, 0.428, (1-eps_p)*(1-inactive)
1214
Positive particle radius [m],1E-05,,
1315
Positive particle distribution in x,1,,
1416
Positive electrode surface area density [m-1],188455,,
@@ -21,18 +23,12 @@ Positive electrode electrons in reaction,1,,
2123
Positive electrode reference exchange-current density [A.m-2.(m3.mol-1)1.5],5.81E-6,,
2224
Reference OCP vs SHE in the positive electrode [V],,,
2325
Positive electrode charge transfer coefficient,0.527,,
24-
Positive electrode double-layer capacity [F.m-2],N/A,,
25-
,,,
26-
# Density,,,
27-
Positive electrode density [kg.m-3],N/A,,
2826
,,,
2927
# Thermal parameters,,,
30-
Positive electrode specific heat capacity [J.kg-1.K-1],N/A,,
31-
Positive electrode thermal conductivity [W.m-1.K-1],N/A,,
32-
Positive electrode OCP entropic change [V.K-1],N/A,,
28+
Positive electrode OCP entropic change [V.K-1],0,,
3329
,,,
3430
# Activation energies,,,
35-
Reference temperature [K],296.15,25C,
31+
Reference temperature [K],296.15,23C,
3632
Positive electrode reaction rate,[function]nco_electrolyte_reaction_rate_Ecker2015,,
3733
Positive reaction rate activation energy [J.mol-1],4.36E+04,,
3834
Positive solid diffusion activation energy [J.mol-1],8.06E+04,,

input/parameters/lithium-ion/cells/kokam_Ecker2015/parameters.csv

-22
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,6 @@ Positive electrode thickness [m],5.45E-05,,
99
Positive current collector thickness [m],2.5E-05,,
1010
Electrode height [m],1.01E-01,,
1111
Electrode width [m],8.50E-02,,
12-
Negative tab width [m],N/A,,
13-
Negative tab centre y-coordinate [m],N/A,,
14-
Negative tab centre z-coordinate [m],N/A,,
15-
Positive tab width [m],N/A,,
16-
Positive tab centre y-coordinate [m],N/A,,
17-
Positive tab centre z-coordinate [m],N/A,,
18-
,,,
19-
# Current collector properties ,,,
20-
Negative current collector conductivity [S.m-1],N/A,,
21-
Positive current collector conductivity [S.m-1],N/A,,
22-
,,,
23-
# Density,,,
24-
Negative current collector density [kg.m-3],N/A,,
25-
Positive current collector density [kg.m-3],N/A,,
26-
,,,
27-
# Specific heat capacity,,,
28-
Negative current collector specific heat capacity [J.kg-1.K-1],N/A,,
29-
Positive current collector specific heat capacity [J.kg-1.K-1],N/A,,
30-
,,,
31-
# Thermal conductivity,,,
32-
Negative current collector thermal conductivity [W.m-1.K-1],N/A,,
33-
Positive current collector thermal conductivity [W.m-1.K-1],N/A,,
3412
,,,
3513
# Electrical,,,
3614
Cell capacity [A.h],0.326,,7.5 [A.h] cell with 23 layers

input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_conductivity_Ecker2015.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import autograd.numpy as np
1+
from pybamm import exp
22

33

44
def electrolyte_conductivity_Ecker2015(c_e, T, T_inf, E_k_e, R_g):
@@ -43,6 +43,6 @@ def electrolyte_conductivity_Ecker2015(c_e, T, T_inf, E_k_e, R_g):
4343

4444
# In Ecker paper there is factor of 1/T out the front but this doesn't
4545
# make much sense so just going to leave it out for now
46-
arrhenius = np.exp(E_k_e / R_g * (1 / T_inf - 1 / T))
46+
arrhenius = exp(E_k_e / R_g * (1 / T_inf - 1 / T))
4747

4848
return sigma_e * arrhenius

input/parameters/lithium-ion/electrolytes/lipf6_Ecker2015/electrolyte_diffusivity_Ecker2015.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import autograd.numpy as np
1+
from pybamm import exp
22

33

44
def electrolyte_diffusivity_Ecker2015(c_e, T, T_inf, E_D_e, R_g):
@@ -35,6 +35,6 @@ def electrolyte_diffusivity_Ecker2015(c_e, T, T_inf, E_D_e, R_g):
3535
"""
3636

3737
D_c_e = 2.4 * 10 ** (-10)
38-
arrhenius = np.exp(E_D_e / R_g * (1 / T_inf - 1 / T))
38+
arrhenius = exp(E_D_e / R_g * (1 / T_inf - 1 / T))
3939

4040
return D_c_e * arrhenius

input/parameters/lithium-ion/experiments/1C_discharge_from_full_Ecker2015/parameters.csv

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Name [units],Value,Reference,Notes
33
,,,
44
# Temperature
55
Reference temperature [K],296.15,23C,
6-
Heat transfer coefficient [W.m-2.K-1],N/A,,
6+
Heat transfer coefficient [W.m-2.K-1],1, dummy value,
77
,,,
88
# Electrical
99
Number of electrodes connected in parallel to make a cell,1,,
1010
Number of cells connected in series to make a battery,1,,
1111
Lower voltage cut-off [V],2.8,,
1212
Upper voltage cut-off [V],4.7,,
13-
C-rate,1,,
13+
C-rate,0.0001,,
1414
,,,
1515
# Initial conditions
1616
Initial concentration in negative electrode [mol.m-3], 26356,

input/parameters/lithium-ion/separators/separator_Ecker2015/parameters.csv

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ Name [units],Value,Reference,Notes
22
# Empty rows and rows starting with ‘#’ will be ignored,,,
33
,,,
44
Separator porosity,50.8,,
5-
Separator Bruggeman coefficient,N/A,,
6-
Separator density [kg.m-3],N/A,,
7-
Separator specific heat capacity [J.kg-1.K-1],N/A,,
8-
Separator thermal conductivity [W.m-1.K-1],N/A,,
5+
Separator Bruggeman coefficient (electrolyte),1.5,Ecker set uses measured tortuosity,
6+
Separator Bruggeman coefficient (electrode),1.5,,

pybamm/parameters/standard_parameters_lithium_ion.py

+9-12
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,6 @@ def U_p_dimensional(sto, T):
196196
return u_ref + (T - T_ref) * dUdT_p_dimensional(sto)
197197

198198

199-
# can maybe improve ref value at some stage
200-
U_n_ref = U_n_dimensional(pybamm.Scalar(0.7), T_ref)
201-
202-
# can maybe improve ref value at some stage
203-
U_p_ref = U_p_dimensional(pybamm.Scalar(0.7), T_ref)
204-
205199
m_n_ref_dimensional = m_n_dimensional(T_ref)
206200
m_p_ref_dimensional = m_p_dimensional(T_ref)
207201

@@ -327,6 +321,15 @@ def chi(c_e):
327321
C_dl_dimensional * potential_scale / interfacial_current_scale_p / tau_discharge
328322
)
329323

324+
# Initial conditions
325+
c_e_init = c_e_init_dimensional / c_e_typ
326+
c_n_init = c_n_init_dimensional / c_n_max
327+
c_p_init = c_p_init_dimensional / c_p_max
328+
T_init = pybamm.thermal_parameters.T_init
329+
330+
U_n_ref = U_n_dimensional(pybamm.Scalar(0.7), T_ref)
331+
U_p_ref = U_p_dimensional(pybamm.Scalar(0.7), T_ref)
332+
330333
# Electrical
331334
voltage_low_cut = (voltage_low_cut_dimensional - (U_p_ref - U_n_ref)) / potential_scale
332335
voltage_high_cut = (
@@ -361,12 +364,6 @@ def chi(c_e):
361364
/ (pybamm.thermal_parameters.rho_eff_dim * F * Delta_T * L_x)
362365
)
363366

364-
# Initial conditions
365-
c_e_init = c_e_init_dimensional / c_e_typ
366-
c_n_init = c_n_init_dimensional / c_n_max
367-
c_p_init = c_p_init_dimensional / c_p_max
368-
T_init = pybamm.thermal_parameters.T_init
369-
370367

371368
# --------------------------------------------------------------------------------------
372369
"5. Dimensionless Functions"

tests/unit/test_parameters/test_parameter_sets/test_ecker2015.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def test_standard_lithium_parameters(self):
4040
sim = pybamm.Simulation(model, parameter_values=parameter_values)
4141
sim.set_parameters()
4242

43-
# sim.build()
43+
sim.build()
44+
sim.solve()
4445

4546

4647
if __name__ == "__main__":

0 commit comments

Comments
 (0)