Homogeneous Reaction Parameters
The parameters of homogeneous/bulk reactions can be provided through
echemfem.EchemSolver.homog_params
, a list containing one dictionary for
each reaction. Below is a list of different keys that should appear in each
dictionary
- Key:
"stoichiometry"
- Type:
- Description:
This entry defines the stoichiometry of the reaction. Each key in this dictionary should be the name of a species (as defined in the
"name"
key values ofconc_params
). The corresponding value is the stoichemetry coefficient for the species in this reaction. It should be an integer: negative for a reactant, positive for a product.
- Key:
"forward rate constant"
- Type:
float
or Firedrake expression- Description:
Rate constant for the forward reaction.
- Key:
"backward rate constant"
or"equilibrium constant"
(optional)- Type:
float
or Firedrake expression- Description:
Rate constant for the backward reaction or equilibrium constant of the reaction. For a reversible reaction, only of one these is required. For an irreversible reaction, leave unset.
- Key:
"reference concentration"
(optional)- Type:
float
or Firedrake expression- Description:
Value of 1M in the appropriate units. By setting this, the rate constants are assumed to have the same units (typically 1/s), and the equilibrium constant to be nondimensional.
- Key:
"reaction order"
(optional)- Type:
- Description:
This entry can be used to enforce reaction order. Each key in this dictionary should be the name of a species (as defined in the
"name"
key values ofconc_params
). The corresponding value (positive integer) is reaction order of the species in this reaction. If unset, the absolute value of the stoichiometry coeffcient is the reaction order.
Assuming an arbitrary homogeneous reaction system where the forward and backward rate constants for reaction \(i\) are \(k_i^f\) and \(k_i^b\), respectively, and the stoichiometry coefficient of species \(j\) in reaction \(i\) is \(s_{j,i}\), then, according to the law of mass action, the reaction for species \(j\) is given by
where \(c_n\) is the concentration of species \(n\). If the equilibrium
constant \(K_i\) is provided instead of the backward rate constant, then it
is automatically recovered via \(k_i^b = \dfrac{k_i^f}{K_i}\).
The above formula assumes single-step reactions so that the reaction orders are
given by the stoichiometry coefficients. If that is not the case, the exponents
can be replaced by the "reaction order"
inputs.
Note that here the rate constants can have different units, depending on the number of reactants or products. It is also common to write the reactions in terms of dimensionless “activities” instead of concentrations. Then, the rate constants have the same units (typically 1/s) and the equilibrium constants are dimensionless. With this definition of rate constants, we instead write the reaction for species \(j\) as
where \(a_n = c_n / c_\mathrm{ref}\) is the activity of species \(n\)
and \(c_\mathrm{ref} = 1\text{M}\) is a reference concentration, which
needs to be provided in the correct units to homog_params
.
Here is an example of a reaction system that can be implement via
homog_params
. Simplified CO2 - bicarbonate homogeneous reactions:
Here, we assume the dilute solution case where \(\mathrm{H}_2\mathrm{O}\)
concentration is not tracked. In conc_params
, we will have entries for the
other species in this reactions, with "name"
key values: "CO2"
,
"OH"
, "HCO3"
, and "CO3"
. We get the following homog_params
list:
[{"stoichiometry": {"CO": -1,
"OH": -1,
"HCO3": 1},
"forward rate constant": k1f,
"backward rate constant": k1b
},
{"stoichiometry": {"HCO3": -1,
"OH": -1,
"CO3": 1},
"forward rate constant": k2f,
"backward rate constant": k2b
}]
Now here is another bicarbonate approximation with a high pH approximation, where the reaction system is simplified into a single irreversible reaction:
Since this is not actually a single-step reaction, we need to specify the
reaction order for \(\mathrm{OH}^-\). We can use the following
homog_params
list:
[{"stoichiometry": {"CO2": -1,
"OH": -2,
"CO3": 1},
"reaction order": {"OH": 1},
"forward rate constant": k1f
}]
As an alternative to the homog_params
interface, the reactions can be
written directly and passed as a function in physical_params["bulk
reaction"]
(Physical Parameters). See examples/cylindrical_pore.py
for
the direct implementation of the high pH approximation of the bicarbonate bulk
reactions. See examples/carbonate.py
and
examples/carbonate_homog_params.py
for two equivalent implementations of
the full bicarbonate bulk reactions.