You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The X-averaged value(stress_t_surf_avg) is consistently lower than the uniform local value, despite all entries in stress_t_surf[0] being identical.
To understand the cause, I inspected the expression behind the variable "X-averaged negative particle surface tangential stress [Pa]". It appears that this variable is computed using X-averaged concentration, rather than by directly averaging the local surface stress values across the electrode.
However, at t = 0, both the local and X-averaged concentrations should be equal to the initial value throughout the domain, so both stress variables should produce the same result.
The mesh is uniform (dx is constant), so integration weights should not introduce any error.
Given these conditions, why is there a discrepancy between the X-averaged and local surface stress values at the initial time? I’d appreciate any clarification on how these variables are computed under the hood.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using PyBaMM with the SPMe model and the OKane2022 parameter set, and I've encountered a discrepancy in the computed surface tangential stress.
Let’s assume the solution object is
sol1
. Then the following two variables return different values att = 0
:stress_t_surf_avg = sol1.cycles[0].steps[0]['X-averaged negative particle surface tangential stress [Pa]'].entries
stress_t_surf = sol1.cycles[0].steps[0]['Negative particle surface tangential stress [Pa]'].entries.T
The X-averaged value(stress_t_surf_avg) is consistently lower than the uniform local value, despite all entries in stress_t_surf[0] being identical.
To understand the cause, I inspected the expression behind the variable "X-averaged negative particle surface tangential stress [Pa]". It appears that this variable is computed using X-averaged concentration, rather than by directly averaging the local surface stress values across the electrode.
However, at t = 0, both the local and X-averaged concentrations should be equal to the initial value throughout the domain, so both stress variables should produce the same result.
I also checked the spatial discretization:
sol1.cycles[0].steps[0]['x_n [m]'].entries.T[0][1:] - sol1.cycles[0].steps[0]['x_n [m]'].entries.T[0][:-1]
The mesh is uniform (dx is constant), so integration weights should not introduce any error.
Given these conditions, why is there a discrepancy between the X-averaged and local surface stress values at the initial time? I’d appreciate any clarification on how these variables are computed under the hood.
Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions