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

Surface Quantities: Surface Flux #629

Merged
merged 72 commits into from
Nov 6, 2023

Conversation

jhdark
Copy link
Collaborator

@jhdark jhdark commented Nov 2, 2023

Proposed changes

With this change users will now be able to export the surface flux at a given surface subdomain at each time step using:

my_species = F.Species("A")
my_subdomain = F.SurfaceSubdomain1D(id=1, x=1)

my_export = F.SurfaceFlux(
        filename="surface_flux.csv",
        field=my_species,
        surface_subdomain=my_subdomain,
    )

With this implementation, the filename is optional, however, the export data will still be accessible after the simulation. Additionally, the time of the simulation is also saved at each iteration:

simulation_times = my_export .t
flux_values = my_export .data

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)

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

test/test_surface_quantity.py Outdated Show resolved Hide resolved
test/test_surface_quantity.py Outdated Show resolved Hide resolved
test/test_surface_quantity.py Outdated Show resolved Hide resolved
@RemDelaporteMathurin RemDelaporteMathurin mentioned this pull request Nov 3, 2023
12 tasks
jhdark and others added 4 commits November 4, 2023 10:43
Co-authored-by: Rémi Delaporte-Mathurin <40028739+RemDelaporteMathurin@users.noreply.github.com>
@jhdark jhdark marked this pull request as ready for review November 5, 2023 16:29
festim/exports/surface_flux.py Outdated Show resolved Hide resolved
festim/exports/surface_flux.py Outdated Show resolved Hide resolved
festim/exports/surface_flux.py Outdated Show resolved Hide resolved
festim/exports/surface_flux.py Outdated Show resolved Hide resolved
festim/exports/surface_flux.py Show resolved Hide resolved
test/test_h_transport_problem.py Outdated Show resolved Hide resolved
test/test_h_transport_problem.py Outdated Show resolved Hide resolved
test/test_h_transport_problem.py Outdated Show resolved Hide resolved
test/test_h_transport_problem.py Outdated Show resolved Hide resolved
test/test_h_transport_problem.py Outdated Show resolved Hide resolved
jhdark and others added 4 commits November 5, 2023 15:38
Co-authored-by: Rémi Delaporte-Mathurin <40028739+RemDelaporteMathurin@users.noreply.github.com>
@jhdark jhdark merged commit b0c2666 into festim-dev:fenicsx Nov 6, 2023
7 checks passed
@jhdark jhdark deleted the surface_flux_export branch November 14, 2023 18:18
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.

2 participants