IdealGasPhase getStandardChemPotentials

Open
#841 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #843 by @decaluwe — closed without merging

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Start with IdealGasPhase::getStandardChemPotentials and trace how its pressure-dependent value reaches GasKinetics::updateKc, including m_logStandConc. Compare standard kinetics with exchangecurrentdensity handling for interface reactions. Done means resolving the pressure dependence of reverse rate coefficients for exchange-current-density reactions without breaking the existing standard-kinetics behavior.

Written by the indexing model from the issue text.

Description

System information

  • Cantera version: 2.4
  • OS: all (C++ source code)

Expected behavior
The standard state definition for an ideal gas, typically, is pressure-independent. All pressure dependence in thermodynamic definitions is generally handled in the activity term, where the activity of a species k is equal to pressure*molefraction[k]/standardPressure.

More directly, this should always result in reverse reaction rate coefficients, calculated via k_rev = k_fwd*exp(-deltaG^o/RT)*prod(standardConcentrations^nu_k` being pressure independent (so long as f_fwd is pressure-independent).

Actual behavior (EDITED FROM ORIGINAL POST)

  • For the IdealGasPhase, the standard state is defined as pressure-dependent (cf IdealGasPhase::getStandardChemPotentials, which includes muStar + log(pressure() / refPressure()) * RT();)
  • For reactions where the forward rate k_fwd is supplied and the thermo is used to calculate k_ref (i.e. standard kinetics), this causes no problems. When it comes to calculating the reverse rate, the GasKinetics::updateKc routine includes the term m_rkcn[irxn]*rrt - m_dn[irxn]*m_logStandConc). In short, the logStandardConc term compensates for any pressure dependence in delta G^0.
  • However, for interface reactions where rate_coeff_type = exchangecurrentdensity is used to supply the composition- and pressure-independent part of the exchange current density (let's call it i_o^*), which Cantera converts into a k_fwd and k_rev, we end up with reverse rate coefficients which are pressure dependent. @wbessler first noticed this when comparing charge-transfer reactions using forward and reverse rate constants (k_fwd and k_rev), versus using rate_coeff_type = exchangecurrentdensity. The former gives the expected behavior, whereas the latter does not.

Additional context
See discussions below.

Dominant language
C++
Stars
883
Forks
436
Avg merge
3h 41m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Cantera/cantera

All issues in Cantera/cantera

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.