How to account for the interface between two different phases in a discretized diffusion model?
I have tried to set up a model for the diffusion of a gas into a liquid. The two media are next to each other and the geometry is spherical because the system should simulate the diffusion out of a gas bubble. I have made a diffusion model for the gas phase (the left compartment) and a corresponding diffusion model for the liquid phase (the right compartment). 232
The two diffusion models are as follows:
$\frac{\partial c_{left}}{\partial t} = D_{left} \cdot \frac{1}{r^2} \frac{\partial}{\partial r} \left(r^2 \frac{\partial c_{left}}{\partial r} \right)$
$\frac{\partial c_{right}}{\partial t} = D_{right} \cdot \frac{1}{r^2} \frac{\partial}{\partial r} \left(r^2 \frac{\partial c_{right}}{\partial r} \right)$
Then I have discretized the volume. So the PDEs are turned into ODEs of the form: $\frac{dc_{i,left}}{dt} = D \left(\frac{c_{i+1,left} - 2 \cdot c_i + c_{i-1,left}}{\Delta r^2} + \frac{2}{r_{i,left}} \cdot \frac{c_{i+1,left} - c_{i-1,left}}{2 \cdot \Delta r} \right)$
$\frac{dc_{i,right}}{dt} = D \left(\frac{c_{i+1,right} - 2 \cdot c_i + c_{i-1,right}}{\Delta r^2} + \frac{2}{r_{i,right}} \cdot \frac{c_{i+1,right} - c_{i-1,right}}{2 \cdot \Delta r} \right)$
When discretizing I got the following expressions: $\frac{d^2c_i}{dr^2} = \frac{c_{i+1} - 2 \cdot c_i + c_{i-1}}{\Delta r^2}$
$\frac{dc_i}{dr} = \frac{c_{i+1} - c_{i-1}}{2 \cdot \Delta r}$
But how does one incorporate the following two boundary conditions at the gas-liquid-interface?
1) $c_{left,interface} = H \cdot c_{right,interface} $
where H is <PERSON>'s constant.
2) $J_{left,interface} = J_{right,interface}$
Meaning that there is equal flux across the interface between the two compartments
update
The concentration in the last compartment of the gas phase (before the interface) is approximated by linear extrapolation. This means that the concentration just before the interface is given by: $c_{3} = \frac{c2-c1}{r2-r1} \cdot r_3 + c_1 - r_1 \frac{c_2-c_1}{r_2 - r_1}$
In this example it is assumed that only three compartments are present on each side of the interface. 374