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

SurfaceKinetics BC #791

Merged

Conversation

KulaginVladimir
Copy link
Collaborator

@KulaginVladimir KulaginVladimir commented Jul 1, 2024

Proposed changes

This PR represents the initial attempt on implementing Surface Kinetics feature as a new boundary condition in FESTIM and is aimed at starting the discussion. Additionally, a specific DerivedQuantity is introduced to export the surface concentration of H.

To-do list:

  • Tests
  • Docs (API, UG, Theory)
  • Error message when the SurfaceKinetics BC is set with other BCs on the same surface
  • Error message when the SurfaceKinetics BC is used not in 1D simulations
  • Error message when the AdsorbedHydrogen is called without setting SurfaceKinetics on this surface (@RemDelaporteMathurin, is this needed?)

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 Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.55%. Comparing base (b56a3dc) to head (86ed906).
Report is 145 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #791      +/-   ##
==========================================
+ Coverage   99.53%   99.55%   +0.02%     
==========================================
  Files          59       61       +2     
  Lines        2582     2705     +123     
==========================================
+ Hits         2570     2693     +123     
  Misses         12       12              

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

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.

Hi @KulaginVladimir thanks so much for this! I think a lot of people will use this new functionality! (ping @ehodille )
Here's a first round of comments on my side

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.

Another round of comments

@KulaginVladimir
Copy link
Collaborator Author

KulaginVladimir commented Jul 3, 2024

I noticed that SurfaceKinetics breaks the right content menu in API, so the subsection Flux doesn't open

image

@RemDelaporteMathurin
Copy link
Collaborator

I noticed that SurfaceKinetics breaks the right content menu in API, so the subsection Flux doesn't open

Right this doesn't occur on main. This is a wild guess but could it be because of the warning block? Does this appear when you compile locally?

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.

A few more comments

@RemDelaporteMathurin RemDelaporteMathurin marked this pull request as ready for review July 4, 2024 07:20
@RemDelaporteMathurin RemDelaporteMathurin added the enhancement New feature or request label Jul 4, 2024
@RemDelaporteMathurin RemDelaporteMathurin added this to the v1.3 milestone Jul 4, 2024
@RemDelaporteMathurin RemDelaporteMathurin mentioned this pull request Jul 4, 2024
6 tasks
@RemDelaporteMathurin
Copy link
Collaborator

@KulaginVladimir this is very good thank you so much for this AWESOME contribution! This opens up so many possibilities with FESTIM! 🚀

Would you mind attaching to this PR an example script for us to play with, like the Ti validation case or maybe the model from @ehodille ?

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 @KulaginVladimir ! We can either add a Theory section in this PR or do it in another one. Either is fine with me.

@KulaginVladimir
Copy link
Collaborator Author

@RemDelaporteMathurin, I can attach both scripts as there are some differences. Or I can make a separate repository with these cases.

We can either add a Theory section in this PR or do it in another one. Either is fine with me.

I'd like to add theory and UG in a separate PR to avoid possible conflicts. Is it OK?

@RemDelaporteMathurin
Copy link
Collaborator

I can attach both scripts as there are some differences. Or I can make a separate repository with these cases.

Whatever's easiest for you.

I'd like to add theory and UG in a separate PR to avoid possible conflicts. Is it OK?

No problem!

@KulaginVladimir
Copy link
Collaborator Author

This repository (https://github.com/KulaginVladimir/FESTIM-SurfaceKinetics-Validation) includes all cases that I attempted to reproduce with this surface model.

@RemDelaporteMathurin
Copy link
Collaborator

image

I managed to reproduce the figures! This is a slick implementation!

@RemDelaporteMathurin RemDelaporteMathurin merged commit dd40851 into festim-dev:main Jul 4, 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.

2 participants