I am currently attempting to use FEnICS to solve an electrostatic problem with two materials of different permittivity $\varepsilon_1$ and $\varepsilon_2$ forming an interface:
Consider a domain $\Omega_1 \cup \Omega_2 = \Omega $ with $\Gamma_T$, $\Gamma_B$, $\Gamma_R$ and $\Gamma_L$ as the top, bottom, right and left exterior boundaries of a simple rectangular domain and $\Gamma$ as the interface between the two dielectrics, the boundary problem is:
$$ -\nabla^2 \varphi = \frac{\rho+\sigma}{\varepsilon} \\ \varphi = U_0 \ \textrm{on} \ \Gamma_T \\ \varphi = U_1 \ \textrm{on} \ \Gamma_B \\ (\nabla \varphi)\cdot\hat{n} = 0 \ \textrm{on} \ \Gamma_R, \ \Gamma_L $$ and finally, the condition due to the surface charge accumulation at the interface: $$ \hat{n}\cdot(D_1-D_2) = \sigma $$ With $D = \varepsilon E$.
Where $\sigma$ is the surface charge. Particularly, I am struggling with the weak formulation of the final boundary condition, I am able to derive, with $w$ being a test function and the general form of $-\nabla^2\varphi = f$ :$$ \int_{\Omega} \nabla\varphi \cdot\nabla w \ d\Omega - \int_{\partial\Omega}w(\nabla\varphi)\cdot\hat{n} \ ds = \int_{\Omega}fw \ d\Omega $$
As I understand, the second integral on the left shall vanish on Dirichlet boundaries and, of course, where a zero Neumann boundary exists.
However, how can I consider the surface charge condition in the weak form on $\Gamma$?