Repository navigation
Replies: 1 comment
|
You do not need to change the kinetics, only the open-circuit potential of the lithium-metal electrode. Your ocp = E + (RT/F) ln(c_e / c_s). For lithium metal, that OCP is hard-coded to zero in import pybamm
class LiMetalNernstOCP(pybamm.open_circuit_potential.SingleOpenCircuitPotential):
def get_coupled_variables(self, variables):
if self.reaction != "lithium metal plating":
return super().get_coupled_variables(variables)
_, Domain = self.domain_Domain
T = variables[f"{Domain} electrode temperature [K]"]
# in a half-cell this is c_e at the Li/separator interface
c_e = variables[f"{Domain} electrolyte concentration [mol.m-3]"]
E = pybamm.Parameter("Lithium metal reference potential [V]")
c_s = pybamm.Parameter("Lithium metal surface concentration [mol.m-3]")
ocp = E + self.param.R * T / self.param.F * pybamm.log(c_e / c_s)
variables.update(self._get_standard_ocp_variables(ocp, ocp, 0 * T))
return variables
model = pybamm.lithium_ion.DFN(options={"working electrode": "positive"}, build=False)
model.submodels["negative primary open-circuit potential"] = LiMetalNernstOCP(
model.param, "negative", "lithium metal plating", model.options, "primary"
)
model.build_model()
param = pybamm.ParameterValues("Xu2019")
param.update(
{
"Exchange-current density for lithium metal electrode [A.m-2]": 30,
"Lithium metal reference potential [V]": 0.0,
"Lithium metal surface concentration [mol.m-3]": 1000.0,
},
check_already_exists=False,
)The rest of your experiment and Notes:
|
Uh oh!
There was an error while loading. Please reload this page.
I am using the PyBaMM half-cell model and need to implement a custom kinetic expression for lithium plating. I am unable to reformulate my desired kinetic form to match the expression in Xu2019 paper (Eq. 13, I believe this is the expressions used in PyBaMM?).
The Desired Kinetic Form
I want to use the following form for the plating current density,$j$ :
where the overpotential,$\eta$ , is defined as:
Definitions of Variables
My Question
I can modify the exchange current density. But I don't know where can I modify the form of the kinetics. Where in PyBaMM should I implement this custom kinetic form?
Example Code
This is the code I have for now.
I would appreciate any help and recommendations to achieve this custom kinetic form.
All reactions