Electromagnetism

# Making Friends with Electromagnetic Boundary Conditions

1. Introduction

In The Meaning of Maxwell’s Equations we looked at the geometric meaning of Maxwell’s equations:

$\displaystyle \begin{gathered} \nabla\cdot \mathbf{B}=0;\;\nabla\times \mathbf{E}+\frac{\partial \mathbf{B}}{\partial t}=0, \\ \nabla\cdot \mathbf{E}=\frac{\rho}{\epsilon_0};\; \nabla\times \mathbf{B}-\epsilon_0\mu_0\frac{\partial \mathbf{E}}{\partial t}=\mu_0\mathbf{j}. \end{gathered} \ \ \ \ \ (1)$

The key thing to remember was: if you see a divergence draw a three-dimensional volume and use the divergence theorem, while if you see a curl draw a two-dimensional surface and use Stokes’ theorem. We are going to use this to derive the electromagnetic boundary conditions. Hopefully by the end of this they should seem pretty intuitive, and you will be able to quickly guess the boundary conditions just by looking at Maxwell’s equations.

Now things are complicated by the fact that if we are not in a vacuum, the electric and magnetic fields can induce extra charges ${\rho}$ and currents ${j}$ in the surface, which induce new fields, which induce even more charges and currents, and so on. For this reason it is convenient to write some of the equations in terms of ${D}$ and ${H}$, because then only the free’ charges ${\rho_f}$ and currents ${j_f}$, the ones that are put in at the start rather than induced by the fields, show up:

$\displaystyle \begin{gathered} \nabla\cdot \mathbf{B}=0;\;\nabla\times \mathbf{E}+\frac{\partial \mathbf{B}}{\partial t}=0, \\ \nabla\cdot \mathbf{D}=\rho_f;\; \nabla\times \mathbf{H}-\frac{\partial \mathbf{D}}{\partial t}=\mathbf{j}_f. \end{gathered} \ \ \ \ \ (2)$

2. Deriving the boundary conditions

Let’s suppose we have a boundary between two media, and some sort of electromagnetic wave propagates between the two. We want to know how the fields on one side relate to the fields on the other.

We will look at the conditions imposed on the fields by each of Maxwell’s laws.

2.1. Gauss’ Law for the Magnetic Field

For our first candidate we will look at

$\displaystyle \nabla\cdot\mathbf{B}=0. \ \ \ \ \ (3)$

There is a divergence, so that means we want to draw a three-dimensional box on both sides of the boundary, and use the divergence theorem to convert the left hand side to an integral of ${\mathbf{B}\cdot\hat{\mathbf{n}}}$ over the surface.

We have a solid rectangular box. The blue face lies inside the left region, the green face inside the right region, while the black faces cross both regions. Integrating both sides of Gauss’ Law gives that the integral of ${\mathbf{B}\cdot\hat{\mathbf{n}}}$ over all six faces is equal to zero:

$\displaystyle 0=\int_{\mathrm{Blue\;face}}\mathbf{B}_1\cdot\hat{\mathbf{n}} +\int_{\mathrm{Green\;face}}\mathbf{B}_2\cdot\hat{\mathbf{n}}+\int_{\mathrm{Black\;faces}}\mathbf{B}\cdot\hat{\mathbf{n}}. \ \ \ \ \ (4)$

Let’s suppose the blue and green faces have some area ${A}$. Note that the unit normal ${\hat{\mathbf{n}}}$ has opposite sign on each side of the box, so it is pointing against ${\mathbf{B}_1}$ but with ${\mathbf{B}_2}$. On the blue and green faces, taking the dot product with the unit normal selects the components of the magnetic field which are perpendicular to the boundary. We then have:

$\displaystyle 0=-|\mathbf{B}_1^{\perp}|A+|\mathbf{B}_2^{\perp}|A+\int_{\mathrm{Black\;faces}}\mathbf{B}\cdot\hat{\mathbf{n}}. \ \ \ \ \ (5)$

