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 initial soc work with half cell models #3456

Merged
merged 5 commits into from Oct 19, 2023

Conversation

abillscmu
Copy link
Contributor

@abillscmu abillscmu commented Oct 17, 2023

Description

Adds methods to use initial soc with half-cell models

Also fixes a spelling mistake I saw, lolz.

@tinosulzer it sounds like is redoing much of this anyway, so this could be considered a hot fix for now given that it may be overwritten soon.

I'd love it if this got into 23.9 as a bug fix so that I don't have to pin to some weird branch waiting for the next version, but understand if that's not possible. If I need to branch off 23.9 to make that happen, I would be happy to do so.

Fixes # (issue)
Fixes #3224

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 (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
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 to me if tests and coverage pass

@abillscmu
Copy link
Contributor Author

Can you run the workflows?

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (8429903) 99.58% compared to head (7f6d55a) 99.58%.
Report is 26 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3456   +/-   ##
========================================
  Coverage    99.58%   99.58%           
========================================
  Files          256      256           
  Lines        20003    20048   +45     
========================================
+ Hits         19920    19965   +45     
  Misses          83       83           
Files Coverage Δ
...m/models/full_battery_models/base_battery_model.py 99.13% <ø> (ø)
...models/full_battery_models/lithium_ion/__init__.py 100.00% <100.00%> (ø)
...tery_models/lithium_ion/electrode_soh_half_cell.py 100.00% <100.00%> (ø)
pybamm/parameters/parameter_values.py 100.00% <100.00%> (ø)
pybamm/simulation.py 99.55% <100.00%> (+<0.01%) ⬆️

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

@abillscmu
Copy link
Contributor Author

coverage should be at or very near 100% now

@valentinsulzer valentinsulzer merged commit 876c512 into pybamm-team:develop Oct 19, 2023
35 checks passed
@abillscmu abillscmu mentioned this pull request Oct 23, 2023
8 tasks
@Saransh-cpp
Copy link
Member

I'd love it if this got into 23.9 as a bug fix so that I don't have to pin to some weird branch waiting for the next version, but understand if that's not possible. If I need to branch off 23.9 to make that happen, I would be happy to do so.

Just read this. Adding this into the future rc1 release.

Saransh-cpp pushed a commit that referenced this pull request Oct 31, 2023
make initial soc work with half cell models
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.

[Bug]: initial_soc not working with half cell model
3 participants