Skip to content

Commit

Permalink
matched parameter functions with BattMo.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenaH84 committed Jun 28, 2024
1 parent d2dfbe3 commit ba59000
Show file tree
Hide file tree
Showing 40 changed files with 108 additions and 46 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion Documentation/intermediate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ the :code:`jsonstruct` that is obtained is equivalent to the one where we would
"guestStoichiometry0": 0.1429,
"chargeTransferCoefficient": 0.5,
"openCircuitPotential" : {"type": "function",
"functionname" : "computeOCP_graphite",
"functionname" : "computeOCP_Graphite_Torchio",
"argumentlist" : ["cElectrode", "T", "cmax"]
}}},
Expand Down
2 changes: 1 addition & 1 deletion Examples/Documentation/jsonfiles/Example/interface.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_graphite",
"functionname": "computeOCP_Graphite_Torchio",
"argumentlist": [
"concentration",
"temperature",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_nmc111",
"functionname": "computeOCP_NMC111",
"argumentlist": [
"concentration",
"temperature",
Expand Down
4 changes: 2 additions & 2 deletions Examples/JsonDataFiles/p2d_40.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_graphite",
"functionname": "computeOCP_Graphite_Torchio",
"argumentlist": [
"concentration",
"temperature",
Expand Down Expand Up @@ -91,7 +91,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_nmc111",
"functionname": "computeOCP_NMC111",
"argumentlist": [
"concentration",
"temperature",
Expand Down
4 changes: 2 additions & 2 deletions Examples/JsonDataFiles/p2d_40_jl.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_graphite",
"functionname": "computeOCP_Graphite_Torchio",
"argumentlist": [
"concentration",
"temperature",
Expand Down Expand Up @@ -91,7 +91,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_nmc111",
"functionname": "computeOCP_NMC111",
"argumentlist": [
"concentration",
"temperature",
Expand Down
4 changes: 2 additions & 2 deletions Examples/JsonDataFiles/sample_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_graphite",
"functionname": "computeOCP_Graphite_Torchio",
"argumentlist": [
"concentration",
"temperature",
Expand Down Expand Up @@ -99,7 +99,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_nmc111",
"functionname": "computeOCP_NMC111",
"argumentlist": [
"concentration",
"temperature",
Expand Down
6 changes: 3 additions & 3 deletions Examples/LNMO/SiGrLnmo.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"temperature",
"cmax"
],
"functionname": "computeOCP_graphite",
"functionname": "computeOCP_Graphite_Torchio",
"type": "function"
},
"reactionRateConstant": 5.031e-11,
Expand Down Expand Up @@ -94,7 +94,7 @@
"temperature",
"cmax"
],
"functionname": "computeOCPSiliconLi2012",
"functionname": "computeOCP_Silicon_Li2012",
"type": "function"
},
"reactionRateConstant": 5.031e-11,
Expand Down Expand Up @@ -168,7 +168,7 @@
"temperature",
"maximum concentration"
],
"functionname": "updateOCPFunc_LNMO_Pron",
"functionname": "computeOCP_LNMO_Pron",
"type": "function"
},
"reactionRateConstant": 2.33e-11,
Expand Down
4 changes: 2 additions & 2 deletions Examples/LNMO/params_initial.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"temperature",
"cmax"
],
"functionname": "computeOCP_graphite_Chen",
"functionname": "computeOCP_Graphite_SiOx_Chen2020",
"type": "function"
},
"reactionRateConstant": 6.716e-12,
Expand Down Expand Up @@ -129,7 +129,7 @@
"temperature",
"maximum concentration"
],
"functionname": "updateOCPFunc_LNMO_Pron",
"functionname": "computeOCP_LNMO_Pron",
"type": "function"
},
"reactionRateConstant": 2.33e-11,
Expand Down
2 changes: 1 addition & 1 deletion Examples/LNMO/params_lnmo_sig_intelligent.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"temperature",
"cmax"
],
"functionname": "computeOCP_graphite_Chen",
"functionname": "computeOCP_Graphite_SiOx_Chen2020",
"type": "function"
},
"reactionRateConstant": 6.716e-12,
Expand Down
4 changes: 2 additions & 2 deletions Examples/LNMO/params_modified.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"temperature",
"cmax"
],
"functionname": "computeOCP_graphite_Chen",
"functionname": "computeOCP_Graphite_SiOx_Chen2020",
"type": "function"
},
"reactionRateConstant": 6.716e-12,
Expand Down Expand Up @@ -131,7 +131,7 @@
"temperature",
"maximum concentration"
],
"functionname": "updateOCPFunc_LNMO_Pron",
"functionname": "computeOCP_LNMO_Pron",
"type": "function"
},
"saturationConcentration": 24358,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_graphite",
"functionname": "computeOCP_Graphite_Torchio",
"argumentlist": [
"concentration",
"temperature",
Expand Down Expand Up @@ -229,7 +229,7 @@
},
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_nmc111",
"functionname": "computeOCP_NMC111",
"argumentlist": [
"concentration",
"temperature",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"guestStoichiometry100": 0.51873811,
"guestStoichiometry0": 0.001,
"openCircuitPotential": {"type": "function",
"functionname": "computeOCPFunc_LiC6_Xu",
"functionname": "computeOCP_Graphite_Torchio_Xu2015",
"argumentlist" : ["concentration", "temperature", "cmax"]
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = computeOCP_graphite_Chen(c, ~, cmax)
function [OCP, dUdT] = computeOCP_Graphite_SiOx_Chen2020(c, ~, cmax)
% LG M50 graphite open circuit potential as a function of stochiometry, fit taken
% from [1].

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = computeOCP_graphite(c, T, cmax)
function [OCP, dUdT] = computeOCP_Graphite_Torchio(c, T, cmax)
% Calculate the equilibrium open cirucuit potential of
% graphite according to the model used by Torchio et al [1].

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = computeOCPFunc_LiC6_Xu(c, T, cmax)
function [OCP, dUdT] = computeOCP_Graphite_Torchio_Xu2015(c, T, cmax)
%% TODO : implement function model to avoid reading

data = [0.00, 1.28683
Expand Down
2 changes: 1 addition & 1 deletion ParameterData/MaterialProperties/Graphite/graphite.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"guestStoichiometry0": 0.1429,
"chargeTransferCoefficient": 0.5,
"openCircuitPotential" : {"type": "function",
"functionname" : "computeOCP_graphite",
"functionname" : "computeOCP_Graphite_Torchio",
"argumentlist" : ["concentration", "temperature", "cmax"]
}
}
2 changes: 1 addition & 1 deletion ParameterData/MaterialProperties/LFP/LFP.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"guestStoichiometry0": 0.999,
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {"type": "function",
"functionname": "computeOCPFunc_LFP_Xu",
"functionname": "computeOCP_LFP_Xu2015",
"argumentlist" : ["concentration", "temperature", "cmax"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function [OCP, dUdT] = computeOCP_LFP_Gerver2011(c, T, cmax)

OCP = 3.41285712e+00 - 1.49721852e-02 * c/cmax + 3.54866018e+14 * exp(-3.95729493e+02 * c/cmax) - 1.45998465e+00 * exp(-1.10108622e+02 * (1 - c/cmax))
dUdT = 0
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = computeOCPFunc_LFP_Xu(c, T, cmax)
function [OCP, dUdT] = computeOCP_LFP_Xu2015(c, T, cmax)
%% TODO : implement function model to avoid reading

stoc = c./cmax;
Expand Down
2 changes: 1 addition & 1 deletion ParameterData/MaterialProperties/LNMO/LNMO_Mao.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"guestStoichiometry100": 1.4001e-04,
"guestStoichiometry0": 0.9811,
"openCircuitPotential" : {"type" : "function",
"functionname" : "updateOCPFunc_LNMO_Mao",
"functionname" : "computeOCP_LNMO_Mao",
"argumentlist" : ["concentration", "temperature", "maximum concentration"]
},
"chargeTransferCoefficient" : 0.5}
2 changes: 1 addition & 1 deletion ParameterData/MaterialProperties/LNMO/LNMO_Pron.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"guestStoichiometry100": 1.4001e-04,
"guestStoichiometry0": 0.9811,
"openCircuitPotential" : {"type" : "function",
"functionname" : "updateOCPFunc_LNMO_Pron",
"functionname" : "computeOCP_LNMO_Pron",
"argumentlist" : ["concentration", "temperature", "maximum concentration"]},
"chargeTransferCoefficient" : 0.5}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = updateOCPFunc_lnmo_Mao(c, T, cmax)
function [OCP, dUdT] = computeOCP_LNMO_Mao(c, T, cmax)
% Data from
% @article{Mao_2020, title={Entropy Change Characteristics of the LiNi0.5Mn1.5O4 Cathode Material for Lithium-Ion Batteries}, volume={5}, ISSN={2470-1343}, url={http://dx.doi.org/10.1021/acsomega.9b03794}, DOI={10.1021/acsomega.9b03794}, number={8}, journal={ACS Omega}, publisher={American Chemical Society (ACS)}, author={Mao, Jing and Zhang, Peng and Liu, Xin and Liu, Yanxia and Shao, Guosheng and Dai, Kehua}, year={2020}, month=feb, pages={4109–4114} }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = updateOCPFunc_lnmo_Pron(c, T, cmax)
function [OCP, dUdT] = computeOCP_LNMO_Pron(c, T, cmax)
% Data from
% @article{Pron_2019, title={Electrochemical Characterization and Solid Electrolyte Interface Modeling of LiNi0.5Mn1.5O4-Graphite Cells}, volume={166}, ISSN={1945-7111}, url={http://dx.doi.org/10.1149/2.0941910jes}, DOI={10.1149/2.0941910jes}, number={10}, journal={Journal of The Electrochemical Society}, publisher={The Electrochemical Society}, author={Pron, Vittorio Giai and Versaci, Daniele and Amici, Julia and Francia, Carlotta and Santarelli, Massimo and Bodoardo, Silvia}, year={2019}, pages={A2255–A2263} }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = computeOCP_nmc111_Chen(c, T, cmax)
function [OCP, dUdT] = computeOCP_NMC811_Chen2020(c, T, cmax)

% LG M50 NMC open circuit potential as a function of stochiometry, fit taken
% from [1].
Expand Down
2 changes: 1 addition & 1 deletion ParameterData/MaterialProperties/NMC/computeOCP_nmc111.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = computeOCP_nmc111(c, T, cmax)
function [OCP, dUdT] = computeOCP_NMC111(c, T, cmax)

Tref = 298.15; % [K]

Expand Down
2 changes: 1 addition & 1 deletion ParameterData/MaterialProperties/NMC/nmc111.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"guestStoichiometry0": 0.99174,
"chargeTransferCoefficient" : 0.5,
"openCircuitPotential" : {"type" : "function",
"functionname" : "computeOCP_nmc111",
"functionname" : "computeOCP_NMC111",
"argumentlist" : ["concentration", "temperature", "cmax"]}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function D = computeDiffusionCoefficient_Chen2020(c, T)

c = c./1000;
D = 8.794 .*10^(-11) .*c .^2 - 3.972 .*10^(-10) .*c + 4.862*10^(-10);

end



%{
Copyright 2021-2024 SINTEF Industry, Sustainable Energy Technology
and SINTEF Digital, Mathematics & Cybernetics.
This file is part of The Battery Modeling Toolbox BattMo
BattMo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
BattMo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with BattMo. If not, see <http://www.gnu.org/licenses/>.
%}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function D = computeDiffusionCoefficientFunc_Xu(c, T)
function D = computeDiffusionCoefficient_Xu2015(c, T)

% Calculate diffusion coefficients constant for the diffusion coefficient calculation
cnst = [ -4.43, -54;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function D = computeElectrolyteConductivity_Chen2020(c, T)

c = c./1000;
D = 0.1297 .*c.^3 - 2.51 .*c.^(1.5) + 3.329 .*c;

end



%{
Copyright 2021-2024 SINTEF Industry, Sustainable Energy Technology
and SINTEF Digital, Mathematics & Cybernetics.
This file is part of The Battery Modeling Toolbox BattMo
BattMo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
BattMo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with BattMo. If not, see <http://www.gnu.org/licenses/>.
%}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function conductivity = computeElectrolyteConductivityFunc_Xu(c, T)
function conductivity = computeElectrolyteConductivity_Xu2015(c, T)

conductivityFactor = 1e-4;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
},
"Conductivity": {
"type": "function",
"functionname": "computeElectrolyteConductivityFunc_Xu",
"functionname": "computeElectrolyteConductivity_Xu2015",
"argumentlist": [
"concentration",
"temperature"
]
},
"DiffusionCoefficient": {
"type": "function",
"functionname": "computeDiffusionCoefficientFunc_Xu",
"functionname": "computeDiffusionCoefficient_Xu2015",
"argumentlist": [
"concentration",
"temperature"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function j0 = computeJ0SiliconLi2012(soc)
function j0 = computeJ0_Silicon_Li2012(soc)
%% unit of j0 is in [A/m^2]

j0 = 10;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [OCP, dUdT] = computeOCPSiliconLi2012(c, T, cmax)
function [OCP, dUdT] = computeOCP_Silicon_Li2012(c, T, cmax)
% From
% Juchuan Li, Xingcheng Xiao, Fuqian Yang, Mark W. Verbrugge, Yang-Tse Cheng
% Potentiostatic Intermittent Titration Technique for Electrodes Governed by Diffusion and Interfacial Reaction
Expand Down
2 changes: 1 addition & 1 deletion ParameterData/MaterialProperties/Silicon/silicon.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"guestStoichiometry0": 0.1429,
"chargeTransferCoefficient": 0.5,
"openCircuitPotential" : {"type": "function",
"functionname" : "computeOCPSiliconLi2012",
"functionname" : "computeOCP_Silicon_Li2012",
"argumentlist" : ["concentration", "temperature", "cmax"]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"chargeTransferCoefficient": 0.5,
"openCircuitPotential": {
"type": "function",
"functionname": "computeOCP_graphite_Chen",
"functionname": "computeOCP_Graphite_SiOx_Chen2020",
"argumentlist": [
"concentration",
"temperature",
Expand Down
Loading

0 comments on commit ba59000

Please sign in to comment.