Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: transport efficiency models #2841

Conversation

isaacsquires
Copy link
Contributor

@isaacsquires isaacsquires commented Mar 30, 2023

Description

Adding new methods for calculating the transport efficiency beyond Bruggeman coefficient. This includes:

  • log square root
  • log
  • linear
  • half volume fraction
  • Bruggeman
  • Tortuosity factor

These were taken from 10.1016/j.ces.2007.03.041 and http://dx.doi.org/10.1016/j.coche.2016.02.006

Fixes #2111

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ pre-commit run (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all
  • The documentation builds: $ python run-tests.py --doctest

You can run unit and doctests together at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@isaacsquires
Copy link
Contributor Author

TODO:

  • write tests for each option
  • add to documentation outlining different options
  • change default behaviour of tortuosity factor to not crash when tau not found in param set

@TomTranter TomTranter self-requested a review March 31, 2023 11:19
@TomTranter
Copy link
Contributor

I think we should include references to the papers that propose the relations and maybe rename them to align a bit better with the descriptions given in this table by Shen and Chen. There a few more in the table we could include too.
image

@TomTranter
Copy link
Contributor

I also feel like tortuosity itself should be a submodel on its own and transport efficiency should use that. This would allow for uploading experimental data and interpolating against porosity.

@isaacsquires
Copy link
Contributor Author

So as I see it, the tor variable implemented at the moment is the transport efficiency as defined here, where trasport efficiency $B$ is defined as $D_{eff}=BD$ in the diffusivity case. This related to tortuosity factor $\tau$ and the Bruggeman coefficient $n$ by $B = \epsilon / \tau=\epsilon ^{(1+n)/n}$ with $n=2$ for the standard Bruggeman formulation for spheres (this does collapse to $B=\epsilon^{1.5}$, taken from here)

So if we are to implement transport efficiency as two submodels, one for tortuosity factor and one for transport efficiency, I feel like transport efficiency would end up just being a simple relation to tortuosity factor i.e. $B=\epsilon/\tau$. We would then just have to reframe all the other relations in terms of $\tau$, e.g. $\tau = \epsilon^{-1/n}$ for Bruggeman. And actually the interesting variation in interpretations and approaches comes in the framing of the transport efficiency.

@TomTranter
Copy link
Contributor

Hey @isaacsquires really sorry I haven't responded to this yet properly. Had a short holiday over Easter and then been swamped with other work things. I haven't forgotten about it and hopefully look again tomorrow

@TomTranter
Copy link
Contributor

transport efficiency would end up just being a simple relation to tortuosity factor

This is currently how the implementation is coded. What are the alternatives?

@TomTranter TomTranter changed the base branch from develop to issue-2111-custom-transport-efficiency October 11, 2023 10:12
@TomTranter TomTranter merged commit 19ac474 into pybamm-team:issue-2111-custom-transport-efficiency Oct 11, 2023
3 of 9 checks passed
@TomTranter
Copy link
Contributor

Merged into a branch on our code base to keep working on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding customized function for tortuosity
7 participants