Skip to content

Commit

Permalink
#936 ferran comments
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Apr 6, 2020
1 parent b4ff62d commit d6943ec
Show file tree
Hide file tree
Showing 23 changed files with 32 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def graphite_LGM50_diffusivity_Chen2020(sto, T):
"""

D_ref = 3.3e-14
arrhenius = exp(42770 / constants.R * (1 / 298.15 - 1 / T))
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
Expand Up @@ -24,6 +24,7 @@ def graphite_LGM50_electrolyte_reaction_rate_Chen2020(T):
"""

m_ref = 6.48e-7
arrhenius = exp(3500 / constants.R * (1 / 298.15 - 1 / T))
E_r = 35000
arrhenius = exp(E_r / constants.R * (1 / 298.15 - 1 / T))

return m_ref * arrhenius
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ Negative electrode specific heat capacity [J.kg-1.K-1],700,default,
Negative electrode thermal conductivity [W.m-1.K-1],1.7,default,
Negative electrode OCP entropic change [V.K-1],0,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Negative electrode reaction rate,[function]graphite_LGM50_electrolyte_reaction_rate_Chen2020,,
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ Negative electrode electrons in reaction,1,,
# Thermal parameters,,,
Negative electrode OCP entropic change [V.K-1],0,,
,,,
# Activation energies,,,
Reference temperature [K],296.15,23C,
# Reaction rate,,,
Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Ecker2015,,
Negative reaction rate activation energy [J.mol-1],53400,,
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ Negative electrode specific heat capacity [J.kg-1.K-1],700,,
Negative electrode thermal conductivity [W.m-1.K-1],1.1339,1.7 * 0.667,
Negative electrode OCP entropic change [V.K-1],0,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Kim2011,,
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ Negative electrode specific heat capacity [J.kg-1.K-1],1100,Peyman MPM,cell lump
Negative electrode thermal conductivity [W.m-1.K-1],1.7,,no info from Peyman MPM
Negative electrode OCP entropic change [V.K-1],[function]graphite_entropic_change_PeymanMPM,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_PeymanMPM,,
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ 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,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Negative electrode reaction rate,[function]graphite_electrolyte_reaction_rate_Dualfoil1998,,
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ Positive electrode electrons in reaction,1,,
# Thermal parameters,,,
Positive electrode OCP entropic change [V.K-1],0,,
,,,
# Activation energies,,,
Reference temperature [K],296.15,23C,
# Reaction rate,,,
Positive electrode reaction rate,[function]nco_electrolyte_reaction_rate_Ecker2015,,
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ Positive electrode specific heat capacity [J.kg-1.K-1],1100,Peyman MPM, cell lum
Positive electrode thermal conductivity [W.m-1.K-1],2.1,,no info from Peyman MPM
Positive electrode OCP entropic change [V.K-1],[function]NMC_entropic_change_PeymanMPM,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Positive electrode reaction rate,[function]NMC_electrolyte_reaction_rate_PeymanMPM,,
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ Positive electrode specific heat capacity [J.kg-1.K-1],700,,
Positive electrode thermal conductivity [W.m-1.K-1],2.1,,
Positive electrode OCP entropic change [V.K-1],[function]lico2_entropic_change_Moura2016,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Positive electrode reaction rate,[function]lico2_electrolyte_reaction_rate_Dualfoil1998,,
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ Positive electrode specific heat capacity [J.kg-1.K-1],700,,
Positive electrode thermal conductivity [W.m-1.K-1],1.4007, 2.1 * 0.667,
Positive electrode OCP entropic change [V.K-1],0,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Positive electrode reaction rate,[function]nca_electrolyte_reaction_rate_Kim2011,,
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ Positive electrode specific heat capacity [J.kg-1.K-1],700,default,
Positive electrode thermal conductivity [W.m-1.K-1],2.1,default,
Positive electrode OCP entropic change [V.K-1],0,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
# Reaction rate,,,
Positive electrode reaction rate,[function]nmc_LGM50_electrolyte_reaction_rate_Chen2020,,
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ Cation transference number,0.38,Peyman MPM,
Typical lithium ion diffusivity [m2.s-1],5.34E-10,Scott Moura FastDFN,
Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_PeymanMPM,,
Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_PeymanMPM,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Cation transference number,0.26,,
1 + dlnf/dlnc,1,,
Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Ecker2015,,
Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Ecker2015,,
,,,
# Activation energies,,,
Reference temperature [K],296.15,23C,
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Cation transference number,0.4,Reported as a function in Kim2011 (Implement late
1 + dlnf/dlnc,1,,
Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Kim2011,,
Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Kim2011,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ Cation transference number,0.4,Scott Moura FastDFN,
1 + dlnf/dlnc,1,,
Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Capiglia1999,,
Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Capiglia1999,,
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ Typical electrolyte concentration [mol.m-3],1000,Chen 2020,
Cation transference number,0.2594,Chen 2020,
1 + dlnf/dlnc,1,,
Electrolyte diffusivity [m2.s-1],[function]electrolyte_diffusivity_Nyman2008,Nyman 2008," "
Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Nyman2008,Nyman 2008," "
,,,
# Activation energies,,,
Reference temperature [K],298.15,25C,
Electrolyte conductivity [S.m-1],[function]electrolyte_conductivity_Nyman2008,Nyman 2008," "
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ def test_load_params(self):
"input/parameters/lithium-ion/anodes/graphite_Chen2020/parameters.csv"
)
)
self.assertEqual(anode["Reference temperature [K]"], "298.15")
self.assertEqual(anode["Negative electrode porosity"], "0.25")

