Skip to content

Commit

Permalink
make partial molar volume also a function of temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
aabills committed Dec 5, 2023
1 parent 31e08c7 commit 0fd0385
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +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 ([#3576](https://github.com/pybamm-team/PyBaMM/pull/3576))
- Mechanical parameters are now a function of stoichiometry and temperature ([#3576](https://github.com/pybamm-team/PyBaMM/pull/3576))

## Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion pybamm/models/submodels/particle/base_particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _get_effective_diffusivity(self, c, T, current):
if stress_option == "true":
# Ai2019 eq [12]
sto = c / phase_param.c_max
Omega = pybamm.r_average(domain_param.Omega(sto))
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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _get_mechanical_results(self, variables):

#use a tangential approximation for omega
sto = variables[f"{Domain} particle concentration"]
Omega = pybamm.r_average(domain_param.Omega(sto))
Omega = pybamm.r_average(domain_param.Omega(sto, T))
R0 = domain_param.prim.R
c_0 = domain_param.c_0
E0 = pybamm.r_average(domain_param.E(sto, T))
Expand Down
4 changes: 2 additions & 2 deletions pybamm/parameters/lithium_ion_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ def C_dl(self, T):
f"{Domain} electrode double-layer capacity [F.m-2]", inputs
)

def Omega(self, sto):
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}
inputs = {f"{Domain} particle stoichiometry": sto, "Temperature [K]": T}
return pybamm.FunctionParameter(
f"{Domain} electrode partial molar volume [m3.mol-1]", inputs
)
Expand Down

0 comments on commit 0fd0385

Please sign in to comment.