The integral over the black faces is annoying because each face has contributions from both ${B_1}$ and ${B_2}$, so it doesn’t have a nice answer. We can get rid of these parts though by making the box extremely thin. We bring the blue and green face closer together, shrinking the black faces to zero area while keeping the areas of the blue and green faces at ${A}$. With this we will have

$\displaystyle 0=-|\mathbf{B}_1^{\perp}|A+|\mathbf{B}_2^{\perp}|A. \ \ \ \ \ (6)$

Dividing through by area then gives

$\displaystyle |\mathbf{B}_1^{\perp}|=|\mathbf{B}_2^{\perp}|. \ \ \ \ \ (7)$

In other words, the perpendicular component of the magnetic field is unchanged across the boundary. Since the perpendicular component of the magnetic field is ${\mathbf{B}\cdot\hat{\mathbf{n}}}$, another way of writing this boundary condition is

$\displaystyle \hat{\mathbf{n}}\cdot\left(\mathbf{B}_2-\mathbf{B}_1\right)=0 \ \ \ \ \ (8)$

2.2. Gauss’ Law for the Electric Field

Now we will analyse

$\displaystyle \nabla\cdot\mathbf{D}=\rho_f. \ \ \ \ \ (9)$

The analysis for the left hand side is identical to what we had for the magnetic field, and we end up with

$\displaystyle -|\mathbf{D}_1^{\perp}|A+|\mathbf{D}_2^{\perp}|A. \ \ \ \ \ (10)$

On the right hand side however the volume integral of ${\rho_f}$ over the box will be equal to the enclosed free charge. Let’s assume there is a charge density ${\sigma_f}$ per unit area on the boundary, then the right hand side will be ${\sigma_f A}$, and we will have

$\displaystyle -|\mathbf{D}_1^{\perp}|A+|\mathbf{D}_2^{\perp}|A=\sigma_f A, \ \ \ \ \ (11)$

or

$\displaystyle -|\mathbf{D}_1^{\perp}|+|\mathbf{D}_2^{\perp}|=\sigma_f. \ \ \ \ \ (12)$

As before we may re-write this as

$\displaystyle \hat{\mathbf{n}}\cdot\left(\mathbf{D}_2-\mathbf{D}_1\right)=\sigma_f. \ \ \ \ \ (13)$

Let’s consider a special case. Suppose there is no free charge on the boundary (${\sigma_f=0}$), and we are in linear media, so ${\mathbf{D}_1=\epsilon_1\mathbf{E}_2}$ and ${\mathbf{D}_2=\epsilon_2\mathbf{E}_2}$. In this case the boundary condition becomes:

$\displaystyle \hat{\mathbf{n}}\cdot\left(\epsilon_2\mathbf{E}_2-\epsilon_1\mathbf{E}_1\right)=0, \ \ \ \ \ (14)$

and we see that the normal component of the electric field is discontinuous across the boundary. The intuition for this is that the electric fields induce a bound charge density on the boundary, which causes the normal component of the electric fields to be discontinuous.

We’re done with the divergences, so let’s move onto the simpler one of the curl equations:

$\displaystyle \nabla\times \mathbf{E}=-\frac{\partial \mathbf{B}}{\partial t}. \ \ \ \ \ (15)$

Since we have a curl, this time we will draw a two-dimensional surface and then use Stokes’ theorem.

Now the blue line lies inside the left material, the green line inside the right material, and the black lines cross the boundary and lie in both materials. We integrate both sides of Faraday’s law over this surface. For the left hand side Stokes’ theorem converts the integral of the curl over this surface to the line integral around the boundary:

$\displaystyle \int_{\mathrm{Blue\;line}}\mathbf{E}_1\cdot d\mathbf{l} +\int_{\mathrm{Green\;line}}\mathbf{E}_2\cdot d\mathbf{l}+ \int_{\mathrm{Black\;lines}}\mathbf{E}\cdot d\mathbf{l}. \ \ \ \ \ (16)$

