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

Make mechanical properties a function of stoichiometry and sometimes temperature #3576

Merged
merged 5 commits into from
Dec 5, 2023

Conversation

aabills
Copy link
Contributor

@aabills aabills commented Nov 29, 2023

Description

For many chemistries, notably high-nickel NMCs and graphite, the volume change associated with intercalation is a strong function of stoichiometry. Here, I have taken the r-averaged value for Ω and used it to calculate total stress. This accounts for the change without violating the initial model assumptions.

This is the same as #2943 but it was easier to start over than just update that one

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

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)
  • Bug fix (non-breaking change which fixes an issue)
  • Optimization (back-end change that speeds up the code)

Key checklist:

  • No style issues: $ pre-commit run (or $ nox -s pre-commit) (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 (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

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

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ebacf49) 99.59% compared to head (0fd0385) 99.58%.
Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3576      +/-   ##
===========================================
- Coverage    99.59%   99.58%   -0.01%     
===========================================
  Files          257      257              
  Lines        20639    20661      +22     
===========================================
+ Hits         20556    20576      +20     
- Misses          83       85       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aabills
Copy link
Contributor Author

aabills commented Nov 30, 2023

I could be wrong, but it's hard for me to imagine how these regressions could be related to this PR

@agriyakhetarpal
Copy link
Member

I could be wrong, but it's hard for me to imagine how these regressions could be related to this PR

The benchmarks on PRs are not reliable a lot of the times especially on GitHub Actions runners, it's usually good to re-run them if there is a chance of a regression being introduced

@aabills
Copy link
Contributor Author

aabills commented Dec 4, 2023

I mean, I don't think these regressions are even running any of my code -- can someone rerun please if this is blocking?

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please update changelog

Omega = domain_param.Omega
#use a tangential approximation for omega
sto = variables[f"{Domain} particle concentration"]
Omega = pybamm.r_average(domain_param.Omega(sto))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while we're here, could Omega also depend on T?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that would be a thermal expansion coefficient, generally called α

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean I guess they're the same thing really, but in some ways that's an entirely different model.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do it anyway

@valentinsulzer valentinsulzer merged commit e802b11 into pybamm-team:develop Dec 5, 2023
34 of 35 checks passed
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.

3 participants