Hover over the menu bar to pick a physics animation.
Here we have a rectangular slab of variable dielectric constant, `epsilon`, inside a rectangle with `epsilon=1` and the potential at the top of the top is +/-1 separated by a gap. This arrangement is often used for integrated optics chips where an electric field near the surface of a substrate is needed to modify the phase of a wave in a waveguide near the surface. When the charge density is zero, the differential equation for the potential, `V`, is a modified version of the Laplace equation `grad*(epsilongradV)=0`. In order to efficiently solve for V(x,y) using finite difference methods we need to have a good estimate of V(y) for the internal nodes. If you set the number of iterations to zero you can see the estimate being used here. If the dielectric constant is the same everywhere, then one can also use complex function mapping to plot the potential `V(x,y)` and that is an option available here. For the finite difference method that I used to refine the guess, I very strongly recommend : Finite Difference Method. Since we need the divergence of `epsilongrad(V)` and epsilon has x and y variation we have to take the first differentials of epsilon and V in addition to the second differential of V: i.e.
`d/dx(epsilon(dV)/dx)=epsilon(d2V)/dx^2+(depsilon)/dx(dV)/dx`
and similarly for the y differential. The electric field, -`grad(V)`, is inversely proportional the the spacing between the potential contours. It is important to notice the way the dielectric slab greatly excludes the electric field. This is similar to the way a superconductor excludes an external magnetic field which is called the Meissner Effect.