Support RMS diffusion/mass-transfer interfaces (`ConstantReservoirDiffusion`, `FickDiffusionInternalInterface`) in `liquidSurfaceReactor`

Abierto
#3,035 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 9 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start with ConstantTLiquidSurfaceReactor.generate_reactor, then trace how selectobjects and getkeyselectioninds handle domains and interfaces; inspect EdgeAnalysis.jl and Domain.jl for existing RMS diffusion handling. The issue proposes constant-reservoir and finite-bulk modes, with core and edge reactors both supporting the added domain and interface. Done means both modes work and are documented in input.rst with an electrocatalysis example.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Note: This issue was drafted by Claude (Anthropic's AI assistant, via Claude Code), based on its diagnosis of the run described below, and posted at Richard West's request.

Context

Torrie Asifor's CO2RR-on-Cu(111) run (liquidSurfaceReactor, RMS backend, echem branch of RMS) slowed to ~4.4 h per iteration after 3 days. 67 of its 69 edge simulations ended with CVODE "corrector convergence test failed repeatedly or with |h| = hmin", most at t ≈ 1e-11 s with h ≈ 1e-19 s. Each failure takes RMS's "resurrect" branch, which adds the edge species with the largest rate, so the model was being grown by solver crashes, not by flux criteria (and the RMG log never says so).

ConstantTLiquidSurfaceReactor.generate_reactor builds the liquid phase with IdealDiluteSolution(..., diffusionlimited=True). That only limits liquid-phase bimolecular reactions. When the mechanism has no liquid-phase reactions, as in typical electrocatalysis models where everything happens at the interface, it does nothing. Interface reactions such as proton + adsorbate or adsorption have no transport limit at all.

For example, at pH 7 (1e-4 mol/m³ H⁺, D ≈ 9e-9 m²/s, film thickness about 100 µm) mass transfer caps the proton supply at about 10⁻⁸ mol/m²/s. That's about 3×10⁻⁴ turnovers per site per second, orders of magnitude below the kinetic rates RMS now uses.

RMS already has the pieces:

  • ConstantReservoirDiffusion(domain, conddict, A, layer_thickness) on echem/for_rmg (ReactionMechanismGenerator/ReactionMechanismSimulator.jl@a814423e): couples a domain to a constant-composition bulk through a film.
  • FickDiffusionInternalInterface, RMS PR 279, open and not yet reviewed: Fickian transfer between two finite domains, so the bulk can deplete or accumulate.

Proposal:

  1. New liquidSurfaceReactor keywords, e.g. diffusionLayerThickness=(100,'um'), plus either bulkConcentrations={...} (constant reservoir) or a bulk liquidVolume (finite bulk, using PR 279).
  2. In generate_reactor, split the liquid into a near-surface domain and the bulk, add the diffusion interface, and build both the core and edge reactors the same way.
  3. Make sure selectobjects / getkeyselectioninds handle the extra domain and non-reactive interface, and that edge species get diffusivities. EdgeAnalysis.jl only special-cases the reactive interfaces now; Domain.jl handles ConstantReservoirDiffusion.
  4. Document it in input.rst, with an electrocatalysis example.

Related: for buffered electrolytes, constantSpecies=["proton"] is the cheap alternative. Without either, a 1 m³ reactor at pH 7 holds 10⁻⁴ mol H⁺ against about 0.3 mol of sites, and the protons run out almost at once.

See also: #3034 (linear solver) and ReactionMechanismGenerator/ReactionMechanismSimulator.jl#280 (rate caps), which came out of the same diagnosis.

🤖 Generated with Claude Code

Lenguaje dominante
Python
Estrellas
541
Forks
265
Merge medio
8 h 49 min
PR fusionados (30 d)
1

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ReactionMechanismGenerator/RMG-Py

Todos los issues de ReactionMechanismGenerator/RMG-Py

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.