This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Implementation of flux jump condition and coupling two submeshes

+2 votes

I have a problem with a model of two perfect electrical conductors $\Omega_1$ and $\Omega_2$ and separated by a thin film of dielectric material on $\partial \Omega_{12}$. This has been historically been modeled as a linear potential drop across this thin film, but this requires having a separate subdomain for either conductor and an interface condition
$$
\sigma_1 \nabla u_1 - \sigma_2 \nabla u_2 = \frac{\epsilon}{d} \frac{\partial (u_1 - u_2)}{\partial t}
$$
on $\partial \Omega_{12}$, where $d$ is the thickness of the material and $\epsilon$ is its permittivity. The issue I'm running into is how to define two separate submeshes in each of the conductive domains, then couple them using the interface condition on $\partial \Omega_{12}$. My question boils down to this: how can I define this condition so that I can update it during my time-stepping routine? Currently at each step in my time-stepping routine, I have something like the following, but it does not actually seem to be coupling the two domains.

begin("Computing U1 at t=%s"%t)
b1 = assemble(L1 + (sigma12*Um)*v_1*ds_1(1))
solve(A1, U1.vector(), b1)
end()

begin("Computing U2 at t= %s"%t)
b2 = assemble(L2 + (sigma12*Um)*v_2*ds_2(3))
[bc.apply(A2, b2) for bc in bcs]
solve(A2, U2.vector(), b2)
end()

# Save to file
Um = (U1-U2)
u1 << U1
u2 << U2
t += dt

Any comments and suggestions are appreciated! Thanks!

asked Feb 26, 2017 by treblebrewing FEniCS Novice (760 points)
edited Feb 26, 2017 by treblebrewing
...