Q:

How to force potential boundary conditions in the Yee scheme for solving Maxwell's equations?

Assume that we have a 2D electromagnetic field (in the sense that: $E=(E_x,E_y,0)$, $B=(0,0,B_z)$, and all derivatives with respect to $z$ are $0$), and that we are considering a system made up of two walls at $x=-b$ and $x=b$, held at fixed potential $\phi(y)$, with a third wall at $y=0$ also held at a fixed potential $\phi(x)=1$. The current in our system is $\vec{j} \propto B \times E+\sigma E$.
Using the Yee scheme to solve the Maxwell equations for our system how do I force the fixed potential boundary equations at the walls? Is there another scheme more appropriate for these types of problems?

A:

Interesting question. I would expect the Yee scheme to be indifferent to static (bias) fields induced by constant potentials. 
In the electrostatic case, if you have a constant electric potential $\phi$, it induces a field $\vec E = \nabla \phi$. The update equation is (modulo constants) $\frac{d}{dt}\vec B = \nabla \times \vec E$. But since $\vec E$ is a gradient, it lies in the nullspace of curl, so $\frac{d}{dt}\vec B=\nabla \times \nabla \phi= \vec 0$ (that is, $\vec B$ doesn't vary in time). 
The elegance of the Yee scheme (and other schemes drawn from Nedelec/Whitney-type elements) is that all of these identities are upheld faithfully after (spatial) discretization. In the discrete setting, your potential $\mathbf v$ will give rise to a static field $\mathbf e = \mathbf G \mathbf v$, where $\mathbf G$ is the sparse stencil induced by the signed vertex-to-edge adjacency. The (semi)discrete update equation is  $\frac{d}{dt}\mathbf b = \mathbf C \mathbf e$, where C is the edge-to-facet adjacency. By construction, $\mathbf C \mathbf G = \mathbf 0$, so $\mathbf b$ doesn't vary in time, either. Note, incorporating the gauss law $\nabla \cdot \vec B=0$ basically forces trivial/null $\vec B$ as an initial condition, so when you read "$\vec B$ doesn't vary in time", what you should be really thinking is "$\vec B$ starts as zero and stays that way forever".
My point being, an electrostatic (gradient) field is basically ignored by the scheme, as the curl operator / $\mathbf C$-stencil doesn't "sense" or "measure" it. 
All that said, some care is required when you (i) set initial conditions and (ii) incorporate sources, to make sure you do not "source" $\mathbf e$ and $\mathbf b$ in any way that's inconsistent with Maxwell's equations. You should consult literature, people have studied this sort of thing. In particular, that $\vec J$ source term is murky. Most codes I have worked upon use engineering-motivated sources like planewaves and lumped ports. I am not sure how to interpret the role of your volume source .. looks like poynting vector and ohmic conduction? The latter is normally accounted for by directly modifying the $\mathbf e$ updates in a "semi-implicit" fashion, not an explicit source. I don't know what the former term is trying to represent.

