Skip to content

Commit 0d5af5c

Browse files
authored
Moved concentration inside average when calculating LLI due to LAM (#4858)
* Moved concentration inside average when calculating LLI due to LAM * changelog
1 parent 86b00ce commit 0d5af5c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
## Bug fixes
3030

31+
- Moved concentration inside x-averaged when calculating LLI due to LAM variables ([#4858](https://github.com/pybamm-team/PyBaMM/pull/4858))
3132
- Fixed a bug which caused the ec-reaction limited SEI model to give
3233
incorrect results ([#4774](https://github.com/pybamm-team/PyBaMM/pull/4774))
3334

src/pybamm/models/submodels/active_material/loss_active_material.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ def set_rhs(self, variables):
161161
f"in {domain} electrode [mol]"
162162
]
163163
# Multiply by mol.m-3 * m3 to get mol
164-
c_s_av = variables[
165-
f"Average {domain} {phase_name}particle concentration [mol.m-3]"
164+
c_s_rav = variables[
165+
f"R-averaged {domain} {phase_name}particle concentration [mol.m-3]"
166166
]
167167
V = self.domain_param.L * self.param.A_cc
168168

169169
self.rhs = {
170170
# minus sign because eps_solid is decreasing and LLI measures positive
171-
lli_due_to_lam: -c_s_av * V * pybamm.x_average(deps_solid_dt),
171+
lli_due_to_lam: -V * pybamm.x_average(c_s_rav * deps_solid_dt),
172172
eps_solid: deps_solid_dt,
173173
}
174174

0 commit comments

Comments
 (0)