Suppose the blue and green lines have length ${l}$, then the line integrals over these become the parallel component of ${\mathbf{E}}$ multiplied by ${l}$, with again a sign difference because the line integral is pointing down on the blue side and up on the green side (as it goes anticlockwise around the rectangle)

$\displaystyle =|\mathbf{E}_1^{\parallel}|l-|\mathbf{E}_2^{\parallel}|l+ \int_{\mathrm{Black\;lines}}\mathbf{E}\cdot d\mathbf{l}. \ \ \ \ \ (17)$

Again the integrals over the black line are annoying, as each line crosses between the two regions. But again the cure is the same, to move the blue and green lines closer together (keeping them at length ${l}$), squeezing the rectangle thinner and thinner until the lengths of the black lines go to zero. In this case the integral over the black lines vanishes and we have

$\displaystyle =|\mathbf{E}_1^{\parallel}|l-|\mathbf{E}_2^{\parallel}|l \ \ \ \ \ (18)$

For the right hand side we want to integrate ${-\partial_t\mathbf{B}}$ over the face of the rectangle. However we just squeezed the rectangle infinitely thin, so we will be integrating this over zero area, which will give us zero. The net result is

$\displaystyle |\mathbf{E}_1^{\parallel}|l-|\mathbf{E}_2^{\parallel}|l=0, \ \ \ \ \ (19)$

and then dividing by ${l}$ we find that the parallel component of the electric field is continuous across the boundary. Since the parallel component is the part perpendicular to the normal vector, we can also write this as

$\displaystyle \hat{\mathbf{n}}\times\left(\mathbf{E}_1-\mathbf{E}_2\right)=0. \ \ \ \ \ (20)$

This one is left as an exercise to the reader! Begin with

$\displaystyle \nabla\times \mathbf{H}=\mathbf{j}+\frac{\partial\mathbf{D}}{\partial t}, \ \ \ \ \ (21)$

and show that you end up with

$\displaystyle \hat{\mathbf{n}}\times\left(\mathbf{H}_2-\mathbf{H}_1\right)=\mathbf{j}_s \ \ \ \ \ (22)$

where ${\mathbf{j}_s}$ is the surface current density. If there is no free current and we are in a linear material (${\mathbf{B}=\mu\mathbf{H}}$), this becomes

$\displaystyle \hat{\mathbf{n}}\times\left(\frac{1}{\mu_2}\mathbf{B}_2-\frac{1}{\mu_1}\mathbf{B}_1\right)=0. \ \ \ \ \ (23)$

3. Conclusion

There you have it! Once you understand the general principle, you can read off the boundary conditions very quickly by just looking at Maxwell’s laws:

$\displaystyle \begin{gathered} \nabla\cdot \mathbf{B}=0;\;\nabla\times \mathbf{E}+\frac{\partial \mathbf{B}}{\partial t}=0, \\ \nabla\cdot \mathbf{E}=\frac{\rho}{\epsilon_0};\; \nabla\times \mathbf{B}-\epsilon_0\mu_0\frac{\partial \mathbf{E}}{\partial t}=\mu_0\mathbf{j}, \end{gathered} \ \ \ \ \ (24)$

The divergence laws will tell you about the perpendicular components, while the curl laws tell you about the parallel. The homogenous (source-free) laws give you continuity (the same fields on either side), while the inhomogeneous laws lead to discontinuity (factors of ${\mu}$ and ${\epsilon}$ on either side). After a bit of thinking you should be able to jump straight to

$\displaystyle \begin{gathered} \hat{\mathbf{n}}\cdot\left(\mathbf{B}_2-\mathbf{B}_1\right)=0;\; \hat{\mathbf{n}}\times\left(\mathbf{E}_1-\mathbf{E}_2\right)=0, \\ \hat{\mathbf{n}}\cdot\left(\mathbf{D}_2-\mathbf{D}_1\right)=\sigma_f;\;\hat{\mathbf{n}}\times\left(\mathbf{H}_2-\mathbf{H}_1\right)=\mathbf{j}_s. \end{gathered} \ \ \ \ \ (25)$

