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
I've been reading through the code and I've found a few things that seem inconsistent. Please let me know if I'm misunderstanding what the code is supposed to do.
ffrac is the overall filling fraction of the electrode. In mod_cell.py Lines 166-179 ffrac is calculated with
This equation seems to treat $V_{v,p}$ as the particle volume as a fraction of the electrode volume $dx$. However, the $V_{v,p}$ is the particle volume as a fraction of the total particle volume in the electrode volume (configuration.py Line 669). This is only equivalent when each electrode volume contains the same total particle volume. This is not the case when the particle size distribution is randomized.
Instead, lines 166-179 could be replaced with something like
# Define the overall filling fraction in the electrodes
for trode in trodes:
eq = self.CreateEquation("ffrac_{trode}".format(trode=trode))
eq.Residual = self.ffrac[trode]()
tmp = 0
Vol_fracs = config["psd_vol"][trode] / config["psd_vol"][trode].sum(axis=None)
for vInd in range(Nvol[trode]):
for pInd in range(Npart[trode]):
Vj = Vol_fracs[vInd,pInd]
tmp += self.particles[trode][vInd,pInd].cbar() / config[trode,'csmax'] * Vj
eq.Residual -= tmp
The text was updated successfully, but these errors were encountered:
marbris
changed the title
ffrac assumes each electrode volume contains equal particle volume
Calculating ffrac from volume fractions
May 18, 2023
I've been reading through the code and I've found a few things that seem inconsistent. Please let me know if I'm misunderstanding what the code is supposed to do.
ffrac is the overall filling fraction of the electrode. In mod_cell.py Lines 166-179 ffrac is calculated with
This equation seems to treat$V_{v,p}$ as the particle volume as a fraction of the electrode volume $dx$ . However, the $V_{v,p}$ is the particle volume as a fraction of the total particle volume in the electrode volume (configuration.py Line 669). This is only equivalent when each electrode volume contains the same total particle volume. This is not the case when the particle size distribution is randomized.
Instead, lines 166-179 could be replaced with something like
The text was updated successfully, but these errors were encountered: