Allow different types of species and reaction at surface
We would need to support surface reactions of the type:
A + B <-> C + D
Where both sides of the reaction can have gaseous or adsorbed species.
For example
T (ad) + H2O (g) <-> H (ad) + HTO (g)
import festim as F
T = F.Species("T")
H2O = F.GasSpecies("H2O", pressure=lambda t: 1e5 + t)
HTO = F.GasSpecies("HTO", dynamically_computed=True)
H = F.Species("H")
my_reaction = F.SurfaceReactionBC(
reactant=[H2O, T],
product=[HTO, H],
k_r0=1e-6,
E_kr=0.2,
k_d0=1e-6,
E_kd=0.2,
)
Assuming both rates $K$ and units are #/m2/s/(#/m-3)/Pa are equal, the fluxes are:
$$ J_T = K c_H P_{HTO} - K c_T P_{H2O} $$
$$ J_H = K c_T P_{H2O} - K c_H P_{HTO} $$
The flag dynamically_computed could be a way to simulate enclosures as in the Depleting Source case where the partial pressure of that species is dynamically computed from the flux. Although we would need additional parameters like surface area, volume of the enclosure, etc
Perhaps instead of k_r and k_d we can use k_forward and k_backward (since we impose a "direction" with reactants and products).