Skip to content

Commit

Permalink
Merge pull request pybamm-team#3576 from abillscmu/omega-stoich-2
Browse files Browse the repository at this point in the history
Make mechanical properties a function of stoichiometry and sometimes temperature
  • Loading branch information
valentinsulzer authored Dec 5, 2023
2 parents 4aec7cd + 0fd0385 commit e802b11
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Features

- Serialisation added so models can be written to/read from JSON ([#3397](https://github.com/pybamm-team/PyBaMM/pull/3397))
- Mechanical parameters are now a function of stoichiometry and temperature ([#3576](https://github.com/pybamm-team/PyBaMM/pull/3576))

## Bug fixes

Expand Down
5 changes: 3 additions & 2 deletions pybamm/models/submodels/particle/base_particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def _get_effective_diffusivity(self, c, T, current):

if stress_option == "true":
# Ai2019 eq [12]
Omega = domain_param.Omega
E = domain_param.E
sto = c / phase_param.c_max
Omega = pybamm.r_average(domain_param.Omega(sto, T))
E = pybamm.r_average(domain_param.E(sto, T))
nu = domain_param.nu
theta_M = Omega / (param.R * T) * (2 * Omega * E) / (9 * (1 - nu))
stress_factor = 1 + theta_M * (c - domain_param.c_0)
Expand Down
11 changes: 9 additions & 2 deletions pybamm/models/submodels/particle_mechanics/base_mechanics.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,19 @@ def _get_mechanical_results(self, variables):
sto_rav = variables[f"R-averaged {domain} particle concentration"]
c_s_surf = variables[f"{Domain} particle surface concentration [mol.m-3]"]
T_xav = variables["X-averaged cell temperature [K]"]
phase_name = self.phase_name
T = pybamm.PrimaryBroadcast(
variables[f"{Domain} electrode temperature [K]"],
[f"{domain} {phase_name}particle"],
)
eps_s = variables[f"{Domain} electrode active material volume fraction"]

Omega = domain_param.Omega
#use a tangential approximation for omega
sto = variables[f"{Domain} particle concentration"]
Omega = pybamm.r_average(domain_param.Omega(sto, T))
R0 = domain_param.prim.R
c_0 = domain_param.c_0
E0 = domain_param.E
E0 = pybamm.r_average(domain_param.E(sto, T))
nu = domain_param.nu
L0 = domain_param.L
sto_init = pybamm.r_average(domain_param.prim.c_init / domain_param.prim.c_max)
Expand Down
21 changes: 17 additions & 4 deletions pybamm/parameters/lithium_ion_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,11 @@ def _set_parameters(self):

# Mechanical parameters
self.nu = pybamm.Parameter(f"{Domain} electrode Poisson's ratio")
self.E = pybamm.Parameter(f"{Domain} electrode Young's modulus [Pa]")
self.c_0 = pybamm.Parameter(
f"{Domain} electrode reference concentration for free of deformation "
"[mol.m-3]"
)
self.Omega = pybamm.Parameter(
f"{Domain} electrode partial molar volume [m3.mol-1]"
)

self.l_cr_0 = pybamm.Parameter(f"{Domain} electrode initial crack length [m]")
self.w_cr = pybamm.Parameter(f"{Domain} electrode initial crack width [m]")
self.rho_cr = pybamm.Parameter(
Expand Down Expand Up @@ -349,6 +346,22 @@ def C_dl(self, T):
f"{Domain} electrode double-layer capacity [F.m-2]", inputs
)

def Omega(self, sto, T):
"""Dimensional partial molar volume of Li in solid solution [m3.mol-1]"""
Domain = self.domain.capitalize()
inputs = {f"{Domain} particle stoichiometry": sto, "Temperature [K]": T}
return pybamm.FunctionParameter(
f"{Domain} electrode partial molar volume [m3.mol-1]", inputs
)

def E(self, sto, T):
"""Dimensional Young's modulus"""
Domain = self.domain.capitalize()
inputs = {f"{Domain} particle stoichiometry": sto, "Temperature [K]": T}
return pybamm.FunctionParameter(
f"{Domain} electrode Young's modulus [Pa]", inputs
)

def sigma(self, T):
"""Dimensional electrical conductivity in electrode"""
inputs = {"Temperature [K]": T}
Expand Down

0 comments on commit e802b11

Please sign in to comment.