4. References

[1] The LaTeX was written using the excellent tool LaTeX to WordPress:

LaTeX to WordPress

Electromagnetism

# The Meaning of Maxwell’s Equations

1. Introduction

Let’s take a look at Maxwell’s equations (in differential form):

$\displaystyle \begin{gathered} \nabla\cdot \mathbf{B}=0;\;\nabla\times \mathbf{E}+\frac{\partial \mathbf{B}}{\partial t}=0, \\ \nabla\cdot \mathbf{E}=\frac{\rho}{\epsilon_0};\; \nabla\times \mathbf{B}-\epsilon_0\mu_0\frac{\partial \mathbf{E}}{\partial t}=\mu_0j. \end{gathered} \ \ \ \ \ (1)$

Let’s try and understand what these mean geometrically, and how you can go about using them.

2. Some Vector Calculus

Firstly we need some vector calculus. Let’s start off with some vector field ${\mathbf{A}=(A_x,A_y,A_z)}$. The divergence of ${\mathbf{A}}$ is given by

$\displaystyle \nabla\cdot\mathbf{A}=\partial_xA_x+\partial_yA_y+\partial_zA_z. \ \ \ \ \ (2)$

What does the divergence mean intuitively? Imagine placing a tiny sphere at some point ${\mathbf{p}=(x_0,y_0,z_0)}$, and letting the surface of the sphere be pushed and pulled by the vector field ${\mathbf{A}}$. Depending on the vector field the surface of the sphere will be distorted, and its volume will change. The rate of change of volume is given by the divergence of ${\mathbf{A}}$ at ${\mathbf{p}}$. If the divergence is positive, that means the volume of the sphere will increase. If the divergence is negative, then the volume of the sphere will decrease. If the divergence is zero then the shape of the sphere may be distorted, but in such a way that the volume remains constant.

The divergence is related to the divergence theorem. Let ${V}$ be some solid volume, ${\partial V}$ its surface, and ${\hat{\mathbf{n}}}$ the normal vector. For if ${V}$ were the solid ball of radius ${1}$, then ${\partial V}$ would be the surface of that ball, namely the sphere of radius ${1}$, and ${\hat{\mathbf{n}}}$ the unit normal vector on the sphere. The divergence theorem relates the integral of the divergence of ${\mathbf{A}}$ over ${V}$, with the integral of ${\mathbf{A}\cdot\hat{\mathbf{n}}}$ over the surface of ${V}$:

$\displaystyle \int_V\nabla\cdot\mathbf{A}\,dV=\int_{\partial V}\mathbf{A}\cdot \hat{\mathbf{n}}\,dS. \ \ \ \ \ (3)$

Imagine an incompressible fluid in three dimensions, being pushed around by ${\mathbf{A}}$. If the divergence is positive at a point then fluid is being created and pushed outwards. If the divergence is negative then the fluid is being sucked away, while if the divergence is zero then the vector field is pushing the fluid around, without creating or destroying it. The left hand side of Eq. 3 is the sum over the entire volume ${V}$ of how much fluid is being created or sucked up. Now let’s look at the right hand side. The dot product ${\mathbf{A}\cdot\hat{\mathbf{n}}}$ asks how much fluid is being pushed through the boundary; if the dot product is positive then fluid is being pushed out of the surface, if the dot product is negative then fluid is being pushed into the surface, while if the dot product is zero then fluid is circulating around the surface, without going inwards or outwards.

In other words the divergence theorem says that the sum of all the fluid being created or sucked up at each point in the entire volume ${V}$ is equal to the net amount of fluid that gets pushed into or out of the surface.

Next we have the curl:

\displaystyle \begin{aligned} \nabla\times\mathbf{A} &= (\partial_x,\partial_y,\partial_z)\times(A_x,A_y,A_z), \\ &=\left(\partial_yA_z-\partial_zA_y,\partial_zA_x-\partial_xA_z,\partial_xA_y-\partial_yA_x\right). \end{aligned} \ \ \ \ \ (4)

