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

rewrite full conductivity submodel #4563

Closed

Conversation

aabills
Copy link
Contributor

@aabills aabills commented Nov 4, 2024

Description

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 #4324
Enables #4562

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

@aabills aabills marked this pull request as ready for review November 4, 2024 21:29
@aabills
Copy link
Contributor Author

aabills commented Nov 4, 2024

Coverage could be affected here because there are catches for a specific case that this PR eliminates

@valentinsulzer
Copy link
Member

I'm slightly surprised this works without adding boundary conditions for the internal boundaries but is that already being done by another part of the code?

@aabills
Copy link
Contributor Author

aabills commented Nov 4, 2024

Not explicitly. We do check for accuracy somewhere in tests right? I don't want to merge this without confirming that it is correct.

@aabills
Copy link
Contributor Author

aabills commented Nov 4, 2024

oh yeah, there we go, failing integration tests big time

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.27%. Comparing base (19a7738) to head (6a4796f).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4563      +/-   ##
===========================================
- Coverage    99.42%   99.27%   -0.16%     
===========================================
  Files          300      300              
  Lines        22774    22805      +31     
===========================================
- Hits         22643    22639       -4     
- Misses         131      166      +35     

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

@brosaplanella
Copy link
Member

I'm slightly surprised this works without adding boundary conditions for the internal boundaries but is that already being done by another part of the code?

IIRC this is done in the base class, but only for the concatenated variable (the composite_conductivity.py I have been tinkering with didn't have BCs either).

@aabills
Copy link
Contributor Author

aabills commented Nov 7, 2024

IIRC this is done in the base class, but only for the concatenated variable (the composite_conductivity.py I have been tinkering with didn't have BCs either).

It appears that the code automatically sets Neumann internal boundary conditions for concatenated variables which is not always correct (at least in the way its implemented rn) , so that will need to be corrected and I'm guessing will fix this:

def set_internal_boundary_conditions(self, model):

To handle this, I propose that we should have another dictionary, internal_boundary_conditions, which we check during the code above and default to what the code currently does.

@aabills aabills closed this Nov 12, 2024
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]: Half cell negative reaction heating set to 0
3 participants