Repository navigation
Kinetics for the full redox flow cell - #17
Merged
Merged
Conversation
jorgensd
force-pushed
the
stoichimetry
branch
2 times, most recently
from
November 11, 2026 23:19
68e6ba4 to
6864be3
Compare
Two extensions of the Butler–Volmer kinetics in `sumfem.electrochemistry`.
jorgensd
force-pushed
the
stoichimetry
branch
from
November 11, 2026 23:19
6864be3 to
f1c7793
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two extensions of the Butler–Volmer kinetics in
sumfem.electrochemistry, the first part of the full-cell work (B3).Changes
ElectrodeReactiontakesothers: concentrations, each with the moles produced per mole oxidized (negative for one consumed). The reaction's rate enters the residual of each species that has a field.ButlerVolmerandMassTransferButlerVolmertake the same by ion name, asstoichiometry, e.g.{"H": 2, "H2O": -1}.ValueError.PistonVelocityButlerVolmer. Butler–Volmer kinetics limited by diffusion between the fibres, with the mass-transfer coefficient (piston velocity) D/δ of each ion of the couple, where δ is the mean distance between fibres (parameter<name>.fiber_distance). UnlikeMassTransferButlerVolmer, it does not depend on the flow._balanced_surface, used by both mass-transfer-limited kinetics.MassTransferButlerVolmer's results are unchanged.PistonVelocityButlerVolmeris exported fromsumfem.electrochemistryand added to the package docstring and the API page.Tests
test_positive_couple_with_protons_water_and_piston_velocities: the positive vanadium couple, with piston velocities, two protons produced and one water consumed, against the same residual written in plain UFL, on intervals, triangles, quadrilaterals, tetrahedra and hexahedra. Both sides add a mass term for the proton and water fields, which otherwise appear only through the reaction and would leave their Jacobian blocks empty.test_the_stoichiometry_needs_ions_with_fields: a stoichiometry that names the ion given by electroneutrality is rejected.