# Interface conditions for electromagnetic fields

Interface conditions describe the behaviour of electromagnetic fields; electric field, electric displacement field, and the magnetic field at the interface of two materials. The differential forms of these equations require that there is always an open neighbourhood around the point to which they are applied, otherwise the vector fields and H are not differentiable. In other words, the medium must be continuous[no need to be continuous][This paragraph need to be revised, the wrong concept of "continuous" need to be corrected]. On the interface of two different media with different values for electrical permittivity and magnetic permeability, that condition does not apply.
However, the interface conditions for the electromagnetic field vectors can be derived from the integral forms of Maxwell's equations.

## Interface conditions for electric field vectors
### Electric field strength

    $\mathbf {n} _{12}\times (\mathbf {E} _{2}-\mathbf {E} _{1})=\mathbf {0}$
where:
$\mathbf {n} _{12}$ is normal vector from medium 1 to medium 2.
Therefore, the tangential component of E is continuous across the interface.
    Outline of proof from Faraday's law We begin with the integral form of Faraday's law: $\oint _{\partial \Sigma }\mathbf {E} \cdot d{\boldsymbol {\ell }}=-\int _{\Sigma }{\frac {\partial \mathbf {B} }{\partial t}}\cdot d\mathbf {A}$ Choose $\Sigma$ as a small square across the interface. Then, have the sides perpendicular to the interface shrink to infinitesimal length. The area of integration now looks like a line, which has zero area. In other words: $\lim _{linelength\to 0}\mathbf {A} =0$ Since $\partial \mathbf {B} /\partial t$ remains finite in this limit, the whole right hand side goes to zero. All that is left is: $\oint _{\partial \Sigma }\mathbf {E} \cdot d{\boldsymbol {\ell }}=0$ Two of our sides are infinitesimally small, leaving only $\int _{medium1}\mathbf {E} \cdot d{\boldsymbol {\ell }}+\int _{medium2}\mathbf {E} \cdot d{\boldsymbol {\ell }}=0$ Assuming we made our square small enough that E is roughly constant, its magnitude can be pulled out of the integral. As the remaining sides to our original loop, the $d{\boldsymbol {\ell }}$ in each region run in opposite directions, so we define one of them as the tangent unit vector ${\boldsymbol {t}}$ and the other as $-{\boldsymbol {t}}$ $(\mathbf {E} _{2}\cdot {\boldsymbol {t}})l-(\mathbf {E} _{1}\cdot {\boldsymbol {t}})l=\mathbf {0}$ After dividing by l, and rearranging, $(\mathbf {E} _{2}-\mathbf {E} _{1})\cdot {\boldsymbol {t}}=\mathbf {0}$ This argument works for any tangential direction. The difference in electric field dotted into any tangential vector is zero, meaning only the components of $\mathbf {E}$ parallel to the normal vector can change between mediums. Thus, the difference in electric field vector is parallel to the normal vector. Two parallel vectors always have a cross product of zero. $\mathbf {n} _{12}\times (\mathbf {E} _{2}-\mathbf {E} _{1})=\mathbf {0}$

### Electric displacement field

    $(\mathbf {D} _{2}-\mathbf {D} _{1})\cdot \mathbf {n} _{12}=\sigma _{s}$
$\mathbf {n} _{12}$ is the unit normal vector from medium 1 to medium 2. $\sigma _{s}$ is the surface charge density between the media (unbounded charges only, not coming from polarization of the materials).
This can be deduced by using Gauss's law and similar reasoning as above.
Therefore, the normal component of D has a step of surface charge on the interface surface. If there is no surface charge on the interface, the normal component of D is continuous.

## Interface conditions for magnetic field vectors
### For magnetic flux density

    $(\mathbf {B} _{2}-\mathbf {B} _{1})\cdot \mathbf {n} _{12}=0$
where:
$\mathbf {n} _{12}$ is normal vector from medium 1 to medium 2.
Therefore, the normal component of B is continuous across the interface (the same in both media). (The tangential components are in the ratio of the permeabilities.)

### For magnetic field strength

    $\mathbf {n} _{12}\times (\mathbf {H} _{2}-\mathbf {H} _{1})=\mathbf {j} _{s}$
where:
$\mathbf {n} _{12}$ is the unit normal vector from medium 1 to medium 2. $\mathbf {j} _{s}$ is the surface current density between the two media (unbounded current only, not coming from polarisation of the materials).
Therefore, the tangential component of H is discontinuous across the interface by an amount equal to the magnitude of the surface current density. The normal components of H in the two media are in the ratio of the permeabilities.

## Discussion according to the media beside the interface
### If medium 1 & 2 are perfect dielectrics

There are no charges nor surface currents at the interface, and so the tangential component of H and the normal component of D are both continuous.

### If medium 1 is a perfect dielectric and medium 2 is a perfect metal

There are charges and surface currents at the interface, and so the tangential component of H and the normal component of D are not continuous.

## Boundary conditions

The boundary conditions must not be confused with the interface conditions. For numerical calculations, the space where the calculation of the electromagnetic field is achieved must be restricted to some boundaries. This is done by assuming conditions at the boundaries which are physically correct and numerically solvable in finite time. In some cases, the boundary conditions resume to a simple interface condition. The most usual and simple example is a fully reflecting (electric wall) boundary - the outer medium is considered as a perfect conductor. In some cases, it is more complicated: for example, the reflection-less (i.e. open) boundaries are simulated as perfectly matched layer or magnetic wall that do not resume to a single interface.