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

Fix SurfaceFlux with Soret #831

Merged
merged 7 commits into from
Jul 30, 2024
Merged

Fix SurfaceFlux with Soret #831

merged 7 commits into from
Jul 30, 2024

Conversation

RemDelaporteMathurin
Copy link
Collaborator

Proposed changes

This is a fix for #830.

The compute method of SurfaceFlux had a soret argument defaulting to False. However, this was not integrated correctly with the rest of the implementation.

What I did is I removed this argument and replaced it by an attribute of SurfaceFlux. This attribute is set to True or False during Simulation.initialise. Also, the T attribute of SurfaceFlux is set at the same time in order to calculate the soret flux.

This bug did not affect any of the actual solving step and the equations were correctly solved with Soret. This is only a post-processing bug with SurfaceFlux (the other derived quantities are unaffected).

Note: I propagated this fix to the cylindrical and spherical versions of SurfaceFlux.

Types of changes

What types of changes does your code introduce to FESTIM?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code refactoring
  • Documentation Update (if none of the other choices apply)
  • New tests

Checklist

  • Black formatted
  • Unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@RemDelaporteMathurin RemDelaporteMathurin added the bug Something isn't working label Jul 30, 2024
@RemDelaporteMathurin RemDelaporteMathurin linked an issue Jul 30, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.55%. Comparing base (40cdd22) to head (fb360de).
Report is 80 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #831   +/-   ##
=======================================
  Coverage   99.55%   99.55%           
=======================================
  Files          61       61           
  Lines        2718     2724    +6     
=======================================
+ Hits         2706     2712    +6     
  Misses         12       12           

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

Copy link
Collaborator

@KulaginVladimir KulaginVladimir left a comment

Choose a reason for hiding this comment

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

The fix seems ok.

I have a couple of questions below.

festim/generic_simulation.py Outdated Show resolved Hide resolved
test/system/test_misc.py Show resolved Hide resolved
test/system/test_misc.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@KulaginVladimir KulaginVladimir left a comment

Choose a reason for hiding this comment

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

I suppose everything is ok.

@RemDelaporteMathurin RemDelaporteMathurin merged commit 31864c8 into main Jul 30, 2024
8 checks passed
@RemDelaporteMathurin RemDelaporteMathurin deleted the fix-soret branch July 30, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] SurfaceFlux doesn't account for Soret effect
2 participants