Skip to content

Kinetics for the full redox flow cell - #17

Merged
jorgensd merged 1 commit into
mainfrom
stoichimetry
Nov 12, 2026
Merged

jorgensd merged 1 commit into
mainfrom
stoichimetry

Conversation

@jorgensd

Copy link
Copy Markdown
Member

Two extensions of the Butler–Volmer kinetics in sumfem.electrochemistry, the first part of the full-cell work (B3).

Changes

  • Other species of a reaction. A reaction can now produce or consume species besides its redox couple, e.g. VO²⁺ + H₂O ⇌ VO₂⁺ + 2H⁺ + e⁻, which produces two protons and consumes one water molecule.
    • ElectrodeReaction takes others: 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.
    • ButlerVolmer and MassTransferButlerVolmer take the same by ion name, as stoichiometry, e.g. {"H": 2, "H2O": -1}.
    • An ion that follows from electroneutrality has no field to produce or consume, so naming one raises a 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). Unlike MassTransferButlerVolmer, it does not depend on the flow.
  • Shared surface balance. The surface concentrations at which mass transfer balances the reaction are computed by one private function, _balanced_surface, used by both mass-transfer-limited kinetics. MassTransferButlerVolmer's results are unchanged.
  • Docs. PistonVelocityButlerVolmer is exported from sumfem.electrochemistry and 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.

@jorgensd
jorgensd added this pull request to stack #16 November 11, 2026 23:01
@jorgensd
jorgensd force-pushed the stoichimetry branch 2 times, most recently from 68e6ba4 to 6864be3 Compare November 11, 2026 23:19
Base automatically changed from dokken/improved-timestepping to main November 11, 2026 23:19
Two extensions of the Butler–Volmer kinetics in `sumfem.electrochemistry`.
@jorgensd
jorgensd merged commit 95893ec into main Nov 12, 2026
3 checks passed
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.

1 participant