To interpret the curl, imagine placing a tiny sphere at some point ${\mathbf{p}}$, but fix it in place so that it cannot move. Let’s suppose this sphere is rigid, so that it’s surface cannot be stretched. You can imagine ${\mathbf{A}}$ at each point on the surface of the sphere giving it a little push or pull. If we let all these pushes and pulls add up, the sphere will start to rotate. The magnitude of the curl tells you how fast the sphere will rotate due to its surface being pushed by ${\mathbf{A}}$, and the direction of the curl tells you the axis the sphere will rotate around.

The curl is related to Stokes’ theorem. Let ${\Sigma}$ be a two-dimensional solid region with normal vector ${\hat{\mathbf{n}}}$, and ${\partial\Sigma}$ the one-dimensional boundary of ${\Sigma}$. Stokes’ theorem relates the integral of the curl over ${\Sigma}$ to the line integral of ${\mathbf{A}}$ around the boundary:

$\displaystyle \int_{\Sigma}\nabla\times\mathbf{A}\cdot\hat{\mathbf{n}}\,dS=\int_{\partial\Sigma}\mathbf{A}\cdot d\mathbf{l}. \ \ \ \ \ (5)$

The left hand side gives the integral over ${\Sigma}$ of the circulation of the vector field in the plane of ${\Sigma}$. The right hand side gives the net circulation of ${\mathbf{A}}$ around the boundary.

Stokes’ theorem says that the sum of circulation of fluid at every point of a two-dimensional surface is equal to the net circulation around the boundary of the surface.

3. The Meaning of Maxwell’s Equations

Armed with our knowledge of vector calculus, let’s take another look at Maxwell’s equations. We’ll begin with the divergence of the magnetic field:

$\displaystyle \nabla\cdot\mathbf{B}=0. \ \ \ \ \ (6)$

This equation says that there are no sources’ or sinks’ of the magnetic field lines. The magnetic field is neither created nor destroyed, it just flows from one place to another. If you draw a solid region, there is just as much magnetic field coming into the region as coming out. Things are slightly different for the electric field however:

$\displaystyle \nabla\cdot\mathbf{E}=\frac{\rho}{\epsilon_0}. \ \ \ \ \ (7)$

If there is no charge in a region of space, then electric field lines are also neither created nor destroyed. If you have positive charge however this acts as a source of electric field lines, and a region enclosing positive charge will on the whole have electric field being produced’ inside and flowing outwards from the surface. Negative charge on the other hand acts as a sink, `sucking in’ the electric field. If you consider a region enclosing negative charge, the electric field will flow inwards through the boundary.

The moral of the story is every time you see a divergence ${\nabla\cdot\mathbf{A}}$ in Maxwell’s equations, imagine drawing a three-dimensional volume and use the divergence theorem to convert this to an integral of ${\mathbf{A}\cdot\hat{\mathbf{n}}}$ over the surface.

Similarly every time you see a curl ${\nabla\times\mathbf{A}}$ in Maxwell’s equations, draw a two-dimensional surface and use Stokes’ theorem to convert this to an integral of ${\mathbf{A}\cdot d\mathbf{l}}$ around the boundary.

Let’s see this with Faraday’s law:

$\displaystyle \nabla\times \mathbf{E}=-\frac{\partial\mathbf{B}}{\partial t}. \ \ \ \ \ (8)$

Integrate both sides of this over a two-dimensional surface. The right hand side will be the rate of change of the flux of ${\mathbf{B}}$ through the surface. If the flux is changing, this will induce an electric field circulating around the boundary of this surface. The case is similar for

$\displaystyle \nabla\times\mathbf{B}=\mu_0j+\epsilon_0\mu_0\frac{\partial\mathbf{E}}{\partial t}, \ \ \ \ \ (9)$

only now we find that a current also induces a circulating magnetic field around the boundary.

4. References

[1] The LaTeX was written using the excellent tool LaTeX to WordPress:

LaTeX to WordPress