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

Soret coefficient as a function of temperature #690

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

KulaginVladimir
Copy link
Collaborator

This PR makes it possible to set the Soret coefficient as a function of temperature, according to #458. Following the discussion, the parameter is renamed to Q and expressed in eV. Most of the changes are made based on #468.

Basic usage:

from FESTIM import Material

my_mat = Material(id=1, D_0=1, E_D=0, Q=lambda T: 2 + 5 * T)
# or
my_mat = Material(id=1, D_0=1, E_D=0, Q=10)

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)

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2ae06c1) 98.95% compared to head (ada717a) 98.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #690      +/-   ##
==========================================
- Coverage   98.95%   98.94%   -0.01%     
==========================================
  Files          58       58              
  Lines        2195     2181      -14     
==========================================
- Hits         2172     2158      -14     
  Misses         23       23              

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

@jhdark
Copy link
Collaborator

jhdark commented Jan 26, 2024

@mougenj Its finally coming!

Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @KulaginVladimir , just a small comment on the docstrings, we could add an example of using a lambda function.

Also, do we have an MMS test for the soret effect? I don't know if we tested it thoroughly or not. Can be done in a separate PR if we don't

festim/materials/material.py Show resolved Hide resolved
@RemDelaporteMathurin RemDelaporteMathurin added the enhancement New feature or request label Jan 26, 2024
@RemDelaporteMathurin RemDelaporteMathurin linked an issue Jan 26, 2024 that may be closed by this pull request
Copy link
Collaborator

@RemDelaporteMathurin RemDelaporteMathurin left a comment

Choose a reason for hiding this comment

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

Thanks @KulaginVladimir 🚀 I'll leave this open to leave others the time to make some comments if needed.

@RemDelaporteMathurin RemDelaporteMathurin merged commit 1e16e37 into festim-dev:main Jan 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Soret coefficient as a callable
3 participants