cathode = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
"input/parameters/lithium-ion/cathodes/nmc_Chen2020/parameters.csv"
)
)
self.assertEqual(cathode["Reference temperature [K]"], "298.15")
self.assertEqual(cathode["Positive electrode porosity"], "0.335")

electrolyte = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
"input/parameters/lithium-ion/electrolytes/lipf6_Nyman2008/"
+ "parameters.csv"
)
)
self.assertEqual(electrolyte["Reference temperature [K]"], "298.15")
self.assertEqual(electrolyte["Cation transference number"], "0.2594")

cell = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ def test_load_params(self):
"input/parameters/lithium-ion/anodes/graphite_Kim2011/parameters.csv"
)
)
self.assertEqual(anode["Reference temperature [K]"], "298.15")
self.assertEqual(anode["Negative electrode porosity"], "0.4")

cathode = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
"input/parameters/lithium-ion/cathodes/nca_Kim2011/parameters.csv"
)
)
self.assertEqual(cathode["Reference temperature [K]"], "298.15")
self.assertEqual(cathode["Positive electrode porosity"], "0.4")

electrolyte = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
"input/parameters/lithium-ion/electrolytes/lipf6_Kim2011/parameters.csv"
)
)
self.assertEqual(electrolyte["Reference temperature [K]"], "298.15")
self.assertEqual(electrolyte["Cation transference number"], "0.4")

cell = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_load_params(self):
+ "parameters.csv"
)
)
self.assertEqual(electrolyte["Reference temperature [K]"], "296.15")
self.assertEqual(electrolyte["Cation transference number"], "0.26")

cell = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ class TestMohtat(unittest.TestCase):
def test_load_params(self):
anode = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
"input/parameters/lithium-ion/" +
"anodes/graphite_UMBL_Mohtat2020/parameters.csv"
"input/parameters/lithium-ion/"
+ "anodes/graphite_UMBL_Mohtat2020/parameters.csv"
)
)
self.assertEqual(anode["Reference temperature [K]"], "298.15")
self.assertEqual(anode["Negative electrode porosity"], "0.3")

cathode = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
"input/parameters/lithium-ion/" +
"cathodes/NMC_UMBL_Mohtat2020/parameters.csv"
"input/parameters/lithium-ion/"
+ "cathodes/NMC_UMBL_Mohtat2020/parameters.csv"
)
)
self.assertEqual(cathode["Reference temperature [K]"], "298.15")
self.assertEqual(cathode["Positive electrode porosity"], "0.3")

electrolyte = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
"input/parameters/lithium-ion/electrolytes/LiPF6_Mohtat2020/"
+ "parameters.csv"
)
)
self.assertEqual(electrolyte["Reference temperature [K]"], "298.15")
self.assertEqual(electrolyte["Cation transference number"], "0.38")

cell = pybamm.ParameterValues({}).read_parameters_csv(
pybamm.get_parameters_filepath(
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_parameters/test_parameter_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_read_parameters_csv(self):
)
)
)
self.assertEqual(data["Reference temperature [K]"], "298.15")
self.assertEqual(data["Positive electrode porosity"], "0.3")

def test_init(self):
# from dict
Expand All @@ -40,7 +40,7 @@ def test_init(self):
+ "parameters.csv"
)
)
self.assertEqual(param["Reference temperature [K]"], 298.15)
self.assertEqual(param["Positive electrode porosity"], 0.3)

# values vs chemistry
with self.assertRaisesRegex(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_parameters/test_parameters_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_add_param(self):
new_anode = pybamm.ParameterValues({}).read_parameters_csv(
new_parameter_filename
)
self.assertEqual(new_anode["Reference temperature [K]"], "298.15")
self.assertEqual(new_anode["Negative electrode porosity"], "0.3")

# Clean up directories
tempdir.cleanup() # Remove temporary local directory
Expand Down

0 comments on commit d6943ec

Please sign in to comment.